/* ============================================
   PRO PROFILE — Gaming Showcase Design
   ============================================ */

/* === PRO Profile Templates === */

/* Template: PRO (default, current purple/cosmic) */
.pro-page--pro {
    --template-primary: #8B5CF6;
    --template-primary-rgb: 139, 92, 246;
    --template-glow: #A78BFA;
    --template-badge-bg: #8B5CF6;
    --template-badge-text: #fff;
    --template-accent: #C4B5FD;
}

/* Template: LEGEND (gold/amber, prestigious) */
.pro-page--legend {
    --template-primary: #F59E0B;
    --template-primary-rgb: 245, 158, 11;
    --template-glow: #FBBF24;
    --template-badge-bg: #F59E0B;
    --template-badge-text: #000;
    --template-accent: #FDE68A;
}

/* Template: STREAMER (neon green/teal) */
.pro-page--streamer {
    --template-primary: #10B981;
    --template-primary-rgb: 16, 185, 129;
    --template-glow: #34D399;
    --template-badge-bg: #10B981;
    --template-badge-text: #fff;
    --template-accent: #6EE7B7;
}

/* Template: SEMI-PRO (cyan/teal) */
.pro-page--semi-pro {
    --template-primary: #06B6D4;
    --template-primary-rgb: 6, 182, 212;
    --template-glow: #22D3EE;
    --template-badge-bg: #06B6D4;
    --template-badge-text: #fff;
    --template-accent: #67E8F9;
}

/* === Template-specific overrides === */

/* Legend: prestigious, formal — slower, grander */
.pro-page--legend .pro-name {
    animation-duration: 6s;
    font-size: clamp(2.8rem, 9vw, 5.5rem);
}
.pro-page--legend .pro-badge {
    box-shadow: 0 0 12px rgba(var(--template-primary-rgb), 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(var(--template-primary-rgb), 0.5);
}
.pro-page--legend .ambient-fog--1 { animation-duration: 35s; }
.pro-page--legend .ambient-fog--2 { animation-duration: 24s; }
.pro-page--legend .ambient-dust  { animation-duration: 20s; }

/* 2. Zone A — Left sidebar */
.legend-sidebar {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 5rem 1.5rem 1.5rem; /* top accounts for fixed header */
    background: rgba(10, 10, 30, 0.92);
    border-right: 1px solid rgba(var(--template-primary-rgb), 0.18);
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    z-index: 2;
}
@supports (backdrop-filter: blur(12px)) {
    .legend-sidebar {
        background: rgba(10, 10, 30, 0.82);
        -webkit-backdrop-filter: blur(12px);
        backdrop-filter: blur(12px);
    }
}

/* 3. Sidebar avatar */
.legend-sidebar-avatar {
    width: 140px;
    height: 140px;
    border-radius: 1rem;
    object-fit: cover;
    border: 2px solid rgba(var(--template-primary-rgb), 0.5);
    box-shadow:
        0 0 0 4px rgba(var(--template-primary-rgb), 0.12),
        0 0 30px rgba(var(--template-primary-rgb), 0.25),
        0 4px 20px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
    margin-bottom: 1rem;
}

.pro-page--legend .legend-sidebar-avatar--placeholder {
    background: rgba(var(--template-primary-rgb), 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 4. Sidebar name */
.legend-sidebar-name {
    font-family: 'Righteous', system-ui, sans-serif;
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: #fff;
    text-shadow:
        0 0 8px rgba(var(--template-primary-rgb), 0.5),
        0 1px 4px rgba(0, 0, 0, 0.8);
    margin: 0 0 0.75rem;
    line-height: 1.3;
    word-break: break-word;
}

/* 5. Sidebar info rows (Team, Role, Country, Age) */
.legend-sidebar-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1rem;
    font-size: 12px;
}

.legend-sidebar-info-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.4rem;
    line-height: 1.4;
}

.legend-sidebar-info-label {
    color: rgba(var(--template-primary-rgb), 0.75);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    flex-shrink: 0;
}

.legend-sidebar-info-value {
    color: #d1d5db;
    font-size: 12px;
    word-break: break-word;
}

/* 6. Sidebar socials */
.legend-sidebar-socials {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

/* 7. Sidebar footer — pushed to bottom */
.legend-sidebar-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(var(--template-primary-rgb), 0.12);
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    font-size: 11px;
    color: #6b7280;
}

.legend-sidebar-footer a,
.legend-sidebar-footer button {
    color: #9ca3af;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 11px;
    padding: 0;
    transition: color 0.2s ease;
    text-decoration: none;
}

.legend-sidebar-footer a:hover,
.legend-sidebar-footer button:hover {
    color: rgba(var(--template-primary-rgb), 1);
}

/* 8. Zone B — Main content area */
.legend-main {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 3rem;
    padding-top: 5rem; /* account for fixed header */
    position: relative;
    z-index: 2;
    overflow: hidden;
}

/* Zone B dark gradient overlay for text readability */
.legend-main::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.15) 0%,
        rgba(0, 0, 0, 0.4) 40%,
        rgba(0, 0, 0, 0.75) 70%,
        rgba(2, 6, 23, 0.92) 100%
    );
    z-index: -1;
    pointer-events: none;
}

