/* ========================================
   NEXUS TV — Premium Design System v2.0
   Dark Glassmorphism + Neon Accents
   ======================================== */

/* === ROOT DESIGN TOKENS === */
:root {
    /* "Dark Neo-Modern": void canvas, glass surfaces, purple accents */
    --bg-deep: #0B0E14;
    --bg-base: #0E121A;
    --bg-surface: #151A23;
    --bg-elevated: #1B2230;

    --glass: rgba(255,255,255,0.03);
    --glass-hover: rgba(255,255,255,0.06);
    --glass-border: rgba(255,255,255,0.08);
    --glass-border-hover: rgba(255,255,255,0.12);

    --primary: #a855f7;
    --primary-strong: #7c3aed;
    --primary-dim: rgba(168,85,247,0.15);
    --primary-glow: rgba(168,85,247,0.3);
    --secondary: #06b6d4;
    --secondary-dim: rgba(6,182,212,0.15);
    --accent: #f472b6;
    --accent-dim: rgba(244,114,182,0.15);

    --success: #10b981;
    --success-dim: rgba(16,185,129,0.15);
    --danger: #ef4444;
    --danger-dim: rgba(239,68,68,0.15);
    --warning: #f59e0b;
    --warning-dim: rgba(245,158,11,0.15);

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #8a97ab;
    --text-dim: #475569;

    --accent-gradient: linear-gradient(135deg, #7c3aed, #a855f7);
    --text-gradient: linear-gradient(135deg, #f5f3ff, #c4b5fd 45%, #a855f7);
    --hero-gradient: linear-gradient(135deg, #ddd6fe, #a855f7 45%, #7c3aed);
    --glass-gradient: linear-gradient(135deg, rgba(124,58,237,0.10), rgba(168,85,247,0.04));

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-pill: 50px;

    --sidebar-width: 240px;
    --sidebar-collapsed: 68px;
    --topbar-height: 64px;
    --bottomtab-height: 64px;

    --font: 'Inter', system-ui, -apple-system, sans-serif;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 0.15s ease;
    --transition-spring: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* === RESET & BASE === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    background: var(--bg-deep);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    min-height: 100vh;
}

::selection {
    background: var(--primary);
    color: white;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(168,85,247,0.3); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(168,85,247,0.5); }
* { scrollbar-width: thin; scrollbar-color: rgba(168,85,247,0.3) transparent; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: var(--font); cursor: pointer; border: none; outline: none; }
input, select, textarea { font-family: var(--font); }

/* === APP LAYOUT === */
.app-container {
    min-height: 100vh;
}

/* === SIDEBAR === */
.sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: var(--sidebar-width);
    background: rgba(14,18,26,0.98);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: width var(--transition);
    overflow-y: auto;
    overflow-x: hidden;
}
.sidebar::-webkit-scrollbar { width: 0; }

.sidebar-logo {
    padding: 28px 24px 20px;
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: 2px;
    background: var(--text-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}

.sidebar-nav { flex: 1; padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; }

.sidebar-link {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.92rem;
    font-weight: 500;
    transition: all var(--transition);
    position: relative;
    white-space: nowrap;
}
.sidebar-link:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}
.sidebar-link.active {
    background: var(--primary-dim);
    color: var(--primary);
    font-weight: 600;
}
.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 3px; height: 24px;
    background: var(--primary);
    border-radius: 0 4px 4px 0;
}
.sidebar-link .nav-icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}
.sidebar-link .nav-label { transition: opacity var(--transition); }

.sidebar-divider {
    height: 1px;
    background: var(--glass-border);
    margin: 12px 16px;
}

/* Sidebar Subscription Badge */
.sidebar-sub-badge {
    margin: 8px 16px;
    padding: 10px 14px;
    background: var(--glass-gradient);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    font-size: 0.8rem;
}
.sidebar-sub-badge .sub-label { color: var(--text-muted); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; }
.sidebar-sub-badge .sub-plan { color: var(--primary); font-weight: 700; margin-top: 2px; }

/* Sidebar Profile */
.sidebar-profile {
    padding: 16px;
    border-top: 1px solid var(--glass-border);
    display: flex; align-items: center; gap: 12px;
}
.sidebar-profile-avatar {
    width: 36px; height: 36px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid var(--glass-border);
    flex-shrink: 0;
}
.sidebar-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-profile-info { overflow: hidden; }
.sidebar-profile-name { font-size: 0.85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-profile-plan { font-size: 0.72rem; color: var(--text-muted); }

/* === MAIN CONTENT === */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    position: relative;
    max-width: calc(100vw - var(--sidebar-width));
}

/* === TOP BAR === */
.top-bar {
    position: sticky;
    top: 0; z-index: 50;
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 32px;
    background: rgba(11,14,20,0.92);
    border-bottom: 1px solid var(--glass-border);
    gap: 16px;
}
.top-bar-search {
    display: flex; align-items: center; gap: 10px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-pill);
    padding: 8px 18px;
    cursor: pointer;
    transition: all var(--transition);
    margin-right: auto;
    min-width: 240px;
}
.top-bar-search:hover { background: var(--glass-hover); border-color: var(--glass-border-hover); }
.top-bar-search .search-icon { color: var(--text-muted); font-size: 0.9rem; }
.top-bar-search .search-text { color: var(--text-dim); font-size: 0.85rem; }

