/**
 * MadBot - Creator Profile Public Page Styles
 * 
 * @package MadBot
 * @since 1.3.0
 */

/* ==========================================================================
   PAGE LAYOUT
   ========================================================================== */

.creator-page .main-content {
    flex: 1;
    display: flex;
    justify-content: center;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.3) rgba(255,255,255,0.08);
}

.creator-page .main-content::-webkit-scrollbar {
    width: 6px;
}

.creator-page .main-content::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.08);
}

.creator-page .main-content::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
}

.light-mode.creator-page .main-content {
    scrollbar-color: rgba(0,0,0,0.25) rgba(0,0,0,0.05);
}

.light-mode.creator-page .main-content::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
}

.light-mode.creator-page .main-content::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.25);
}

/* ==========================================================================
   PAGE CONTAINER
   ========================================================================== */

.creator-profile-page {
    width: 100%;
    max-width: 900px;
    padding: 40px 24px 40px 24px;
}

.creator-profile-page::after {
    content: '';
    display: block;
    height: 200px;
}

/* ==========================================================================
   PROFILE HEADER
   ========================================================================== */

.creator-header {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 32px;
}

.creator-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-secondary);
    border: 4px solid var(--primary);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.creator-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.creator-avatar .avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: 700;
    color: var(--primary);
    background: var(--bg-tertiary);
}

.creator-info {
    flex: 1;
    min-width: 0;
}

.creator-name {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    line-height: 1.2;
}

.creator-username {
    font-size: 16px;
    color: var(--text-muted);
    margin: 0 0 16px 0;
}

.creator-bio {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 12px 0;
    max-width: 600px;
}

.creator-website {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    transition: opacity 0.2s;
}

.creator-website:hover {
    opacity: 0.8;
    text-decoration: underline;
}


/* ==========================================================================
   STATS SECTION
   ========================================================================== */

.creator-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.creator-stats .stat-item {
    flex: 1;
    min-width: 100px;
    text-align: center;
    padding: 12px;
}

.creator-stats .stat-value {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.creator-stats .stat-value svg {
    color: #f59e0b;
}

.creator-stats .stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   SOCIAL LINKS
   ========================================================================== */

.creator-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #FAFAFA;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

.social-link svg {
    color: #9CA3AF;
    transition: color 0.2s;
}

.social-link:hover svg {
    color: var(--primary);
}

.social-link-static {
    cursor: default;
}

.social-link-static:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #FAFAFA;
}

.social-link-static:hover svg {
    color: #9CA3AF;
}

/* ==========================================================================
   CONTENT SECTIONS
   ========================================================================== */

.creator-section {
    margin-bottom: 40px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.section-title svg {
    color: var(--primary);
}

.section-count {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 12px;
    margin-left: auto;
}


/* ==========================================================================
   CHARACTERS GRID - Aligned with Explore page design
   ========================================================================== */

.creator-profile-page .characters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.creator-profile-page .character-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit; /* Prevent default link colors (blue/purple) */
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

/* Light mode border */
.light-mode .creator-profile-page .character-card {
    border-color: rgba(0,0,0,0.1);
}

.creator-profile-page .character-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(255,255,255,0.1);
    border-color: var(--primary);
}

/* Light mode shadow */
.light-mode .creator-profile-page .character-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.creator-profile-page .character-card .card-avatar {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background: var(--bg-tertiary);
    overflow: hidden;
}

.creator-profile-page .character-card .card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.creator-profile-page .character-card .card-avatar .avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    font-size: 48px;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
}

/* Badges - Icon only style like Explore page */
.creator-profile-page .character-card .badge {
    position: absolute;
    top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    font-size: 12px;
}

.creator-profile-page .character-card .premium-badge {
    left: 8px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.creator-profile-page .character-card .nsfw-badge {
    right: 8px;
    background: #dc2626;
    color: white;
}

.creator-profile-page .character-card .nsfw-badge svg {
    width: 16px;
    height: 16px;
}

.creator-profile-page .character-card .card-info {
    padding: 12px;
}

.creator-profile-page .character-card .card-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.creator-profile-page .character-card .card-tagline {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0 0 8px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 33px;
}

.creator-profile-page .character-card .card-meta {
    display: flex;
    gap: 12px;
}

.creator-profile-page .character-card .meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-muted);
}

.creator-profile-page .character-card .meta-item svg {
    width: 12px;
    height: 12px;
}

.creator-profile-page .character-card .meta-item.rating svg {
    color: #f59e0b;
}

/* ==========================================================================
   GAMES GRID - Aligned with Explore page design
   ========================================================================== */

.creator-profile-page .games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.creator-profile-page .game-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-secondary);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

/* Light mode border */
.light-mode .creator-profile-page .game-card {
    border-color: rgba(0,0,0,0.1);
}

.creator-profile-page .game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(255,255,255,0.1);
    border-color: var(--primary);
}

/* Light mode shadow */
.light-mode .creator-profile-page .game-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.creator-profile-page .game-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.creator-profile-page .game-card:hover .game-icon {
    transform: scale(1.05);
}

.creator-profile-page .game-info {
    flex: 1;
    min-width: 0;
}

.creator-profile-page .game-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.creator-profile-page .game-description {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* ==========================================================================
   EMPTY STATE
   ========================================================================== */

.creator-profile-page .empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.creator-profile-page .empty-icon {
    color: var(--text-muted);
    opacity: 0.5;
    margin-bottom: 16px;
}

.creator-profile-page .empty-state h3 {
    font-size: 18px;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.creator-profile-page .empty-state p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {
    .creator-profile-page {
        padding: 24px 16px 24px 16px;
    }
    
    .creator-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .creator-avatar {
        width: 100px;
        height: 100px;
    }
    
    .creator-name {
        font-size: 24px;
    }
    
    .creator-bio {
        max-width: 100%;
    }
    
    .creator-stats {
        padding: 16px;
    }
    
    .creator-stats .stat-item {
        min-width: 80px;
        padding: 8px;
    }
    
    .creator-stats .stat-value {
        font-size: 20px;
    }
    
    .creator-socials {
        justify-content: center;
    }
    
    .creator-profile-page .characters-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }
    
    .creator-profile-page .games-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .creator-stats {
        flex-direction: column;
        gap: 0;
    }
    
    .creator-stats .stat-item {
        padding: 12px;
        border-bottom: 1px solid var(--border-color);
    }
    
    .creator-stats .stat-item:last-child {
        border-bottom: none;
    }
    
    .creator-profile-page .characters-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .character-card .card-info {
        padding: 10px;
    }
    
    .character-card .card-name {
        font-size: 13px;
    }
    
    .character-card .card-tagline {
        display: none;
    }
}

/* ==========================================================================
   LIGHT MODE
   ========================================================================== */

.light-mode .creator-avatar {
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.2);
}

.light-mode .character-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.light-mode .creator-stats {
    background: #f8fafc;
}

.light-mode .character-card,
.light-mode .game-card {
    background: #ffffff;
}

.light-mode .social-link {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #1e293b;
}

.light-mode .social-link svg {
    color: #64748b;
}

.light-mode .social-link:hover {
    background: #f1f5f9;
    border-color: var(--primary);
    color: var(--primary);
}

.light-mode .social-link:hover svg {
    color: var(--primary);
}

.light-mode .social-link-static:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #1e293b;
}

.light-mode .social-link-static:hover svg {
    color: #64748b;
}

.light-mode .game-icon {
    background: #f1f5f9;
}

.light-mode .creator-profile-page .empty-state {
    background: #f8fafc;
}
