* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --bg: #030712;
    --bg-soft: #0b1120;
    --panel: rgba(17, 24, 39, 0.78);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f9fafb;
    --muted: #9ca3af;
    --muted-strong: #d1d5db;
    --amber: #f59e0b;
    --orange: #ea580c;
    --red: #ef4444;
    --blue: #38bdf8;
    --green: #22c55e;
    --radius: 22px;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.14), transparent 28rem),
        radial-gradient(circle at top right, rgba(239, 68, 68, 0.12), transparent 30rem),
        linear-gradient(180deg, #111827 0%, #030712 38%, #000000 100%);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(15, 23, 42, 0.9));
}

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(3, 7, 18, 0.84);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
    box-shadow: 0 12px 45px rgba(0, 0, 0, 0.24);
}

.header-inner {
    max-width: 1280px;
    height: 68px;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 168px;
}

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

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-name {
    font-size: 21px;
    font-weight: 900;
    letter-spacing: 0.04em;
    background: linear-gradient(90deg, #fde68a, #fb923c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-subtitle {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

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

.nav-link,
.mobile-link {
    color: #d1d5db;
    border-radius: 14px;
    transition: all 0.22s ease;
}

.nav-link {
    padding: 10px 14px;
    font-size: 14px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.95), rgba(234, 88, 12, 0.95));
    box-shadow: 0 10px 30px rgba(234, 88, 12, 0.24);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #fff;
    border-radius: 999px;
}

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

.mobile-nav.open {
    display: grid;
    gap: 8px;
}

.mobile-link {
    padding: 12px 14px;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.55s ease;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.38;
    filter: blur(2px) saturate(1.15);
}

.hero-backdrop::after,
.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(3, 7, 18, 0.94) 0%, rgba(3, 7, 18, 0.74) 48%, rgba(3, 7, 18, 0.92) 100%),
        linear-gradient(180deg, rgba(3, 7, 18, 0.28), #030712 100%);
}

.hero-layout {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    min-height: 680px;
    margin: 0 auto;
    padding: 86px 22px 98px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    align-items: center;
    gap: 64px;
}

.hero-copy {
    max-width: 760px;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    gap: 8px;
    margin-bottom: 16px;
    padding: 7px 13px;
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 999px;
    color: #fde68a;
    background: rgba(245, 158, 11, 0.12);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-weight: 950;
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero h1 {
    max-width: 780px;
    font-size: clamp(42px, 8vw, 82px);
}

.hero p {
    max-width: 680px;
    margin: 24px 0 0;
    color: #d1d5db;
    font-size: 19px;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.hero-tags {
    margin-top: 26px;
}

.hero-tags span,
.tag-row span {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #e5e7eb;
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 12px;
}

.hero-actions {
    margin-top: 32px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 15px;
    font-weight: 900;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

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

.ghost-btn {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
}

.primary-btn:hover,
.ghost-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.35);
}

.hero-poster {
    position: relative;
    height: 520px;
    border-radius: 30px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

.hero-poster::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.72));
}

.hero-arrow {
    position: absolute;
    z-index: 5;
    top: 50%;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    color: #fff;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(14px);
    cursor: pointer;
    font-size: 34px;
    line-height: 1;
}

.hero-arrow.prev {
    left: 22px;
}

.hero-arrow.next {
    right: 22px;
}

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

.hero-dot {
    width: 36px;
    height: 5px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    cursor: pointer;
}

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

.content-section,
.quick-search,
.player-section,
.detail-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 72px 22px;
}

.quick-search {
    padding-top: 62px;
}

.alt-section {
    max-width: none;
    padding-left: max(22px, calc((100vw - 1280px) / 2 + 22px));
    padding-right: max(22px, calc((100vw - 1280px) / 2 + 22px));
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.45), rgba(3, 7, 18, 0));
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.section-heading {
    margin-bottom: 28px;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.16;
    letter-spacing: -0.03em;
}

.section-heading p {
    margin: 10px auto 0;
    max-width: 650px;
    color: var(--muted);
}

.section-heading.centered {
    text-align: center;
}

.section-heading.centered .section-kicker {
    margin-left: auto;
    margin-right: auto;
}