/* 9. Hero label ("TOP HERO", "LEGEND", etc.) */
.legend-hero-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(var(--template-primary-rgb), 0.85);
    margin-bottom: 0.4rem;
    text-shadow: 0 0 12px rgba(var(--template-primary-rgb), 0.4);
}

/* 10. Main display name */
.legend-main-name {
    font-family: 'Righteous', system-ui, sans-serif;
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 400;
    letter-spacing: 0.04em;
    color: #fff;
    text-shadow:
        0 0 10px rgba(var(--template-primary-rgb), 0.7),
        0 0 30px rgba(var(--template-primary-rgb), 0.4),
        0 0 60px rgba(var(--template-primary-rgb), 0.2),
        0 2px 20px rgba(0, 0, 0, 0.8);
    margin: 0 0 0.25rem;
    line-height: 1.1;
    animation: neonBreathe 6s ease-in-out infinite;
}

/* 11. Main tagline */
.legend-main-tagline {
    font-size: 0.95rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.55);
    margin: 0 0 1.25rem;
    max-width: 480px;
    line-height: 1.5;
}

/* 12. Inline About section */
.legend-about {
    margin-bottom: 1.5rem;
    max-width: 520px;
}

.legend-about-heading {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(var(--template-primary-rgb), 0.7);
    margin-bottom: 0.35rem;
}

.legend-about-text {
    font-size: 13px;
    color: #9ca3af;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.legend-about-text.expanded {
    -webkit-line-clamp: unset;
    display: block;
}

.legend-about-read-more {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: rgba(var(--template-primary-rgb), 0.8);
    padding: 0.2rem 0;
    margin-top: 0.25rem;
    transition: color 0.2s ease;
    display: inline-block;
}

.legend-about-read-more:hover {
    color: rgba(var(--template-primary-rgb), 1);
}

/* 13. Stats row (View Count + Member Since) */
.legend-stats {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.legend-stat {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.legend-stat-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(var(--template-primary-rgb), 0.65);
}

.legend-stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: #e5e7eb;
    letter-spacing: 0.02em;
}

/* 14. Actions bar (Comments button + other CTAs) */
.legend-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(var(--template-primary-rgb), 0.12);
    flex-wrap: wrap;
}

/* ===== LEGEND: Mobile Responsive (max 767px) ===== */

