:root {
    --red: #e50914;
    --red-hover: #f40612;
    --bg: #141414;
    --bg-dark: #000;
    --bg-card: #181818;
    --bg-elevated: #2f2f2f;
    --text: #fff;
    --text-muted: #b3b3b3;
    --text-dim: #808080;
    --green: #46d369;
    --header-h: 68px;
    --radius: 4px;
    --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
    --font-display: "Bebas Neue", "Helvetica Neue", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.4;
    min-height: 100vh;
    overflow-x: hidden;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius);
    transition: background .2s, transform .15s;
    white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-hover); }
.btn-white { background: #fff; color: #000; }
.btn-white:hover { background: rgba(255,255,255,.75); }
.btn-ghost {
    background: rgba(109,109,110,.7);
    color: #fff;
    backdrop-filter: blur(4px);
}
.btn-ghost:hover { background: rgba(109,109,110,.4); }
.btn-outline {
    border: 1px solid rgba(255,255,255,.5);
    background: transparent;
    color: #fff;
}
.btn-outline:hover { border-color: #fff; background: rgba(255,255,255,.1); }
.btn-lg { padding: 12px 32px; font-size: 1.15rem; }
.btn-sm { padding: 7px 16px; font-size: .9rem; }
.btn svg { flex-shrink: 0; }

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--header-h);
    background: linear-gradient(180deg, rgba(0,0,0,.7) 10%, transparent);
    transition: background .3s;
}
.site-header.scrolled {
    background: var(--bg-dark);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 4%;
    height: 100%;
}
.logo {
    font-family: var(--font-display);
    font-size: clamp(1.15rem, 2.2vw, 1.65rem);
    letter-spacing: 1px;
    color: var(--red);
    flex-shrink: 0;
    line-height: 1;
    white-space: nowrap;
}
.admin-sidebar .logo {
    font-size: 1.25rem;
    letter-spacing: 0.5px;
}
.main-nav {
    display: flex;
    gap: 18px;
    flex: 1;
}
.main-nav a {
    font-size: .875rem;
    color: var(--text-muted);
    transition: color .2s;
}
.main-nav a:hover,
.main-nav a.active { color: #fff; font-weight: 500; }

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
}

/* Search */
.search-form {
    display: flex;
    align-items: center;
    position: relative;
}
.search-toggle {
    padding: 4px;
    color: #fff;
    display: flex;
}
.search-form input {
    width: 0;
    opacity: 0;
    padding: 0;
    border: none;
    background: rgba(0,0,0,.75);
    color: #fff;
    font-size: .9rem;
    transition: width .3s, opacity .3s, padding .3s, border .3s;
}
.search-form.open input,
.search-form input:focus {
    width: 220px;
    opacity: 1;
    padding: 6px 10px 6px 36px;
    border: 1px solid #fff;
    outline: none;
}
.search-form.open .search-toggle,
.search-form:focus-within .search-toggle {
    position: absolute;
    left: 8px;
    z-index: 1;
}

/* Profile */
.profile-menu { position: relative; }
.profile-btn {
    display: flex;
    align-items: center;
    gap: 6px;
}
.avatar {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .85rem;
    color: #fff;
}
.avatar.sm { width: 28px; height: 28px; font-size: .75rem; }
.profile-btn .caret { transition: transform .2s; }
.profile-menu.open .caret { transform: rotate(180deg); }
.profile-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 200px;
    background: rgba(0,0,0,.92);
    border: 1px solid rgba(255,255,255,.15);
    padding: 8px 0;
}
.profile-menu.open .profile-dropdown { display: block; }
.profile-dropdown a,
.dropdown-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: .85rem;
    color: var(--text-muted);
}
.profile-dropdown a:hover { text-decoration: underline; color: #fff; }
.profile-dropdown hr {
    border: none;
    border-top: 1px solid rgba(255,255,255,.15);
    margin: 6px 0;
}

/* Landing */
.landing-body {
    background: #000;
}
.landing-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        linear-gradient(to top, rgba(0,0,0,.9) 0%, transparent 50%, rgba(0,0,0,.7) 100%),
        url('https://assets.nflxext.com/ffe/siteui/vlv3/fc164b4b-f085-44ee-bb7f-ec7df95375dd/d23a1608-7d90-4da1-93d6-bae2feee3850/IN-en-20230814-popsignuptwoweeks-perspective_alpha_website_large.jpg') center/cover no-repeat;
}
.landing-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 5% 80px;
    max-width: 800px;
    margin: 0 auto;
}
.landing-content h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.15;
}
.landing-content .sub {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    margin-bottom: 20px;
}
.landing-content .cta-text {
    font-size: 1.15rem;
    margin-bottom: 20px;
}
.email-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    max-width: 600px;
    justify-content: center;
}
.email-form input {
    flex: 1;
    min-width: 240px;
    padding: 16px 14px;
    font-size: 1rem;
    background: rgba(22,22,22,.7);
    border: 1px solid rgba(255,255,255,.3);
    border-radius: var(--radius);
    color: #fff;
    outline: none;
}
.email-form input:focus { border-color: #fff; }
.email-form .btn { padding: 16px 28px; font-size: 1.35rem; }

.landing-section {
    border-top: 8px solid #222;
    padding: 70px 5%;
}
.landing-section .inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}
.landing-section.reverse .inner { direction: rtl; }
.landing-section.reverse .inner > * { direction: ltr; }
.landing-section h2 {
    font-size: clamp(1.6rem, 3.5vw, 2.8rem);
    margin-bottom: 16px;
}
.landing-section p {
    font-size: clamp(1rem, 2vw, 1.35rem);
    color: var(--text-muted);
}
.landing-section .media {
    position: relative;
}
.landing-section .media img {
    width: 100%;
    border-radius: 4px;
}

