/* ═══════════════════════════════════════════════════════════════
   GrobTV Player — Styles
   Font: Open Sans (loaded via HTML)
═══════════════════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
    --bg:           #080818;
    --bg2:          #0e0e24;
    --bg3:          #151530;
    --card:         rgba(255, 255, 255, 0.04);
    --card-hover:   rgba(255, 255, 255, 0.08);
    --border:       rgba(255, 255, 255, 0.08);
    --border-hover: rgba(139, 92, 246, 0.5);
    --purple:       #8b5cf6;
    --purple-dark:  #6d28d9;
    --purple-light: #a78bfa;
    --cyan:         #06b6d4;
    --pink:         #ec4899;
    --green:        #10b981;
    --orange:       #f59e0b;
    --red:          #ef4444;
    --text:         #f1f5f9;
    --text-2:       #94a3b8;
    --text-3:       #475569;
    --radius:       12px;
    --radius-lg:    18px;
    --shadow:       0 8px 32px rgba(0, 0, 0, 0.4);
    --transition:   0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: 'Open Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

a { color: var(--purple-light); text-decoration: none; }
a:hover { color: var(--text); }

input, select, button, textarea {
    font-family: inherit;
}

/* Fix native <select> option dropdown on Windows (white background) */
select option {
    background-color: #0e0e24;
    color: #f1f5f9;
}
    font-size: inherit;
}

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--purple-dark); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--purple); }

/* ═══════════════════════════════════════════════════════════
   AUTH PAGE (index.php)
═══════════════════════════════════════════════════════════ */

.auth-bg {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: radial-gradient(ellipse at 20% 50%, rgba(109, 40, 217, 0.15) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 20%, rgba(6, 182, 212, 0.10) 0%, transparent 50%),
                radial-gradient(ellipse at 60% 80%, rgba(236, 72, 153, 0.08) 0%, transparent 50%),
                var(--bg);
}

/* Floating orbs */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    animation: floatOrb 8s ease-in-out infinite;
}
.orb-1 { width: 400px; height: 400px; background: rgba(109, 40, 217, 0.2); top: -100px; left: -100px; animation-delay: 0s; }
.orb-2 { width: 300px; height: 300px; background: rgba(6, 182, 212, 0.15); bottom: -80px; right: -80px; animation-delay: 3s; }
.orb-3 { width: 200px; height: 200px; background: rgba(236, 72, 153, 0.12); top: 50%; right: 20%; animation-delay: 6s; }

@keyframes floatOrb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%       { transform: translate(30px, -30px) scale(1.05); }
    66%       { transform: translate(-20px, 20px) scale(0.95); }
}

.auth-card {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 440px;
    margin: 1rem;
    background: rgba(14, 14, 36, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow), 0 0 0 1px rgba(255,255,255,0.03) inset;
    animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo .logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--purple-dark), var(--cyan));
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.4);
}

.auth-logo .logo-icon svg { width: 32px; height: 32px; color: #fff; }

.auth-logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--purple-light), var(--cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.auth-logo p {
    font-size: 0.8rem;
    color: var(--text-3);
    margin-top: 0.25rem;
}

/* Tabs */
.auth-tabs {
    display: flex;
    background: var(--bg);
    border-radius: var(--radius);
    padding: 4px;
    margin-bottom: 1.75rem;
    border: 1px solid var(--border);
}

.auth-tab {
    flex: 1;
    padding: 0.6rem;
    background: transparent;
    border: none;
    color: var(--text-2);
    border-radius: calc(var(--radius) - 2px);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all var(--transition);
}

.auth-tab.active {
    background: linear-gradient(135deg, var(--purple-dark), var(--purple));
    color: #fff;
    box-shadow: 0 4px 12px rgba(109, 40, 217, 0.4);
}

/* Forms */
.form-group { margin-bottom: 1.1rem; }

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-2);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.9rem;
    transition: all var(--transition);
    outline: none;
}

.form-input:focus {
    border-color: var(--purple);
    background: rgba(139, 92, 246, 0.08);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.form-input::placeholder { color: var(--text-3); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    outline: none;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0);
    transition: background var(--transition);
}

.btn:hover::after { background: rgba(255,255,255,0.08); }

.btn-primary {
    background: linear-gradient(135deg, var(--purple-dark), var(--purple));
    color: #fff;
    width: 100%;
    padding: 0.85rem;
    box-shadow: 0 4px 20px rgba(109, 40, 217, 0.4);
    margin-top: 0.5rem;
}

