/**
 * Creator Profile Modal Styles
 * Action Item 2.8: Creator Profile Modal
 */

/* ========== Modal Container ========== */
.creator-profile-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.creator-profile-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.creator-profile-modal__content {
    position: relative;
    width: 90%;
    max-width: 660px;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ========== Close Button ========== */
.creator-profile-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.creator-profile-modal__close:hover {
    background: rgba(0, 0, 0, 0.5);
}

/* ========== Header with Background ========== */
.creator-profile-modal__header {
    height: 140px;
    background-size: cover;
    background-position: center;
    background-color: #2a2a2a;
}

/* ========== Main Section (Avatar + Actions) ========== */
.creator-profile-modal__main {
    position: relative;
    height: 60px;
    margin-top: -60px;
}

/* Left Action Buttons */
.creator-profile-modal__actions-left {
    position: absolute;
    left: calc(50% - 100px);
    top: -12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.creator-profile-modal__action-btn {
    width: 32px;
    height: 32px;
    background: #2a2a2a;
    border: none;
    border-radius: 50%;
    color: #888;
    cursor: not-allowed;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.creator-profile-modal__action-btn:disabled {
    opacity: 0.5;
}

/* Avatar - 가로 센터 */
.creator-profile-modal__avatar-wrapper {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: -20px;
}

.creator-profile-modal__avatar {
    width: 120px;
    height: 120px;
    border-radius: 16px;
    border: 4px solid #1a1a1a;
    object-fit: cover;
    background: #2a2a2a;
}

/* Right Follow Button */
.creator-profile-modal__actions-right {
    position: absolute;
    right: 24px;
    top: 80px;
}

.creator-profile-modal__follow-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    border: none;
    border-radius: 24px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: not-allowed;
    transition: all 0.2s;
}

.creator-profile-modal__follow-btn:disabled {
    opacity: 0.5;
    background: #444;
}

/* ========== Profile Info ========== */
.creator-profile-modal__info {
    padding: 54px 40px 0;
    text-align: center;
}

.creator-profile-modal__name {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px;
}

.creator-profile-modal__badge-placeholder {
    height: 24px;
    margin-bottom: 8px;
}

.creator-profile-modal__description {
    font-size: 14px;
    color: #aaa;
    margin: 0 0 0 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========== Stats and Games Section ========== */
.creator-profile-modal__stats-games {
    display: flex;
    padding: 24px;
    gap: 24px;
    margin-top: 20px;
}

/* Stats (Left) */
.creator-profile-modal__stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 140px;
    margin-top: 20px;
}

.creator-profile-modal__stat {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.creator-profile-modal__stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.creator-profile-modal__stat-label {
    font-size: 16px;
    color: #888;
}

/* Games (Right) */
.creator-profile-modal__games {
    flex: 1;
    margin-left: 140px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.creator-profile-modal__games-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 12px;
}

.creator-profile-modal__games-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.creator-profile-modal__games-list {
    display: flex;
    flex: 1;
}

.creator-profile-modal__game-thumb {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    background: #333;
    cursor: pointer;
    transition: transform 0.2s;
    margin-left: -12px;
    position: relative;
    border: 2px solid #000;
}

.creator-profile-modal__game-thumb:first-child {
    margin-left: 0;
}

.creator-profile-modal__game-thumb:nth-child(1) { z-index: 3; }
.creator-profile-modal__game-thumb:nth-child(2) { z-index: 2; }
.creator-profile-modal__game-thumb:nth-child(3) { z-index: 1; }

.creator-profile-modal__game-thumb:hover {
    transform: scale(1.05);
    z-index: 10;
}

.creator-profile-modal__game-more {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-left: -12px;
    position: relative;
    z-index: 0;
    border: 2px solid #000;
}

.creator-profile-modal__game-more:hover {
    background: #444;
}

.creator-profile-modal__studio-btn {
    padding: 12px 20px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.creator-profile-modal__studio-btn:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

/* ========== 2.6 Badges (Bottom) ========== */
.creator-profile-modal__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px 24px 24px;
}

.creator-profile-modal__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    /* Auto-width based on text length */
    white-space: nowrap;
}

/* Badge color variants */
.creator-profile-modal__badge--best_creator {
    background: rgba(255, 215, 0, 0.15);
    color: #ffd700;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.creator-profile-modal__badge--100_plays {
    background: rgba(255, 107, 53, 0.15);
    color: #ff6b35;
    border: 1px solid rgba(255, 107, 53, 0.3);
}

.creator-profile-modal__badge--community_star {
    background: rgba(96, 165, 250, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(96, 165, 250, 0.3);
}

.creator-profile-modal__badge--rising_star {
    background: rgba(52, 211, 153, 0.15);
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.3);
}

.creator-profile-modal__badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

/* Inactive/Unearned badge style */
.creator-profile-modal__badge--inactive {
    opacity: 0.35;
    filter: grayscale(100%);
    background: rgba(100, 100, 100, 0.1) !important;
    color: #666 !important;
    border: 1px solid rgba(100, 100, 100, 0.2) !important;
}

/* Game placeholder when no games */
.creator-profile-modal__game-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    font-size: 24px;
    font-weight: bold;
}

/* ========== Responsive ========== */
@media (max-width: 600px) {
    .creator-profile-modal__content {
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
    }

    .creator-profile-modal__main {
        flex-direction: column;
        align-items: center;
        margin-top: -50px;
    }

    .creator-profile-modal__actions-left {
        flex-direction: row;
        padding-top: 0;
        order: 2;
        margin-top: 12px;
    }

    .creator-profile-modal__avatar-wrapper {
        order: 1;
    }

    .creator-profile-modal__actions-right {
        padding-top: 12px;
        order: 3;
    }

    .creator-profile-modal__stats-games {
        flex-direction: column;
    }

    .creator-profile-modal__stats {
        flex-direction: row;
        justify-content: center;
        gap: 24px;
    }

    .creator-profile-modal__stat {
        flex-direction: column;
        align-items: center;
        gap: 2px;
    }
}