.faq-section {
    border-top: 8px solid #222;
    padding: 70px 5%;
    text-align: center;
}
.faq-section h2 {
    font-size: clamp(1.6rem, 3.5vw, 2.8rem);
    margin-bottom: 32px;
}
.faq-list {
    max-width: 800px;
    margin: 0 auto 40px;
    text-align: left;
}
.faq-item {
    margin-bottom: 8px;
    background: #2d2d2d;
}
.faq-item button {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 24px;
    font-size: 1.25rem;
    text-align: left;
}
.faq-item button span { font-size: 2rem; font-weight: 300; line-height: 1; }
.faq-item .answer {
    display: none;
    padding: 0 24px 22px;
    font-size: 1.15rem;
    color: var(--text-muted);
    border-top: 1px solid #000;
    padding-top: 22px;
}
.faq-item.open .answer { display: block; }
.faq-item.open button span { transform: rotate(45deg); display: inline-block; }

/* Auth */
.auth-body {
    min-height: 100vh;
    background:
        linear-gradient(rgba(0,0,0,.6), rgba(0,0,0,.6)),
        url('https://assets.nflxext.com/ffe/siteui/vlv3/fc164b4b-f085-44ee-bb7f-ec7df95375dd/d23a1608-7d90-4da1-93d6-bae2feee3850/IN-en-20230814-popsignuptwoweeks-perspective_alpha_website_large.jpg') center/cover;
}
.auth-header {
    padding: 20px 4%;
}
.auth-card {
    width: 100%;
    max-width: 450px;
    margin: 40px auto 80px;
    background: rgba(0,0,0,.75);
    padding: 48px 68px 60px;
    border-radius: 4px;
}
.auth-card h1 {
    font-size: 2rem;
    margin-bottom: 28px;
}
.form-group {
    margin-bottom: 16px;
}
.form-group label {
    display: block;
    font-size: .8rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    background: #333;
    border: none;
    border-radius: var(--radius);
    color: #fff;
    outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    background: #454545;
    outline: 2px solid #fff;
    outline-offset: -2px;
}
.form-group textarea { min-height: 100px; resize: vertical; }
.auth-card .btn { width: 100%; margin-top: 12px; padding: 14px; }
.auth-error {
    background: #e87c03;
    color: #fff;
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: .9rem;
}
.auth-success {
    background: #46d369;
    color: #000;
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: .9rem;
}
.auth-switch {
    margin-top: 24px;
    color: var(--text-dim);
    font-size: 1rem;
}
.auth-switch a { color: #fff; }
.auth-switch a:hover { text-decoration: underline; }
.demo-creds {
    margin-top: 20px;
    padding: 12px;
    background: rgba(255,255,255,.08);
    border-radius: var(--radius);
    font-size: .8rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Browse / Home */
.browse-page { padding-bottom: 60px; }

.hero-banner {
    position: relative;
    height: 85vh;
    min-height: 480px;
    max-height: 900px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center top;
}
.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(77deg, rgba(0,0,0,.7) 0%, transparent 60%),
        linear-gradient(to top, var(--bg) 0%, transparent 40%),
        linear-gradient(to bottom, rgba(0,0,0,.4) 0%, transparent 20%);
}
.hero-content {
    position: relative;
    z-index: 2;
    padding: 0 4% 12%;
    max-width: 45%;
    animation: fadeUp .8s ease;
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    letter-spacing: 1px;
    line-height: 1;
    margin-bottom: 16px;
    text-shadow: 2px 2px 8px rgba(0,0,0,.6);
}
.hero-desc {
    font-size: clamp(.95rem, 1.5vw, 1.2rem);
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 1px 1px 4px rgba(0,0,0,.8);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hero-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
    font-size: .95rem;
}
.hero-meta .match { color: var(--green); font-weight: 700; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Movie rows */
.rows-container {
    margin-top: -80px;
    position: relative;
    z-index: 5;
    padding: 0 0 40px;
}
.movie-row {
    margin-bottom: 28px;
    padding: 0 4%;
}
.row-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 10px;
}
.row-slider {
    position: relative;
}
.row-track {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 12px 0 24px;
}
.row-track::-webkit-scrollbar { display: none; }

.slider-btn {
    position: absolute;
    top: 0;
    bottom: 24px;
    z-index: 10;
    width: 48px;
    background: rgba(20,20,20,.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .2s, background .2s;
}
.row-slider:hover .slider-btn { opacity: 1; }
.slider-btn:hover { background: rgba(20,20,20,.8); }
.slider-btn.prev { left: -4%; border-radius: 0 4px 4px 0; }
.slider-btn.next { right: -4%; border-radius: 4px 0 0 4px; }

/* Cards */
.movie-card {
    flex: 0 0 auto;
    width: 16.5%;
    min-width: 140px;
    max-width: 220px;
    position: relative;
    transition: transform .3s ease;
    z-index: 1;
}
.movie-card:hover {
    transform: scale(1.35);
    z-index: 20;
}
.card-link { display: block; position: relative; }
.card-poster {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: var(--radius);
    background: var(--bg-elevated);
}
.card-hover {
    display: none;
    position: absolute;
    inset: auto 0 0 0;
    top: 0;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: 0 8px 30px rgba(0,0,0,.8);
    overflow: hidden;
}
.movie-card:hover .card-hover { display: block; }
.movie-card:hover .card-poster { visibility: hidden; }
.hover-bg {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}
.hover-content { padding: 10px 12px 14px; }
.hover-actions {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}
.icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.5);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(42,42,42,.6);
    transition: background .2s, border-color .2s;
}
.icon-btn:hover { border-color: #fff; background: rgba(255,255,255,.1); }
.icon-btn.play {
    background: #fff;
    color: #000;
    border-color: #fff;
}
.icon-btn.play:hover { background: rgba(255,255,255,.8); }
.icon-btn.active {
    border-color: #fff;
}
.hover-title {
    font-size: .8rem;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hover-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: .7rem;
    color: var(--text-muted);
}
.hover-meta .match { color: var(--green); font-weight: 700; }
.maturity {
    border: 1px solid var(--text-dim);
    padding: 0 4px;
    font-size: .65rem;
}

/* Movie detail */
.movie-detail {
    padding-top: 0;
}
.detail-hero {
    position: relative;
    height: 70vh;
    min-height: 400px;
}
.detail-hero .hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.detail-hero .hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--bg) 5%, transparent 50%),
                linear-gradient(77deg, rgba(0,0,0,.8) 0%, transparent 55%);
}
.detail-info {
    position: relative;
    z-index: 2;
    padding: 0 4% 40px;
    max-width: 55%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    padding-bottom: 8%;
}
.detail-info h1 {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5vw, 4rem);
    margin-bottom: 16px;
}
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
    font-size: .95rem;
}
.detail-meta .match { color: var(--green); font-weight: 700; }
.detail-desc {
    font-size: 1.05rem;
    margin-bottom: 20px;
    color: #e5e5e5;
    max-width: 600px;
}
.detail-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}
.genre-tag {
    padding: 4px 12px;
    background: rgba(255,255,255,.1);
    border-radius: 20px;
    font-size: .8rem;
    color: var(--text-muted);
}
.detail-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.detail-body {
    padding: 0 4% 60px;
}
.detail-body .rows-container { margin-top: 20px; }

