:root {
    color-scheme: dark;
    --page-bg: #020617;
    --panel-bg: rgba(15, 23, 42, 0.72);
    --panel-solid: #0f172a;
    --panel-soft: rgba(30, 41, 59, 0.7);
    --line: rgba(148, 163, 184, 0.16);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --subtle: #94a3b8;
    --accent: #f59e0b;
    --accent-soft: rgba(245, 158, 11, 0.16);
    --accent-strong: #fbbf24;
    --shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --container: min(1200px, calc(100vw - 32px));
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 34rem),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 34rem),
        linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
    color: var(--text);
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    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(18px);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.26);
}

.nav-shell {
    width: var(--container);
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: white;
    letter-spacing: -0.02em;
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), #ef4444);
    color: #111827;
    font-weight: 900;
    box-shadow: 0 14px 35px rgba(245, 158, 11, 0.3);
}

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

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

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

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: var(--accent-strong);
}

.nav-link:hover {
    transform: translateY(-1px);
}

.nav-search,
.mobile-search,
.hero-search,
.wide-search {
    display: flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.45);
}

.nav-search input,
.mobile-search input,
.hero-search input,
.wide-search input,
.inline-filter input {
    min-width: 0;
    border: 0;
    outline: 0;
    color: white;
    background: transparent;
}

.nav-search input {
    width: 220px;
    padding: 10px 14px;
}

.nav-search button,
.mobile-search button,
.hero-search button,
.wide-search button {
    border: 0;
    cursor: pointer;
    color: #111827;
    background: var(--accent);
    font-weight: 800;
    padding: 10px 18px;
    transition: background 0.2s ease;
}

.nav-search button:hover,
.mobile-search button:hover,
.hero-search button:hover,
.wide-search button:hover {
    background: var(--accent-strong);
}

.menu-toggle {
    display: none;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 9px 12px;
    color: white;
    background: rgba(15, 23, 42, 0.8);
    cursor: pointer;
}

.mobile-nav {
    display: none;
    width: var(--container);
    margin: 0 auto;
    padding: 0 0 16px;
    gap: 14px;
}

main {
    min-height: 70vh;
}

.hero-carousel {
    position: relative;
    height: min(680px, calc(100vh - 68px));
    min-height: 540px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.18), transparent 34rem),
        linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.92)),
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.55), rgba(2, 6, 23, 0.85)),
        var(--hero);
    background-size: cover;
    background-position: center;
    transform: scale(1.025);
    transition: opacity 0.7s ease, transform 1.2s ease;
}

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, #020617 0%, transparent 45%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: var(--container);
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 56px 0 140px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--accent-strong);
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-content h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(42px, 8vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.06em;
    text-shadow: 0 16px 45px rgba(0, 0, 0, 0.7);
}

.hero-summary {
    max-width: 720px;
    margin: 22px 0 0;
    color: var(--muted);
    font-size: clamp(17px, 2vw, 21px);
    line-height: 1.75;
}

.hero-meta,
.detail-meta,
.card-meta,
.rank-copy div {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-meta {
    margin-top: 22px;
}

.hero-meta span,
.hero-meta a,
.detail-meta span,
.card-meta span,
.card-meta a,
.rank-copy div span {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.6);
    color: var(--muted);
    padding: 7px 12px;
    font-size: 13px;
}

.hero-meta a,
.card-meta a {
    color: var(--accent-strong);
    background: var(--accent-soft);
}

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

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

.hero-tags span,
.tag-row span,
.detail-content dd a {
    border-radius: 999px;
    color: var(--accent-strong);
    background: var(--accent-soft);
    padding: 6px 10px;
    font-size: 13px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.primary-button,
.ghost-button,
.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    font-weight: 850;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-button {
    padding: 13px 22px;
    color: #111827;
    background: linear-gradient(135deg, var(--accent-strong), var(--accent));
    box-shadow: 0 16px 40px rgba(245, 158, 11, 0.25);
}

.ghost-button,
.section-link {
    padding: 12px 20px;
    border: 1px solid var(--line);
    color: white;
    background: rgba(15, 23, 42, 0.58);
}

.primary-button:hover,
.ghost-button:hover,
.section-link:hover {
    transform: translateY(-2px);
}

.ghost-button:hover,
.section-link:hover {
    border-color: rgba(245, 158, 11, 0.45);
    color: var(--accent-strong);
}

.hero-controls {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 96px;
    width: var(--container);
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 16px;
}

.hero-controls > button {
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: white;
    background: rgba(15, 23, 42, 0.68);
    cursor: pointer;
    font-size: 30px;
}

.hero-controls > div {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-dot {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 999px;
    background: rgba(203, 213, 225, 0.4);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
    width: 28px;
    background: var(--accent);
}

.hero-search {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 24px;
    width: min(680px, calc(100vw - 32px));
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.82);
    box-shadow: var(--shadow);
}

.hero-search input,
.wide-search input {
    flex: 1;
    padding: 16px 20px;
}

.hero-search button,
.wide-search button {
    padding: 16px 24px;
}

.hero-categories {
    position: absolute;
    z-index: 4;
    right: max(16px, calc((100vw - 1200px) / 2));
    bottom: 102px;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    width: min(420px, 40vw);
}

.hero-categories a {
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.58);
    padding: 8px 12px;
    font-size: 13px;
}