.btn-primary:hover { box-shadow: 0 6px 28px rgba(109, 40, 217, 0.6); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
    background: transparent;
    color: var(--text-2);
    border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--border-hover); color: var(--text); }

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--red);
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.btn-danger:hover { background: rgba(239, 68, 68, 0.25); }

.btn-accent {
    background: rgba(6, 182, 212, 0.12);
    color: var(--cyan);
    border: 1px solid rgba(6, 182, 212, 0.35);
}
.btn-accent:hover { background: rgba(6, 182, 212, 0.22); border-color: var(--cyan); }

.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.8rem; }
.btn-icon { padding: 0.5rem; width: 36px; height: 36px; }

.btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

/* ═══════════════════════════════════════════════════════════
   DASHBOARD (dashboard.php)
═══════════════════════════════════════════════════════════ */

.app-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: radial-gradient(ellipse at 0% 0%, rgba(109, 40, 217, 0.08) 0%, transparent 50%),
                radial-gradient(ellipse at 100% 100%, rgba(6, 182, 212, 0.06) 0%, transparent 50%),
                var(--bg);
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 2rem;
    background: rgba(8, 8, 24, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

.nav-logo .logo-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--purple-dark), var(--cyan));
    border-radius: 8px;
    box-shadow: 0 0 16px rgba(139, 92, 246, 0.4);
}

.nav-logo .logo-mark svg { width: 20px; height: 20px; color: #fff; }

.nav-logo span {
    background: linear-gradient(135deg, var(--purple-light), var(--cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-2);
    font-size: 0.875rem;
}

.nav-avatar {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, var(--purple-dark), var(--purple));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.3);
}

/* Main content */
.main-content {
    flex: 1;
    padding: 2rem;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

/* Views */
.view { display: none; }
.view.active { display: block; animation: fadeIn 0.25s ease; }

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* List bar */
.list-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.list-select {
    flex: 1;
    min-width: 200px;
    max-width: 360px;
    padding: 0.65rem 1rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
    transition: all var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

.list-select:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15); }

.list-bar .actions { display: flex; gap: 0.5rem; margin-left: auto; }

/* Last sync badge */
.sync-info {
    font-size: 0.75rem;
    color: var(--text-3);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.sync-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--green);
    display: inline-block;
}

/* ── Empty state ───────────────────────────────────────────── */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 5rem 2rem;
    min-height: 60vh;
}

.empty-icon {
    width: 96px; height: 96px;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, rgba(109, 40, 217, 0.15), rgba(6, 182, 212, 0.1));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid rgba(139, 92, 246, 0.2);
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.15);
    animation: pulseGlow 3s ease-in-out infinite;
}

.empty-icon svg { width: 48px; height: 48px; color: var(--purple); }

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 40px rgba(139, 92, 246, 0.15); }
    50%       { box-shadow: 0 0 60px rgba(139, 92, 246, 0.3); }
}

.empty-state h2 { font-size: 1.75rem; font-weight: 700; margin-bottom: 0.75rem; }
.empty-state p  { color: var(--text-2); max-width: 400px; margin-bottom: 2rem; }

/* ── Dashboard cards ───────────────────────────────────────── */
.section-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 1.25rem;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 280px));
    justify-content: start;
    gap: 1.25rem;
    margin-bottom: 3rem;
}

.dashboard-card {
    position: relative;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    cursor: pointer;
    transition: all var(--transition);
    overflow: hidden;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--card-gradient);
    opacity: 0;
    transition: opacity var(--transition);
}

.dashboard-card:hover {
    background: var(--card-hover);
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(139, 92, 246, 0.1);
}

.dashboard-card:hover::before { opacity: 1; }

.card-live   { --card-gradient: linear-gradient(90deg, var(--purple), var(--cyan)); }
.card-movie  { --card-gradient: linear-gradient(90deg, var(--pink), var(--orange)); }
.card-series { --card-gradient: linear-gradient(90deg, var(--cyan), var(--green)); }