/* Watch player */
.watch-page {
    background: #000;
    min-height: 100vh;
}
.player-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    max-height: 100vh;
    background: #000;
}
.player-wrap iframe,
.player-wrap video {
    width: 100%;
    height: 100%;
    border: none;
}
.player-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    padding: 20px 4%;
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(to bottom, rgba(0,0,0,.8), transparent);
    opacity: 0;
    transition: opacity .3s;
}
.player-wrap:hover .player-top { opacity: 1; }
.back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    font-weight: 500;
}
.back-btn:hover { opacity: .8; }
.player-title { font-size: 1.2rem; font-weight: 600; }

/* Search / Browse / My List pages */
.page-header {
    padding: calc(var(--header-h) + 30px) 4% 20px;
}
.page-header h1 {
    font-size: 2rem;
    font-weight: 600;
}
.page-header .sub { color: var(--text-muted); margin-top: 6px; }

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    padding: 10px 4% 60px;
}
.movie-grid .movie-card {
    width: 100%;
    min-width: 0;
    max-width: none;
}
.movie-grid .movie-card:hover {
    transform: scale(1.08);
}

.empty-state {
    text-align: center;
    padding: 80px 4%;
    color: var(--text-muted);
}
.empty-state h2 { color: #fff; margin-bottom: 12px; }
.empty-state .btn { margin-top: 24px; }

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 4% 20px;
}
.filter-chip {
    padding: 6px 16px;
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 20px;
    font-size: .85rem;
    color: var(--text-muted);
    transition: all .2s;
}
.filter-chip:hover,
.filter-chip.active {
    background: #fff;
    color: #000;
    border-color: #fff;
}