.top-bar-avatar {
    width: 36px; height: 36px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid var(--glass-border);
    cursor: pointer;
    transition: border-color var(--transition);
}
.top-bar-avatar:hover { border-color: var(--primary); }
.top-bar-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* === BOTTOM TABS (Mobile) === */
.bottom-tabs {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: var(--bottomtab-height);
    background: rgba(14,18,26,0.98);
    border-top: 1px solid var(--glass-border);
    z-index: 100;
    justify-content: space-around;
    align-items: center;
    padding: 0 8px;
}
.bottom-tab {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 6px 12px;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 600;
    transition: color var(--transition);
    text-decoration: none;
}
.bottom-tab .tab-icon { font-size: 1.3rem; }
.bottom-tab.active { color: var(--primary); }
.bottom-tab:hover { color: var(--text-primary); }

/* === HERO SECTION === */
.hero {
    position: relative;
    width: 100%;
    min-height: 520px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 0 48px 48px;
}
.hero-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.hero-backdrop img {
    width: 100%; height: 100%;
    object-fit: cover;
    animation: heroZoom 20s ease-in-out alternate infinite;
}
.hero-backdrop::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--bg-deep) 0%, rgba(11,14,20,0.6) 40%, rgba(11,14,20,0.3) 70%, rgba(11,14,20,0.5) 100%),
                linear-gradient(to right, var(--bg-deep) 0%, transparent 50%);
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    animation: fadeInUp 0.8s cubic-bezier(0.16,1,0.3,1) both;
}
.hero-title {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 12px;
    text-shadow: 0 4px 30px rgba(0,0,0,0.5);
}
.hero-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.hero-rating {
    display: flex; align-items: center; gap: 4px;
    color: var(--warning);
    font-weight: 700;
    font-size: 0.95rem;
}
.hero-year { color: var(--text-secondary); font-size: 0.9rem; }
.hero-genre-badge {
    padding: 3px 12px;
    border-radius: var(--radius-pill);
    background: var(--glass);
    border: 1px solid var(--glass-border);
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-weight: 500;
}
.hero-overview {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 24px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-btn-primary {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 32px;
    background: var(--accent-gradient);
    color: white;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 4px 20px var(--primary-glow);
    text-decoration: none;
}
.hero-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--primary-glow);
}
.hero-btn-secondary {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 28px;
    background: var(--glass);
    backdrop-filter: blur(10px);
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border-hover);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}
.hero-btn-secondary:hover {
    background: var(--glass-hover);
    border-color: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

/* === CONTENT SECTIONS / ROWS === */
.content-section {
    padding: 0 48px;
    margin-bottom: 36px;
}
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}
.section-title {
    font-size: 1.35rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-see-all {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    transition: color var(--transition);
}
.section-see-all:hover { color: var(--primary); }

.content-row {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.content-row::-webkit-scrollbar { display: none; }

/* === CONTENT CARDS === */
.content-card {
    flex-shrink: 0;
    width: 175px;
    scroll-snap-align: start;
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--transition-spring), box-shadow var(--transition);
    text-decoration: none;
    color: inherit;
    display: block;
}
.content-card:hover {
    transform: scale(1.08);
    z-index: 10;
    box-shadow: 0 12px 40px rgba(0,0,0,0.6), 0 0 20px var(--primary-dim);
}
.content-card-poster {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: var(--radius-lg);
    transition: filter var(--transition);
    background: var(--bg-surface);
}
.content-card:hover .content-card-poster { filter: brightness(0.5); }

.content-card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 16px;
    opacity: 0;
    transition: opacity var(--transition);
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 60%);
    border-radius: var(--radius-lg);
}
.content-card:hover .content-card-overlay { opacity: 1; }
.content-card-overlay .card-title {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.content-card-overlay .card-rating {
    font-size: 0.75rem;
    color: var(--warning);
    font-weight: 600;
}
.content-card-overlay .card-play {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 48px; height: 48px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 20px var(--primary-glow);
    transition: transform var(--transition-spring);
}
.content-card:hover .content-card-overlay .card-play {
    transform: translate(-50%, -50%) scale(1);
}

/* Progress bar on continue watching cards */
.content-card-progress {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: rgba(255,255,255,0.1);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    overflow: hidden;
}
.content-card-progress-bar {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 3px;
    transition: width 0.4s ease;
}

/* === MEDIA GRID (Browse pages) === */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    gap: 20px;
    padding: 0 48px 40px;
}
.media-grid .content-card { width: 100%; }

/* === PLAYER PAGE === */
.player-container { width: 100%; padding: 0; position: relative; }
.player-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 0;
    overflow: hidden;
}
.player-frame iframe {
    width: 100%; height: 100%;
    border: none;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    background: var(--glass);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    flex-wrap: wrap;
}
.ctrl-btn {
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    color: white;
    background: var(--glass);
    backdrop-filter: blur(10px);
    transition: all 0.2s;
    display: flex; align-items: center; gap: 6px;
    white-space: nowrap;
}
.ctrl-btn:hover { background: var(--glass-hover); border-color: var(--glass-border-hover); }
.ctrl-btn.sub:hover { background: var(--secondary-dim); border-color: rgba(6,182,212,0.5); }
.ctrl-btn.report { color: #ff9999; border-color: rgba(255,100,100,0.3); }
.ctrl-btn.report:hover { background: var(--danger-dim); }

select.server-select {
    background: rgba(0,0,0,0.5);
    color: white;
    border: 1px solid var(--glass-border);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.82rem;
    outline: none;
    cursor: pointer;
    font-family: var(--font);
    backdrop-filter: blur(10px);
}

/* Player Info */
.player-info {
    padding: 24px;
    background: var(--glass);
    border-bottom: 1px solid var(--glass-border);
}
.player-info h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.player-info p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.5; }