.card-body {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.card-icon-wrap {
    width: 56px; height: 56px;
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.card-live   .card-icon-wrap { background: rgba(139, 92, 246, 0.15); }
.card-movie  .card-icon-wrap { background: rgba(236, 72, 153, 0.15); }
.card-series .card-icon-wrap { background: rgba(6, 182, 212, 0.15); }

.card-icon-wrap svg {
    width: 28px; height: 28px;
}
.card-live   .card-icon-wrap svg { color: var(--purple); }
.card-movie  .card-icon-wrap svg { color: var(--pink); }
.card-series .card-icon-wrap svg { color: var(--cyan); }

.card-info .card-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.3rem;
}

.card-count {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
    letter-spacing: -1px;
}

.card-arrow {
    position: absolute;
    right: 1.5rem; top: 50%;
    transform: translateY(-50%);
    color: var(--text-3);
    transition: all var(--transition);
}
.dashboard-card:hover .card-arrow { color: var(--text-2); transform: translateY(-50%) translateX(4px); }
.card-arrow svg { width: 20px; height: 20px; }

/* ── Content view ──────────────────────────────────────────── */
.content-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.9rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-2);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    outline: none;
}
.back-btn:hover { border-color: var(--border-hover); color: var(--text); }
.back-btn svg { width: 16px; height: 16px; }

.content-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.breadcrumb-link {
    cursor: pointer;
    color: var(--text-2);
    transition: color 0.2s;
}
.breadcrumb-link:hover { color: var(--text); }

.breadcrumb-sep {
    color: var(--text-3);
    font-weight: 400;
    padding: 0 0.1rem;
}

.content-badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 100px;
    font-weight: 600;
    background: rgba(139, 92, 246, 0.15);
    color: var(--purple-light);
    border: 1px solid rgba(139, 92, 246, 0.25);
}

.content-toolbar {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.search-wrap { position: relative; flex: 1; min-width: 200px; }

.search-wrap svg {
    position: absolute;
    left: 0.85rem; top: 50%;
    transform: translateY(-50%);
    width: 16px; height: 16px;
    color: var(--text-3);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 0.65rem 1rem 0.65rem 2.5rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.875rem;
    outline: none;
    transition: all var(--transition);
}

.search-input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12); }

.filter-select {
    padding: 0.65rem 2.5rem 0.65rem 1rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.875rem;
    cursor: pointer;
    outline: none;
    transition: all var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    min-width: 180px;
}
.filter-select:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12); }

/* Streams Grid */
.streams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stream-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}

.stream-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3), 0 0 0 1px rgba(139, 92, 246, 0.15);
}

.stream-poster {
    aspect-ratio: 16/9;
    background: var(--bg3);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    position: relative;
}

.stream-poster img {
    width: 100%; height: 100%;
    object-fit: contain;
    padding: 0.5rem;
    transition: transform var(--transition);
}
.stream-card:hover .stream-poster img { transform: scale(1.05); }

.stream-poster .no-logo {
    width: 48px; height: 48px;
    color: var(--text-3);
}

.stream-play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex; align-items: center; justify-content: center;
    opacity: 0;
    transition: opacity var(--transition);
}
.stream-card:hover .stream-play-overlay { opacity: 1; }
.stream-play-overlay svg { width: 36px; height: 36px; color: #fff; }

.stream-info { padding: 0.6rem 0.75rem; }

.stream-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    min-height: 2.3em;
    margin-bottom: 0.2rem;
}

.stream-group {
    font-size: 0.7rem;
    color: var(--text-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 1rem 0 2rem;
    flex-wrap: wrap;
}

.page-btn {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-2);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}
.page-btn:hover { border-color: var(--border-hover); color: var(--text); }
.page-btn.active { background: linear-gradient(135deg, var(--purple-dark), var(--purple)); border-color: transparent; color: #fff; }
.page-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* ═══════════════════════════════════════════════════════════
   MODALS
═══════════════════════════════════════════════════════════ */

.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.hidden { display: none; }

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: fadeOverlay 0.2s ease;
}

@keyframes fadeOverlay { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    animation: scaleIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}

.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 1.5rem;
}

.modal-title { font-size: 1.15rem; font-weight: 700; }

.modal-close {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-2);
    cursor: pointer;
    transition: all var(--transition);
    outline: none;
}
.modal-close:hover { border-color: var(--border-hover); color: var(--text); }

/* List type tabs */
.type-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; }

.type-tab {
    flex: 1;
    padding: 0.55rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-2);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    outline: none;
    text-align: center;
}
.type-tab.active { border-color: var(--purple); background: rgba(139, 92, 246, 0.1); color: var(--purple-light); }

/* ═══════════════════════════════════════════════════════════
   PLAYER MODAL
═══════════════════════════════════════════════════════════ */

.player-modal {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.2s ease, playerLedGlow 4s ease-in-out 0.25s infinite;
}
@keyframes playerLedGlow {
    0%,100% { box-shadow: inset 0 0 0 2px rgba(139,92,246,0.45), inset 0 0 50px rgba(139,92,246,0.06); }
    33%     { box-shadow: inset 0 0 0 2px rgba(99,102,241,0.5),  inset 0 0 50px rgba(99,102,241,0.08); }
    66%     { box-shadow: inset 0 0 0 2px rgba(168,85,247,0.5),  inset 0 0 50px rgba(168,85,247,0.08); }
}

