:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.76);
    --panel-strong: rgba(15, 23, 42, 0.92);
    --line: rgba(245, 158, 11, 0.22);
    --line-strong: rgba(245, 158, 11, 0.48);
    --text: #fff7ed;
    --muted: rgba(254, 243, 199, 0.72);
    --soft: rgba(254, 243, 199, 0.54);
    --gold: #f59e0b;
    --gold-light: #fcd34d;
    --purple: #581c87;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at 10% 0%, rgba(245, 158, 11, 0.14), transparent 32rem),
        radial-gradient(circle at 90% 10%, rgba(147, 51, 234, 0.22), transparent 34rem),
        linear-gradient(180deg, #020617 0%, #111827 45%, #020617 100%);
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(88, 28, 135, 0.94), rgba(15, 23, 42, 0.94));
    backdrop-filter: blur(18px);
}

.nav-shell {
    width: min(1180px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #1f1300;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    box-shadow: 0 0 32px rgba(245, 158, 11, 0.42);
}

.brand-text {
    font-size: 21px;
    background: linear-gradient(90deg, #fde68a, #f59e0b, #fff7ed);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-left: auto;
}

.desktop-nav a,
.mobile-panel a {
    color: rgba(254, 243, 199, 0.78);
    transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-panel a:hover,
.mobile-panel a.active {
    color: var(--gold-light);
}

.nav-search {
    position: relative;
    width: 260px;
}

.nav-search input,
.mobile-panel input,
.search-box input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    color: var(--text);
    border: 1px solid rgba(245, 158, 11, 0.28);
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search input {
    padding: 10px 44px 10px 16px;
}

.nav-search input:focus,
.mobile-panel input:focus,
.search-box input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: rgba(252, 211, 77, 0.7);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.13);
    background: rgba(255, 255, 255, 0.11);
}

.nav-search button {
    position: absolute;
    right: 6px;
    top: 50%;
    width: 34px;
    height: 34px;
    transform: translateY(-50%);
    border: 0;
    color: var(--gold-light);
    background: transparent;
    cursor: pointer;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    color: var(--text);
    background: transparent;
    font-size: 25px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.97);
}

.mobile-panel.is-open {
    display: block;
}

.mobile-panel nav,
.mobile-panel form {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.mobile-panel nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 18px 0;
}

.mobile-panel form {
    display: flex;
    gap: 10px;
    padding: 0 0 18px;
}

.mobile-panel input {
    padding: 10px 14px;
}

.mobile-panel button,
.primary-button,
.secondary-button,
.watch-link,
.section-more,
.filter-button {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.mobile-panel button,
.primary-button,
.watch-link {
    color: #1f1300;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    font-weight: 800;
    box-shadow: 0 18px 38px rgba(245, 158, 11, 0.22);
}

.mobile-panel button {
    padding: 10px 18px;
}

main {
    overflow: hidden;
}

.hero {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.hero-slide.is-active {
    opacity: 1;
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.68), rgba(88, 28, 135, 0.5));
}

.hero-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.54;
}

.hero-backdrop img.is-empty,
.poster-frame img.is-empty,
.detail-cover img.is-empty {
    opacity: 0;
}

.hero-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.4) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.12) 45%, rgba(2, 6, 23, 0.34) 100%);
}

.hero-inner {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 72vh;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 42px;
    padding: 72px 0 52px;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    gap: 8px;
    color: var(--gold-light);
    font-weight: 700;
    letter-spacing: 0.08em;
}

.hero h1 {
    margin: 18px 0 16px;
    font-size: clamp(42px, 6vw, 76px);
    line-height: 1.02;
    max-width: 780px;
}

.hero p {
    max-width: 680px;
    margin: 0 0 24px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.8;
}

.hero-meta,
.detail-meta,
.movie-meta,
.breadcrumb,
.result-note {
    color: var(--soft);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 28px;
}

.hero-meta span,
.detail-meta span,
.stat-pill,
.tag-row span {
    border: 1px solid rgba(245, 158, 11, 0.24);
    background: rgba(15, 23, 42, 0.5);
    border-radius: 999px;
}

.hero-meta span,
.detail-meta span,
.stat-pill {
    padding: 8px 12px;
}

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

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 24px;
}