/* Player Paywall */
.player-paywall {
    position: absolute;
    inset: 0;
    background: rgba(11,14,20,0.92);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 50;
    text-align: center;
    padding: 40px;
}
.player-paywall .paywall-icon { font-size: 4rem; margin-bottom: 20px; opacity: 0.6; }
.player-paywall h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; }
.player-paywall p { color: var(--text-secondary); margin-bottom: 24px; max-width: 400px; }

/* Next Episode overlay */
.next-ep-overlay { position: fixed; bottom: 80px; right: 25px; z-index: 200; }
.next-ep-overlay a {
    display: flex; align-items: center; gap: 8px;
    padding: 12px 24px;
    background: var(--accent-gradient);
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 20px var(--primary-glow);
    transition: all 0.2s;
    backdrop-filter: blur(10px);
}
.next-ep-overlay a:hover { transform: scale(1.05); box-shadow: 0 6px 30px var(--primary-glow); }

/* === SUBSCRIPTION / PRICING PAGE === */
.pricing-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 48px 24px;
}
.pricing-header {
    text-align: center;
    margin-bottom: 48px;
}
.pricing-header h1 {
    font-size: 2.8rem;
    font-weight: 900;
    background: var(--text-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}
.pricing-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: start;
}

.plan-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 36px 28px;
    text-align: center;
    transition: all var(--transition-spring);
    position: relative;
    overflow: hidden;
    animation: pricePop 0.5s cubic-bezier(0.16,1,0.3,1) both;
}
.plan-card:nth-child(2) { animation-delay: 0.1s; }
.plan-card:nth-child(3) { animation-delay: 0.2s; }

.plan-card:hover {
    transform: translateY(-8px);
    border-color: var(--glass-border-hover);
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.plan-card.featured {
    border-color: rgba(168,85,247,0.3);
    background: linear-gradient(135deg, rgba(168,85,247,0.08), rgba(6,182,212,0.05));
    transform: scale(1.03);
}
.plan-card.featured:hover {
    transform: scale(1.03) translateY(-8px);
    box-shadow: 0 20px 60px rgba(168,85,247,0.15);
}

.plan-badge {
    position: absolute;
    top: 16px; right: -30px;
    background: var(--accent-gradient);
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 5px 40px;
    transform: rotate(45deg);
    letter-spacing: 1px;
    text-transform: uppercase;
}
.plan-icon { font-size: 3rem; margin-bottom: 16px; }
.plan-name { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
.plan-price {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 4px;
    background: var(--text-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.plan-price-period { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 24px; }

.plan-features {
    list-style: none;
    text-align: left;
    margin-bottom: 28px;
}
.plan-features li {
    padding: 8px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}
.plan-features li:last-child { border-bottom: none; }
.plan-features .check { color: var(--success); font-weight: 700; }

.plan-btn {
    width: 100%;
    padding: 14px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition);
    border: none;
}
.plan-btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 20px var(--primary-glow);
}
.plan-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--primary-glow);
}
.plan-btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--glass-border-hover);
}
.plan-btn-outline:hover {
    background: var(--glass-hover);
    border-color: var(--primary);
    color: var(--primary);
}
.plan-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.plan-card.current::after {
    content: 'CURRENT PLAN';
    position: absolute;
    top: 16px; left: 50%;
    transform: translateX(-50%);
    background: var(--success-dim);
    color: var(--success);
    font-size: 0.65rem;
    font-weight: 800;
    padding: 4px 16px;
    border-radius: var(--radius-pill);
    letter-spacing: 1px;
}

/* Current Subscription Info */
.current-plan-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 28px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    gap: 20px;
    flex-wrap: wrap;
}
.current-plan-info h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; }
.current-plan-info p { color: var(--text-secondary); font-size: 0.85rem; }

/* === PAYMENT MODAL === */
.payment-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(12px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: backdropIn 0.3s ease;
}
.payment-modal.active { display: flex; }

.payment-card {
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 36px;
    width: 460px;
    max-width: 92%;
    animation: modalIn 0.4s cubic-bezier(0.16,1,0.3,1);
    max-height: 90vh;
    overflow-y: auto;
}
.payment-card h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.payment-plan-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 28px;
    padding: 12px 16px;
    background: var(--glass);
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
}

.payment-form { display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.form-group input {
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    background: rgba(0,0,0,0.3);
    color: white;
    font-size: 1rem;
    outline: none;
    transition: border-color var(--transition);
}
.form-group input:focus { border-color: var(--primary); }
.form-group input::placeholder { color: var(--text-dim); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.payment-submit {
    width: 100%;
    padding: 16px;
    background: var(--accent-gradient);
    color: white;
    font-weight: 700;
    font-size: 1rem;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    margin-top: 8px;
    box-shadow: 0 4px 20px var(--primary-glow);
}
.payment-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--primary-glow);
}

.payment-cancel {
    width: 100%;
    padding: 12px;
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    margin-top: 4px;
    transition: color var(--transition);
}
.payment-cancel:hover { color: var(--text-primary); }

/* Payment Steps */
.payment-step { display: none; }
.payment-step.active, #step-form { display: block; }

.payment-processing {
    text-align: center;
    padding: 48px 0;
}
.payment-processing .spinner {
    width: 48px; height: 48px;
    border: 3px solid var(--glass-border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}
.payment-processing p { color: var(--text-secondary); font-size: 0.95rem; }

.payment-success {
    text-align: center;
    padding: 48px 0;
}
.payment-success .success-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    animation: fadeInScale 0.5s cubic-bezier(0.16,1,0.3,1) both;
}
.payment-success h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; color: var(--success); }
.payment-success p { color: var(--text-secondary); }