.player-modal.hidden { display: none; }

.player-topbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(0,0,0,0.5);
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.player-close {
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: all var(--transition);
    outline: none;
    flex-shrink: 0;
}
.player-close:hover { background: rgba(255,255,255,0.15); }
.player-close svg { width: 18px; height: 18px; }

.player-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-group-badge {
    margin-left: auto;
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 100px;
    background: rgba(139, 92, 246, 0.2);
    color: var(--purple-light);
    border: 1px solid rgba(139, 92, 246, 0.3);
    white-space: nowrap;
    flex-shrink: 0;
}

.player-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    position: relative;
}

#video-player {
    width: 100%;
    height: 100%;
    max-height: calc(100vh - 70px);
    outline: none;
    background: #000;
}

.player-spinner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.player-spinner.hidden { display: none; }

.spinner-ring {
    width: 48px; height: 48px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: var(--purple);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.player-error {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-2);
    gap: 0.75rem;
}
.player-error.hidden { display: none; }
.player-error svg { width: 48px; height: 48px; color: var(--red); }
.player-error p { font-size: 0.9rem; text-align: center; max-width: 300px; }

/* ── Resume overlay (retomar / reiniciar) ── */
.player-resume-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    animation: fadeIn 0.2s ease;
}
.player-resume-overlay.hidden { display: none; }
.player-resume-card {
    background: var(--bg2);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 14px;
    padding: 2rem 2.25rem;
    text-align: center;
    max-width: 360px;
    width: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    box-shadow: 0 24px 64px rgba(0,0,0,0.75);
}
.player-resume-card > svg { width: 40px; height: 40px; color: var(--purple-light); margin-bottom: 0.2rem; }
.player-resume-title { font-size: 1.05rem; font-weight: 700; color: var(--text); margin: 0; }
.player-resume-time  { font-size: 0.875rem; color: var(--text-2); margin: 0; }
.player-resume-btns  {
    display: flex;
    gap: 0.65rem;
    margin-top: 0.6rem;
    flex-wrap: wrap;
    justify-content: center;
}
.player-resume-btn-restart {
    display: flex; align-items: center; gap: 0.4rem;
    padding: 0.55rem 1.1rem;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    color: var(--text-2);
    font-size: 0.85rem; font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}
.player-resume-btn-restart:hover { background: rgba(255,255,255,0.13); color: var(--text); }
.player-resume-btn-continue {
    display: flex; align-items: center; gap: 0.4rem;
    padding: 0.55rem 1.3rem;
    background: var(--purple);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 0.85rem; font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
}
.player-resume-btn-continue:hover { filter: brightness(1.12); }

/* ── Live controls bar (ao vivo: sem seekbar / sem velocidade) ── */
.player-live-controls {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.9rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.72));
    z-index: 2;
    transition: opacity 0.2s;
}
.player-live-controls.hidden { display: none; }

.live-playpause-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0.2rem;
    display: flex;
    align-items: center;
    border-radius: 4px;
}
.live-playpause-btn:hover { background: rgba(255,255,255,0.12); }
.live-playpause-btn svg  { width: 26px; height: 26px; }
.live-playpause-btn svg.hidden { display: none; }

.live-badge {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: #fff;
    background: var(--red, #e53e3e);
    padding: 0.18rem 0.55rem;
    border-radius: 100px;
    white-space: nowrap;
}

.live-volume {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: rgba(255,255,255,0.8);
    cursor: pointer;
}
.live-volume svg   { width: 16px; height: 16px; flex-shrink: 0; }
.live-volume input[type=range] {
    width: 72px;
    accent-color: #fff;
    cursor: pointer;
}

/* ═══════════════════════════════════════════════════════════
   TOAST
═══════════════════════════════════════════════════════════ */

.toast-container {
    position: fixed;
    bottom: 1.5rem; right: 1.5rem;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1.1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    max-width: 340px;
    box-shadow: var(--shadow);
    animation: toastIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}

.toast.out { animation: toastOut 0.3s ease forwards; }

@keyframes toastOut {
    to { opacity: 0; transform: translateX(30px); }
}

.toast-success { background: rgba(16, 185, 129, 0.15); border-color: rgba(16, 185, 129, 0.3); color: #6ee7b7; }
.toast-error   { background: rgba(239, 68, 68, 0.15);  border-color: rgba(239, 68, 68, 0.3);  color: #fca5a5; }
.toast-info    { background: rgba(139, 92, 246, 0.15); border-color: rgba(139, 92, 246, 0.3); color: var(--purple-light); }
.toast-warning { background: rgba(245, 158, 11, 0.15); border-color: rgba(245, 158, 11, 0.3); color: #fcd34d; }

.toast svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════════
   LOADING OVERLAY
═══════════════════════════════════════════════════════════ */

.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
}
.loading-overlay.hidden { display: none; }

.loading-pulse {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple-dark), var(--cyan));
    animation: pulse 1.2s ease-in-out infinite;
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.5);
}

