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

:root {
    --red: #e50914;
    --red-dark: #b20710;
    --red-hover: #f40612;
    --black: #141414;
    --dark: #181818;
    --gray: #808080;
    --light-gray: #e5e5e5;
    --green: #46d369;
    --blue: #0071eb;
    --white: #ffffff;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--black);
    color: var(--white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }
ul { list-style: none; }
svg { display: block; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #1a1a1a; }
::-webkit-scrollbar-thumb { background: #444; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #666; }

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

/* Loading */
.loading {
    position: fixed; inset: 0; background: var(--black); z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.3s;
}
.loading.hide { opacity: 0; pointer-events: none; }
.spinner {
    width: 56px; height: 56px;
    border: 4px solid rgba(229,9,20,0.2);
    border-top-color: var(--red);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast */
.toast {
    position: fixed; bottom: 40px; left: 50%;
    transform: translateX(-50%) translateY(120px);
    background: rgba(30,30,30,0.98); color: #fff;
    padding: 14px 24px; border-radius: 6px; font-size: 15px;
    z-index: 10000; opacity: 0; transition: all 0.3s;
    border-left: 4px solid var(--red);
    backdrop-filter: blur(10px);
    max-width: 90%;
    text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ======= PROFILE SCREEN ======= */
.profile-screen {
    position: fixed; inset: 0; background: var(--black); z-index: 100;
    display: flex; flex-direction: column; align-items: center;
    opacity: 0; pointer-events: none; transition: opacity 0.4s;
}
.profile-screen.visible { opacity: 1; pointer-events: all; }

.profile-header {
    width: 100%; padding: 20px 40px;
    display: flex; justify-content: space-between; align-items: center;
}

.logo {
    font-size: 28px; font-weight: 900; color: var(--red);
    letter-spacing: -0.5px; cursor: pointer;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.profile-container {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 40px 20px 100px;
    max-width: 900px;
}

.profile-container h2 {
    font-size: clamp(28px, 4vw, 48px);
    font-weight: 300; margin-bottom: 12px; color: #fff;
}
.profile-subtitle {
    color: var(--gray); font-size: 15px; text-align: center;
    margin-bottom: 30px; max-width: 500px; line-height: 1.5;
}
.profile-subtitle strong { color: #fff; }

.profiles-list {
    display: flex; gap: 2vw; flex-wrap: wrap; justify-content: center;
    margin-bottom: 16px;
}

.profile-card {
    display: flex; flex-direction: column; align-items: center;
    cursor: pointer; transition: transform 0.2s; min-width: 110px;
    animation: fadeUp 0.5s ease both;
}
.profile-card:nth-child(1) { animation-delay: 0.1s; }
.profile-card:nth-child(2) { animation-delay: 0.18s; }
.profile-card:nth-child(3) { animation-delay: 0.26s; }
.profile-card:nth-child(4) { animation-delay: 0.34s; }
.profile-card:nth-child(5) { animation-delay: 0.42s; }

.profile-card:hover { transform: scale(1.05); }
.profile-card:hover .profile-name { color: #fff; }
.profile-card:hover .profile-avatar { border-color: #fff; }

.avatar-wrapper { position: relative; margin-bottom: 12px; }

.profile-avatar {
    width: 150px; height: 150px; border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    border: 3px solid transparent; transition: border-color 0.2s;
    position: relative; z-index: 2; overflow: hidden;
}
.profile-avatar svg { width: 100px; height: 100px; }
.profile-avatar.small { width: 36px; height: 36px; }
.profile-avatar.small svg { width: 22px; height: 22px; }
.profile-avatar.tiny { width: 32px; height: 32px; }
.profile-avatar.tiny svg { width: 18px; height: 18px; }

.pulse-ring {
    position: absolute; inset: -8px;
    border: 3px solid var(--red);
    border-radius: 8px; z-index: 1;
    animation: pulseRing 2s ease-out infinite;
}
@keyframes pulseRing {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.15); opacity: 0; }
}
@keyframes badgePulse {
    0%, 100% { box-shadow: 0 2px 8px rgba(229,9,20,0.5); }
    50% { box-shadow: 0 2px 20px rgba(229,9,20,0.9); }
}

.default-badge {
    position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
    background: var(--red); color: #fff; font-size: 10px; font-weight: 700;
    letter-spacing: 1.5px; text-transform: uppercase;
    padding: 4px 10px; border-radius: 3px; z-index: 3;
    animation: badgePulse 2s ease-in-out infinite;
}
.guest-badge {
    position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
    background: #555; color: #fff; font-size: 9px; font-weight: 600;
    letter-spacing: 1px; text-transform: uppercase;
    padding: 3px 8px; border-radius: 3px; z-index: 3;
}

.profile-name {
    color: var(--gray); font-size: 18px; transition: color 0.2s;
}
.default-profile .profile-name { color: #fff; font-weight: 600; }
.guest-profile .profile-name { color: #ddd; }

.continue-btn {
    margin-top: 8px; padding: 6px 16px; background: var(--red); color: #fff;
    border-radius: 4px; font-size: 12px; font-weight: 600;
    display: inline-flex; align-items: center; gap: 4px;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(229,9,20,0.4);
    animation: fadeContinue 0.5s ease forwards 0.5s; opacity: 0;
}
.continue-btn:hover {
    background: var(--red-dark); transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(229,9,20,0.6);
}
@keyframes fadeContinue { to { opacity: 1; } }

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

.profile-hint {
    margin-top: 20px; padding: 12px 20px;
    background: rgba(255,255,255,0.05);
    border-left: 3px solid var(--red);
    border-radius: 4px; max-width: 560px;
}
.profile-hint p { color: #b3b3b3; font-size: 14px; line-height: 1.5; }
.profile-hint strong { color: #fff; }
.link-red { color: var(--red); font-weight: 600; }
.link-red:hover { text-decoration: underline; }

.manage-profiles-btn {
    margin-top: 20px; padding: 10px 24px;
    border: 1px solid var(--gray); color: var(--gray);
    font-size: 14px; letter-spacing: 2px; text-transform: uppercase;
    background: transparent; transition: all 0.2s;
}
.manage-profiles-btn:hover { border-color: #fff; color: #fff; }

/* ======= APP PAGE ======= */
.app-page { display: none; min-height: 100vh; }
.app-page.active { display: block; animation: pageIn 0.45s cubic-bezier(0.2,0.8,0.2,1); }
@keyframes pageIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
.page-fade-out { animation: pageOut 0.2s ease forwards; }
@keyframes pageOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-8px); }
}

/* ======= NAVBAR ======= */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 50;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 4%; height: 64px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.75) 0%, transparent 100%);
    transition: background-color 0.3s;
}
.navbar.scrolled { background: var(--black); }

.hamburger {
    display: none; color: #fff; padding: 4px; transition: transform 0.2s;
}
.hamburger:hover { transform: scale(1.15); }
.nav-left { display: flex; align-items: center; gap: 30px; }
.nav-links { display: flex; gap: 18px; }
.nav-link {
    color: #e5e5e5; font-size: 14px; transition: color 0.2s;
    padding: 4px 0;
}
.nav-link:hover { color: #b3b3b3; }
.nav-link.active { color: #fff; font-weight: 700; }

.nav-right { display: flex; align-items: center; gap: 16px; }

.nav-icon-btn { color: #fff; position: relative; padding: 4px; transition: transform 0.2s cubic-bezier(0.4,0,0.2,1); display: inline-flex; align-items: center; justify-content: center; }
.nav-icon-btn:hover { transform: scale(1.18); }
.nav-icon-btn.active { color: var(--red); }
.notif-dot {
    position: absolute; top: 2px; right: 2px;
    width: 8px; height: 8px; background: var(--red);
    border-radius: 50%; border: 1.5px solid #141414;
}
.auth-btn-small { transition: all 0.2s cubic-bezier(0.4,0,0.2,1); }
.auth-btn-small:hover { transform: scale(1.05); background: var(--red-hover); }

/* Search */
.search-container { position: relative; }
.search-btn svg, .search-box svg { pointer-events: none; }
.search-box {
    position: absolute; right: 0; top: 50%; transform: translateY(-50%);
    display: flex; align-items: center;
    background: rgba(0,0,0,0.85); border: 1px solid rgba(255,255,255,0.85);
    padding: 4px 10px; width: 0; opacity: 0; overflow: hidden;
    pointer-events: none; transition: all 0.2s;
}
.search-box.active { width: 300px; opacity: 1; padding: 6px 12px; pointer-events: auto; }
.search-box svg { margin-right: 8px; color: #fff; flex-shrink: 0; }
.search-box input {
    background: transparent; border: none; outline: none;
    color: #fff; font-size: 14px; width: 100%;
}
.search-box input::placeholder { color: #999; }
.close-search { color: #fff; padding-left: 8px; display: none; }
.search-box.active .close-search { display: block; }

/* Search dropdown (suggestions) */
.search-suggestions {
    position: absolute; top: calc(100% + 4px); left: 0; right: 0;
    background: rgba(20,20,20,0.98); border: 1px solid #333;
    border-radius: 4px; max-height: 400px; overflow-y: auto;
    display: none;
}
.search-box.active + .search-suggestions,
.search-suggestions.active { display: block; }
.search-suggest {
    padding: 10px 12px; cursor: pointer; display: flex;
    align-items: center; gap: 12px; border-bottom: 1px solid #222;
}
.search-suggest:hover { background: rgba(255,255,255,0.05); }
.suggest-thumb {
    width: 50px; height: 28px; flex-shrink: 0;
    background-size: cover; background-position: center; border-radius: 2px;
}
.suggest-info { flex: 1; }
.suggest-info strong { font-size: 13px; display: block; }
.suggest-info span { font-size: 11px; color: var(--gray); }

/* Auth Section */
.auth-btn-small {
    padding: 7px 16px; background: var(--red); color: #fff;
    border-radius: 3px; font-size: 13px; font-weight: 600;
}

.profile-menu { position: relative; }
.current-profile {
    display: flex; align-items: center; gap: 8px; cursor: pointer;
}
.caret { transition: transform 0.2s; }
.profile-menu.open .caret { transform: rotate(180deg); }

.profile-dropdown {
    position: absolute; top: calc(100% + 10px); right: 0;
    background: rgba(0,0,0,0.95); border: 1px solid rgba(255,255,255,0.15);
    min-width: 220px; padding: 10px 0; display: none; z-index: 100;
}
.profile-menu.open .profile-dropdown { display: block; }
.profile-dropdown::before {
    content: ''; position: absolute; top: -10px; right: 14px;
    border: 5px solid transparent; border-bottom-color: rgba(255,255,255,0.15);
}
.dropdown-profile {
    display: flex; align-items: center; gap: 12px;
    padding: 6px 20px; font-size: 13px; color: #b3b3b3;
    cursor: pointer;
}
.dropdown-profile:hover { color: #fff; background: rgba(255,255,255,0.05); }
.dropdown-profile.current { color: #fff; }
.dropdown-divider { height: 1px; background: rgba(255,255,255,0.15); margin: 8px 0; }
.profile-dropdown a {
    display: block; padding: 8px 20px; font-size: 13px; color: #b3b3b3;
}
.profile-dropdown a:hover { color: #fff; text-decoration: underline; }
.whois {
    padding: 8px 20px; font-size: 12px; color: var(--gray);
    border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 6px;
}
.whois strong { color: #fff; display: block; font-size: 13px; }
.whois .guest-tag {
    display: inline-block; font-size: 9px; background: #444; color: #ccc;
    padding: 1px 6px; border-radius: 2px; text-transform: uppercase;
    letter-spacing: 1px; margin-top: 3px;
}
.whois .member-tag {
    display: inline-block; font-size: 9px; background: var(--red); color: #fff;
    padding: 1px 6px; border-radius: 2px; text-transform: uppercase;
    letter-spacing: 1px; margin-top: 3px;
}

/* ======= SEARCH RESULTS ======= */
.search-results {
    display: none; padding: 100px 4% 60px;
}
.search-results.active { display: block; }
.search-results h2 { font-size: 24px; margin-bottom: 20px; font-weight: 500; }

/* ======= PAGE VIEW (genre, history, etc) ======= */
.main-content { padding-bottom: 0; }
.page-header {
    padding: 100px 4% 20px;
}
.page-header h1 {
    font-size: clamp(28px, 4vw, 44px); font-weight: 700; margin-bottom: 8px;
}
.page-header p { color: var(--gray); font-size: 15px; }

/* Empty state */
.empty-state {
    padding: 80px 4%; text-align: center; color: var(--gray);
}
.empty-state svg { width: 80px; height: 80px; margin: 0 auto 20px; opacity: 0.4; }
.empty-state h3 { color: #fff; font-size: 22px; margin-bottom: 8px; font-weight: 500; }
.empty-state p { font-size: 15px; max-width: 500px; margin: 0 auto; line-height: 1.5; }

/* History card with progress */
.hist-card {
    position: relative;
}
.hist-progress {
    position: absolute; bottom: 0; left: 0; right: 0; height: 4px;
    background: rgba(255,255,255,0.2); border-radius: 0 0 6px 6px;
}
.hist-progress-bar {
    height: 100%; background: var(--red); border-radius: 0 0 0 6px;
}
.hist-percent {
    position: absolute; bottom: 10px; right: 10px;
    background: rgba(0,0,0,0.7); padding: 2px 6px; border-radius: 3px;
    font-size: 11px; font-weight: 600;
}

/* Resume badge */
.resume-badge {
    display: inline-flex; align-items: center; gap: 4px;
    background: rgba(229,9,20,0.9); padding: 3px 8px; border-radius: 3px;
    font-size: 11px; font-weight: 600; margin-top: 6px;
}

/* ======= HERO ======= */
.hero {
    position: relative; height: 88vh; min-height: 560px; width: 100%;
}
.hero-backdrop { position: absolute; inset: 0; background-size: cover; background-position: center top; }
.hero-gradient {
    position: absolute; inset: 0;
    background:
        linear-gradient(to right, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.75) 45%, rgba(0,0,0,0.3) 75%, rgba(0,0,0,0) 100%),
        linear-gradient(to top, var(--black) 0%, rgba(20,20,20,0.9) 20%, transparent 60%);
    z-index: 2;
    pointer-events: none;
}
.hero-bottom-fade {
    position: absolute; bottom: 0; left: 0; right: 0; height: 260px;
    background: linear-gradient(to top, var(--black) 0%, rgba(20,20,20,0.9) 35%, transparent 100%);
    z-index: 2;
    pointer-events: none;
}
.hero-content {
    position: absolute; bottom: 26%; left: 4%; max-width: 640px; z-index: 3;
}
.hero-rating-badge {
    display: flex; align-items: center; gap: 10px;
    font-size: 14px; font-weight: 700; margin-bottom: 14px;
    letter-spacing: 1px; color: #fff;
}
.top10-tag {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--red); color: #fff;
    font-size: 10px; font-weight: 900; letter-spacing: 1px;
    padding: 3px 6px; border-radius: 2px; line-height: 1;
}
.hero-rank-text {
    font-size: 16px; font-weight: 700; color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.45);
}
.badge-n { color: var(--red); font-weight: 900; font-size: 24px; }
.hero-title {
    font-size: clamp(36px, 6vw, 72px); font-weight: 900;
    margin-bottom: 14px; text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
    line-height: 1.05; max-width: 900px;
}
.hero-meta {
    display: flex; align-items: center; gap: 10px;
    font-size: 14px; margin-bottom: 16px; flex-wrap: wrap;
}
.match-score { color: var(--green); font-weight: 700; }
.maturity-badge { border: 1px solid #777; padding: 1px 6px; font-size: 12px; }
.hd-badge { border: 1px solid #777; padding: 1px 6px; font-size: 12px; border-radius: 3px; }
.hero-description {
    font-size: clamp(14px, 1.4vw, 20px); line-height: 1.3;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.8);
    margin-bottom: 20px; color: #fff; max-width: 600px;
    font-weight: 400;
}
.hero-buttons { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 24px; border-radius: 4px; font-size: 16px;
    font-weight: 700; transition: all 0.2s cubic-bezier(0.4,0,0.2,1); white-space: nowrap;
    will-change: transform; cursor: pointer; line-height: 1;
}
.btn-play { background: #fff; color: #000; }
.btn-play:hover { background: rgba(255,255,255,0.75); }
.btn-info { background: rgba(109,109,110,0.7); color: #fff; backdrop-filter: blur(2px); }
.btn-info:hover { background: rgba(109,109,110,0.4); }
.btn-round {
    width: 42px; height: 42px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.5);
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0 !important;
    color: #fff; background: rgba(42,42,42,0.6); transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
    will-change: transform; flex-shrink: 0; box-sizing: border-box;
}
.btn-round svg {
    width: 22px; height: 22px; display: block;
    flex-shrink: 0; fill: currentColor; pointer-events: none;
}
.btn-round:hover { border-color: #fff; background: rgba(42,42,42,0.9); transform: scale(1.12); }
.btn-round-hero { width: 44px; height: 44px; margin-left: 8px; }
.btn-round-hero svg { display: block; width: 22px; height: 22px; }
.btn-round.active, .btn-round.added { background: #fff; color: #000; border-color: #fff; }
.btn-round.rated-up { background: var(--green); border-color: var(--green); }
.btn-round.rated-down { background: var(--red); border-color: var(--red); }

.hero-video {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; opacity: 0; transition: opacity 1s; pointer-events: none; z-index: 1;
}
.hero-video.playing { opacity: 1; }
.hero-controls {
    position: absolute; right: 0; bottom: 30%;
    display: flex; align-items: center; gap: 16px; z-index: 3;
}
.hero-age-badge {
    background: rgba(0,0,0,0.5); border-left: 3px solid rgba(255,255,255,0.8);
    padding: 6px 30px 6px 12px; font-size: 14px;
    font-weight: 500; display: flex; align-items: center;
}

/* ======= CONTENT ROWS ======= */
.rows-container { position: relative; z-index: 3; margin-top: 10px; padding-bottom: 40px; }

.row-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 4% 8px; min-height: 40px;
}
.row-title {
    font-size: clamp(14px, 1.4vw, 20px); font-weight: 700; color: #e5e5e5;
    letter-spacing: 0.01em;
}
.row-explore {
    color: #54b9c5; font-size: 13px; font-weight: 600; opacity: 0;
    transition: opacity 0.2s; display: flex; align-items: center; gap: 3px;
    white-space: nowrap;
}
.content-row:hover .row-explore { opacity: 1; }
.row-explore:hover { color: #fff; }

.content-row {
    position: relative;
    z-index: 1;
    padding: 0 0 0 4%;
    margin-bottom: 2.5vw;
}
.content-row:hover { z-index: 50; }
.row-slider { position: relative; }

.row-items {
    display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden;
    padding: 30px 4% 180px 4%; scroll-behavior: smooth; scrollbar-width: none;
    margin: -30px 0 -130px -4%;
}
.row-items::-webkit-scrollbar { display: none; }

.card {
    flex-shrink: 0; width: 260px; cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.2,0.8,0.2,1); position: relative; border-radius: 6px; overflow: visible;
    transform-origin: center center;
}
.card:first-child { transform-origin: left center; }
.card:last-child { transform-origin: right center; }
.card:hover { transform: scale(1.2) translateY(-20px); z-index: 100; transition-delay: 0.15s; }
.card:hover .card-hover { opacity: 1; pointer-events: all; transition-delay: 0.2s; }

.card-img {
    width: 100%; aspect-ratio: 16/9; background-size: cover; background-position: center;
    border-radius: 4px; position: relative; overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.card-img::before {
    display: none;
}
.grid-card-img::before {
    display: none;
}
.card-title-overlay {
    position: absolute; bottom: 8px; left: 10px; right: 10px;
    font-size: 14px; font-weight: 800; color: #fff;
    text-shadow: 0 2px 5px rgba(0,0,0,0.95), 0 0 12px rgba(0,0,0,0.8);
    z-index: 3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    pointer-events: none; letter-spacing: -0.2px;
}
.card-img::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 40%, transparent 70%);
    opacity: 0.9; transition: opacity 0.2s;
}
.card:hover .card-img::after { opacity: 1; }
.card-progress {
    position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: rgba(255,255,255,0.2); z-index: 4;
}
.card-progress-bar { height: 100%; background: var(--red); }

/* Top 10 Netflix Style */
.top10-row .card {
    width: 290px; padding-left: 65px; position: relative;
}
.top10-row .card-number {
    position: absolute; bottom: -15px; left: 0;
    font-size: 160px; font-weight: 900; line-height: 0.8; color: #000;
    -webkit-text-stroke: 4px #595959; z-index: 1;
    text-shadow: -2px 0 #333; font-family: 'Arial Black', Impact, sans-serif;
    user-select: none; pointer-events: none;
}
.top10-row .card-img { position: relative; z-index: 2; }
.top10-row .card:hover { transform: scale(1.12) translateY(-6px); }

.card-hover {
    position: absolute; top: -10px; left: -10px; right: -10px;
    background: #181818; border-radius: 6px;
    box-shadow: 0 14px 36px rgba(0,0,0,0.95), 0 0 0 1px rgba(255,255,255,0.1);
    opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
    overflow: hidden; z-index: 100;
}
.card-hover-video {
    width: 100%; aspect-ratio: 16/9; background-size: cover; background-position: center;
}
.card-hover-info { padding: 12px; }
.card-hover-buttons {
    display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.card-hover-buttons .btn-round { width: 32px; height: 32px; border-width: 1.5px; padding: 0 !important; }
.card-hover-buttons .btn-round svg { width: 16px; height: 16px; fill: currentColor; }
.card-hover-buttons .btn-round.added { background: #fff; color: #000; }
.card-hover-title { font-size: 15px; font-weight: 700; margin-bottom: 6px; color: #fff; }
.card-hover-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; margin-bottom: 4px; flex-wrap: wrap; color: #bcbcbc; }
.card-hover-meta .match-score { color: #46d369; font-weight: 700; }
.card-hover-genres { font-size: 12px; color: #aaa; }
.card-hover-genres span + span::before { content: '•'; margin: 0 4px; }

/* Slider arrows */
.slider-arrow {
    position: absolute; top: 30px; height: 146px; width: 4%;
    background: rgba(20,20,20,0.5);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 5; opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.row-slider:hover .slider-arrow { opacity: 1; pointer-events: auto; }
.slider-arrow:hover { background: rgba(20,20,20,0.85); transform: scale(1.05); }
.slider-arrow.left { left: 0; border-radius: 0 4px 4px 0; }
.slider-arrow.right { right: 0; border-radius: 4px 0 0 4px; }

/* Grid */
.content-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px; padding: 0 4% 0 4%;
}
.grid-card {
    border-radius: 6px; overflow: hidden; cursor: pointer;
    transition: transform 0.2s; background: var(--dark); position: relative;
}
.grid-card:hover { transform: scale(1.05); }
.grid-card-img { width: 100%; aspect-ratio: 16/9; background-size: cover; background-position: center; position: relative; border-radius: 4px; overflow: hidden; }
.grid-card-info { padding: 12px; }
.grid-card-info h4 { font-size: 15px; margin-bottom: 6px; }
.grid-card-info p { font-size: 12px; color: #999; line-height: 1.3; }

/* Footer */
.site-footer {
    max-width: 1000px; margin: 40px auto 40px 4%; padding-right: 4%;
    color: #808080; font-size: 13px;
    position: relative; z-index: 60;
}
.footer-social { display: flex; gap: 20px; margin-bottom: 20px; }
.footer-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.footer-col { display: flex; flex-direction: column; gap: 14px; }
.footer-col a:hover { text-decoration: underline; }
.copyright { font-size: 11px; margin-top: 20px; }

/* ======= VIDEO PLAYER ======= */
.player-page { display: none; background: var(--black); min-height: 100vh; }
.player-page.active { display: block; animation: pageIn 0.4s cubic-bezier(0.2,0.8,0.2,1); }

.player-container {
    position: relative; width: 100%; background: #000;
    aspect-ratio: 16/9;
    max-height: 100vh;
    overflow: hidden;
}
.video-player {
    width: 100%; height: 100%; display: block; background: #000; object-fit: contain;
}
.jw-host { position: absolute; inset: 0; }
.jw-host .jwplayer { width: 100% !important; height: 100% !important; }
.jw-host .jw-video { object-fit: contain !important; }
/* Hide JW default skin chrome (we render our own controls on top) */
.jw-controlbar, .jw-display-icon-container, .jw-dock { display: none !important; }

.player-grad-top {
    position: absolute; top: 0; left: 0; right: 0; height: 160px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.75), transparent);
    pointer-events: none; opacity: 0; transition: opacity 0.35s;
}
.player-grad-bottom {
    position: absolute; bottom: 0; left: 0; right: 0; height: 200px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 80%);
    pointer-events: none; opacity: 0; transition: opacity 0.35s;
}
.player-container.show-controls .player-grad-top,
.player-container.show-controls .player-grad-bottom,
.player-container:hover .player-grad-top,
.player-container:hover .player-grad-bottom { opacity: 1; }
.player-container.paused .player-grad-top,
.player-container.paused .player-grad-bottom { opacity: 1; }

.player-overlay-top {
    position: absolute; top: 0; left: 0; right: 0; padding: 20px 3%;
    display: flex; align-items: center; gap: 20px;
    z-index: 5; opacity: 0; transition: opacity 0.3s;
    pointer-events: none;
}
.player-container.show-controls .player-overlay-top,
.player-container:hover .player-overlay-top { opacity: 1; pointer-events: all; }
.player-back { color: #fff; transition: transform 0.2s; }
.player-back:hover { transform: scale(1.1); }
.player-title { font-size: 22px; font-weight: 600; }
.player-top-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.player-icon-btn {
    color: #fff; padding: 6px 10px; border-radius: 4px; transition: background 0.2s;
    display: inline-flex; align-items: center;
}
.player-icon-btn:hover { background: rgba(255,255,255,0.15); }
.player-icon-btn.active { color: var(--green); }

.player-center-controls {
    position: absolute; inset: 0; display: flex;
    align-items: center; justify-content: center; gap: 30px;
    z-index: 4; opacity: 0; transition: opacity 0.35s; pointer-events: none;
}
.player-container.show-controls .player-center-controls,
.player-container.paused .player-center-controls { opacity: 1; pointer-events: all; }
.player-big-btn {
    color: #fff; padding: 8px; border-radius: 50%; transition: all 0.2s cubic-bezier(0.2,0.8,0.2,1);
    background: transparent; display: inline-flex; align-items: center; justify-content: center;
}
.player-big-btn:hover { transform: scale(1.2); }
.player-big-btn.seek-btn { opacity: 0.85; }
.player-big-btn.seek-btn:hover { opacity: 1; }
.player-big-btn.play-pause {
    padding: 14px; border-radius: 50%;
    background: rgba(255,255,255,0.2); backdrop-filter: blur(2px);
}
.player-big-btn.play-pause:hover { background: rgba(255,255,255,0.35); transform: scale(1.08); }

.skip-intro {
    position: absolute; right: 3%; bottom: 90px;
    background: rgba(0,0,0,0.65); color: #fff; padding: 9px 18px 9px 0;
    border-radius: 3px; font-size: 14px; font-weight: 700; letter-spacing: 1.5px;
    display: none; align-items: center; gap: 0;
    border-left: 4px solid #fff; z-index: 6;
    transition: all 0.2s; text-transform: uppercase;
}
.skip-intro svg { margin: 0 8px; }
.skip-intro.visible { display: flex; }
.skip-intro:hover { background: rgba(255,255,255,1); color: #000; }

.next-episode {
    position: absolute; right: 3%; bottom: 90px;
    background: #181818; color: #fff;
    border-radius: 4px; display: none; flex-direction: column; overflow: hidden;
    border: 1px solid #333; z-index: 6;
    width: 290px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.6);
}
.next-episode.visible { display: flex; animation: nextIn 0.3s ease; }
@keyframes nextIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.next-thumb { width: 100%; height: 140px; background-size: cover; background-position: center; position: relative; }
.next-thumb::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, #181818 0%, transparent 50%); }
.next-countdown-ring {
    position: absolute; bottom: -18px; right: 14px;
    width: 36px; height: 36px;
}
.next-countdown-ring svg { transform: rotate(-90deg); }
.next-countdown-ring circle { fill: #181818; }
.next-countdown-ring .ring-bg { stroke: #555; stroke-width: 3; fill: none; }
.next-countdown-ring .ring-fg { stroke: var(--red); stroke-width: 3; fill: none; stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.next-info { padding: 14px; }
.next-label { font-size: 11px; color: var(--gray); display: block; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 4px; }
.next-title { font-size: 15px; font-weight: 600; }
.next-actions { display: flex; border-top: 1px solid #333; }
.next-cancel, .next-play {
    flex: 1; padding: 12px; background: transparent; color: #fff;
    font-size: 13px; font-weight: 600; text-align: center; transition: background 0.15s;
}
.next-cancel { border-right: 1px solid #333; }
.next-cancel:hover { background: #2a2a2a; }
.next-play:hover { background: #2a2a2a; }

.player-bottom {
    position: absolute; bottom: 0; left: 0; right: 0; padding: 0 3% 10px;
    z-index: 5; opacity: 0; transition: opacity 0.3s;
}
.player-container.show-controls .player-bottom,
.player-container:hover .player-bottom,
.player-container.paused .player-bottom { opacity: 1; }

.progress-bar {
    position: relative; height: 4px; background: rgba(255,255,255,0.2);
    border-radius: 2px; cursor: pointer; margin-bottom: 8px;
    transition: height 0.2s ease;
}
.progress-bar:hover { height: 6px; }
.progress-watched {
    position: absolute; top: 0; left: 0; height: 100%;
    background: var(--red); border-radius: 2px;
}
.progress-loaded {
    position: absolute; top: 0; left: 0; height: 100%;
    background: rgba(255,255,255,0.3); border-radius: 2px;
}
.progress-thumb {
    position: absolute; top: 50%; width: 12px; height: 12px;
    background: var(--red); border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.15s ease;
    box-shadow: 0 0 0 2px rgba(229,9,20,0.2);
}
.progress-bar:hover .progress-thumb { transform: translate(-50%, -50%) scale(1); }

.controls-row {
    display: flex; align-items: center; justify-content: space-between;
    padding-top: 4px;
}
.controls-left, .controls-right { display: flex; align-items: center; gap: 14px; }
.controls-left button { color: #fff; padding: 4px; transition: transform 0.2s; }
.controls-left button:hover { transform: scale(1.15); }
.controls-right button { color: #fff; padding: 4px; transition: transform 0.2s; }
.controls-right button:hover { transform: scale(1.15); }
.controls-right button.active { color: var(--green); }

.volume-slider {
    width: 0; height: 4px; background: rgba(255,255,255,0.3);
    border-radius: 2px; position: relative;
    transition: width 0.2s;
    flex-shrink: 0;
}
.volume-slider:hover, .volume-slider.dragging { width: 70px; }
.volume-fill {
    height: 100%; background: white; border-radius: 2px;
}
.volume-thumb { display: none; }
.player-time { font-size: 13px; color: #fff; font-variant-numeric: tabular-nums; }
.player-title-inline { font-size: 13px; color: #fff; margin-left: 10px; }

.speed-control { position: relative; }
#speedBtn {
    font-size: 13px; padding: 4px 8px;
}
.speed-menu {
    position: absolute; bottom: calc(100% + 8px); left: 50%;
    transform: translateX(-50%);
    background: rgba(30,30,30,0.95); border-radius: 4px;
    padding: 4px 0; min-width: 100px; display: none;
    backdrop-filter: blur(10px);
}
.speed-menu.open { display: block; }
.speed-menu div {
    padding: 8px 14px; font-size: 13px; cursor: pointer; text-align: center;
}
.speed-menu div:hover { background: rgba(255,255,255,0.1); }
.speed-menu div.active { font-weight: 700; color: var(--red); }

/* Subtitles Overlay inside Player */
.player-subtitles {
    position: absolute;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 85%;
    width: max-content;
    text-align: center;
    pointer-events: none;
    z-index: 25;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: clamp(18px, 2.6vw, 32px);
    font-weight: 600;
    line-height: 1.35;
    text-shadow: 0 0 4px #000, 0 0 8px #000, 1px 1px 2px #000, -1px -1px 2px #000;
    background: rgba(0, 0, 0, 0.65);
    padding: 6px 16px;
    border-radius: 6px;
    display: none;
    white-space: pre-line;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}
.player-subtitles.visible { display: inline-block; }

/* Audio & Subtitles Menu */
.audio-sub-control { position: relative; }
.audio-sub-menu {
    position: absolute;
    bottom: calc(100% + 12px);
    right: -30px;
    background: rgba(20, 20, 20, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 16px;
    min-width: 320px;
    display: none;
    backdrop-filter: blur(16px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7);
    z-index: 50;
}
.audio-sub-menu.open { display: flex; gap: 20px; }
.audio-sub-col { flex: 1; min-width: 140px; }
.audio-sub-header {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #8c8c8c;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.audio-sub-list { display: flex; flex-direction: column; gap: 3px; max-height: 240px; overflow-y: auto; }
.audio-sub-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 10px;
    border-radius: 4px;
    font-size: 13px;
    color: #cccccc;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.audio-sub-item:hover { background: rgba(255, 255, 255, 0.12); color: #ffffff; }
.audio-sub-item.active { font-weight: 700; color: #ffffff; background: rgba(229, 9, 20, 0.2); }
.audio-sub-item .check-icon { font-size: 14px; color: var(--red); opacity: 0; }
.audio-sub-item.active .check-icon { opacity: 1; }

/* Stream Quality Menu */
.quality-control { position: relative; }
.quality-control button { display: flex; align-items: center; gap: 4px; }
.quality-badge {
    background: var(--red);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 1px 4px;
    border-radius: 3px;
    letter-spacing: 0.5px;
}
.quality-menu {
    position: absolute;
    bottom: calc(100% + 12px);
    right: 0;
    background: rgba(20, 20, 20, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 10px 0;
    min-width: 170px;
    display: none;
    backdrop-filter: blur(16px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7);
    z-index: 50;
}
.quality-menu.open { display: block; }
.quality-header {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #8c8c8c;
    padding: 4px 14px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.quality-list { display: flex; flex-direction: column; gap: 2px; padding: 6px 0; }
.quality-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 14px;
    font-size: 13px;
    color: #cccccc;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.quality-item:hover { background: rgba(255, 255, 255, 0.12); color: #ffffff; }
.quality-item.active { font-weight: 700; color: #ffffff; background: rgba(229, 9, 20, 0.2); }
.quality-item .check-icon { font-size: 14px; color: var(--red); opacity: 0; }
.quality-item.active .check-icon { opacity: 1; }

/* Post-play info */
.player-info {
    padding: 30px 4%; display: grid; grid-template-columns: 2fr 1fr;
    gap: 40px; max-width: 1400px;
}
.player-actions-row {
    display: flex; gap: 10px; margin-bottom: 16px;
}
.player-actions-row .btn { padding: 8px 20px; font-size: 14px; }
.player-actions-row .btn-round { width: 38px; height: 38px; }
.player-actions-row .btn-round svg { display: block; }
.btn-round svg { display: block; }
.player-info h2 { font-size: 28px; margin-bottom: 10px; }
.player-meta { display: flex; align-items: center; gap: 10px; font-size: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.player-info p { font-size: 15px; line-height: 1.5; color: #d2d2d2; }
.player-extra { font-size: 14px; margin-bottom: 8px; color: #777; }
.extra-label { color: #777; margin-right: 6px; }
.player-extra span:not(.extra-label) { color: #d2d2d2; }

.player-more { padding: 0 4% 60px; }
.player-more h3 { font-size: 24px; margin-bottom: 20px; }

/* ======= MODAL ======= */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 200;
    display: none; align-items: flex-start; justify-content: center;
    padding: 40px 0; overflow-y: auto;
    backdrop-filter: blur(4px);
}
.modal-overlay.active { display: flex; }

.modal {
    background: var(--dark); width: 90%; max-width: 900px;
    border-radius: 8px; overflow: hidden; position: relative;
    margin: auto; animation: modalIn 0.3s ease;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
    position: absolute; top: 16px; right: 16px; z-index: 10;
    width: 36px; height: 36px; border-radius: 50%;
    background: #181818; color: #fff;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.modal-close:hover { background: #333; }

.modal-hero { position: relative; height: 500px; }
.modal-hero-video { position: absolute; inset: 0; background-size: cover; background-position: center; }
.modal-hero-gradient {
    position: absolute; inset: 0;
    background: linear-gradient(to top, var(--dark) 0%, rgba(24,24,24,0.2) 60%, transparent 100%);
}
.modal-hero-content {
    position: absolute; bottom: 40px; left: 40px; right: 40px;
}
.modal-hero-content h2 {
    font-size: clamp(28px, 4vw, 48px); font-weight: 800;
    margin-bottom: 20px; text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
}
.modal-hero-buttons { display: flex; align-items: center; gap: 10px; }
.modal-hero-buttons .btn-play { padding: 10px 22px; font-size: 15px; }

.modal-body {
    padding: 20px 40px; display: grid; grid-template-columns: 2fr 1fr; gap: 30px;
}
.modal-meta-row { display: flex; align-items: center; gap: 10px; font-size: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.modal-info p { font-size: 15px; line-height: 1.5; color: #d2d2d2; }
.modal-details { font-size: 14px; }
.detail-row { margin-bottom: 8px; color: #777; }
.detail-label { color: #777; margin-right: 6px; }
.detail-row span:not(.detail-label) { color: #d2d2d2; }

.modal-episodes { padding: 0 40px 10px; display: none; }
.modal-episodes.visible { display: block; }
.modal-section-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px;
}
.modal-section-header h3 { font-size: 24px; }
.season-selector select {
    background: #222; color: #fff; border: 1px solid #555;
    padding: 8px 36px 8px 16px; font-size: 14px; border-radius: 4px;
    min-width: 180px; appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center;
}
.episode-item {
    display: flex; gap: 16px; padding: 16px 0;
    border-bottom: 1px solid #333; cursor: pointer; transition: background 0.2s;
}
.episode-item:hover { background: rgba(255,255,255,0.03); }
.episode-thumb {
    width: 170px; flex-shrink: 0; aspect-ratio: 16/9;
    background-size: cover; background-position: center; border-radius: 4px; position: relative;
}
.episode-thumb::after {
    content: '▶'; position: absolute; inset: 0; display: flex;
    align-items: center; justify-content: center;
    font-size: 32px; color: white; background: rgba(0,0,0,0.3);
    opacity: 0; transition: opacity 0.2s;
}
.episode-item:hover .episode-thumb::after { opacity: 1; }
.episode-progress {
    position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
    background: rgba(255,255,255,0.2);
}
.episode-progress-bar { height: 100%; background: var(--red); }
.episode-num {
    font-size: 20px; color: #d2d2d2;
    align-self: flex-start; padding-top: 16px; min-width: 24px;
}
.episode-content { flex: 1; }
.episode-title-row {
    display: flex; justify-content: space-between; margin-bottom: 6px;
}
.episode-title { font-weight: 600; font-size: 16px; }
.episode-duration { color: #999; font-size: 14px; }
.episode-desc { font-size: 14px; color: #a3a3a3; line-height: 1.4; }

.modal-more { padding: 0 40px 40px; }
.modal-more h3 { font-size: 24px; margin-bottom: 20px; }
.more-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.more-card {
    background: #2f2f2f; border-radius: 6px; overflow: hidden;
    cursor: pointer; transition: background 0.2s;
}
.more-card:hover { background: #3a3a3a; }
.more-card-img { width: 100%; aspect-ratio: 16/9; background-size: cover; background-position: center; }
.more-card-info { padding: 12px; }
.more-card-info h4 { font-size: 15px; margin-bottom: 6px; }
.more-card-info .match { color: var(--green); font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.more-card-info p { font-size: 13px; color: #a3a3a3; line-height: 1.3; }

/* ======= AUTH MODAL ======= */
.auth-modal {
    background: rgba(0,0,0,0.85); border-radius: 8px;
    width: 90%; max-width: 440px; padding: 48px 56px;
    position: relative; margin: auto;
    animation: modalIn 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.05);
}
.auth-box h2 { font-size: 32px; font-weight: 700; margin-bottom: 8px; }
.auth-box p { color: #b3b3b3; font-size: 14px; margin-bottom: 24px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; color: #b3b3b3; margin-bottom: 6px; }
.form-group input {
    width: 100%; padding: 12px 14px; background: #333;
    border: 1px solid transparent; border-radius: 4px; color: #fff;
    font-size: 15px; outline: none; transition: border-color 0.2s;
}
.form-group input:focus { border-color: var(--red); background: #444; }
.form-group input::placeholder { color: #8c8c8c; }
.btn-signin {
    width: 100%; justify-content: center; margin-top: 16px; padding: 14px;
    background: var(--red); color: #fff;
}
.btn-signin:hover { background: var(--red-dark); }
.auth-switch {
    margin-top: 20px; text-align: center; font-size: 14px; color: #b3b3b3;
}
.auth-switch a { color: #fff; font-weight: 600; margin-left: 6px; }
.auth-switch a:hover { text-decoration: underline; }
.auth-divider {
    margin: 24px 0; position: relative;
    text-align: center; color: #8c8c8c; font-size: 12px;
    text-transform: uppercase; letter-spacing: 2px;
}
.auth-divider::before, .auth-divider::after {
    content: ''; position: absolute; top: 50%; width: 40%;
    height: 1px; background: #333;
}
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }
.btn-guest {
    width: 100%; justify-content: center; padding: 12px;
    background: rgba(255,255,255,0.08); color: #fff; font-size: 14px;
}
.btn-guest:hover { background: rgba(255,255,255,0.15); }
.auth-note {
    margin-top: 20px; font-size: 11px; color: #8c8c8c;
    text-align: center; line-height: 1.5;
}
.migrate-prompt {
    background: rgba(229,9,20,0.1); border-left: 3px solid var(--red);
    padding: 12px 14px; border-radius: 4px; margin-bottom: 20px;
    font-size: 13px; color: #ddd; line-height: 1.5;
}
.migrate-prompt strong { color: #fff; display: block; margin-bottom: 4px; }
.auth-error {
    background: rgba(229,9,20,0.2); border: 1px solid var(--red);
    color: #ff9c9c; padding: 10px 14px; border-radius: 4px;
    font-size: 13px; margin-bottom: 16px; display: none;
}
.auth-error.visible { display: block; }

/* Migration modal */
.migrate-modal {
    background: var(--dark); border-radius: 8px;
    width: 90%; max-width: 460px; padding: 36px;
    position: relative; margin: auto;
    animation: modalIn 0.3s ease; text-align: center;
}
.migrate-icon { font-size: 56px; margin-bottom: 16px; }
.migrate-modal h2 { font-size: 26px; margin-bottom: 10px; }
.migrate-modal p { color: var(--gray); font-size: 15px; margin-bottom: 20px; line-height: 1.5; }
.migrate-list {
    text-align: left; background: rgba(255,255,255,0.05);
    border-radius: 6px; padding: 16px; margin-bottom: 24px;
}
.migrate-list li {
    padding: 8px 0; font-size: 14px; color: #ddd;
    display: flex; justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.migrate-list li:last-child { border-bottom: none; }
.migrate-list strong { color: var(--green); }
.migrate-buttons { display: flex; gap: 10px; justify-content: center; }
.migrate-buttons .btn { font-size: 14px; padding: 10px 22px; }

/* Shortcuts modal */
.shortcuts-modal {
    background: var(--dark); border-radius: 8px;
    width: 90%; max-width: 560px; padding: 32px;
    position: relative; margin: auto;
    animation: modalIn 0.3s ease;
}
.shortcuts-modal h2 { font-size: 24px; margin-bottom: 20px; }
.shortcuts-grid { display: grid; gap: 12px; }
.shortcut {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; background: rgba(255,255,255,0.03);
    border-radius: 4px;
}
.shortcut span { margin-left: auto; color: var(--gray); font-size: 14px; }
kbd {
    display: inline-block; padding: 4px 8px;
    background: #333; border: 1px solid #555;
    border-radius: 4px; font-family: 'Inter', monospace;
    font-size: 12px; font-weight: 600; color: #fff;
    min-width: 28px; text-align: center;
    box-shadow: 0 2px 0 #111;
}

/* Age Gate */
.age-gate-modal {
    background: var(--dark); border-radius: 8px;
    width: 90%; max-width: 400px; padding: 36px;
    position: relative; margin: auto; text-align: center;
    animation: modalIn 0.3s ease;
}
.age-icon { font-size: 56px; margin-bottom: 16px; }
.age-gate-modal h2 { font-size: 24px; margin-bottom: 10px; }
.age-gate-modal p { color: var(--gray); font-size: 15px; margin-bottom: 24px; line-height: 1.5; }
.age-buttons { display: flex; gap: 10px; justify-content: center; }
.age-buttons .btn { font-size: 14px; padding: 10px 22px; }

/* User chip in nav */
.user-chip {
    display: flex; align-items: center; gap: 8px;
}
.user-chip-name { font-size: 13px; color: #fff; font-weight: 500; }

/* Subtitle styling */
::cue {
    background: rgba(0,0,0,0.8);
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    padding: 4px 8px;
}

/* Badge for My List on cards */
.in-list-badge {
    position: absolute; top: 8px; right: 8px;
    background: var(--red); color: #fff;
    width: 24px; height: 24px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    z-index: 3; font-size: 14px;
}

/* ======= RESPONSIVE ======= */
@media (max-width: 1024px) {
    .nav-links { gap: 14px; }
    .nav-link { font-size: 12px; }
    .player-info { grid-template-columns: 1fr; gap: 20px; }
    .modal-body { grid-template-columns: 1fr; }
    .more-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-links { grid-template-columns: repeat(2, 1fr); }
    .hero-content { max-width: 500px; }
}
@media (max-width: 768px) {
    .nav-left { gap: 14px; }
    .hamburger { display: inline-flex; }
    .navbar.search-open .logo { display: none; }
    .navbar.search-open .search-btn { display: none !important; }
    .navbar.search-open .search-box.active {
        position: relative; right: auto; top: auto; transform: none;
        width: 170px; max-width: 100%;
    }
    .nav-links {
        display: none; position: absolute; top: 56px; left: 0; right: 0;
        background: rgba(0,0,0,0.98); flex-direction: column;
        padding: 16px 4%; gap: 12px; z-index: 50;
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 8px 0; font-size: 16px; border-bottom: 1px solid #222; }
    .hero-content { bottom: 20%; max-width: 92%; }
    .btn-round-hero { display: none; }
    .hero-age-badge { display: none; }
    .card { width: 200px; }
    .top10-row .card { width: 230px; padding-left: 50px; }
    .top10-row .card-number { font-size: 120px; }
    .card:hover { transform: scale(1.05); }
    .content-grid { grid-template-columns: repeat(2, 1fr); }
    .profiles-list { gap: 12px; }
    .profile-avatar { width: 100px; height: 100px; }
    .avatar-wrapper { width: 100px; height: 100px; }
    .profile-avatar svg { width: 60px; height: 60px; }
    .profile-container h2 { font-size: 28px; }
    .continue-btn { font-size: 11px; padding: 5px 12px; }
    .profile-hint { margin-top: 14px; padding: 10px 14px; max-width: 92%; }
    .profile-hint p { font-size: 12px; }
    .modal-hero { height: 280px; }
    .modal-body { padding: 16px 20px; }
    .modal-hero-content { left: 20px; right: 20px; bottom: 20px; }
    .modal-episodes, .modal-more { padding-left: 20px; padding-right: 20px; }
    .more-grid { grid-template-columns: 1fr; }
    .episode-thumb { width: 120px; }
    .episode-num { display: none; }
    .auth-modal { padding: 32px 24px; }
    .auth-box h2 { font-size: 26px; }
    .player-center-controls { gap: 20px; }
    .player-big-btn svg { width: 32px !important; height: 32px !important; }
    .player-big-btn.play-pause svg { width: 48px !important; height: 48px !important; }
    .player-title { font-size: 16px; }
    .controls-left, .controls-right { gap: 8px; }
    .player-title-inline { display: none; }
    .volume-slider { display: none; }
    .offline-banner { top: 56px; }
    .navbar { padding: 0 16px; height: 56px; }
    .auth-btn-small { padding: 5px 10px; font-size: 12px; }
}
@media (max-width: 480px) {
    .card { width: 160px; }
    .content-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .hero-buttons .btn { padding: 9px 18px; font-size: 14px; }
    .btn { padding: 9px 18px; font-size: 14px; }
    .user-chip-name { display: none; }
    .profile-avatar { width: 84px; height: 84px; }
    .avatar-wrapper { width: 84px; height: 84px; }
    .profile-avatar svg { width: 50px; height: 50px; }
    .continue-btn { display: none; }
    .skip-intro, .next-episode { bottom: 60px; font-size: 12px; padding: 8px 12px; }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print styles (hide UI for print) */
@media print {
    .navbar, .hero-buttons, .slider-arrow, .site-footer { display: none !important; }
    body { background: white; color: black; }
}
/* ===== SETTINGS MODAL ===== */
.settings-modal {
    background: var(--dark); border-radius: 8px;
    width: 90%; max-width: 540px; padding: 36px;
    position: relative; margin: auto;
    animation: modalIn 0.3s ease;
}
.settings-modal h2 { font-size: 24px; margin-bottom: 20px; }
.settings-list { display: flex; flex-direction: column; gap: 4px; }
.toggle-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    cursor: pointer;
}
.toggle-row strong { display: block; font-size: 15px; color: #fff; font-weight: 600; margin-bottom: 2px; }
.toggle-row span { font-size: 13px; color: var(--gray); line-height: 1.3; }

/* iOS-style switch */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
    position: absolute; cursor: pointer; inset: 0;
    background: #444; border-radius: 24px; transition: 0.25s;
}
.switch .slider::before {
    content: ""; position: absolute; height: 18px; width: 18px;
    left: 3px; top: 3px; background: white; border-radius: 50%; transition: 0.25s;
}
.switch input:checked + .slider { background: var(--red); }
.switch input:checked + .slider::before { transform: translateX(20px); }

.settings-actions { margin-top: 20px; display: flex; gap: 10px; }

/* ===== LIGHTS OFF OVERLAY ===== */
.lights-off-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.92);
    z-index: 145; pointer-events: none; opacity: 0;
    transition: opacity 0.4s;
    display: block;
}
.lights-off-overlay.on { opacity: 1; pointer-events: auto; }
#player-page { position: relative; z-index: 150; }
#navbar { z-index: 160; } /* nav must stay above lights-off */
#lightsBtn.active { color: var(--red); }

/* ===== OFFLINE BANNER ===== */
.offline-banner {
    position: fixed; top: 68px; left: 0; right: 0;
    background: var(--red); color: #fff; padding: 10px 20px;
    display: none; align-items: center; justify-content: center; gap: 12px;
    z-index: 300; font-size: 14px; font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.offline-banner.show { display: flex; }
.offline-banner button {
    margin-left: 12px; padding: 6px 14px;
    background: rgba(255,255,255,0.2); color: #fff;
    border-radius: 4px; font-size: 12px; font-weight: 600;
}
.offline-banner button:hover { background: rgba(255,255,255,0.3); }

/* ===== MINI PLAYER ===== */
.mini-player {
    position: fixed; bottom: 20px; right: 20px;
    width: 360px; background: #000; border-radius: 8px;
    z-index: 160; display: none; overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    cursor: pointer; transition: all 0.3s;
    border: 1px solid rgba(255,255,255,0.1);
}
.mini-player.visible { display: flex; align-items: stretch; animation: slideUp 0.3s ease; }
.mini-player:hover { transform: scale(1.02); }
.mini-player video { width: 160px; height: 90px; object-fit: cover; flex-shrink: 0; }
.mini-info { padding: 10px 14px; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.mini-title { font-size: 13px; font-weight: 600; color: #fff; margin-bottom: 4px; line-height: 1.2;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.mini-sub { font-size: 11px; color: var(--gray); display: flex; align-items: center; gap: 6px; }
.mini-sub::before { content: ''; width: 8px; height: 8px; background: var(--red); border-radius: 50%; animation: pulse 1s infinite; }
.mini-close {
    position: absolute; top: 6px; right: 6px;
    width: 24px; height: 24px; background: rgba(0,0,0,0.6);
    border-radius: 50%; color: #fff; font-size: 12px;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.2s;
}
.mini-player:hover .mini-close { opacity: 1; }
.mini-close:hover { background: rgba(229,9,20,0.9); }

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* PiP button is inside player controls; no extra styling needed */

/* Server fallback / connection status dot */
.conn-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #46d369; display: inline-block; margin-right: 6px;
}
.conn-dot.offline { background: var(--red); animation: pulse 1s infinite; }

/* Subtitle demo track */
video::cue {
    background: rgba(0,0,0,0.85);
    color: #fff;
    font-family: 'Inter', sans-serif;
}

/* Autoplay preview indicator on hero */
.hero-preview-hint {
    position: absolute; bottom: 20px; right: 4%; z-index: 3;
    font-size: 12px; color: rgba(255,255,255,0.7);
    display: flex; align-items: center; gap: 6px;
}

/* Responsive mini player */
@media (max-width: 768px) {
    .mini-player { width: calc(100% - 32px); right: 16px; bottom: 16px; }
    .mini-player video { width: 120px; height: 68px; }
    .offline-banner { top: 56px; font-size: 12px; padding: 8px 12px; }
    .settings-modal { padding: 24px 20px; }
    .toggle-row strong { font-size: 14px; }
    .toggle-row span { font-size: 12px; }
}

/* ==========================================================================
   KILLER FEATURES: MULTI-SERVER, SKIP INTRO, PROVIDERS, SHORTCUTS, PWA
   ========================================================================== */

/* 1. Multi-Server Streaming Mirror Selector */
.server-control {
    position: relative;
    display: inline-block;
}
.server-control button {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    border-radius: 4px;
    transition: background 0.15s ease;
}
.server-control button:hover {
    background: rgba(255, 255, 255, 0.15);
}
.server-badge {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 3px;
    letter-spacing: 0.5px;
}
.server-menu {
    position: absolute;
    bottom: calc(100% + 12px);
    right: 0;
    background: rgba(20, 20, 20, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 10px 0;
    min-width: 280px;
    display: none;
    backdrop-filter: blur(18px);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.8);
    z-index: 50;
}
.server-menu.open { display: block; }
.server-header {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #8c8c8c;
    padding: 4px 14px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.server-list { display: flex; flex-direction: column; gap: 3px; padding: 6px 0; }
.server-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    cursor: pointer;
    transition: background 0.15s ease;
}
.server-item:hover { background: rgba(255, 255, 255, 0.1); }
.server-item.active { background: rgba(229, 9, 20, 0.18); }
.server-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #46d369; flex-shrink: 0;
}
.server-meta { flex: 1; display: flex; flex-direction: column; }
.server-meta strong { font-size: 13px; color: #fff; line-height: 1.2; }
.server-meta small { font-size: 11px; color: #a3a3a3; margin-top: 2px; }
.server-check { font-size: 14px; color: var(--red); font-weight: 800; min-width: 14px; }

/* 2. Skip Intro Button */
.skip-intro-btn {
    position: absolute;
    bottom: 85px;
    right: 4%;
    background: rgba(20, 20, 20, 0.88);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
    z-index: 30;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}
.skip-intro-btn:hover {
    background: #fff;
    color: #000;
    border-color: #fff;
    transform: scale(1.04);
}

/* 3. Keyboard Shortcuts Modal */
.shortcuts-modal {
    max-width: 540px;
    background: #181818;
    border: 1px solid #333;
    border-radius: 10px;
    padding: 24px 28px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.85);
}
.shortcuts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 20px;
    margin-top: 18px;
}
.shortcut-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: #ccc;
}
.shortcut-key {
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 2px 7px;
    font-family: monospace;
    font-size: 12px;
    color: #fff;
    font-weight: 700;
}

/* 4. Browse by Provider / Network Row */
.provider-section {
    position: relative;
    z-index: 4;
    margin-top: -60px;
    padding: 0 4% 18px;
    max-width: 100%;
}
.provider-title {
    font-size: 18px;
    font-weight: 700;
    color: #e5e5e5;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.provider-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
}
.provider-grid::-webkit-scrollbar { display: none; }
.provider-pill {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #1e1e1e;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 24px;
    color: #ddd;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
}
.provider-pill:hover {
    background: #2a2a2a;
    color: #fff;
    border-color: rgba(255,255,255,0.25);
    transform: translateY(-2px);
}
.provider-pill.active {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
}
.provider-icon {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 900;
}

/* 5. Episode Badges on Series Cards */
.card-ep-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #46d369;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    z-index: 2;
    backdrop-filter: blur(4px);
}

/* 6. PWA 1-Click Install Floating Banner */
.pwa-install-banner {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: rgba(24, 24, 24, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.8);
    backdrop-filter: blur(20px);
    z-index: 999;
    max-width: 400px;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.pwa-icon { font-size: 26px; }
.pwa-text { flex: 1; }
.pwa-text strong { display: block; font-size: 13px; color: #fff; }
.pwa-text p { font-size: 11px; color: #aaa; margin: 2px 0 0; line-height: 1.3; }
.btn-pwa-install {
    background: var(--red);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease;
}
.btn-pwa-install:hover { background: #b80710; }
.pwa-close {
    background: transparent;
    border: none;
    color: #888;
    font-size: 18px;
    cursor: pointer;
    padding: 2px;
}
.pwa-close:hover { color: #fff; }