/* === SETTINGS PAGE === */
.settings-container { max-width: 800px; margin: 0 auto; padding: 40px 24px; }
.settings-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 36px;
    background: var(--text-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.settings-section {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}
.section-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 18px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-title span { font-size: 1.3rem; }

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.setting-row:last-child { border-bottom: none; }
.setting-label { color: var(--text-secondary); font-size: 0.95rem; }
.setting-value { color: var(--text-muted); font-size: 0.9rem; text-align: right; }
.setting-value.highlight { color: var(--secondary); font-weight: 600; }
.setting-value.accent {
    background: var(--text-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.profile-header { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; }
.profile-avatar {
    width: 72px; height: 72px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid rgba(168,85,247,0.3);
    box-shadow: 0 0 16px rgba(168,85,247,0.1);
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-info h3 { font-size: 1.3rem; margin-bottom: 4px; }
.profile-info p { color: var(--text-muted); font-size: 0.85rem; }

.edit-form { display: flex; gap: 12px; margin-top: 12px; }
.edit-form input, .setting-select {
    flex: 1;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    background: rgba(0,0,0,0.3);
    color: white;
    font-size: 0.95rem;
    font-family: var(--font);
    outline: none;
    transition: border-color var(--transition);
}
.edit-form input:focus, .setting-select:focus { border-color: rgba(168,85,247,0.5); }

.btn-save {
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    border: none;
    background: var(--accent-gradient);
    color: white;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    transition: all var(--transition);
}
.btn-save:hover { transform: scale(1.03); box-shadow: 0 0 20px var(--primary-glow); }

.danger-section { border-color: rgba(239,68,68,0.15); }
.danger-btn {
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(239,68,68,0.3);
    background: var(--danger-dim);
    color: var(--danger);
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: all var(--transition);
}
.danger-btn:hover { background: rgba(239,68,68,0.25); box-shadow: 0 0 15px rgba(239,68,68,0.15); }

.switch-btn {
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(6,182,212,0.3);
    background: var(--secondary-dim);
    color: var(--secondary);
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    display: inline-block;
}
.switch-btn:hover { background: rgba(6,182,212,0.25); }

.status-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    font-weight: 600;
}
.status-active { background: var(--success-dim); color: var(--success); border: 1px solid rgba(16,185,129,0.3); }
.status-expired { background: var(--danger-dim); color: var(--danger); border: 1px solid rgba(239,68,68,0.3); }

/* Avatar picker */
.avatar-picker-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
    margin-top: 12px;
    max-height: 200px;
    overflow-y: auto;
}
.avp-item {
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0.6;
}
.avp-item:hover { opacity: 1; border-color: var(--glass-border-hover); transform: scale(1.05); }
.avp-item.selected { opacity: 1; border-color: var(--primary); box-shadow: 0 0 10px var(--primary-dim); }
.avp-item img { width: 100%; height: 100%; object-fit: cover; }

.saved-toast {
    position: fixed; top: 20px; right: 20px; z-index: 9999;
    background: rgba(16,185,129,0.9); color: white; padding: 12px 24px;
    border-radius: var(--radius-sm); font-weight: 600; display: none;
    animation: toastIn 0.4s cubic-bezier(0.16,1,0.3,1);
}

/* Promo button pulse */
@keyframes pulsePromo {
    0%, 100% { box-shadow: 0 0 15px rgba(168,85,247,0.4); }
    50% { box-shadow: 0 0 30px rgba(168,85,247,0.6); }
}

/* === PROFILE SELECTION PAGE === */
.profiles-page {
    background: var(--bg-deep);
    color: var(--text-primary);
    font-family: var(--font);
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; min-height: 100vh;
}
.profiles-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(168,85,247,0.1) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 80%, rgba(244,114,182,0.06) 0%, transparent 50%);
    z-index: 0;
}
.profiles-page .container { position: relative; z-index: 1; text-align: center; }
.profiles-page h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 48px;
    background: linear-gradient(135deg, #fff, #aaa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInDown 0.6s ease;
}

.profiles { display: flex; gap: 36px; justify-content: center; flex-wrap: wrap; animation: fadeInUp 0.8s ease; }
.profile-card {
    text-align: center; cursor: pointer; color: var(--text-muted);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); position: relative;
}
.profile-card:hover { color: var(--text-primary); transform: translateY(-8px); }
.avatar {
    width: 150px; height: 150px;
    border-radius: var(--radius-md);
    border: 3px solid var(--glass-border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, var(--bg-surface), var(--bg-elevated));
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-card:hover .avatar {
    border-color: rgba(168,85,247,0.7);
    box-shadow: 0 0 30px rgba(168,85,247,0.2), 0 10px 40px rgba(0,0,0,0.4);
}
.name { margin-top: 14px; font-size: 1.1rem; font-weight: 600; }

.delete-btn {
    position: absolute; top: -8px; right: -8px;
    width: 28px; height: 28px; border-radius: 50%;
    background: rgba(239,68,68,0.9); border: 2px solid var(--bg-deep);
    color: white; font-size: 0.8rem; cursor: pointer;
    display: none; align-items: center; justify-content: center;
    z-index: 10; text-decoration: none; transition: transform 0.2s;
}
.delete-btn:hover { transform: scale(1.2); background: var(--danger); }
.profile-card:hover .delete-btn { display: flex; }

.add-card .avatar {
    border: 3px dashed rgba(255,255,255,0.1);
    font-size: 3.5rem;
    color: rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.01);
}
.add-card:hover .avatar {
    border-color: rgba(6,182,212,0.6);
    box-shadow: 0 0 30px rgba(6,182,212,0.15);
    color: var(--text-primary);
    background: rgba(6,182,212,0.05);
}

/* Profile modal */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 10000;
    display: none;
    align-items: center; justify-content: center;
    backdrop-filter: blur(12px);
}
.modal-overlay.active { display: flex; }