@keyframes pulse {
    0%, 100% { transform: scale(0.8); opacity: 0.6; }
    50%       { transform: scale(1.1); opacity: 1; }
}

.loading-text { font-size: 0.875rem; color: var(--text-2); }

/* ── Skeleton ───────────────────────────────────────────── */
.skeleton {
    background: linear-gradient(90deg, var(--bg3) 25%, rgba(255,255,255,0.04) 50%, var(--bg3) 75%);
    background-size: 400% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 6px;
}

@keyframes shimmer {
    0%   { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.skeleton-card {
    height: 160px;
    border-radius: var(--radius);
}

/* ── Divider ────────────────────────────────────────────── */
.divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.25rem 0;
    color: var(--text-3);
    font-size: 0.75rem;
}
.divider::before, .divider::after {
    content: ''; flex: 1;
    height: 1px; background: var(--border);
}

/* ── Utility ────────────────────────────────────────────── */
.hidden { display: none !important; }
.text-muted { color: var(--text-2); }
.text-xs { font-size: 0.75rem; }
.mt-1 { margin-top: 0.5rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: 0.5rem; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .navbar { padding: 0.75rem 1rem; }
    .main-content { padding: 1rem; }
    .list-bar { flex-direction: column; align-items: stretch; }
    .list-select { max-width: 100%; }
    .list-bar .actions { justify-content: flex-end; }
    .streams-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
    .cards-grid { grid-template-columns: 1fr; }
    .player-topbar { padding: 0.75rem 1rem; }
    .player-title { font-size: 0.875rem; }
    /* Reduz espaçamento antes da lista */
    .content-header { margin-bottom: 0.75rem; }
    .content-toolbar { margin-bottom: 0.75rem; }
    /* Season tabs: scroll horizontal em vez de wrap */
    .detail-season-tabs { flex-wrap: nowrap; overflow-x: auto; padding: 0.75rem 1rem; -webkit-overflow-scrolling: touch; }
    .detail-season-tabs::-webkit-scrollbar { display: none; }
    .detail-season-tab { flex-shrink: 0; }
    /* Episódios: garantir altura correta para scroll */
    .detail-inner-scroll { padding: 0; }
    .detail-episodes-list { padding: 0.75rem 0.75rem 5rem; }
}

@media (max-width: 480px) {
    .auth-card { padding: 1.75rem 1.25rem; }
    .modal-box { padding: 1.5rem 1.25rem; }
    .streams-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 0.6rem; }
    .nav-logo span { display: none; }
}

/* ═══════════════════════════════════════════════════════════
   STREAM CARD — PROGRESS BAR (watch history)
═══════════════════════════════════════════════════════════ */
.stream-card { position: relative; }

.card-progress {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: rgba(255,255,255,0.12);
    border-radius: 0 0 var(--radius) var(--radius);
    overflow: hidden;
}
.card-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--purple), var(--cyan));
    border-radius: inherit;
    transition: width 0.3s;
}

/* ═══════════════════════════════════════════════════════════
   CONTINUE WATCHING STRIP
═══════════════════════════════════════════════════════════ */
.continue-strip {
    display: flex;
    gap: 0.9rem;
    overflow-x: auto;
    padding-bottom: 0.75rem;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
    -webkit-overflow-scrolling: touch;
}
.continue-strip::-webkit-scrollbar { height: 4px; }
.continue-strip::-webkit-scrollbar-track { background: transparent; }
.continue-strip::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.continue-card {
    flex-shrink: 0;
    width: 168px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
}
.continue-card:hover { border-color: var(--border-hover); transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,0.3); }

.continue-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--bg3);
    position: relative;
    overflow: hidden;
}
.continue-thumb img { width: 100%; height: 100%; object-fit: cover; }
.continue-thumb .no-logo { width: 28px; height: 28px; position: absolute; inset: 0; margin: auto; color: var(--text-3); }