/* Profile */
.profile-page {
    padding: calc(var(--header-h) + 40px) 4% 60px;
    max-width: 700px;
    margin: 0 auto;
}
.profile-page h1 { margin-bottom: 32px; font-size: 2rem; }
.profile-card {
    background: var(--bg-card);
    padding: 32px;
    border-radius: 8px;
}
.profile-avatar-lg {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 24px;
}

/* Admin */
.admin-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
}
.admin-sidebar {
    background: #000;
    padding: 24px 0;
    border-right: 1px solid #222;
}
.admin-sidebar .logo {
    display: block;
    padding: 0 24px 32px;
}
.admin-nav a {
    display: block;
    padding: 12px 24px;
    font-size: .9rem;
    color: var(--text-muted);
    border-left: 3px solid transparent;
}
.admin-nav a:hover,
.admin-nav a.active {
    color: #fff;
    background: rgba(255,255,255,.05);
    border-left-color: var(--red);
}
.admin-main { padding: 32px; }
.admin-main h1 { font-size: 1.75rem; margin-bottom: 24px; }
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}
.stat-card {
    background: var(--bg-card);
    padding: 24px;
    border-radius: 8px;
}
.stat-card .num {
    font-size: 2rem;
    font-weight: 700;
    color: var(--red);
}
.stat-card .label { color: var(--text-muted); font-size: .85rem; margin-top: 4px; }
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
}
.admin-table th,
.admin-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #2a2a2a;
    font-size: .9rem;
}
.admin-table th {
    background: #1a1a1a;
    color: var(--text-muted);
    font-weight: 500;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.admin-table img {
    width: 40px;
    height: 60px;
    object-fit: cover;
    border-radius: 2px;
}
.admin-table .actions { display: flex; gap: 8px; }
.btn-icon {
    padding: 6px 10px;
    border-radius: var(--radius);
    font-size: .8rem;
    background: var(--bg-elevated);
}
.btn-icon:hover { background: #444; }
.btn-icon.danger { color: var(--red); }
.admin-form {
    background: var(--bg-card);
    padding: 32px;
    border-radius: 8px;
    max-width: 700px;
}
.admin-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}
.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .9rem;
    color: var(--text-muted);
    cursor: pointer;
}
.admin-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