.modal-content {
    background: linear-gradient(145deg, var(--bg-surface), var(--bg-deep));
    border: 1px solid var(--glass-border);
    padding: 32px;
    border-radius: var(--radius-xl);
    width: 560px;
    max-width: 92%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    animation: modalIn 0.4s cubic-bezier(0.16,1,0.3,1);
}
.modal-content h2 { margin-bottom: 18px; font-size: 1.5rem; }
.modal-content input[type="text"] {
    width: 100%; padding: 14px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    background: rgba(0,0,0,0.4);
    color: white; font-size: 1rem;
    font-family: var(--font); outline: none;
    margin-bottom: 18px;
    transition: border var(--transition);
}
.modal-content input[type="text"]:focus { border-color: rgba(168,85,247,0.5); }

.avatar-label { font-size: 0.9rem; color: var(--text-secondary); font-weight: 600; margin-bottom: 10px; display: block; }
.cat-label { font-size: 0.75rem; color: var(--primary); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin: 10px 0 8px; }
.avatar-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 10px; }
.avatar-option {
    width: 100%; aspect-ratio: 1; border-radius: var(--radius-sm);
    overflow: hidden; border: 3px solid transparent; cursor: pointer;
    transition: all 0.25s; opacity: 0.6;
}
.avatar-option:hover { opacity: 1; border-color: var(--glass-border-hover); transform: scale(1.08); }
.avatar-option.selected { opacity: 1; border-color: var(--primary); box-shadow: 0 0 15px var(--primary-dim); }
.avatar-option img { width: 100%; height: 100%; object-fit: cover; }

.modal-btns { display: flex; gap: 12px; margin-top: 18px; }
.modal-btn {
    flex: 1; padding: 14px; border-radius: var(--radius-sm);
    border: none; cursor: pointer; font-weight: 700; font-size: 0.95rem;
    font-family: var(--font); transition: all var(--transition);
}
.modal-btn:hover { transform: scale(1.03); }
.btn-cancel { background: var(--glass); color: white; border: 1px solid var(--glass-border); }
.btn-create { background: var(--accent-gradient); color: white; }
.modal-btn-cancel { background: var(--glass); color: white; border: 1px solid var(--glass-border); }
.modal-btn-confirm { background: var(--accent-gradient); color: white; }

/* Subtitle / Report modals */
.lang-select { display: flex; flex-direction: column; margin-bottom: 14px; }
.lang-select label { font-size: 0.85rem; margin-bottom: 6px; font-weight: 600; color: var(--text-secondary); }
.lang-select select {
    background: rgba(0,0,0,0.5); color: white;
    border: 1px solid var(--glass-border); padding: 10px;
    border-radius: var(--radius-sm); font-size: 0.95rem;
    outline: none; font-family: var(--font);
}
.report-modal textarea {
    width: 100%; min-height: 100px;
    background: rgba(0,0,0,0.5); color: white;
    border: 1px solid var(--glass-border); padding: 12px;
    border-radius: var(--radius-sm); font-size: 0.9rem;
    outline: none; font-family: var(--font);
    resize: vertical; margin-bottom: 14px;
}
.report-modal textarea:focus { border-color: rgba(239,68,68,0.4); }
.report-modal .context-info {
    background: var(--glass); border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm); padding: 12px;
    margin-bottom: 14px; font-size: 0.82rem; color: var(--text-muted);
}
.report-modal .context-info strong { color: var(--text-secondary); }