.continue-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity var(--transition);
}
.continue-card:hover .continue-overlay { opacity: 1; }
.continue-overlay svg { width: 28px; height: 28px; color: #fff; filter: drop-shadow(0 2px 6px rgba(0,0,0,.6)); }

.continue-prog {
    position: absolute; bottom: 0; left: 0; right: 0;
    height: 3px; background: rgba(255,255,255,0.15);
}
.continue-prog-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--purple), var(--cyan));
}

.continue-info {
    padding: 0.55rem 0.65rem;
}
.continue-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.2rem;
}
.continue-sub {
    font-size: 0.68rem;
    color: var(--text-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ═══════════════════════════════════════════════════════════
   NETFLIX-STYLE DETAIL MODAL  (90×90% overlay)
═══════════════════════════════════════════════════════════ */

/* Dark overlay */
.modal-detail {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5vh 5vw;
    background: rgba(0,0,0,0.88);
    backdrop-filter: blur(6px);
    animation: detailFadeIn 0.22s ease;
}
@keyframes detailFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* 90×90% box */
.detail-container {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 1280px;
    background: var(--bg);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: detailSlideIn 0.28s cubic-bezier(0.4,0,0.2,1), modalLedGlow 4s ease-in-out 0.3s infinite;
}
@keyframes detailSlideIn {
    from { opacity: 0; transform: scale(0.96) translateY(14px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes modalLedGlow {
    0%,100% { box-shadow: 0 0 0 1.5px rgba(139,92,246,0.65), 0 0 32px rgba(139,92,246,0.18), 0 32px 80px rgba(0,0,0,0.85); }
    33%     { box-shadow: 0 0 0 1.5px rgba(99,102,241,0.7),  0 0 32px rgba(99,102,241,0.22),  0 32px 80px rgba(0,0,0,0.85); }
    66%     { box-shadow: 0 0 0 1.5px rgba(168,85,247,0.7),  0 0 32px rgba(168,85,247,0.22),  0 32px 80px rgba(0,0,0,0.85); }
}

/* Backdrop hero (inside container) */
.detail-backdrop {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 52%;
    background-size: cover;
    background-position: center top;
    background-color: var(--bg3);
    pointer-events: none;
}
.detail-backdrop-overlay {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 52%;
    background: linear-gradient(to bottom,
        rgba(8,8,24,0.1) 0%,
        rgba(8,8,24,0.6) 58%,
        var(--bg) 100%);
    pointer-events: none;
}

/* ── Navbar: back + breadcrumb + close ── */
.detail-navbar {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1rem;
    min-height: 52px;
    flex-shrink: 0;
}
.detail-back-btn {
    display: flex; align-items: center; gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: var(--text-2);
    font-size: 0.83rem; font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    flex-shrink: 0;
}
.detail-back-btn:hover { background: rgba(255,255,255,0.13); color: var(--text); }
.detail-nav-breadcrumb {
    flex: 1;
    font-size: 0.88rem; font-weight: 600;
    color: var(--text-2);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.detail-close-btn {
    flex-shrink: 0;
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(8,8,24,0.75);
    color: var(--text);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all var(--transition);
}
.detail-close-btn:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.3); transform: scale(1.1); }

/* ── Screens (info / seasons / episodes) ── */
.detail-screen {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
}

/* Info screen scrollable content */
.detail-scroll {
    position: relative;
    z-index: 2;
    padding: 180px 2.5rem 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Two-column layout */
.detail-layout {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 2.5rem;
    align-items: start;
}

/* ── Left column: poster + actions ── */
.detail-left {
    position: sticky;
    top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.detail-poster-wrap {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    background: var(--bg3);
    aspect-ratio: 2/3;
    display: flex; align-items: center; justify-content: center;
}
.detail-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.detail-poster-fallback {
    width: 100%; height: 100%;
    display: none;
    align-items: center; justify-content: center;
    color: var(--text-3);
    background: var(--bg3);
}

/* Progress under poster */
.detail-progress-section {
    padding: 0.1rem 0;
}
.detail-progress-track {
    height: 4px;
    background: rgba(255,255,255,0.12);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.3rem;
}
.detail-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--purple), var(--cyan));
    border-radius: 2px;
    transition: width 0.4s;
}
.detail-progress-label {
    font-size: 0.7rem;
    color: var(--text-3);
}

/* Play button */
.btn-play-detail {
    width: 100%;
    padding: 0.85rem;
    background: linear-gradient(135deg, var(--purple-dark), var(--purple));
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 0.6rem;
    transition: all var(--transition);
    box-shadow: 0 6px 24px rgba(109,40,217,0.45);
}
.btn-play-detail:hover { box-shadow: 0 8px 32px rgba(109,40,217,0.65); transform: translateY(-1px); }

/* Seasons button */
.btn-seasons-detail {
    width: 100%;
    padding: 0.7rem;
    background: rgba(255,255,255,0.07);
    color: var(--text-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 0.5rem;
    transition: all var(--transition);
}
.btn-seasons-detail:hover { background: rgba(255,255,255,0.12); border-color: var(--border-hover); color: var(--text); }

/* ── Right column: metadata ── */
.detail-right {
    padding-top: 0.5rem;
}

.detail-loading-state {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 2rem 0;
    color: var(--text-2);
}

.detail-title {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.15;
    color: var(--text);
    margin-bottom: 0.9rem;
    letter-spacing: -0.5px;
}

.detail-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.9rem;
}

.detail-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    background: rgba(255,255,255,0.07);
    color: var(--text-2);
    border: 1px solid rgba(255,255,255,0.08);
}
.detail-badge-rating {
    background: rgba(245, 158, 11, 0.15);
    color: #fcd34d;
    border-color: rgba(245, 158, 11, 0.25);
}
.detail-badge-status {
    background: rgba(16, 185, 129, 0.12);
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.2);
}

.detail-genres-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}
.detail-genre-tag {
    padding: 0.2rem 0.7rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(139, 92, 246, 0.12);
    color: var(--purple-light);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.detail-overview {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--text-2);
    margin-bottom: 1.5rem;
}

