:root {
    --bg-netflix: #141414;
    --bg-surface: #181818;
    --bg-card: #202020;
    --bg-card-hover: #2a2a2a;
    --primary: #e50914;
    --primary-hover: #b81d24;
    --accent: #38bdf8;
    --text-main: #ffffff;
    --text-muted: #aaaaaa;
    --border: #333333;
    --border-focused: #ffffff;
    --glow-focused: rgba(255, 255, 255, 0.4);
    --radius: 8px;
    --radius-lg: 16px;
    --transition: all 0.22s cubic-bezier(0.2, 0, 0, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Phosphor Duotone artwork selected from opensvg.dev and self-hosted locally. */
.open-icon {
    width: 1.15em;
    height: 1.15em;
    flex: 0 0 auto;
    display: inline-block;
    vertical-align: -0.16em;
    background: currentColor;
    -webkit-mask: var(--open-icon) center / contain no-repeat;
    mask: var(--open-icon) center / contain no-repeat;
}

.rating-icon {
    width: 0.95em;
    height: 0.95em;
    vertical-align: -0.1em;
}

.logo-icon {
    display: inline-flex;
    color: var(--primary);
}

.logo-mark {
    width: 1.25em;
    height: 1.25em;
}

.empty-state-icon {
    width: 2.5rem;
    height: 2.5rem;
    color: var(--accent);
}

.play-overlay-icon {
    width: 1.7rem;
    height: 1.7rem;
}

body.netflix-theme {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-netflix);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* iPhone-inspired local access gate */
.access-gate {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow-y: auto;
    background: radial-gradient(circle at 50% 0%, #3b1020 0%, #141414 47%, #090909 100%);
}

.access-gate.hidden { display: none; }

.access-card {
    width: min(100%, 390px);
    padding: 2.4rem 2.25rem 2rem;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.13);
    border-radius: 30px;
    background: rgba(24,24,24,0.93);
    box-shadow: 0 32px 90px rgba(0,0,0,0.55);
}

.access-logo {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    margin: 0 auto 1rem;
    border-radius: 17px;
    color: #fff;
    background: linear-gradient(145deg, #ef233c, #ad0710);
    box-shadow: 0 10px 26px rgba(229,9,20,0.32);
}
.access-logo .open-icon { width: 1.75rem; height: 1.75rem; }
.access-kicker { color: #e50914; font-size: .75rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.access-card h1 { margin: .4rem 0 .45rem; font-size: 2rem; letter-spacing: -.06em; }
.access-name-input {
    width: 100%;
    margin-top: .5rem;
    padding: .85rem 1rem;
    border: 1px solid #444;
    border-radius: 13px;
    outline: none;
    color: #fff;
    background: #262626;
    font: inherit;
}
.access-name-input:focus, .access-name-input.focused { border-color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.12); }
.pin-dots { display: flex; justify-content: center; gap: 1rem; min-height: 25px; margin: 1.6rem 0 1rem; }
.pin-dots span { width: 13px; height: 13px; border: 1.5px solid #999; border-radius: 50%; transition: all .14s ease; }
.pin-dots span.filled { border-color: #fff; background: #fff; transform: scale(1.12); }
.pin-keypad { display: grid; grid-template-columns: repeat(3, 68px); justify-content: center; gap: .8rem; }
.pin-key {
    width: 68px; height: 68px; border: 1px solid rgba(255,255,255,.2); border-radius: 50%;
    color: #fff; background: rgba(255,255,255,.09); cursor: pointer; font: 600 1.35rem/1 'Plus Jakarta Sans', sans-serif;
    transition: transform .1s ease, background .1s ease, border-color .1s ease;
}
.pin-key:hover, .pin-key.focused { background: rgba(255,255,255,.2); border-color: #fff; }
.pin-key:active, .pin-key.pressed { transform: scale(.9); background: #fff; color: #141414; }
.pin-key-empty { visibility: hidden; pointer-events: none; }
.pin-key-delete { display: grid; place-items: center; }
.pin-key-delete .open-icon { width: 1.25rem; height: 1.25rem; }
.access-error { min-height: 1.25rem; margin: .45rem 0; color: #ff6974; font-size: .82rem; font-weight: 700; }
.access-hint { margin-top: 1.1rem; color: #777; font-size: .75rem; }

/* Page Views */
.page-view {
    width: 100%;
    animation: fadeIn 0.25s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-nav-bar {
    padding: 1rem 4%;
    margin-top: 68px;
}

.btn-page-back {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 0.6rem 1.4rem;
    border-radius: 24px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-page-back:hover, .btn-page-back.focused {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
    transform: scale(1.04);
}

/* Netflix Sticky Navbar */
.netflix-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 68px;
    padding: 0 4%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 100;
    background: linear-gradient(180deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
    transition: background 0.4s ease;
}

.netflix-navbar.scrolled {
    background: rgba(20, 20, 20, 0.98);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    color: #ffffff;
    cursor: pointer;
}

.logo strong {
    color: var(--primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.nav-link {
    background: none;
    border: none;
    color: #e5e5e5;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    padding: 0.4rem 0.2rem;
}

.nav-link:hover, .nav-link.focused {
    color: #b3b3b3;
}

.nav-link.active {
    color: #ffffff;
    font-weight: 700;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* SC Health Semafor */
.sc-status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.sc-status-indicator:hover, .sc-status-indicator.focused {
    background: rgba(255, 255, 255, 0.16);
    border-color: #ffffff;
}

.semafor-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #eab308;
    box-shadow: 0 0 8px rgba(234, 179, 8, 0.6);
    transition: var(--transition);
}

.semafor-dot.online {
    background: #22c55e;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.7);
}

.semafor-dot.offline {
    background: #ef4444;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.7);
}

.semafor-dot.degraded {
    background: #f59e0b;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.7);
}

.search-bar-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 0.85rem;
    font-size: 1rem;
    color: #cccccc;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.search-inline-spinner {
    position: absolute;
    left: 0.85rem;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    pointer-events: none;
}

.search-loading-box {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    padding: 5rem 1rem;
    color: #e5e5e5;
    font-size: 1.15rem;
    font-weight: 700;
}

.search-input {
    background: rgba(0, 0, 0, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 0.45rem 2.2rem 0.45rem 2.4rem;
    color: #ffffff;
    font-size: 0.85rem;
    width: 220px;
    outline: none;
    transition: width 0.3s ease, border-color 0.3s ease;
}

.search-input:focus, .search-input.focused {
    width: 320px;
    border-color: #ffffff;
    background: rgba(0, 0, 0, 0.95);
}

.search-clear-btn {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: #999999;
    cursor: pointer;
    display: none;
}

.search-clear-btn .open-icon {
    width: 1rem;
    height: 1rem;
}

.user-profile-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.3rem 0.8rem 0.3rem 0.4rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
}

.user-profile-pill:hover, .user-profile-pill.focused {
    background: rgba(255, 255, 255, 0.2);
    border-color: #ffffff;
}

.user-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar .open-icon {
    width: 15px;
    height: 15px;
}

/* Main Content */
.main-content {
    flex: 1;
    width: 100%;
    padding-bottom: 4rem;
}

/* Empty home must clear the fixed 68px navigation bar. */
#view-home.empty-home-view .browse-rows-container {
    padding: 96px 4% 2rem;
}

#view-home.empty-home-view .empty-state {
    max-width: 720px;
    padding: 2rem;
    border-radius: var(--radius-lg);
    background: var(--bg-surface);
}

/* Netflix Hero Billboard */
.hero-billboard {
    position: relative;
    width: 100vw;
    height: 75vh;
    min-height: 520px;
    max-height: 800px;
    display: flex;
    align-items: center;
    padding: 0 4%;
    overflow: hidden;
}

.hero-backdrop-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center 20%;
    z-index: 1;
    transition: background-image 0.6s ease-in-out;
}

.hero-vignette {
    position: absolute;
    inset: 0;
    background: linear-gradient(77deg, rgba(20,20,20,0.95) 0%, rgba(20,20,20,0.6) 45%, rgba(20,20,20,0) 85%),
                linear-gradient(180deg, rgba(20,20,20,0) 60%, rgba(20,20,20,1) 100%);
    z-index: 2;
}

.hero-info-pane {
    position: relative;
    z-index: 3;
    max-width: 650px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hero-meta-badges {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.badge-tag {
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.type-tag { background: var(--primary); color: #ffffff; }
.rating-tag { background: #46d369; color: #000000; display: inline-flex; align-items: center; gap: 0.28rem; }
.quality-tag { border: 1px solid rgba(255,255,255,0.4); color: #ffffff; }
.hero-year { color: #cccccc; font-weight: 600; font-size: 0.9rem; }

.hero-main-title {
    font-size: 3.2rem;
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1.1;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.7);
}

.hero-synopsis {
    font-size: 1.05rem;
    color: #ffffff;
    line-height: 1.55;
    text-shadow: 1px 1px 6px rgba(0,0,0,0.8);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-button-row { display: flex; gap: 1rem; margin-top: 0.5rem; }

.btn-hero-play {
    background: #ffffff;
    color: #000000;
    padding: 0.8rem 1.8rem;
    border-radius: 6px;
    font-size: 1.05rem;
    font-weight: 800;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: var(--transition);
}

.btn-hero-play:hover, .btn-hero-play.focused {
    background: rgba(255, 255, 255, 0.75);
    transform: scale(1.05);
}

.btn-hero-info {
    background: rgba(109, 109, 110, 0.7);
    color: #ffffff;
    padding: 0.8rem 1.8rem;
    border-radius: 6px;
    font-size: 1.05rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: var(--transition);
}

.btn-hero-info:hover, .btn-hero-info.focused {
    background: rgba(109, 109, 110, 0.4);
    transform: scale(1.05);
}

/* Netflix Content Rows */
.browse-rows-container {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    padding: 0 4%;
    margin-top: -3rem;
    position: relative;
    z-index: 10;
}

.content-row {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.row-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.row-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #e5e5e5;
    letter-spacing: -0.3px;
}

.row-carousel {
    display: flex;
    gap: 0.9rem;
    overflow-x: auto;
    padding: 1rem 0.5rem 1.5rem 0.5rem;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.row-carousel::-webkit-scrollbar { display: none; }

/* Netflix Media Poster Card */
.netflix-card {
    min-width: 190px;
    width: 190px;
    aspect-ratio: 2/3;
    background: var(--bg-card);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.35s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.35s ease;
}

.netflix-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.netflix-card:hover, .netflix-card.focused {
    transform: scale(1.12);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.85);
    z-index: 20;
    border: 2px solid var(--border-focused);
}

.card-overlay-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: rgba(0, 0, 0, 0.8);
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    text-transform: uppercase;
}

.card-rating-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.85);
    color: #fbbf24;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}

/* Search Grid View */
.search-results-section {
    padding: 5rem 4% 3rem 4%;
}

.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-pills { display: flex; gap: 0.5rem; }

.pill {
    background: #262626;
    border: 1px solid #404040;
    color: #cccccc;
    padding: 0.45rem 1.1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.pill:hover, .pill.focused {
    background: #333333;
    color: #ffffff;
    border-color: #ffffff;
}

.pill.active {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

.search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 1.5rem;
}

/* ==========================================
   VIEW 3: Dedicated Full-Screen Series Page
   ========================================== */
.series-hero-banner {
    position: relative;
    width: 100%;
    height: 440px;
    overflow: hidden;
}

.series-hero-backdrop {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center 25%;
}

.series-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(20,20,20,0.1) 0%, rgba(20,20,20,0.8) 70%, rgba(20,20,20,1) 100%);
}

.series-hero-meta {
    position: absolute;
    bottom: 2rem;
    left: 4%;
    right: 4%;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.series-hero-meta h1 {
    font-size: 2.8rem;
    font-weight: 900;
    letter-spacing: -0.5px;
}

.series-tags {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.series-modal-plot {
    color: #d1d5db;
    font-size: 1rem;
    line-height: 1.55;
    max-width: 800px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.series-content-area {
    padding: 2rem 4% 4rem 4%;
}

.series-section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #333333;
}

.series-section-header h2 {
    font-size: 1.6rem;
    font-weight: 800;
}

/* Season Cards Grid */
.seasons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.8rem;
}

.season-card {
    background: #202020;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    border: 1px solid #333333;
    transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
}

.season-card:hover, .season-card.focused {
    transform: translateY(-6px) scale(1.05);
    border-color: #ffffff;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.85);
    z-index: 10;
}

.season-card-poster {
    position: relative;
    aspect-ratio: 2/3;
    background: #111111;
    overflow: hidden;
}

.season-card-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.season-card-info {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.season-card-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffffff;
}

.season-card-meta {
    font-size: 0.825rem;
    color: #a3a3a3;
    display: flex;
    justify-content: space-between;
}

/* Episodes View */
.episodes-view-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #333333;
}

.btn-back-seasons {
    background: #2b2b2b;
    border: 1px solid #444444;
    color: #ffffff;
    padding: 0.6rem 1.4rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-back-seasons:hover, .btn-back-seasons.focused {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
    transform: scale(1.04);
}

.current-season-info h2 {
    font-size: 1.6rem;
    font-weight: 800;
}

.episodes-container {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.netflix-episode-row {
    background: #1a1a1a;
    border-top: 1px solid #2a2a2a;
    padding: 1.25rem 1rem;
    display: flex;
    align-items: center;
    gap: 1.8rem;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 8px;
}

.netflix-episode-row:hover, .netflix-episode-row.focused {
    background: #262626;
    transform: scale(1.01);
    box-shadow: 0 8px 25px rgba(0,0,0,0.6);
}

.episode-index {
    font-size: 1.4rem;
    font-weight: 800;
    color: #737373;
    min-width: 28px;
    text-align: center;
}

.episode-thumbnail-wrap {
    position: relative;
    width: 200px;
    min-width: 200px;
    aspect-ratio: 16/9;
    background: #000000;
    border-radius: 6px;
    overflow: hidden;
}

.episode-thumbnail-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.episode-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    font-size: 1.6rem;
    color: #ffffff;
    opacity: 0;
    transition: var(--transition);
}

.netflix-episode-row:hover .episode-play-overlay, .netflix-episode-row.focused .episode-play-overlay {
    opacity: 1;
}

.episode-text-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.episode-title-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.ep-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #ffffff;
}

.ep-duration {
    font-size: 0.85rem;
    color: #a3a3a3;
    font-weight: 600;
}

.ep-synopsis {
    font-size: 0.875rem;
    color: #a3a3a3;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================
   VIEW 4: Stream Quality Selector Page
   ========================================== */
.streams-page-container, .account-page-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem 1.5rem;
}

.streams-page-header, .account-page-header {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.streams-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.stream-item {
    background: #202020;
    border: 1px solid #383838;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.stream-item:hover, .stream-item.focused {
    border-color: #ffffff;
    background: #2e2e2e;
    transform: scale(1.02);
}

.stream-badge {
    background: var(--primary);
    color: #ffffff;
    padding: 0.4rem 0.85rem;
    border-radius: 4px;
    font-weight: 800;
    font-size: 0.9rem;
}

.stream-details { flex: 1; }
.stream-size { font-weight: 800; font-size: 1rem; }
.stream-codecs { font-size: 0.85rem; color: #a3a3a3; margin-top: 0.25rem; }

/* ==========================================
   VIEW 5: Fullscreen Video Player
   ========================================== */
.player-view {
    position: fixed;
    inset: 0;
    background: #000000;
    z-index: 2000;
}

.player-container { width: 100vw; height: 100vh; display: flex; flex-direction: column; }
.player-header {
    background: #141414;
    padding: 0.85rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #222222;
}
.player-badge { font-size: 0.65rem; background: var(--primary); color: #fff; padding: 0.15rem 0.5rem; border-radius: 4px; font-weight: 800; }
.btn-close-player {
    background: #2b2b2b;
    border: 1px solid #444;
    color: #ffffff;
    padding: 0.5rem 1.1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    font-weight: 700;
}
.btn-close-player:hover, .btn-close-player.focused { background: #ffffff; color: #000; }
.artplayer-app { flex: 1; width: 100%; height: 100%; background: #000; }
.player-footer {
    background: #141414;
    padding: 0.75rem 2rem;
    border-top: 1px solid #222222;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.825rem;
    color: #999999;
}
.player-ext-links { display: flex; align-items: center; gap: 0.75rem; }
.btn-ext { background: #262626; border: 1px solid #404040; color: #fff; padding: 0.4rem 0.9rem; border-radius: 4px; font-size: 0.8rem; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn-ext:hover, .btn-ext.focused { background: #404040; border-color: #fff; }

/* Forms */
.form-group { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1rem; }
.form-group label { font-size: 0.85rem; font-weight: 600; color: #999999; }
.form-control { background: #262626; border: 1px solid #404040; border-radius: 6px; padding: 0.85rem 1.1rem; color: #ffffff; font-size: 0.95rem; outline: none; }
.form-control:focus, .form-control.focused { border-color: #ffffff; }
.account-info-box { background: #222222; border-radius: 8px; padding: 1.4rem; display: flex; flex-direction: column; gap: 0.85rem; }
.info-row { display: flex; justify-content: space-between; font-size: 0.95rem; }

.btn {
    padding: 0.65rem 1.3rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
    border: none;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover, .btn-primary.focused { background: var(--primary-hover); transform: scale(1.02); }
.btn-secondary { background: #262626; color: #fff; border: 1px solid #404040; }
.btn-secondary:hover, .btn-secondary.focused { background: #333333; border-color: #fff; }
.btn-ghost { background: transparent; color: #bdbdbd; border: 1px solid transparent; }
.btn-ghost:hover, .btn-ghost.focused { color: #fff; border-color: #666; }
.w-100 { width: 100%; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }

/* D-Pad Remote Focus */
.focusable.focused {
    box-shadow: 0 0 0 3px var(--border-focused), 0 0 20px var(--glow-focused) !important;
}

/* Spinner & Toast */
.loading-spinner { text-align: center; padding: 4rem 0; }
.spinner { width: 44px; height: 44px; border: 4px solid #333333; border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 1rem auto; }
@keyframes spin { to { transform: rotate(360deg); } }

.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #242424;
    border: 1px solid #444444;
    color: #ffffff;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition);
    z-index: 3000;
}
.toast.show { transform: translateY(0); opacity: 1; }

@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero-main-title { font-size: 2.2rem; }
    .netflix-card { min-width: 140px; width: 140px; }
    .netflix-episode-row { flex-direction: column; align-items: stretch; }
    .episode-thumbnail-wrap { width: 100%; }
}