@media (max-width: 767px) {
    /* Zone A: horizontal strip on top */
    .legend-sidebar {
        grid-column: 1;
        grid-row: 1;
        flex-direction: row;
        align-items: center;
        text-align: left;
        padding: 1rem 1.25rem;
        border-right: none;
        border-bottom: 1px solid rgba(var(--template-primary-rgb), 0.18);
        gap: 1rem;
        overflow-y: visible;
        overflow-x: auto;
    }

    /* Smaller avatar on mobile strip */
    .legend-sidebar-avatar {
        width: 64px;
        height: 64px;
        flex-shrink: 0;
        margin-bottom: 0;
        border-radius: 0.6rem;
    }

    /* Name inline */
    .legend-sidebar-name {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }

    /* Info rows go horizontal on mobile */
    .legend-sidebar-info {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.3rem 0.75rem;
        margin-bottom: 0.25rem;
    }

    .legend-sidebar-info-row {
        justify-content: flex-start;
    }

    /* Socials inline */
    .legend-sidebar-socials {
        justify-content: flex-start;
        margin-bottom: 0;
    }

    /* Footer hidden on mobile (space-constrained strip) */
    .legend-sidebar-footer {
        display: none;
    }

    /* Zone B: main below the strip */
    .legend-main {
        grid-column: 1;
        grid-row: 2;
        padding: 1.5rem 1.25rem 2rem;
        justify-content: flex-start;
    }

    /* Smaller name on mobile */
    .legend-main-name {
        font-size: clamp(2rem, 10vw, 3rem);
    }

    .legend-stats {
        gap: 1.25rem;
        margin-bottom: 1rem;
    }

}

/* ===== LEGEND: Large Screens (min 1280px) ===== */

@media (min-width: 1280px) {
    /* More room in main area */
    .legend-main {
        padding: 4rem 4rem 3.5rem;
    }

    /* Slightly larger avatar */
    .legend-sidebar-avatar {
        width: 160px;
        height: 160px;
    }

    /* More sidebar padding */
    .legend-sidebar {
        padding: 3rem 2rem 2rem;
    }
}

/* Streamer: energetic, lively — faster, punchier */
.pro-page--streamer .pro-name {
    animation-duration: 3s;
}
.pro-page--streamer .pro-badge {
    animation: badgePulse 2s ease-in-out infinite;
}
@keyframes badgePulse {
    0%, 100% { box-shadow: 0 0 6px rgba(var(--template-primary-rgb), 0.3); }
    50%      { box-shadow: 0 0 16px rgba(var(--template-primary-rgb), 0.6); }
}
.pro-page--streamer .ambient-fog--1 { animation-duration: 18s; }
.pro-page--streamer .ambient-fog--2 { animation-duration: 12s; }
.pro-page--streamer .ambient-dust  { animation-duration: 10s; }
.pro-page--streamer .flex.flex-wrap.gap-2[role="list"] { gap: 0.75rem; }