.detail-section-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-3);
    margin-bottom: 0.75rem;
}

.detail-crew-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
    color: var(--text-2);
}
.detail-crew-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-3);
    flex-shrink: 0;
}

/* Cast grid */
.detail-cast {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
}
.cast-chip {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.3rem 0.65rem 0.3rem 0.3rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.78rem;
    color: var(--text-2);
    transition: all var(--transition);
}
.cast-chip:hover { background: rgba(255,255,255,0.1); color: var(--text); }
.cast-avatar {
    width: 26px; height: 26px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg3);
    flex-shrink: 0;
}
.cast-avatar-placeholder {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple-dark), var(--purple));
    display: flex; align-items: center; justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

/* Fallback notice */
.detail-fallback-group {
    font-size: 0.85rem;
    color: var(--text-3);
    margin-bottom: 1.5rem;
}
.detail-tmdb-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 1rem 1.1rem;
    background: rgba(139, 92, 246, 0.07);
    border: 1px solid rgba(139, 92, 246, 0.18);
    border-radius: var(--radius);
    font-size: 0.85rem;
    color: var(--text-2);
    line-height: 1.5;
    margin-top: 0.5rem;
}
.detail-tmdb-notice svg { flex-shrink: 0; margin-top: 1px; color: var(--purple-light); }
.detail-tmdb-notice code { font-family: monospace; font-size: 0.82em; color: var(--purple-light); }
.detail-tmdb-notice strong { color: var(--text); }

/* ── Seasons & Episodes inner screens ── */
.detail-inner-scroll {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* Season tabs bar — replaces old card grid */
.detail-season-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    padding: 1rem 1.5rem 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    flex-shrink: 0;
}
.detail-season-tab {
    padding: 0.3rem 0.85rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.05);
    color: var(--text-2);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.detail-season-tab:hover   { border-color: var(--purple); color: var(--text); }