.secondary-button,
.section-more,
.filter-button {
    color: var(--text);
    border: 1px solid rgba(245, 158, 11, 0.28);
    background: rgba(15, 23, 42, 0.62);
}

.primary-button:hover,
.secondary-button:hover,
.watch-link:hover,
.section-more:hover,
.filter-button:hover,
.filter-button.is-active {
    transform: translateY(-2px);
    box-shadow: 0 22px 44px rgba(245, 158, 11, 0.18);
}

.hero-side-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.56);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.hero-side-card .poster-frame {
    height: 440px;
    border-radius: 0;
}

.hero-side-body {
    padding: 20px;
}

.hero-side-body h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.hero-controls {
    position: absolute;
    z-index: 4;
    right: calc((100% - min(1180px, calc(100% - 32px))) / 2);
    bottom: 36px;
    display: flex;
    gap: 10px;
}

.hero-controls button {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(245, 158, 11, 0.28);
    color: var(--text);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    cursor: pointer;
}

.quick-cats {
    position: relative;
    z-index: 3;
    width: min(1180px, calc(100% - 32px));
    margin: -34px auto 0;
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.quick-cats a {
    flex: 0 0 auto;
    padding: 13px 20px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: rgba(254, 243, 199, 0.88);
    background: rgba(15, 23, 42, 0.84);
    backdrop-filter: blur(16px);
}

.content-section,
.page-hero,
.detail-shell,
.player-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.content-section {
    padding: 72px 0 0;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 26px;
}

.section-heading p,
.page-hero p,
.category-card p,
.movie-card p,
.detail-copy p,
.hero-side-body p,
.footer-grid p {
    color: var(--muted);
    line-height: 1.75;
}

.section-heading p {
    margin: 0 0 8px;
}

.section-heading h2,
.page-hero h1,
.detail-title h1,
.player-title h1 {
    margin: 0;
    letter-spacing: -0.03em;
}

.section-heading h2,
.page-hero h1 {
    font-size: clamp(28px, 4vw, 44px);
}

.section-more {
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    color: var(--gold-light);
}

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

.movie-card,
.category-card,
.rank-row,
.detail-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.56));
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
    overflow: hidden;
}

.movie-card {
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover,
.category-card:hover,
.rank-row:hover {
    transform: translateY(-4px);
    border-color: var(--line-strong);
    box-shadow: 0 28px 64px rgba(0, 0, 0, 0.34);
}

.poster-frame {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: var(--radius) var(--radius) 0 0;
    background:
        radial-gradient(circle at 30% 20%, rgba(252, 211, 77, 0.28), transparent 32%),
        linear-gradient(135deg, rgba(88, 28, 135, 0.76), rgba(15, 23, 42, 0.92));
}

.poster-frame img,
.detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease, opacity 0.25s ease;
}

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

.poster-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), transparent 58%);
}

.play-dot {
    position: absolute;
    right: 16px;
    bottom: 16px;
    z-index: 2;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: #1f1300;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    box-shadow: 0 16px 30px rgba(245, 158, 11, 0.32);
}

