:root {
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.86);
    --panel-strong: #0f172a;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --amber: #f59e0b;
    --amber-light: #fbbf24;
    --orange: #ea580c;
    --radius: 18px;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.16), transparent 34rem),
        radial-gradient(circle at 80% 12%, rgba(234, 88, 12, 0.12), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 52%, #020617 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}

body.menu-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img, video {
    display: block;
    max-width: 100%;
}

button, input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
    backdrop-filter: blur(14px);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.24);
}

.nav-shell {
    max-width: 1280px;
    height: 64px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
}

.brand-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    color: #ffffff;
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.28);
}

.brand-text {
    font-size: 24px;
    line-height: 1;
    background: linear-gradient(90deg, var(--amber-light), var(--orange));
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    color: var(--soft);
    font-weight: 650;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--amber-light);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.75);
}

.mobile-nav {
    display: none;
    padding: 14px 24px 22px;
    border-top: 1px solid var(--line);
}

.mobile-nav a,
.mobile-cats a {
    display: block;
    padding: 10px 12px;
    color: var(--soft);
    border-radius: 12px;
}

.mobile-nav a:hover,
.mobile-cats a:hover {
    background: rgba(51, 65, 85, 0.72);
    color: var(--amber-light);
}

.mobile-cats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    margin-top: 8px;
}

.hero-slider {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 420px);
    align-items: center;
    gap: 44px;
    padding: 72px max(24px, calc((100vw - 1280px) / 2)) 88px;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.01);
    transition: opacity 0.7s ease, transform 0.7s ease;
    background-image:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.78), rgba(2, 6, 23, 0.82)),
        var(--hero-image);
    background-size: cover;
    background-position: center;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 35%, rgba(245, 158, 11, 0.18), transparent 24rem),
        linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.9));
}

.hero-content,
.hero-poster {
    position: relative;
    z-index: 1;
}

.eyebrow,
.section-kicker {
    color: var(--amber-light);
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-content h1 {
    margin: 14px 0 8px;
    max-width: 900px;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-content h2 {
    margin: 0 0 16px;
    font-size: clamp(28px, 4vw, 52px);
    color: var(--amber-light);
}

.hero-content p {
    max-width: 760px;
    color: var(--soft);
    font-size: 18px;
    line-height: 1.8;
}

.hero-tags,
.tag-row,
.pill-row,
.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.tag-row span,
.pill,
.filter-buttons button {
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--soft);
    background: rgba(15, 23, 42, 0.72);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 28px;
}

.primary-btn,
.ghost-btn,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 16px 32px rgba(234, 88, 12, 0.28);
}

.ghost-btn,
.text-link {
    color: var(--text);
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.68);
}

.primary-btn:hover,
.ghost-btn:hover,
.text-link:hover {
    transform: translateY(-2px);
    border-color: rgba(251, 191, 36, 0.55);
}

.hero-poster {
    display: block;
    overflow: hidden;
    border: 1px solid rgba(251, 191, 36, 0.28);
    border-radius: 28px;
    box-shadow: var(--shadow);
    transform: rotate(1.5deg);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 26px;
    z-index: 5;
    display: flex;
    gap: 10px;
    transform: translateX(-50%);
}

.hero-dot {
    width: 34px;
    height: 8px;
    border: 0;
    border-radius: 99px;
    background: rgba(203, 213, 225, 0.32);
}

.hero-dot.active {
    background: linear-gradient(90deg, var(--amber), var(--orange));
}

.section-wrap,
.search-panel,
.filter-bar,
.page-hero,
.player-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 48px 24px;
}

.search-panel {
    margin-top: 34px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.72));
    box-shadow: var(--shadow);
}

.search-panel h2,
.section-head h2,
.page-hero h1,
.ranking-split h2,
.detail-text h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.12;
}

.search-panel p,
.page-hero p,
.ranking-split p,
.detail-text p,
.category-tile p,
.category-large p {
    color: var(--soft);
    line-height: 1.8;
}