/* Footer */
.site-footer {
    border-top: 1px solid #222;
    padding: 50px 4% 30px;
    color: var(--text-dim);
    font-size: .85rem;
}
.footer-inner { max-width: 1000px; margin: 0 auto; }
.footer-questions { margin-bottom: 24px; font-size: 1rem; }
.footer-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}
.footer-links a:hover { text-decoration: underline; }
.footer-copy { margin-top: 16px; }

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #fff;
    color: #000;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 500;
    font-size: .9rem;
    z-index: 999;
    opacity: 0;
    transition: transform .3s, opacity .3s;
    box-shadow: 0 4px 20px rgba(0,0,0,.4);
}
.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Responsive */
@media (max-width: 1100px) {
    .movie-card { width: 22%; }
    .hero-content, .detail-info { max-width: 60%; }
}
@media (max-width: 900px) {
    .main-nav { display: none; }
    .landing-section .inner { grid-template-columns: 1fr; text-align: center; }
    .landing-section.reverse .inner { direction: ltr; }
    .footer-links { grid-template-columns: repeat(2, 1fr); }
    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar { display: flex; overflow-x: auto; padding: 12px; border-right: none; border-bottom: 1px solid #222; }
    .admin-sidebar .logo { display: none; }
    .admin-nav { display: flex; }
    .admin-nav a { border-left: none; border-bottom: 2px solid transparent; white-space: nowrap; }
    .admin-nav a.active { border-bottom-color: var(--red); }
}
@media (max-width: 700px) {
    .movie-card { width: 30%; min-width: 110px; }
    .movie-card:hover { transform: scale(1.1); }
    .hero-content, .detail-info { max-width: 90%; }
    .hero-banner { height: 70vh; }
    .auth-card { padding: 32px 24px; margin: 20px 16px 60px; width: auto; }
    .email-form { flex-direction: column; }
    .email-form .btn { width: 100%; }
    .rows-container { margin-top: -40px; }
    .slider-btn { display: none; }
    .admin-form .form-row { grid-template-columns: 1fr; }
    .search-form.open input,
    .search-form input:focus { width: 160px; }
}
@media (max-width: 480px) {
    .movie-card { width: 40%; }
    .movie-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-actions .btn { padding: 8px 16px; font-size: .9rem; }
}

/* Plans & checkout */
.plans-header { text-align: center; }
.current-plan-banner {
    margin: 20px auto 0;
    max-width: 640px;
    padding: 12px 20px;
    background: rgba(70,211,105,.12);
    border: 1px solid rgba(70,211,105,.35);
    border-radius: 6px;
    font-size: .95rem;
}
.plan-warn { color: #e87c03; }
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    padding: 10px 4% 40px;
    max-width: 1200px;
    margin: 0 auto;
}
.plan-card {
    background: var(--bg-card);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 28px 24px;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: border-color .2s, transform .2s;
}
.plan-card:hover { border-color: #666; transform: translateY(-4px); }
.plan-card.popular { border-color: var(--red); }
.plan-card.current { border-color: var(--green); }
.plan-badge {
    position: absolute;
    top: -10px;
    right: 16px;
    background: var(--red);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
}
.plan-card h2 { font-size: 1.4rem; margin-bottom: 8px; }
.plan-price {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.plan-price span { font-size: .85rem; font-weight: 400; color: var(--text-muted); }
.plan-desc { color: var(--text-muted); font-size: .9rem; margin-bottom: 16px; min-height: 40px; }
.plan-features {
    list-style: none;
    margin-bottom: 24px;
    flex: 1;
}
.plan-features li {
    padding: 8px 0;
    border-bottom: 1px solid #2a2a2a;
    font-size: .9rem;
    color: var(--text-muted);
    padding-left: 20px;
    position: relative;
}
.plan-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--green);
}
.plan-card .btn { width: 100%; }
.accepted-gateways {
    text-align: center;
    padding: 0 4% 60px;
    color: var(--text-muted);
}
.gw-pills { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px; }
.gw-pill {
    padding: 6px 14px;
    background: var(--bg-elevated);
    border-radius: 20px;
    font-size: .8rem;
}

.checkout-page {
    padding: calc(var(--header-h) + 40px) 4% 60px;
    max-width: 960px;
    margin: 0 auto;
}
.checkout-page h1 { margin-bottom: 28px; }
.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 24px;
}
.checkout-summary, .checkout-pay {
    background: var(--bg-card);
    padding: 28px;
    border-radius: 8px;
}
.checkout-summary h2, .checkout-pay h2 {
    font-size: 1.1rem;
    margin-bottom: 20px;
}
.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #2a2a2a;
    color: var(--text-muted);
}
.summary-total {
    display: flex;
    justify-content: space-between;
    padding-top: 16px;
    font-size: 1.2rem;
}
.gateway-options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.gateway-option {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px;
    border: 1px solid #333;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color .2s;
}
.gateway-option:has(input:checked) {
    border-color: var(--red);
    background: rgba(229,9,20,.08);
}
.gw-option-body { display: flex; flex-direction: column; gap: 4px; }
.gw-option-body small { color: var(--text-muted); font-size: .8rem; }
.test-tag { color: #f5c518; font-size: .75rem; font-style: normal; }
.pay-note { font-size: .8rem; color: var(--text-dim); margin-bottom: 14px; line-height: 1.4; }
.back-link { display: inline-block; margin-top: 16px; color: var(--text-muted); font-size: .9rem; }
.back-link:hover { color: #fff; }

.success-page {
    text-align: center;
    padding: calc(var(--header-h) + 80px) 4% 100px;
}
.success-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--green);
    color: #000;
    font-size: 2.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}
.success-page h1 { margin-bottom: 12px; }
.success-page .txn { margin: 16px 0 28px; color: var(--text-muted); font-size: .85rem; }

.membership-box {
    background: #222;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 28px;
}
.membership-box h3 { margin-bottom: 10px; }
.membership-box p { color: var(--text-muted); font-size: .9rem; margin-bottom: 6px; }

/* Admin gateways */
.admin-hint { color: var(--text-muted); font-size: .9rem; margin-bottom: 20px; }
.gateway-list { display: flex; flex-direction: column; gap: 20px; }
.gateway-card {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 24px;
    border-left: 4px solid #444;
}
.gateway-card.on { border-left-color: var(--green); }
.gateway-card.off { border-left-color: #555; opacity: .85; }
.gateway-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}
.gateway-head h2 { font-size: 1.2rem; }
.gateway-head p { color: var(--text-muted); font-size: .85rem; margin-top: 4px; }
.gw-status { margin-left: 12px; font-size: .85rem; color: var(--text-muted); }

.switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #555;
    border-radius: 28px;
    transition: .25s;
}
.switch .slider::before {
    content: '';
    position: absolute;
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: .25s;
}
.switch input:checked + .slider { background: var(--green); }
.switch input:checked + .slider::before { transform: translateX(24px); }

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: .75rem;
    text-transform: uppercase;
}
.badge-completed { background: rgba(70,211,105,.2); color: var(--green); }
.badge-pending { background: rgba(245,197,24,.2); color: #f5c518; }
.badge-failed { background: rgba(229,9,20,.2); color: var(--red); }

@media (max-width: 800px) {
    .checkout-layout { grid-template-columns: 1fr; }
}

/* Genre dropdowns */
.browse-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}
.genre-dropdown-form {
    display: flex;
    align-items: center;
    gap: 10px;
}
.genre-dropdown-form label {
    font-size: .9rem;
    color: var(--text-muted);
}
.genre-dropdown-form select,
.nav-genre-select,
.genre-multiselect {
    background: rgba(0,0,0,.75);
    color: #fff;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 4px;
    padding: 8px 32px 8px 12px;
    font-size: .9rem;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}
.genre-dropdown-form select:hover,
.nav-genre-select:hover,
.genre-dropdown-form select:focus,
.nav-genre-select:focus {
    border-color: #fff;
}
.genre-dropdown-form select option,
.nav-genre-select option,
.genre-multiselect option {
    background: #1a1a1a;
    color: #fff;
}
.genre-multiselect {
    width: 100%;
    min-height: 120px;
    padding: 8px;
    background-image: none;
    appearance: auto;
}
.nav-genre-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}
.nav-genre-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
}
.nav-genre-select {
    padding: 4px 28px 4px 8px;
    font-size: .85rem;
    border-color: transparent;
    background-color: transparent;
    max-width: 120px;
}
.nav-genre-select:hover,
.nav-genre-select:focus {
    background-color: rgba(0,0,0,.6);
    border-color: rgba(255,255,255,.35);
}

@media (max-width: 900px) {
    .nav-genre-wrap { display: none; }
    .browse-header-row { align-items: flex-start; flex-direction: column; }
}

/* Upload form */
.form-section-title {
    font-size: 1rem;
    margin: 24px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #333;
    color: #fff;
}
.upload-block {
    background: #1a1a1a;
    border: 1px dashed #444;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 8px;
}
.upload-preview {
    margin-bottom: 12px;
}
.upload-preview img {
    width: 100px;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
    background: #333;
}
.upload-preview.wide img {
    width: 220px;
    height: 124px;
}
.upload-preview small,
.field-hint,
.current-file {
    display: block;
    color: #808080;
    font-size: .8rem;
    margin-top: 6px;
}
.admin-form input[type="file"] {
    width: 100%;
    padding: 10px;
    background: #333;
    border-radius: 4px;
    color: #fff;
}

.chunk-progress-wrap { margin: 12px 0 16px; }
.chunk-progress-bar {
    height: 10px;
    background: #333;
    border-radius: 6px;
    overflow: hidden;
}
.chunk-progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #e50914, #f40612);
    transition: width .2s ease;
}
.chunk-progress-text {
    margin-top: 8px;
    font-size: .85rem;
    color: #b3b3b3;
}

/* Ad player */
.player-stage {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
}
.player-stage video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}
.ad-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.55);
    pointer-events: none;
}
.ad-overlay[hidden] {
    display: none !important;
}
.ad-skip-btn[hidden] {
    display: none !important;
}
.ad-overlay > * { pointer-events: auto; }
.ad-label {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(229,9,20,.9);
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 3px;
    letter-spacing: .5px;
    text-transform: uppercase;
}
.ad-poster {
    max-width: min(90%, 900px);
    max-height: 60%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 40px rgba(0,0,0,.6);
}
.ad-meta {
    position: absolute;
    bottom: 70px;
    left: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,.8);
}
.ad-learn-more {
    background: #fff;
    color: #000;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 600;
    font-size: .9rem;
}
.ad-learn-more:hover { background: #ddd; }
.ad-skip-btn {
    position: absolute;
    right: 20px;
    bottom: 24px;
    background: rgba(40,40,40,.9);
    border: 1px solid rgba(255,255,255,.4);
    color: #fff;
    padding: 10px 18px;
    border-radius: 4px;
    font-weight: 600;
    font-size: .9rem;
}
.ad-skip-btn:hover { background: rgba(80,80,80,.95); }
.ad-skip-timer {
    position: absolute;
    right: 20px;
    bottom: 28px;
    color: #ccc;
    font-size: .85rem;
}
.ad-note-yt {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,.7);
    color: #b3b3b3;
    font-size: .75rem;
    padding: 6px 12px;
    border-radius: 4px;
}
.badge-start { background: rgba(0,113,235,.25); color: #4da3ff; }
.badge-mid { background: rgba(245,197,24,.2); color: #f5c518; }
.badge-end { background: rgba(168,85,247,.2); color: #c084fc; }

/* Scroll banner ticker (bottom of player) */
.scroll-banner-host {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 8;
    pointer-events: none;
}
.scroll-banner {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    padding: 10px 0;
    line-height: 1.3;
    border-top: 1px solid rgba(255,255,255,.15);
}
.scroll-banner[hidden] { display: none !important; }
.scroll-banner-track {
    display: inline-flex;
    width: max-content;
    gap: 0;
    animation-name: bannerScrollRTL;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    will-change: transform;
}
.scroll-banner-track span {
    padding-right: 4rem;
    white-space: nowrap;
}
/* Right → Left: classic ticker */
@keyframes bannerScrollRTL {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-50%); }
}

.banner-preview-wrap {
    overflow: hidden;
    border-radius: 6px;
    padding: 14px 0;
    margin-bottom: 8px;
}
.banner-preview-track {
    display: inline-flex;
    width: max-content;
    animation: bannerScrollRTL linear infinite;
}
.banner-preview-track span { padding-right: 3rem; white-space: nowrap; }

.admin-form input[type="color"] {
    width: 100%;
    height: 42px;
    padding: 4px;
    background: #333;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* ========== Responsive foundation ========== */
html { -webkit-text-size-adjust: 100%; }
img, video, iframe { max-width: 100%; height: auto; }
.admin-table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.admin-main .admin-table { min-width: 640px; }

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    margin-right: 4px;
    flex-shrink: 0;
}
.nav-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background: #fff;
    border-radius: 2px;
    transition: transform .25s, opacity .25s;
}
body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 90;
}