/* === SPORTS PAGE === */
.sports-hero {
    position: relative;
    height: 320px;
    background: linear-gradient(135deg, #050118 0%, #0a1a30 40%, #0d1a0a 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 0 5%;
}
.sports-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239C92AC' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; z-index: 2; }
.hero-title {
    font-size: 2.8rem;
    font-weight: 900;
    background: linear-gradient(135deg, #00ff87, #60efff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 8px;
    letter-spacing: 2px;
}
.hero-sub { color: rgba(255,255,255,0.5); font-size: 1rem; margin: 0 0 24px; }
.hero-stats { display: flex; gap: 24px; }
.hero-stat {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 12px 20px;
    text-align: center;
    backdrop-filter: blur(10px);
}
.hero-stat-num {
    font-size: 1.6rem; font-weight: 800;
    background: var(--text-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-stat-label { font-size: 0.7rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; margin-top: 3px; }
.hero-live-pulse {
    position: absolute; right: 8%; top: 50%; transform: translateY(-50%);
    width: 160px; height: 160px; border-radius: 50%;
    background: radial-gradient(circle, rgba(0,255,135,0.12), transparent 70%);
    animation: float 3s ease-in-out infinite;
}

/* Filter Bar */
.filter-bar {
    display: flex; gap: 10px; padding: 18px 5%;
    overflow-x: auto; scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-chip {
    padding: 8px 20px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--glass-border);
    background: var(--glass);
    color: var(--text-muted);
    font-size: 0.82rem; font-weight: 600;
    cursor: pointer; white-space: nowrap;
    transition: all var(--transition);
    font-family: var(--font);
}
.filter-chip:hover, .filter-chip.active {
    background: linear-gradient(135deg, #00ff87, #60efff);
    color: #000; border-color: transparent;
    box-shadow: 0 4px 15px rgba(0,255,135,0.25);
}

/* Events Grid */
.events-section { padding: 8px 5% 40px; }
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 16px;
}

/* Event Card */
.event-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 18px;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative; overflow: hidden;
    text-decoration: none; color: inherit; display: block;
}
.event-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00ff87, #60efff);
    opacity: 0; transition: opacity 0.3s;
}
.event-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0,255,135,0.2);
    box-shadow: 0 12px 35px rgba(0,0,0,0.5), 0 0 20px rgba(0,255,135,0.06);
}
.event-card:hover::before { opacity: 1; }
.event-card.live { border-color: rgba(0,255,135,0.2); }
.event-card.live::before { opacity: 1; background: linear-gradient(90deg, #00ff87, #00ff87); }

.event-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.event-league {
    font-size: 0.72rem; color: var(--text-dim);
    text-transform: uppercase; letter-spacing: 1px; font-weight: 600;
    display: flex; align-items: center; gap: 8px;
}
.league-badge { width: 18px; height: 18px; border-radius: 4px; object-fit: contain; }
.event-status {
    font-size: 0.68rem; padding: 4px 12px;
    border-radius: var(--radius-pill); font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.status-live { background: rgba(0,255,135,0.12); color: #00ff87; animation: ambientGlow 1.5s infinite; }
.status-starting { background: var(--warning-dim); color: var(--warning); }
.status-scheduled { background: var(--glass); color: var(--text-dim); }
.status-finished { background: var(--glass); color: var(--text-dim); opacity: 0.6; }

.event-matchup {
    display: flex; align-items: center;
    justify-content: space-between; gap: 14px; margin-bottom: 12px;
}
.team {
    display: flex; flex-direction: column;
    align-items: center; gap: 6px; flex: 1; min-width: 0;
}
.team-badge {
    width: 44px; height: 44px; border-radius: 50%;
    object-fit: contain; background: var(--glass); padding: 4px;
}
.team-name {
    font-size: 0.82rem; font-weight: 600; text-align: center;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px;
}
.vs-divider { font-size: 0.75rem; color: var(--text-dim); font-weight: 800; flex-shrink: 0; }
.score-display { font-size: 1.6rem; font-weight: 900; color: #00ff87; letter-spacing: 4px; }

.event-footer {
    display: flex; justify-content: space-between; align-items: center;
    padding-top: 10px; border-top: 1px solid var(--glass-border);
    font-size: 0.75rem; color: var(--text-dim);
}
.event-time { display: flex; align-items: center; gap: 4px; }

/* === TOASTS === */
.server-toast {
    position: fixed; top: 60px; left: 50%;
    transform: translateX(-50%);
    background: rgba(21,26,35,0.95);
    backdrop-filter: blur(16px);
    color: white; padding: 12px 28px;
    border-radius: var(--radius-pill);
    font-weight: 600; font-size: 0.85rem;
    z-index: 500;
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
    border: 1px solid var(--glass-border);
}

.toast {
    position: fixed; top: 20px; right: 20px; z-index: 9999;
    padding: 14px 24px;
    border-radius: var(--radius-md);
    font-weight: 600; font-size: 0.9rem;
    animation: toastIn 0.4s cubic-bezier(0.16,1,0.3,1);
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
    border: 1px solid var(--glass-border);
}
.toast-success { background: rgba(16,185,129,0.9); color: white; }
.toast-error { background: rgba(239,68,68,0.9); color: white; }

/* === SEARCH OVERLAY === */
.search-overlay {
    position: fixed; inset: 0;
    background: rgba(11,14,20,0.95);
    backdrop-filter: blur(20px);
    z-index: 10000;
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 80px 24px 40px;
}
.search-overlay.active { display: flex; }
.search-overlay-input {
    width: 100%; max-width: 600px;
    padding: 18px 24px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    background: var(--glass);
    color: white;
    font-size: 1.2rem;
    font-family: var(--font);
    outline: none;
    margin-bottom: 32px;
    transition: border-color var(--transition);
}
.search-overlay-input:focus { border-color: var(--primary); }
.search-overlay-close {
    position: absolute; top: 24px; right: 24px;
    background: none; border: none; color: var(--text-muted);
    font-size: 1.5rem; cursor: pointer;
    transition: color var(--transition);
}
.search-overlay-close:hover { color: var(--text-primary); }
.search-results {
    width: 100%; max-width: 900px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
}

/* === UTILITY CLASSES === */
.glass {
    background: var(--glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
}
.gradient-text {
    background: var(--text-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }

.badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.badge-premium {
    background: linear-gradient(135deg, rgba(168,85,247,0.2), rgba(244,114,182,0.2));
    color: var(--primary);
    border: 1px solid rgba(168,85,247,0.3);
}
.badge-success { background: var(--success-dim); color: var(--success); }
.badge-warning { background: var(--warning-dim); color: var(--warning); }

.divider {
    height: 1px;
    background: var(--glass-border);
    margin: 20px 0;
}

.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.hide-scrollbar::-webkit-scrollbar { display: none; }

.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* === LINK / ACTIVATION PAGE (override tokens only) === */
.link-page-body {
    --primary: #a855f7;
    --secondary: #06b6d4;
}

/* === D-PAD / TV REMOTE FOCUS === */

/* Animated focus glow keyframe */
@keyframes focusGlow {
    0%, 100% { box-shadow: 0 0 0 3px rgba(168,85,247,0.6), 0 0 15px rgba(168,85,247,0.2); }
    50% { box-shadow: 0 0 0 3px rgba(168,85,247,0.9), 0 0 25px rgba(168,85,247,0.4); }
}
@keyframes focusGlowCard {
    0%, 100% { box-shadow: 0 0 0 3px rgba(168,85,247,0.6), 0 0 20px rgba(168,85,247,0.15), 0 15px 35px rgba(0,0,0,0.7); }
    50% { box-shadow: 0 0 0 3px rgba(168,85,247,0.9), 0 0 35px rgba(168,85,247,0.3), 0 15px 35px rgba(0,0,0,0.7); }
}

/* Default focus ring — animated glow */
[data-focusable]:focus,
.focusable:focus,
a:focus,
button:focus,
select:focus {
    outline: none;
    border-radius: var(--radius-sm);
    animation: focusGlow 1.8s ease-in-out infinite;
    transition: transform 0.2s ease;
}

/* Input keeps subtle outline without glow animation */
input:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Content cards — show overlay + scale on focus (same as hover) */
.content-card:focus,
.content-card:focus-visible {
    outline: none;
    transform: scale(1.08);
    z-index: 10;
    animation: focusGlowCard 1.8s ease-in-out infinite;
}
.content-card:focus .content-card-poster,
.content-card:focus-visible .content-card-poster {
    filter: brightness(0.5);
}
.content-card:focus .content-card-overlay,
.content-card:focus-visible .content-card-overlay {
    opacity: 1;
}
.content-card:focus .content-card-overlay .card-play,
.content-card:focus-visible .content-card-overlay .card-play {
    transform: translate(-50%, -50%) scale(1);
}

/* Old-style cards also get focus overlay */
.card:focus,
.card:focus-visible {
    outline: none;
    transform: scale(1.08);
    z-index: 5;
    animation: focusGlowCard 1.8s ease-in-out infinite;
}
.card:focus .card-overlay,
.card:focus-visible .card-overlay {
    opacity: 1;
}
.card:focus .card-poster img,
.card:focus-visible .card-poster img {
    transform: scale(1.1);
}
.card:focus .play-circle,
.card:focus-visible .play-circle {
    transform: scale(1.1);
}

/* Sidebar links — glow on focus */
.sidebar-link:focus {
    outline: none;
    background: var(--glass-hover);
    color: var(--text-primary);
    animation: focusGlow 1.8s ease-in-out infinite;
}

/* Hero buttons — enlarge slightly on focus */
.hero-btn-primary:focus,
.hero-btn-secondary:focus,
.hbtn:focus {
    outline: none;
    transform: translateY(-2px) scale(1.03);
    animation: focusGlow 1.8s ease-in-out infinite;
}

/* Episode buttons — highlight on focus */
.ep-btn:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--primary-dim);
    transform: translateY(-4px);
    animation: focusGlow 1.8s ease-in-out infinite;
}

/* Channel cards — highlight on focus */
.channel-card:focus {
    outline: none;
    background: var(--glass-hover);
    border-color: var(--primary);
    transform: translateY(-4px);
    animation: focusGlow 1.8s ease-in-out infinite;
}

/* Filter chips — highlight on focus */
.filter-chip:focus {
    outline: none;
    background: var(--glass-hover);
    color: white;
    border-color: var(--primary);
    animation: focusGlow 1.8s ease-in-out infinite;
}

/* Bottom tabs — glow indicator on focus */
.bottom-tab:focus {
    outline: none;
    color: var(--primary);
    animation: focusGlow 1.8s ease-in-out infinite;
}

/* Player control buttons — glow on focus */
.ctrl-btn:focus,
.server-select:focus {
    outline: none;
    animation: focusGlow 1.8s ease-in-out infinite;
}

/* Next episode overlay — glow on focus */
.next-ep-overlay a:focus {
    outline: none;
    transform: scale(1.05);
    animation: focusGlow 1.8s ease-in-out infinite;
}

/* Scroll padding for smooth focus scrolling in rows */
.content-row,
.row-slider {
    scroll-padding-inline-start: 16px;
}

/* === RESPONSIVE === */

/* Tablet */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: var(--sidebar-collapsed);
    }
    .sidebar .nav-label,
    .sidebar-sub-badge,
    .sidebar-profile-info,
    .sidebar-logo-text { display: none; }
    .sidebar-logo { padding: 20px 16px; font-size: 1.2rem; text-align: center; }
    .sidebar-link { justify-content: center; padding: 14px; }
    .sidebar-link .nav-icon { font-size: 1.3rem; }
    .sidebar-profile { justify-content: center; }
    .sidebar-profile-avatar { margin: 0; }

    .hero { min-height: 400px; padding: 0 32px 32px; }
    .hero-title { font-size: 2.2rem; }
    .content-section { padding: 0 32px; }
    .media-grid { padding: 0 32px 32px; }
    .pricing-grid { gap: 16px; }
    .plan-card { padding: 28px 20px; }
    .plan-card.featured { transform: scale(1.01); }
    .events-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
}

/* Mobile */
@media (max-width: 768px) {
    .sidebar { display: none; }
    .main-content { margin-left: 0; max-width: 100vw; padding-bottom: var(--bottomtab-height); }
    .bottom-tabs { display: flex; }
    .top-bar { padding: 0 16px; }
    .top-bar-search { min-width: 0; flex: 1; }

    .hero { min-height: 350px; padding: 0 20px 28px; }
    .hero-title { font-size: 1.8rem; }
    .hero-overview { -webkit-line-clamp: 2; font-size: 0.85rem; }
    .hero-actions { flex-direction: column; }
    .hero-btn-primary, .hero-btn-secondary { width: 100%; justify-content: center; padding: 12px; }

    .content-section { padding: 0 16px; margin-bottom: 28px; }
    .content-card { width: 140px; }
    .media-grid {
        padding: 0 16px 20px;
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 12px;
    }

    .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
    .plan-card.featured { transform: none; }

    .settings-container { padding: 24px 16px; }
    .settings-title { font-size: 1.8rem; }
    .settings-section { padding: 20px; }

    .events-grid { grid-template-columns: 1fr; }

    .payment-card { padding: 24px; }

    .profiles { gap: 20px; }
    .avatar { width: 110px; height: 110px; }
    .profiles-page h1 { font-size: 2rem; }
}

/* Small phones */
@media (max-width: 480px) {
    .hero { min-height: 300px; }
    .hero-title { font-size: 1.5rem; }
    .hero-meta { gap: 8px; }
    .content-card { width: 120px; }
    .avatar-picker-grid { grid-template-columns: repeat(5, 1fr); }
    .avatar-grid { grid-template-columns: repeat(4, 1fr); }
    .top-bar-search .search-text { display: none; }
    .top-bar-search { min-width: 40px; width: 40px; height: 40px; padding: 0; justify-content: center; border-radius: 50%; flex: 0 0 auto; margin-right: auto; }
}

/* TV / Large screens */
@media (min-width: 1600px) {
    .content-card { width: 210px; }
    .hero { min-height: 600px; }
    .hero-title { font-size: 3.5rem; }
    .media-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
}

/* ========================================
   BACKWARD COMPATIBLE ALIASES
   For old templates (movies.html, tv.html, 
   anime.html, category.html, details.html,
   watchlist.html, search.html, etc.)
   ======================================== */

/* Row Section = Content Section */
.row-section {
    padding: 12px 0;
}
.row-title, .rt-icon + a, .rt-icon {
    color: var(--text-primary);
    font-size: 1.3rem;
    font-weight: 700;
    padding: 0 24px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.rt-icon {
    font-size: 1.2rem;
}
.row-wrapper {
    position: relative;
    padding: 0 24px;
}

/* Row Slider = Content Row */
.row-slider {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 8px;
}
.row-slider::-webkit-scrollbar { display: none; }

/* Row Arrows */
.row-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    color: white;
    font-size: 1.8rem;
    width: 40px;
    height: 70px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    opacity: 0;
}
.row-wrapper:hover .row-arrow { opacity: 1; }
.row-arrow:hover { background: var(--primary-dim); border-color: var(--primary); }
.row-arrow-left { left: 4px; }
.row-arrow-right { right: 4px; }

/* Card = Content Card (old style) */
.card {
    flex: 0 0 180px;
    min-width: 180px;
    scroll-snap-align: start;
    text-decoration: none;
    color: var(--text-primary);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s;
    border-radius: var(--radius-md);
    overflow: hidden;
}
.card:hover {
    transform: scale(1.08);
    z-index: 5;
}
.card:focus {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}
.card-poster {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 2/3;
    background: var(--bg-surface);
}
.card-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s;
}
.card:hover .card-poster img {
    transform: scale(1.1);
}
.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 60%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}
.card:hover .card-overlay { opacity: 1; }
.play-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 4px 20px rgba(168,85,247,0.4);
    transition: transform 0.2s;
}
.card:hover .play-circle { transform: scale(1.1); }
.card-info {
    padding: 10px 4px 6px;
}
.card-info-title {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}
.card-info-year {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 2px 0 0;
}
.badge-rating {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    color: var(--warning);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-pill);
    z-index: 5;
}