/* PRO Profile — Full-page container (one-pager, no scroll) */
.pro-page {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1;
    /* Gradual fade: transparent hero transitions to solid dark at bottom of viewport */
    background: linear-gradient(to bottom, transparent 50vh, var(--pro-bg, #050514) 100vh);
}

/* PRO Profile — Fixed background image */
.pro-page::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: radial-gradient(ellipse at 30% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 60%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
                linear-gradient(to bottom, #0a0a1e, #050514);
    background-size: cover;
    background-position: center;
    z-index: -1;
}

/* PRO pages: dark background covers footer bleed from fixed hero */
body.pro-body > main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

body.pro-body > footer {
    position: relative;
    background: var(--pro-bg, #050514);
    flex-shrink: 0;
}

.pro-claim-panel {
    bottom: 1rem;
}

@media (min-width: 768px) {
    .pro-claim-panel {
        bottom: calc(1rem + 4rem);
    }
}

/* Desktop: hero fills viewport, never scrolls */
@media (min-width: 768px) {
    body.pro-body {
        height: 100vh;
        overflow: hidden;
    }
}

/* PRO Profile — Glass panel (flash messages, overlays) */
body.pro-body .glass-panel {
    background: rgba(10, 10, 30, 0.92);
    border: 1px solid rgba(var(--template-primary-rgb), 0.15);
    border-radius: 0.75rem;
    padding: 1.5rem;
}
@supports (backdrop-filter: blur(12px)) {
    body.pro-body .glass-panel {
        background: rgba(10, 10, 30, 0.85);
        backdrop-filter: blur(12px);
    }
}

/* ---- Hero Zone ---- */
body.pro-body .hero-zone {
    position: relative;
    flex: none;
    min-height: 100vh;
    display: flex;
    align-items: flex-end;
    padding: 0 2rem 2rem;
    overflow: hidden;
}

/* Bottom gradient (child div, replaces ::after) */
body.pro-body .hero-gradient {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 80%;
    background: linear-gradient(transparent 0%, rgba(5, 5, 20, 0.5) 35%, rgba(5, 5, 20, 0.85) 65%, var(--pro-bg, #050514) 100%);
    pointer-events: none;
    z-index: 0;
}

/* ---- Ambient Animations ---- */

/* Shared base for fog layers */
body.pro-body .ambient-fog,
body.pro-body .ambient-light,
body.pro-body .ambient-dust {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* Fog Layer 1: large, low, slow drift L→R — tinted to match template */
body.pro-body .ambient-fog--1 {
    top: auto;
    bottom: 0;
    height: 60%;
    background: radial-gradient(ellipse at center, rgba(var(--template-primary-rgb), 0.18) 0%, rgba(var(--template-primary-rgb), 0.06) 50%, transparent 75%);
    background-size: 160% 100%;
    animation: fogDrift 28s ease-in-out infinite alternate;
}

/* Fog Layer 2: thinner wisp, mid-height, faster drift R→L */
body.pro-body .ambient-fog--2 {
    top: 15%;
    height: 45%;
    background: radial-gradient(ellipse at center, rgba(var(--template-primary-rgb), 0.14) 0%, rgba(var(--template-primary-rgb), 0.05) 50%, transparent 70%);
    background-size: 150% 100%;
    animation: fogDrift 19s ease-in-out infinite alternate-reverse;
}

@keyframes fogDrift {
    from { transform: translateX(-25%); }
    to   { transform: translateX(25%); }
}

/* Light Beam Pulse: top-center spotlight breathing */
body.pro-body .ambient-light {
    top: 0;
    left: 15%;
    width: 70%;
    height: 70%;
    background: radial-gradient(ellipse at top center, rgba(255, 255, 255, 0.25) 0%, rgba(var(--template-primary-rgb), 0.08) 40%, transparent 70%);
    mix-blend-mode: screen;
    animation: lightPulse 6s ease-in-out infinite;
}

@keyframes lightPulse {
    0%, 100% { opacity: 0.3; }
    50%      { opacity: 1; }
}

/* Floating Dust Particles (CSS-only, box-shadow dots) */
body.pro-body .ambient-dust {
    top: auto;
    bottom: 20%;
    left: 8%;
    width: 3px; height: 3px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    box-shadow:
        0    0   0 2px rgba(255, 255, 255, 0.8),
        90px  -30px 0 1.5px rgba(var(--template-primary-rgb), 0.9),
        220px -50px 0 2px rgba(255, 255, 255, 0.7),
        340px -15px 0 1.5px rgba(var(--template-primary-rgb), 0.85),
        470px -45px 0 2px rgba(255, 255, 255, 0.75),
        580px -70px 0 1.5px rgba(var(--template-primary-rgb), 0.8),
        140px -60px 0 2px rgba(255, 255, 255, 0.65),
        400px -80px 0 1.5px rgba(var(--template-primary-rgb), 0.7);
    animation: dustFloat 14s linear infinite;
}

@keyframes dustFloat {
    from {
        transform: translateY(0) translateX(0);
        opacity: 1;
    }
    to {
        transform: translateY(-25vh) translateX(20px);
        opacity: 0;
    }
}

/* Neon Name Glow Breathe */
@keyframes neonBreathe {
    0%, 100% {
        text-shadow:
            0 0 7px rgba(var(--template-primary-rgb), 0.4),
            0 0 20px rgba(var(--template-primary-rgb), 0.2),
            0 0 40px rgba(var(--template-primary-rgb), 0.1),
            0 2px 20px rgba(0, 0, 0, 0.8);
    }
    50% {
        text-shadow:
            0 0 20px rgba(var(--template-primary-rgb), 1),
            0 0 40px rgba(var(--template-primary-rgb), 0.8),
            0 0 80px rgba(var(--template-primary-rgb), 0.5),
            0 0 120px rgba(var(--template-primary-rgb), 0.3),
            0 0 200px rgba(var(--template-primary-rgb), 0.15),
            0 2px 20px rgba(0, 0, 0, 0.8);
    }
}

/* Accessibility: respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    body.pro-body .ambient-fog,
    body.pro-body .ambient-light,
    body.pro-body .ambient-dust { display: none; }
    body.pro-body .pro-name,
    body.pro-body .pro-badge,
    body.pro-body .legend-main-name,
    body.pro-body .glow-pulse,
    body.pro-body .bg-stars::before,
    body.pro-body .bg-stars::after { animation: none !important; }
}

/* Mobile: disable dust + light for performance */
@media (max-width: 767px) {
    body.pro-body .ambient-dust,
    body.pro-body .ambient-light { display: none; }
}

/* ---- Hero Text Cluster ---- */
body.pro-body .hero-text-cluster {
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 20px rgba(0,0,0,0.8), 0 0 40px rgba(0,0,0,0.5);
    padding: 2rem 0;
    text-align: left;
    max-width: 600px;
}

/* ---- Display Name: Neon Glow ---- */
body.pro-body .pro-name {
    font-family: 'Righteous', system-ui, sans-serif;
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 400;
    letter-spacing: 0.04em;
    color: #fff;
    text-shadow:
        0 0 10px rgba(var(--template-primary-rgb), 0.7),
        0 0 30px rgba(var(--template-primary-rgb), 0.4),
        0 0 60px rgba(var(--template-primary-rgb), 0.2),
        0 2px 20px rgba(0, 0, 0, 0.8);
    margin: 0 0 0.25rem;
    line-height: 1.1;
    animation: neonBreathe 4s ease-in-out infinite;
}

/* ---- Player Cutout ---- */
body.pro-body .player-cutout {
    position: absolute;
    right: 5%;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
body.pro-body .player-cutout form,
body.pro-body .player-cutout label,
body.pro-body .player-cutout button,
body.pro-body .player-cutout div {
    pointer-events: auto;
}

body.pro-body .player-cutout:hover #cutout-edit-btn {
    opacity: 1;
}

body.pro-body .cutout-photo-edit {
    position: absolute;
    left: 50%;
    right: auto;
    bottom: 4rem;
    z-index: 10;
    opacity: 0;
    transform: translateX(-50%);
    transition: opacity 0.3s ease;
}
body.pro-body .cutout-photo-edit button {
    white-space: nowrap;
}

body.pro-body .player-cutout-glow {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120%;
    height: 60%;
    background: radial-gradient(ellipse at center bottom, rgba(var(--template-primary-rgb), 0.25) 0%, transparent 70%);
    filter: blur(30px);
    pointer-events: none;
}

body.pro-body .player-cutout-img {
    position: relative;
    height: 40vh;
    max-height: 380px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 30px rgba(0, 0, 0, 0.6))
            drop-shadow(0 0 60px rgba(var(--template-primary-rgb), 0.15));
}

/* ---- Social Pills ---- */
body.pro-body .social-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #d1d5db;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    transition: all 0.25s ease;
    backdrop-filter: blur(8px);
}

body.pro-body .social-pill:hover {
    background: var(--pill-color, rgba(139, 92, 246, 0.3));
    border-color: var(--pill-color, rgba(139, 92, 246, 0.5));
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3),
                0 0 20px color-mix(in srgb, var(--pill-color, #8B5CF6) 30%, transparent);
}

body.pro-body .social-pill--static {
    cursor: default;
}

body.pro-body .social-pill--static:hover {
    transform: none;
    box-shadow: none;
    background: var(--pill-color, rgba(139, 92, 246, 0.2));
    border-color: var(--pill-color, rgba(139, 92, 246, 0.3));
    color: #fff;
}

body.pro-body .social-pill img {
    filter: brightness(0) invert(1);
    opacity: 0.8;
    transition: filter 0.25s ease, opacity 0.25s ease;
}

body.pro-body .social-pill:hover img {
    opacity: 1;
}

/* Icon-only pill (PRO profile) — colorful, no text */
body.pro-body .social-pill--icon {
    padding: 8px;
    border-radius: 50%;
    gap: 0;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

body.pro-body .social-pill--icon img {
    filter: none;
    opacity: 1;
}

body.pro-body .social-pill--icon:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 4px 15px rgba(var(--template-primary-rgb), 0.3);
}

/* ---- PRO Badge ---- */
body.pro-body .pro-badge {
    background: var(--template-badge-bg);
    color: var(--template-badge-text);
}

/* ---- Info Strip ---- */
body.pro-body .info-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
    color: #9ca3af;
    font-size: 13px;
    letter-spacing: 0.01em;
}

/* ---- About Pill (button) ---- */
body.pro-body .about-pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #9ca3af;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: all 0.25s ease;
}

body.pro-body .about-pill:hover {
    background: rgba(var(--template-primary-rgb), 0.15);
    border-color: rgba(var(--template-primary-rgb), 0.3);
    color: #e5e7eb;
}

/* ---- About Overlay ---- */
body.pro-body .about-overlay {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: aboutFadeIn 0.25s ease;
}

body.pro-body .about-overlay.hidden {
    display: none;
}

@keyframes aboutFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

body.pro-body .about-panel {
    width: 90%;
    max-width: 600px;
    max-height: 70vh;
    overflow-y: auto;
    background: rgba(10, 10, 30, 0.95);
    border: 1px solid rgba(var(--template-primary-rgb), 0.15);
    border-radius: 1rem;
    padding: 1.5rem;
    animation: aboutScaleIn 0.25s ease;
}
@supports (backdrop-filter: blur(16px)) {
    body.pro-body .about-panel {
        background: rgba(10, 10, 30, 0.88);
        backdrop-filter: blur(16px);
    }
}

@keyframes aboutScaleIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* ---- Comments Overlay (same pattern as About overlay) ---- */
body.pro-body .comments-overlay {
    position: fixed;
    inset: 0;
    z-index: 60;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: aboutFadeIn 0.25s ease;
}
body.pro-body .comments-overlay.hidden {
    display: none;
}
body.pro-body .comments-panel {
    width: 90%;
    max-width: 600px;
    max-height: 75vh;
    display: flex;
    flex-direction: column;
    background: rgba(10, 10, 30, 0.95);
    border: 1px solid rgba(var(--template-primary-rgb), 0.15);
    border-radius: 1rem;
    padding: 1.5rem;
    animation: aboutScaleIn 0.25s ease;
}
@supports (backdrop-filter: blur(16px)) {
    body.pro-body .comments-panel {
        background: rgba(10, 10, 30, 0.88);
        backdrop-filter: blur(16px);
    }
}
body.pro-body .comments-scroll {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

/* .owner-tools replaced by .pro-toolbar */

/* ---- Edit Mode Toggle ---- */
body.pro-body .edit-affordance {
    display: none !important;
}
body.pro-body.pro-editing .edit-affordance {
    display: flex !important;
    animation: editFadeIn 0.2s ease forwards;
}
body.pro-body.pro-editing .edit-affordance--block {
    display: block !important;
    animation: editFadeIn 0.2s ease forwards;
}
body.pro-body.pro-editing .edit-affordance--inline {
    display: inline-flex !important;
    animation: editFadeIn 0.2s ease forwards;
}
body.pro-body.pro-editing .cutout-photo-edit {
    animation: cutoutEditFadeIn 0.2s ease forwards;
}
@keyframes editFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes cutoutEditFadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(4px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Floating toolbar */
body.pro-body .pro-toolbar {
    position: fixed;
    bottom: 4rem;
    right: 1.5rem;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
body.pro-body .pro-toolbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(17, 17, 17, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.2s;
    cursor: pointer;
    text-decoration: none;
}
body.pro-body .pro-toolbar-btn:hover {
    background: rgba(139, 92, 246, 0.3);
    border-color: rgba(139, 92, 246, 0.5);
    color: white;
}
body.pro-body .pro-toolbar-btn--active {
    background: rgba(139, 92, 246, 0.4);
    border-color: rgba(139, 92, 246, 0.6);
    color: white;
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.3);
}
body.pro-body.pro-editing #cutout-edit-btn {
    opacity: 1 !important;
}

/* ---- PRO Profile Responsive ---- */
@media (max-width: 767px) {
    body.pro-body {
        height: auto;
        overflow: auto;
    }

    body.pro-body .hero-zone {
        min-height: 85vh;
        padding: 0 1.25rem 1.5rem;
        flex-direction: column;
        align-items: center;
        justify-content: flex-end;
    }

    body.pro-body .hero-text-cluster {
        text-align: center;
        max-width: 100%;
        padding: 1rem 0;
    }

    body.pro-body .hero-text-cluster .flex.flex-wrap {
        justify-content: center;
    }

    body.pro-body .hero-text-cluster .flex.items-center.gap-2 {
        justify-content: center;
    }

    body.pro-body .hero-text-cluster .flex.items-center.gap-4 {
        justify-content: center;
    }

    body.pro-body .player-cutout {
        position: relative;
        right: auto;
        bottom: auto;
        margin-bottom: -1rem;
    }

    body.pro-body .player-cutout-img {
        height: 28vh;
        max-height: 240px;
    }

    body.pro-body .info-strip {
        justify-content: center;
    }

    body.pro-body .pro-toolbar {
        bottom: 1rem;
        right: 1rem;
    }

    body.pro-body .about-panel {
        max-height: 80vh;
        border-radius: 1rem;
    }
}

@media (min-width: 768px) {
    body.pro-body .hero-zone {
        padding: 0 5% 2rem;
        min-height: 0;
        flex: 1;
    }
}

/* Large screens: slightly bigger cutout */
@media (min-width: 1280px) {
    body.pro-body .player-cutout {
        right: 8%;
    }

    body.pro-body .player-cutout-img {
        height: 45vh;
        max-height: 400px;
    }
}

/* Mobile: shift focus to center for readability */
@media (max-width: 767px) {
    body.pro-body .pro-page::before {
        background-position: center center;
    }
}

/* ---- Background Picker (native <dialog>) ---- */
body.pro-body .bg-picker {
    width: min(92vw, 820px);
    max-height: 88vh;
    padding: 0;
    border: 1px solid rgba(var(--template-primary-rgb), 0.18);
    border-radius: 1rem;
    background: rgba(10, 10, 30, 0.96);
    color: #fff;
    overflow: hidden;
}
@supports (backdrop-filter: blur(16px)) {
    body.pro-body .bg-picker { background: rgba(10, 10, 30, 0.9); backdrop-filter: blur(16px); }
}
body.pro-body .bg-picker[open] { animation: aboutScaleIn 0.25s ease; }
body.pro-body .bg-picker::backdrop {
    background: rgba(5, 5, 20, 0.55);
    backdrop-filter: blur(3px);
}
body.pro-body .bg-picker__form {
    display: flex;
    flex-direction: column;
    max-height: 88vh;
}
body.pro-body .bg-picker__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.4rem;
    border-bottom: 1px solid rgba(var(--template-primary-rgb), 0.18);
}
body.pro-body .bg-picker__title { font-size: 1.05rem; font-weight: 600; letter-spacing: 0.01em; }
body.pro-body .bg-picker__close {
    width: 2rem; height: 2rem; flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 0.5rem; font-size: 1.4rem; line-height: 1;
    color: rgba(255, 255, 255, 0.55); background: transparent; border: 0; cursor: pointer;
    transition: color 0.2s, background 0.2s;
}
body.pro-body .bg-picker__close:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
body.pro-body .bg-picker__chips {
    display: flex; flex-wrap: wrap; gap: 0.5rem;
    padding: 0.9rem 1.4rem 0.4rem;
}
body.pro-body .bg-chip {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.35rem 0.8rem; border-radius: 999px;
    font-size: 0.8rem; font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid transparent; cursor: pointer;
    transition: all 0.18s;
}
body.pro-body .bg-chip:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
body.pro-body .bg-chip.is-active {
    color: #fff;
    background: rgba(var(--template-primary-rgb), 0.22);
    border-color: rgba(var(--template-primary-rgb), 0.5);
}
body.pro-body .bg-chip__count { font-size: 0.7rem; color: rgba(255, 255, 255, 0.45); }
body.pro-body .bg-chip.is-active .bg-chip__count { color: rgba(255, 255, 255, 0.85); }
body.pro-body .bg-chip--own:not(.is-active) {
    border-color: rgba(var(--template-primary-rgb), 0.45);
}
body.pro-body .bg-chip--own::after {
    content: ""; width: 5px; height: 5px; border-radius: 50%;
    background: rgb(var(--template-primary-rgb)); margin-left: 0.1rem;
}
body.pro-body .bg-picker__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    padding: 0.8rem 1.4rem 1.2rem;
    overflow-y: auto;
}
body.pro-body .bg-tile {
    position: relative; display: flex; flex-direction: column;
    text-align: left; padding: 0; cursor: pointer;
    background: rgba(255, 255, 255, 0.04);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.7rem; overflow: hidden;
    transition: border-color 0.18s, transform 0.18s;
}
body.pro-body .bg-tile:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.25); }
body.pro-body .bg-tile.is-selected,
body.pro-body .bg-tile.is-applied { border-color: rgb(var(--template-primary-rgb)); }
body.pro-body .bg-tile.is-filtered { display: none; }
body.pro-body .bg-tile__img {
    display: block; width: 100%; aspect-ratio: 16 / 9;
    background-size: cover; background-position: center;
}
body.pro-body .bg-tile__meta { padding: 0.5rem 0.6rem 0.6rem; }
body.pro-body .bg-tile__label { display: block; font-size: 0.82rem; font-weight: 600; color: #fff; }
body.pro-body .bg-tile__caption { display: block; font-size: 0.7rem; color: rgba(255, 255, 255, 0.5); margin-top: 0.1rem; }
body.pro-body .bg-tile__check {
    position: absolute; top: 0.4rem; right: 0.4rem;
    width: 1.4rem; height: 1.4rem; display: none;
    align-items: center; justify-content: center; border-radius: 50%;
    background: rgb(var(--template-primary-rgb)); color: #fff; font-size: 0.8rem;
}
body.pro-body .bg-tile.is-selected .bg-tile__check,
body.pro-body .bg-tile.is-applied .bg-tile__check { display: inline-flex; }
body.pro-body .bg-tile__ribbon {
    position: absolute; top: 0.4rem; left: 0.4rem; display: none;
    padding: 0.1rem 0.45rem; border-radius: 0.3rem;
    font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
    background: rgb(var(--template-primary-rgb)); color: #fff;
}
body.pro-body .bg-tile.is-applied .bg-tile__ribbon { display: inline-block; }
body.pro-body .bg-tile:focus-visible { outline: 2px solid rgb(var(--template-primary-rgb)); outline-offset: 2px; }
body.pro-body .bg-chip:focus-visible { outline: 2px solid rgb(var(--template-primary-rgb)); outline-offset: 2px; }
body.pro-body .bg-picker__foot {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.9rem 1.4rem;
    border-top: 1px solid rgba(var(--template-primary-rgb), 0.18);
}
body.pro-body .bg-picker__selected { flex: 1 1 auto; font-size: 0.8rem; color: rgba(255, 255, 255, 0.6); min-width: 0; }
body.pro-body .bg-picker__cancel {
    padding: 0.5rem 1rem; border-radius: 0.5rem; cursor: pointer;
    font-size: 0.82rem; color: rgba(255, 255, 255, 0.7);
    background: transparent; border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.18s;
}
body.pro-body .bg-picker__cancel:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
body.pro-body .bg-picker__save {
    padding: 0.5rem 1.1rem; border-radius: 0.5rem; cursor: pointer;
    font-size: 0.82rem; font-weight: 600; color: #fff; border: 0;
    background: rgb(var(--template-primary-rgb));
    transition: opacity 0.18s, filter 0.18s;
}
body.pro-body .bg-picker__save:hover:not(:disabled) { filter: brightness(1.1); }
body.pro-body .bg-picker__save:disabled { opacity: 0.4; cursor: not-allowed; }

@media (max-width: 640px) {
    body.pro-body .bg-picker {
        inset: auto 0 0 0;
        width: 100%; max-width: 100%; max-height: 92vh;
        margin: 0; border-radius: 1rem 1rem 0 0;
    }
    body.pro-body .bg-picker__chips { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x mandatory; }
    body.pro-body .bg-chip { flex: 0 0 auto; scroll-snap-align: start; }
    body.pro-body .bg-picker__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    body.pro-body .bg-picker[open] { animation: none; }
    body.pro-body .bg-tile { transition: border-color 0.18s; }
    body.pro-body .bg-tile:hover { transform: none; }
}