.search-row {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.search-row input,
.page-filter-input {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0 16px;
    color: var(--text);
    background: rgba(2, 6, 23, 0.72);
    outline: none;
}

.search-row input:focus,
.page-filter-input:focus {
    border-color: rgba(251, 191, 36, 0.6);
}

.search-results {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.search-results.expanded {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.search-hit {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.72);
}

.search-hit img {
    width: 64px;
    height: 90px;
    border-radius: 12px;
    object-fit: cover;
}

.search-hit strong,
.search-hit span {
    display: block;
}

.search-hit span {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.section-head a {
    color: var(--amber-light);
    font-weight: 800;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.78);
    box-shadow: 0 14px 42px rgba(0, 0, 0, 0.22);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(251, 191, 36, 0.45);
    box-shadow: var(--shadow);
}

.poster-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: #0f172a;
}

.poster-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.36s ease;
}

.movie-card:hover .poster-wrap img {
    transform: scale(1.06);
}

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 48%, rgba(2, 6, 23, 0.88));
}

.play-dot,
.rank-badge {
    position: absolute;
    z-index: 1;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
}

.play-dot {
    right: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
    border-radius: 999px;
}

.rank-badge {
    left: 12px;
    top: 12px;
    min-width: 36px;
    height: 30px;
    padding: 0 10px;
    border-radius: 10px;
    font-weight: 900;
}

.movie-card-body {
    padding: 16px;
}

.movie-card-body h2 {
    margin: 0 0 10px;
    font-size: 19px;
    line-height: 1.35;
}

.movie-card-body h2 a:hover {
    color: var(--amber-light);
}

.movie-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.movie-meta span,
.detail-meta span {
    padding: 3px 8px;
    border-radius: 8px;
    background: rgba(51, 65, 85, 0.7);
}

.movie-card-body p {
    min-height: 46px;
    color: var(--soft);
    font-size: 14px;
    line-height: 1.65;
}

.tag-row span {
    padding: 4px 9px;
    font-size: 12px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
}

.category-tile,
.category-large {
    border: 1px solid var(--line);
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.56));
}

.category-tile {
    padding: 20px;
}

.category-tile h2,
.category-large h2 {
    margin: 0 0 10px;
    font-size: 22px;
}

.category-tile h2 a:hover,
.category-large h2 a:hover {
    color: var(--amber-light);
}

.category-tile div,
.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.category-tile div a,
.category-samples a {
    color: var(--soft);
    font-size: 13px;
    padding: 5px 9px;
    border-radius: 9px;
    background: rgba(51, 65, 85, 0.66);
}

.ranking-split {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 32px;
    align-items: start;
}

.mini-list {
    display: grid;
    gap: 12px;
}

.wide-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 24px;
}

.mini-card {
    display: grid;
    grid-template-columns: auto 64px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.78);
}

.mini-card:hover {
    border-color: rgba(251, 191, 36, 0.45);
}

.mini-card img {
    width: 64px;
    height: 88px;
    border-radius: 12px;
    object-fit: cover;
}

.mini-card strong,
.mini-card em {
    display: block;
}

.mini-card strong {
    margin-bottom: 6px;
}

.mini-card em {
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
    line-height: 1.6;
}

.mini-rank {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--amber), var(--orange));
}

.page-hero {
    margin-top: 34px;
    border-bottom: 1px solid var(--line);
}

.page-hero h1 {
    margin: 12px 0;
}

.compact-hero,
.category-hero,
.ranking-hero,
.search-hero {
    border: 1px solid var(--line);
    border-radius: 28px;
    background:
        radial-gradient(circle at 15% 25%, rgba(245, 158, 11, 0.18), transparent 24rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.72));
}

.pill-row {
    margin-top: 20px;
}

.pill:hover,
.pill.active,
.filter-buttons button:hover,
.filter-buttons button.active {
    color: #ffffff;
    border-color: rgba(251, 191, 36, 0.56);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.72), rgba(234, 88, 12, 0.72));
}

.category-large-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.category-large {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 18px;
    padding: 16px;
}