.hero-categories a:hover {
    color: var(--accent-strong);
    border-color: rgba(245, 158, 11, 0.5);
}

.page-shell,
.content-section {
    width: var(--container);
    margin: 0 auto;
}

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

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

.section-heading h2,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.section-heading h2 {
    font-size: clamp(28px, 4vw, 42px);
}

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

.compact-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.movie-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.76), rgba(15, 23, 42, 0.88));
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.18);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.42);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
}

.poster-link,
.rank-cover,
.detail-poster {
    position: relative;
    display: block;
    overflow: hidden;
    background-image:
        linear-gradient(180deg, transparent 35%, rgba(2, 6, 23, 0.78) 100%),
        var(--poster),
        linear-gradient(135deg, rgba(245, 158, 11, 0.24), rgba(59, 130, 246, 0.16));
    background-size: cover;
    background-position: center;
}

.poster-link {
    aspect-ratio: 16 / 23;
}

.poster-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.1), transparent 38%),
        linear-gradient(180deg, transparent 45%, rgba(2, 6, 23, 0.88));
}

.poster-type,
.poster-score {
    position: absolute;
    top: 12px;
    z-index: 2;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.72);
    color: white;
    font-size: 12px;
    font-weight: 800;
    padding: 6px 10px;
}

.poster-type {
    left: 12px;
}

.poster-score {
    right: 12px;
    color: var(--accent-strong);
}

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

.movie-card h2,
.rank-copy h2 {
    margin: 0;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card h2 a:hover,
.rank-copy h2 a:hover {
    color: var(--accent-strong);
}

.movie-card p,
.rank-copy p,
.page-hero p,
.footer-grid p,
.player-desc,
.detail-content p {
    color: var(--muted);
    line-height: 1.72;
}

.movie-card p {
    min-height: 70px;
    margin: 10px 0 14px;
    font-size: 14px;
}

.movie-card.compact p {
    min-height: 48px;
}

.tag-row {
    margin-bottom: 14px;
}

.card-meta {
    gap: 7px;
}

.card-meta span,
.card-meta a {
    padding: 5px 8px;
    font-size: 12px;
}

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

.category-tile {
    position: relative;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 85% 0%, rgba(245, 158, 11, 0.18), transparent 40%),
        linear-gradient(180deg, rgba(30, 41, 59, 0.82), rgba(15, 23, 42, 0.9));
    padding: 24px;
    overflow: hidden;
    transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.category-count {
    display: inline-flex;
    margin-bottom: 18px;
    border-radius: 999px;
    color: var(--accent-strong);
    background: var(--accent-soft);
    padding: 7px 12px;
    font-weight: 850;
    font-size: 13px;
}

.category-tile h2 {
    margin: 0 0 12px;
    font-size: 25px;
}

.category-tile p {
    margin: 0;
    color: var(--muted);
    line-height: 1.72;
}

.mini-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.mini-links a {
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: var(--subtle);
    padding: 6px 10px;
    font-size: 12px;
}

.mini-links a:hover {
    color: var(--accent-strong);
}

.rank-list {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.top-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rank-row {
    display: grid;
    grid-template-columns: 76px 1fr auto;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.76);
    padding: 12px;
}

.rank-cover {
    width: 76px;
    height: 92px;
    border-radius: 14px;
}

.rank-cover span {
    position: absolute;
    left: 8px;
    bottom: 8px;
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #111827;
    background: var(--accent-strong);
    font-weight: 900;
}

.rank-copy p {
    margin: 7px 0 10px;
    font-size: 14px;
}

.rank-copy div span {
    padding: 4px 8px;
    font-size: 12px;
}

.rank-row strong {
    color: var(--accent-strong);
    font-size: 22px;
}

.page-hero {
    margin: 34px 0 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at 15% 20%, rgba(245, 158, 11, 0.16), transparent 38%),
        linear-gradient(135deg, rgba(30, 41, 59, 0.84), rgba(15, 23, 42, 0.92));
    padding: clamp(32px, 6vw, 64px);
    box-shadow: var(--shadow);
}