.rank-no {
    position: absolute;
    left: 14px;
    top: 14px;
    z-index: 2;
    min-width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: #1f1300;
    border-radius: 14px;
    background: linear-gradient(135deg, #fef3c7, #f59e0b);
}

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

.movie-card h2 {
    margin: 8px 0 10px;
    font-size: 20px;
    line-height: 1.3;
}

.movie-card h2 a:hover,
.text-link:hover,
.breadcrumb a:hover {
    color: var(--gold-light);
}

.movie-card p {
    min-height: 75px;
    margin: 0 0 14px;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.tag-row span {
    padding: 6px 9px;
    color: rgba(254, 243, 199, 0.76);
    font-size: 12px;
}

.card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.text-link {
    color: var(--soft);
    font-size: 14px;
}

.watch-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 14px;
    font-size: 14px;
}

.page-hero {
    padding: 72px 0 34px;
}

.page-hero p {
    max-width: 760px;
    font-size: 18px;
}

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

.category-card {
    display: block;
    padding: 22px;
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.category-card h2 {
    margin: 0 0 12px;
    font-size: 22px;
}

.filter-bar,
.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0 0;
}

.search-box {
    max-width: 760px;
}

.search-box input,
.filter-bar input,
.filter-bar select {
    padding: 13px 16px;
}

.search-box button {
    flex: 0 0 auto;
    padding: 13px 22px;
}

.filter-button {
    padding: 10px 15px;
}

.ranking-list {
    display: grid;
    gap: 14px;
}

.rank-row {
    display: grid;
    grid-template-columns: 84px 110px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.rank-row .rank-badge {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    color: #1f1300;
    border-radius: 18px;
    background: linear-gradient(135deg, #fef3c7, #f59e0b);
    font-size: 20px;
    font-weight: 900;
}

.rank-row .poster-frame {
    height: 140px;
    border-radius: 18px;
}

.rank-row h2 {
    margin: 0 0 8px;
}

.rank-row p {
    margin: 0;
    color: var(--muted);
}

.rank-score {
    display: grid;
    gap: 8px;
    justify-items: end;
    color: var(--gold-light);
    font-weight: 900;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 28px 0 18px;
    font-size: 14px;
}

.detail-shell {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 34px;
    padding: 38px 0 24px;
}

.detail-cover {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 30% 20%, rgba(252, 211, 77, 0.24), transparent 32%),
        linear-gradient(135deg, rgba(88, 28, 135, 0.72), rgba(15, 23, 42, 0.94));
    box-shadow: var(--shadow);
    aspect-ratio: 2 / 3;
}

.detail-title h1,
.player-title h1 {
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
}

.detail-title p {
    color: var(--muted);
    font-size: 18px;
    line-height: 1.8;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 22px;
}

.detail-panel {
    padding: 22px;
}

.detail-panel h2,
.player-title h2 {
    margin: 0 0 12px;
    color: var(--gold-light);
}

.detail-copy {
    display: grid;
    gap: 18px;
}

.detail-copy p {
    margin: 0;
}

.player-shell {
    padding: 36px 0 0;
}

.player-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: start;
}

.video-box {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #000;
    box-shadow: var(--shadow);
}

.video-box video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    cursor: pointer;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at center, rgba(245, 158, 11, 0.18), transparent 34%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.24));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.player-button {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    color: #1f1300;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    box-shadow: 0 22px 50px rgba(245, 158, 11, 0.32);
    font-size: 30px;
    cursor: pointer;
}

.player-title {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    padding: 22px;
}

.player-title p {
    color: var(--muted);
    line-height: 1.8;
}

.result-note {
    margin: 18px 0 0;
}

.empty-state {
    display: none;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--muted);
    background: var(--panel);
}

.empty-state.is-visible {
    display: block;
}

.site-footer {
    margin-top: 84px;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(2, 6, 23, 0.96));
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 36px;
    padding: 42px 0;
}

.footer-grid h2 {
    margin: 0 0 14px;
    color: var(--gold-light);
    font-size: 18px;
}

.footer-grid a {
    display: block;
    margin: 9px 0;
    color: var(--muted);
}

.footer-grid a:hover {
    color: var(--gold-light);
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    color: var(--soft);
    border-top: 1px solid rgba(245, 158, 11, 0.14);
}

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

    .menu-toggle {
        display: block;
    }

    .hero-inner,
    .detail-shell,
    .player-layout {
        grid-template-columns: 1fr;
    }

    .hero-side-card {
        display: none;
    }

    .movie-grid,
    .category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .rank-row {
        grid-template-columns: 64px 88px 1fr;
    }

    .rank-score {
        grid-column: 3;
        justify-items: start;
    }
}

@media (max-width: 760px) {
    .hero,
    .hero-inner {
        min-height: 78vh;
    }

    .hero-inner {
        padding-top: 48px;
    }

    .hero-controls {
        right: 16px;
        bottom: 18px;
    }

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

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

    .movie-card h2 {
        font-size: 17px;
    }

    .movie-card p {
        min-height: 66px;
        font-size: 14px;
    }

    .section-heading,
    .filter-bar,
    .search-box {
        align-items: stretch;
        flex-direction: column;
    }

    .rank-row {
        grid-template-columns: 52px 74px 1fr;
        gap: 12px;
    }

    .rank-row .poster-frame {
        height: 104px;
    }

    .rank-row p {
        display: none;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .movie-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 38px;
    }

    .quick-cats {
        margin-top: -20px;
    }
}