.detail-season-tab.active  { background: var(--purple); border-color: var(--purple); color: #fff; }

.detail-episodes-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 1.5rem 2rem;
    overflow-y: auto;
    flex: 1;
}
.detail-episode-row {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.65rem 0.9rem;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
}
.detail-episode-row:hover { background: var(--bg3); border-color: var(--purple); }
.detail-episode-num {
    font-size: 0.85rem; font-weight: 700;
    color: var(--text-3);
    min-width: 2.5rem; text-align: right;
    flex-shrink: 0;
}
.detail-episode-thumb {
    width: 96px; height: 54px;
    border-radius: 6px; overflow: hidden;
    background: var(--bg3); flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
}
.detail-episode-thumb img { width: 100%; height: 100%; object-fit: cover; }
.detail-episode-thumb svg { width: 18px; height: 18px; color: var(--text-3); }
.detail-episode-info { flex: 1; min-width: 0; }
.detail-episode-name {
    font-size: 0.88rem; font-weight: 600; color: var(--text);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.detail-episode-overview {
    font-size: 0.76rem;
    color: var(--text-3);
    margin: 0.25rem 0 0;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.detail-episode-prog {
    height: 3px; background: rgba(255,255,255,0.1);
    border-radius: 2px; margin-top: 0.4rem; overflow: hidden;
}
.detail-episode-prog-fill {
    height: 3px;
    background: linear-gradient(90deg, var(--purple), var(--cyan));
    border-radius: 2px;
}
.detail-episode-play-icon { color: var(--text-3); flex-shrink: 0; }

/* Responsive */
@media (max-width: 700px) {
    .modal-detail { padding: 0; }
    .detail-container { border-radius: 0; width: 100vw; height: 100dvh; }
    .detail-scroll { padding: 160px 1rem 2rem; }
    .detail-inner-scroll { padding: 1rem; }
    .detail-layout { grid-template-columns: 1fr; }
    .detail-left { position: static; flex-direction: row; flex-wrap: wrap; }
    .detail-poster-wrap { width: 110px; }
    .detail-title { font-size: 1.6rem; }
    .detail-backdrop, .detail-backdrop-overlay { height: 45%; }
    .btn-play-detail, .btn-seasons-detail { flex: 1; }
    .detail-seasons-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
    .detail-episode-thumb { display: none; }
    .detail-episode-num { min-width: 1.8rem; }
}

/* ════════════════════════════════════════════════════════════
   OVERLAY — CARREGAMENTO DE LISTA
════════════════════════════════════════════════════════════ */
.list-loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(6, 6, 14, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.25s ease;
}
.list-loading-overlay.hidden { display: none; }

.list-loading-content {
    text-align: center;
    max-width: 400px;
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

/* Círculo animado */
.list-loading-circle {
    position: relative;
    width: 130px;
    height: 130px;
    margin-bottom: 1.75rem;
}
.list-loading-circle svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}
.lc-track {
    fill: none;
    stroke: rgba(139, 92, 246, 0.18);
    stroke-width: 5;
}
.lc-fill {
    fill: none;
    stroke: url(#llGrad);
    stroke-width: 5;
    stroke-linecap: round;
    stroke-dasharray: 264;
    stroke-dashoffset: 264;
    animation: lcSpin 2.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
@keyframes lcSpin {
    0%   { stroke-dashoffset: 264; opacity: 1; }
    45%  { stroke-dashoffset: 0;   opacity: 1; }
    55%  { stroke-dashoffset: 0;   opacity: 0.6; }
    100% { stroke-dashoffset: 264; opacity: 1; }
}
.list-loading-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.list-loading-icon svg {
    width: 40px;
    height: 40px;
    color: var(--purple);
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.6));
    animation: iconPulse 2.8s ease-in-out infinite;
}
@keyframes iconPulse {
    0%, 100% { transform: scale(1);    opacity: 0.85; }
    50%       { transform: scale(1.1); opacity: 1;    }
}

.list-loading-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.3px;
    margin-bottom: 0.6rem;
}

.list-loading-msg {
    font-size: 0.93rem;
    color: var(--text-2);
    min-height: 1.5em;
    line-height: 1.55;
    transition: opacity 0.35s ease;
    margin-bottom: 1.5rem;
    padding: 0 1rem;
}

.list-loading-dots {
    display: flex;
    justify-content: center;
    gap: 7px;
}
.list-loading-dots span {
    width: 8px; height: 8px;
    background: var(--purple);
    border-radius: 50%;
    opacity: 0.25;
    animation: dotPulse 1.5s ease-in-out infinite;
}
.list-loading-dots span:nth-child(2) { animation-delay: 0.25s; }
.list-loading-dots span:nth-child(3) { animation-delay: 0.5s; }
@keyframes dotPulse {
    0%, 80%, 100% { opacity: 0.25; transform: scale(0.75); }
    40%            { opacity: 1;    transform: scale(1.15); }
}

/* ════════════════════════════════════════════════════════════
   DETALHE — BLUR ENQUANTO CARREGA
════════════════════════════════════════════════════════════ */
.detail-fetching .detail-left {
    filter: blur(6px);
    transition: filter 0.4s ease;
}
.detail-fetching .detail-right {
    opacity: 0.35;
    pointer-events: none;
    transition: opacity 0.4s ease;
}
.detail-fetching .detail-loading-state {
    font-size: 1rem;
    color: var(--text-2);
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 2.5rem 0 1rem;
}
.detail-fetching-msg {
    font-size: 0.9rem;
    color: var(--text-3);
    transition: opacity 0.3s ease;
}