.category-cover img {
    width: 150px;
    height: 210px;
    object-fit: cover;
    border-radius: 16px;
}

.filter-bar {
    display: grid;
    gap: 14px;
    padding-bottom: 10px;
}

.filter-buttons button {
    cursor: pointer;
}

.detail-hero {
    position: relative;
    min-height: 560px;
    display: flex;
    align-items: end;
    background-image:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.72), rgba(2, 6, 23, 0.92)),
        var(--detail-image);
    background-size: cover;
    background-position: center;
}

.detail-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, #020617 100%);
}

.detail-layout {
    position: relative;
    z-index: 1;
    width: min(1280px, 100%);
    margin: 0 auto;
    padding: 64px 24px;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 32px;
    align-items: end;
}

.detail-poster {
    width: 280px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 24px;
    border: 1px solid rgba(251, 191, 36, 0.28);
    box-shadow: var(--shadow);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    margin-bottom: 14px;
}

.breadcrumb a:hover {
    color: var(--amber-light);
}

.detail-info h1 {
    margin: 0 0 16px;
    font-size: clamp(42px, 6vw, 76px);
    line-height: 1;
    letter-spacing: -0.05em;
}

.detail-info p {
    max-width: 840px;
    color: var(--soft);
    font-size: 18px;
    line-height: 1.8;
}

.detail-tags {
    margin: 18px 0 24px;
}

.player-section {
    padding-top: 12px;
}

.video-box {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(251, 191, 36, 0.25);
    border-radius: 24px;
    background: #000000;
    box-shadow: var(--shadow);
}

.movie-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
}

.video-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    gap: 10px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.34), rgba(2, 6, 23, 0.68));
    cursor: pointer;
}

.video-overlay span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    font-size: 34px;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 18px 42px rgba(234, 88, 12, 0.34);
}

.video-overlay strong {
    font-size: 18px;
}

.detail-text {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.detail-text article {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.78);
}

.site-footer {
    margin-top: 40px;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), #020617);
}

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 46px 24px;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 36px;
}

.footer-brand {
    margin-bottom: 16px;
}

.site-footer p {
    color: var(--muted);
    line-height: 1.8;
}

.site-footer h2 {
    margin: 0 0 16px;
    font-size: 18px;
}

.footer-links {
    display: grid;
    gap: 9px;
}

.footer-links a {
    color: var(--muted);
}

.footer-links a:hover {
    color: var(--amber-light);
}

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding: 18px 24px 34px;
    color: #64748b;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.hidden-by-filter {
    display: none !important;
}

@media (max-width: 1080px) {
    .movie-grid,
    .category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hero-slide {
        grid-template-columns: minmax(0, 1fr) 280px;
    }

    .category-large-grid,
    .detail-text,
    .ranking-split,
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .desktop-nav {
        display: none;
    }

    .menu-toggle {
        display: grid;
        place-items: center;
    }

    .mobile-nav.open {
        display: block;
    }

    .nav-shell {
        padding: 0 16px;
    }

    .brand-text {
        font-size: 20px;
    }

    .hero-slider {
        min-height: 820px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: center;
        padding: 52px 18px 86px;
    }

    .hero-poster {
        max-width: 240px;
        margin: 0 auto;
        transform: none;
    }

    .search-row,
    .section-head {
        flex-direction: column;
        align-items: stretch;
    }

    .movie-grid,
    .category-grid,
    .search-results,
    .search-results.expanded,
    .wide-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .category-large {
        grid-template-columns: 100px minmax(0, 1fr);
    }

    .category-cover img {
        width: 100px;
        height: 140px;
    }

    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        width: 220px;
    }
}

@media (max-width: 520px) {
    .movie-grid,
    .category-grid,
    .search-results,
    .search-results.expanded,
    .wide-list {
        grid-template-columns: 1fr;
    }

    .mini-card {
        grid-template-columns: auto 56px minmax(0, 1fr);
    }

    .section-wrap,
    .search-panel,
    .filter-bar,
    .page-hero,
    .player-section {
        padding-left: 16px;
        padding-right: 16px;
    }
}