/* Fluid cards */
.movie-card {
    width: clamp(120px, 18vw, 220px);
    min-width: 120px;
}

/* ========== Large tablets / small laptops ========== */
@media (max-width: 1100px) {
    :root { --header-h: 64px; }
    .hero-content, .detail-info { max-width: 65%; }
    .plans-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-form { max-width: 100%; }
}

/* ========== Tablets ========== */
@media (max-width: 900px) {
    .nav-toggle { display: flex; }
    .main-nav {
        display: none;
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        max-height: calc(100vh - var(--header-h));
        overflow-y: auto;
        flex-direction: column;
        gap: 0;
        padding: 12px 0 24px;
        background: #141414;
        border-bottom: 1px solid #333;
        z-index: 95;
        box-shadow: 0 12px 40px rgba(0,0,0,.5);
    }
    body.nav-open .main-nav { display: flex; }
    body.nav-open .nav-backdrop { display: block; }
    .main-nav a,
    .main-nav .nav-genre-wrap {
        padding: 14px 5%;
        font-size: 1rem;
        border-bottom: 1px solid #222;
        width: 100%;
    }
    .nav-genre-wrap { display: flex !important; }
    .nav-genre-label {
        position: static;
        width: auto;
        height: auto;
        clip: auto;
        overflow: visible;
        font-size: .85rem;
        color: var(--text-muted);
        margin-right: 8px;
    }
    .nav-genre-select {
        max-width: none;
        flex: 1;
        background-color: #222;
        border-color: #444;
        padding: 8px 12px;
    }

    .header-inner { gap: 10px; padding: 0 3%; }
    .logo { font-size: 1.15rem; max-width: 42vw; overflow: hidden; text-overflow: ellipsis; }

    .landing-section .inner { grid-template-columns: 1fr; text-align: center; gap: 24px; }
    .landing-section.reverse .inner { direction: ltr; }
    .footer-links { grid-template-columns: repeat(2, 1fr); }

    .hero-content, .detail-info { max-width: 85%; padding-bottom: 10%; }
    .rows-container { margin-top: -48px; }
    .movie-card:hover { transform: scale(1.08); }
    .movie-card:hover .card-hover { display: none; }
    .movie-card:hover .card-poster { visibility: visible; }

    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar {
        display: flex;
        overflow-x: auto;
        padding: 10px 8px;
        border-right: none;
        border-bottom: 1px solid #222;
        -webkit-overflow-scrolling: touch;
    }
    .admin-sidebar .logo { display: none; }
    .admin-nav { display: flex; gap: 0; }
    .admin-nav a {
        border-left: none;
        border-bottom: 2px solid transparent;
        white-space: nowrap;
        padding: 10px 14px;
        font-size: .85rem;
    }
    .admin-nav a.active { border-bottom-color: var(--red); background: transparent; }
    .admin-main { padding: 20px 16px; }
    .admin-form .form-row { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }

    .browse-header-row { flex-direction: column; align-items: flex-start; }
    .gateway-head { flex-direction: column; }
}