.page-hero h1 {
    font-size: clamp(34px, 6vw, 58px);
}

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

.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
    color: var(--subtle);
    font-size: 14px;
}

.breadcrumbs a:hover {
    color: var(--accent-strong);
}

.inline-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.74);
    padding: 8px 14px;
}

.inline-filter input {
    width: 220px;
}

.wide-search {
    max-width: 760px;
    margin-top: 28px;
    background: rgba(2, 6, 23, 0.38);
}

.empty-state {
    display: none;
    margin: 28px 0 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    color: var(--muted);
    background: rgba(15, 23, 42, 0.75);
    padding: 20px;
}

.detail-page {
    padding-bottom: 64px;
}

.detail-hero {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 34px;
    align-items: end;
    margin: 24px 0 42px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background-image:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.75), rgba(2, 6, 23, 0.92)),
        var(--hero);
    background-size: cover;
    background-position: center;
    padding: clamp(24px, 5vw, 54px);
    box-shadow: var(--shadow);
}

.detail-poster {
    aspect-ratio: 2 / 3;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-lg);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.5);
}

.detail-copy h1 {
    font-size: clamp(34px, 6vw, 62px);
}

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

.detail-meta {
    margin-top: 22px;
}

.player-section {
    scroll-margin-top: 90px;
    margin-bottom: 54px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background-image:
        radial-gradient(circle at center, rgba(245, 158, 11, 0.12), transparent 34rem),
        var(--poster),
        linear-gradient(135deg, rgba(15, 23, 42, 1), rgba(2, 6, 23, 1));
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow);
}

.video-shell::before {
    content: "";
    display: block;
    padding-top: 56.25%;
}

.movie-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
}

.play-veil {
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    width: 92px;
    height: 92px;
    border: 0;
    border-radius: 50%;
    color: #111827;
    background: var(--accent-strong);
    cursor: pointer;
    font-weight: 900;
    box-shadow: 0 18px 50px rgba(245, 158, 11, 0.36);
}

.play-veil.hidden {
    display: none;
}

.player-desc {
    margin: 18px 0 0;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr 340px;
    gap: 24px;
    margin-bottom: 44px;
}

.detail-content article,
.detail-content aside {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.72);
    padding: 24px;
}

.detail-content h2 {
    margin: 0 0 16px;
    font-size: 24px;
}

.detail-content p {
    margin: 0;
}

.detail-content dl {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px 14px;
    margin: 0;
}

.detail-content dt {
    color: var(--subtle);
}

.detail-content dd {
    margin: 0;
    color: var(--muted);
}

.detail-content dd a {
    display: inline-flex;
    margin: 0 6px 6px 0;
}

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

.footer-grid {
    width: var(--container);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 32px;
    padding: 46px 0;
}

.footer-grid h2 {
    margin: 0 0 14px;
    font-size: 17px;
}

.footer-grid p {
    margin: 14px 0 0;
    font-size: 14px;
}

.footer-grid ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-grid li + li {
    margin-top: 10px;
}

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

.footer-grid a:hover {
    color: var(--accent-strong);
}

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

    .category-grid,
    .detail-content,
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-hero {
        grid-template-columns: 220px 1fr;
    }

    .hero-categories {
        display: none;
    }
}

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

    .menu-toggle {
        display: inline-flex;
    }

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

    .mobile-search input {
        width: 100%;
        padding: 12px 14px;
    }

    .hero-carousel {
        min-height: 620px;
    }

    .hero-content {
        padding-bottom: 170px;
    }

    .hero-controls {
        bottom: 112px;
    }

    .hero-search {
        bottom: 34px;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .movie-grid,
    .compact-grid,
    .category-grid,
    .top-preview,
    .detail-content,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .detail-poster {
        width: min(260px, 70vw);
    }

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

    .rank-row strong {
        grid-column: 2;
    }
}

@media (max-width: 560px) {
    :root {
        --container: min(100vw - 22px, 1200px);
    }

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

    .hero-content h1,
    .detail-copy h1,
    .page-hero h1 {
        letter-spacing: -0.04em;
    }

    .hero-search,
    .wide-search {
        border-radius: 22px;
        flex-direction: column;
        align-items: stretch;
    }

    .hero-search input,
    .wide-search input,
    .hero-search button,
    .wide-search button {
        width: 100%;
    }

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

    .page-hero,
    .detail-hero {
        border-radius: 22px;
    }
}