/* Continue Watching Bar */
.cw-bar-bg {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255,255,255,0.15);
}
.cw-bar-fill {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 0 2px 0 0;
}

/* Hero Buttons (old) */
.hero-buttons {
    display: flex;
    gap: 12px;
    margin-top: 18px;
    flex-wrap: wrap;
}
.hbtn {
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.hbtn-play {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 20px rgba(168,85,247,0.3);
}
.hbtn-play:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(168,85,247,0.5);
}
.hbtn-info {
    background: var(--glass);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(8px);
}
.hbtn-info:hover {
    background: var(--glass-hover);
    border-color: var(--glass-border-hover);
}

/* Hero Tags */
.hero-tags {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.tag {
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.tag-trending { background: rgba(239,68,68,0.2); color: #ef4444; }
.tag-type { background: var(--primary-dim); color: var(--primary); }
.tag-rating {
    color: var(--warning);
    font-weight: 700;
    font-size: 0.85rem;
}

/* Slider Link */
.slider-link:hover { color: var(--primary) !important; }

/* Details page cards / grid */
.details-container { padding: 24px; max-width: 1200px; margin: 0 auto; }
.detail-hero { position: relative; border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 24px; }

/* Category page grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 18px;
    padding: 0 24px 60px;
}

/* Watchlist grid */
.watchlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 18px;
    padding: 24px;
}

/* Search results */
.search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 18px;
    padding: 24px;
}

/* Trial page */
.trial-container {
    max-width: 500px;
    margin: 60px auto;
    padding: 36px;
    background: var(--glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    text-align: center;
}

/* Saved toast */
.saved-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--success);
    color: white;
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    z-index: 9999;
    animation: toastIn 0.4s ease;
}

/* Badge premium */
.badge-premium {
    background: var(--accent-gradient);
    color: white;
    padding: 4px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 700;
}

/* Flash messages */
.flash-message {
    padding: 14px 24px;
    margin: 16px 24px;
    border-radius: var(--radius-sm);
    background: var(--primary-dim);
    border: 1px solid rgba(168,85,247,0.2);
    color: var(--text-primary);
}


/* ===== MOBILE HYBRID APP CUSTOM STYLES ===== */
.mobile-app-body .top-bar {
    display: none !important;
}
.mobile-app-body .sidebar {
    display: none !important;
}
.mobile-app-body .discord-banner {
    display: none !important;
}
.mobile-app-body .nexus-footer {
    display: none !important;
}
.mobile-app-body .discord-popup {
    display: none !important;
}
.mobile-app-body .main-content {
    margin-left: 0 !important;
    padding-top: 16px !important;
    padding-bottom: 80px !important;
}
.mobile-app-body .pricing-container {
    padding-top: 10px !important;
}
.mobile-app-body .settings-container {
    padding-top: 10px !important;
}