/* ========== Phones ========== */
@media (max-width: 700px) {
    :root { --header-h: 56px; }
    .header-inner { padding: 0 12px; gap: 8px; }
    .logo { font-size: 1.05rem; letter-spacing: 0; max-width: 38vw; }
    .avatar { width: 28px; height: 28px; font-size: .75rem; }

    .search-form.open input,
    .search-form input:focus { width: min(52vw, 160px); font-size: 16px; }

    .landing-hero { min-height: 100svh; }
    .landing-content { padding: 100px 5% 60px; }
    .landing-content h1 { font-size: 1.75rem; }
    .landing-section, .faq-section { padding: 48px 5%; }
    .faq-item button { font-size: 1rem; padding: 16px; }
    .email-form { flex-direction: column; }
    .email-form input { min-width: 0; width: 100%; font-size: 16px; }
    .email-form .btn { width: 100%; font-size: 1.1rem; }

    .auth-card {
        margin: 16px 12px 48px;
        padding: 28px 18px 36px;
        width: auto;
        max-width: none;
    }
    .auth-card h1 { font-size: 1.6rem; }
    .form-group input,
    .form-group select,
    .form-group textarea { font-size: 16px; }

    .hero-banner {
        height: auto;
        min-height: 56vh;
        max-height: none;
        aspect-ratio: 16/11;
    }
    .hero-content, .detail-info {
        max-width: 100%;
        padding: 0 4% 18%;
    }
    .hero-title { font-size: 1.85rem; }
    .hero-desc { -webkit-line-clamp: 2; font-size: .9rem; }
    .hero-actions { gap: 8px; }
    .hero-actions .btn { padding: 8px 14px; font-size: .9rem; }
    .detail-hero { height: auto; min-height: 52vh; aspect-ratio: 16/12; }
    .detail-info h1 { font-size: 1.75rem; }
    .detail-desc { font-size: .95rem; }

    .movie-row { padding: 0 3%; margin-bottom: 18px; }
    .row-title { font-size: 1.05rem; }
    .movie-card {
        width: 38vw;
        min-width: 110px;
        max-width: 160px;
    }
    .movie-card:hover { transform: none; }
    .slider-btn { display: none; }
    .rows-container { margin-top: -36px; }
    .row-track { padding: 8px 0 16px; gap: 8px; }

    .movie-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding: 8px 3% 48px;
    }
    .page-header { padding: calc(var(--header-h) + 20px) 4% 12px; }
    .page-header h1 { font-size: 1.5rem; }
    .filter-bar { padding: 0 3% 12px; gap: 8px; overflow-x: auto; flex-wrap: nowrap; }
    .filter-chip { white-space: nowrap; flex-shrink: 0; }

    .plans-grid { grid-template-columns: 1fr; padding: 8px 4% 32px; gap: 14px; }
    .plan-card { padding: 22px 18px; }
    .checkout-page { padding: calc(var(--header-h) + 24px) 4% 40px; }
    .checkout-layout { grid-template-columns: 1fr; gap: 16px; }
    .checkout-summary, .checkout-pay { padding: 20px; }
    .profile-page { padding: calc(var(--header-h) + 24px) 4% 40px; }
    .profile-card { padding: 20px; }

    .footer-links { grid-template-columns: 1fr 1fr; gap: 10px; }
    .site-footer { padding: 36px 4% 24px; }

    .player-wrap {
        aspect-ratio: 16/9;
        max-height: none;
        min-height: 220px;
    }
    .player-top { padding: 12px 3%; opacity: 1; }
    .player-title { font-size: .95rem; max-width: 60vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .ad-skip-btn, .ad-skip-timer { right: 10px; bottom: 14px; font-size: .8rem; padding: 8px 12px; }
    .ad-meta { bottom: 56px; left: 10px; right: 10px; font-size: .85rem; }
    .ad-label { top: 10px; left: 10px; font-size: .65rem; }
    .scroll-banner { padding: 7px 0; font-size: inherit; }
    .scroll-banner-track span { padding-right: 2rem; }

    .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat-card { padding: 16px; }
    .stat-card .num { font-size: 1.4rem; }
    .admin-toolbar { flex-direction: column; align-items: flex-start; }
    .upload-preview.wide img { width: 100%; max-width: 280px; height: auto; aspect-ratio: 16/9; }
    .toast { left: 12px; right: 12px; transform: translateY(100px); width: auto; text-align: center; }
    .toast.show { transform: translateY(0); }
}

/* ========== Small phones ========== */
@media (max-width: 400px) {
    .movie-card { width: 42vw; min-width: 100px; }
    .movie-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .hero-title { font-size: 1.5rem; }
    .logo { font-size: .95rem; }
    .btn-lg { padding: 10px 16px; font-size: 1rem; }
}

/* ========== Landscape phones ========== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-banner, .detail-hero { min-height: 100vh; aspect-ratio: auto; height: 100vh; }
    .landing-hero { min-height: 100vh; }
    .player-wrap { max-height: 100vh; aspect-ratio: auto; height: 100vh; }
    .auth-card { margin-top: 12px; padding: 20px; }
}

/* ========== Touch devices: no hover zoom ========== */
@media (hover: none) {
    .movie-card:hover { transform: none; z-index: 1; }
    .movie-card:hover .card-hover { display: none; }
    .movie-card:hover .card-poster { visibility: visible; }
    .plan-card:hover { transform: none; }
}