.section-heading.with-link,
.compact-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
}

.section-heading.with-link a,
.compact-heading a {
    color: #fbbf24;
    font-weight: 800;
}

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

.movie-grid.four-col,
.movie-grid.mini-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.top-three {
    margin-bottom: 34px;
}

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(31, 41, 55, 0.92), rgba(15, 23, 42, 0.84));
    box-shadow: 0 16px 50px 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(-6px);
    border-color: rgba(245, 158, 11, 0.45);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.movie-card.compact .poster-link {
    aspect-ratio: 3 / 4;
}

.poster-link img {
    transition: transform 0.35s ease;
}

.movie-card:hover .poster-link img {
    transform: scale(1.05);
}

.poster-link::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.78));
}

.card-badge,
.rank-badge,
.year-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.card-badge,
.rank-badge {
    left: 12px;
    top: 12px;
    padding: 6px 10px;
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
}

.rank-badge {
    background: linear-gradient(135deg, var(--red), var(--orange));
}

.year-badge {
    right: 12px;
    bottom: 12px;
    padding: 5px 9px;
    color: #e5e7eb;
    background: rgba(0, 0, 0, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.card-body {
    padding: 17px;
}

.card-title {
    display: -webkit-box;
    min-height: 52px;
    overflow: hidden;
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.42;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-title:hover {
    color: #fbbf24;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    color: #cbd5e1;
    font-size: 13px;
}

.card-meta span + span::before {
    content: "·";
    margin-right: 8px;
    color: #64748b;
}

.card-body p {
    display: -webkit-box;
    min-height: 48px;
    margin: 12px 0 14px;
    overflow: hidden;
    color: #aeb8c7;
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.filter-toolbar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 180px 180px 180px;
    gap: 14px;
    margin-bottom: 26px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(16px);
}

.filter-toolbar label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #f3f4f6;
    font-size: 13px;
    font-weight: 800;
}

.filter-toolbar input,
.filter-toolbar select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    color: #fff;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 14px;
    outline: 0;
    background: rgba(3, 7, 18, 0.72);
}

.filter-toolbar input:focus,
.filter-toolbar select:focus {
    border-color: rgba(245, 158, 11, 0.78);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.empty-state {
    display: none;
    margin-top: 22px;
    padding: 22px;
    text-align: center;
    color: #fcd34d;
    border: 1px dashed rgba(245, 158, 11, 0.45);
    border-radius: 18px;
    background: rgba(245, 158, 11, 0.08);
}

.empty-state.show {
    display: block;
}

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

.category-card {
    min-height: 178px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(245, 158, 11, 0.15), transparent 46%),
        rgba(15, 23, 42, 0.78);
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.22);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.5);
}

.category-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    margin-bottom: 16px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--amber), var(--orange));
}

.category-card strong {
    display: block;
    font-size: 22px;
    font-weight: 950;
}

.category-card p {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.rank-section {
    padding-top: 56px;
}

.rank-list,
.ranking-list {
    display: grid;
    gap: 12px;
}

.rank-row,
.ranking-line {
    display: grid;
    align-items: center;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.76);
    transition: border-color 0.22s ease, transform 0.22s ease;
}

.rank-row {
    grid-template-columns: 48px 1fr auto;
    padding: 15px 18px;
}

.ranking-line {
    grid-template-columns: 58px minmax(0, 1fr) auto;
    padding: 16px 18px;
}

.rank-row:hover,
.ranking-line:hover {
    transform: translateX(4px);
    border-color: rgba(245, 158, 11, 0.52);
}

.rank-row span,
.ranking-number {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    font-weight: 950;
}

.rank-row strong,
.ranking-line strong {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-row em,
.ranking-line em {
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 86px 22px 58px;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at 18% 10%, rgba(245, 158, 11, 0.2), transparent 26rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(3, 7, 18, 0.98));
}

.page-hero > div {
    max-width: 1280px;
    margin: 0 auto;
}

.page-hero h1 {
    font-size: clamp(38px, 7vw, 70px);
}

.page-hero p {
    max-width: 760px;
    margin: 18px 0 0;
    color: var(--muted-strong);
    font-size: 18px;
}

.category-preview + .category-preview {
    margin-top: 56px;
}

.breadcrumb {
    max-width: 1280px;
    margin: 0 auto;
    padding: 22px 22px 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #fbbf24;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 560px;
    margin-top: -1px;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.34;
    filter: blur(2px) saturate(1.12);
}

.detail-layout {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    padding: 58px 22px 72px;
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 44px;
    align-items: center;
}

.detail-poster {
    height: 440px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.detail-copy h1 {
    max-width: 900px;
    font-size: clamp(34px, 6vw, 72px);
}

.lead {
    max-width: 860px;
    margin: 20px 0 0;
    color: #e5e7eb;
    font-size: 19px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.detail-meta span {
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.07);
    font-size: 14px;
}

.detail-tags {
    margin-top: 18px;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 28px;
    background: #000;
    box-shadow: var(--shadow);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    color: #fff;
    border: 0;
    background:
        radial-gradient(circle at center, rgba(245, 158, 11, 0.18), rgba(0, 0, 0, 0.66)),
        rgba(0, 0, 0, 0.28);
    cursor: pointer;
}

.player-shell.is-playing .player-overlay {
    display: none;
}

.play-circle {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    padding-left: 4px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 18px 54px rgba(245, 158, 11, 0.38);
    font-size: 30px;
}

.player-overlay strong {
    font-size: 22px;
}

.player-overlay em {
    max-width: min(720px, 88vw);
    color: #d1d5db;
    font-style: normal;
    text-align: center;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.story-card {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.78);
    box-shadow: 0 18px 58px rgba(0, 0, 0, 0.18);
}

.story-card h2 {
    margin: 0 0 15px;
    font-size: 26px;
}

.story-card p {
    margin: 0;
    color: #cbd5e1;
    font-size: 16px;
}

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

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 46px 22px;
    display: grid;
    grid-template-columns: 1.3fr 0.7fr 1fr;
    gap: 28px;
}

.footer-logo {
    margin-bottom: 12px;
    color: #fbbf24;
    font-size: 24px;
    font-weight: 950;
}

.footer-brand p {
    max-width: 580px;
    margin: 0;
    color: var(--muted);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    align-content: start;
    gap: 10px;
}

.footer-links a {
    padding: 7px 10px;
    color: #d1d5db;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    font-size: 13px;
}

.footer-links a:hover {
    color: #fff;
    border-color: rgba(245, 158, 11, 0.45);
}

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

    .menu-toggle {
        display: block;
    }

    .hero-layout {
        grid-template-columns: 1fr;
        gap: 34px;
        padding-top: 70px;
    }

    .hero-poster {
        width: min(360px, 80vw);
        height: 460px;
        transform: none;
    }

    .movie-grid,
    .movie-grid.four-col,
    .movie-grid.mini-grid,
    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-toolbar {
        grid-template-columns: 1fr 1fr;
    }

    .detail-layout,
    .detail-content,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        width: min(320px, 86vw);
    }
}

@media (max-width: 680px) {
    .header-inner {
        height: 64px;
        padding: 0 16px;
    }

    .brand-subtitle {
        display: none;
    }

    .hero {
        min-height: 650px;
    }

    .hero-layout {
        min-height: 650px;
        padding: 54px 16px 78px;
    }

    .hero p,
    .lead,
    .page-hero p {
        font-size: 16px;
    }

    .hero-poster {
        height: 340px;
    }

    .hero-arrow {
        display: none;
    }

    .content-section,
    .quick-search,
    .player-section,
    .detail-content {
        padding-left: 16px;
        padding-right: 16px;
    }

    .movie-grid,
    .movie-grid.four-col,
    .movie-grid.mini-grid,
    .category-grid,
    .filter-toolbar {
        grid-template-columns: 1fr;
    }

    .section-heading.with-link,
    .compact-heading {
        align-items: start;
        flex-direction: column;
    }

    .rank-row,
    .ranking-line {
        grid-template-columns: 44px 1fr;
    }

    .rank-row em,
    .ranking-line em {
        grid-column: 2;
    }

    .detail-layout {
        padding: 42px 16px 58px;
    }

    .detail-poster {
        height: 390px;
    }

    .story-card {
        padding: 22px;
    }
}
