:root {
    --page-bg: #020617;
    --panel-bg: rgba(15, 23, 42, 0.78);
    --panel-strong: #0f172a;
    --panel-soft: rgba(30, 41, 59, 0.72);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-soft: #cbd5e1;
    --accent: #f59e0b;
    --accent-soft: #fbbf24;
    --accent-deep: #92400e;
    --line: rgba(148, 163, 184, 0.18);
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --container: 1180px;
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--text-main);
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 32rem),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 28rem),
        var(--page-bg);
    min-height: 100vh;
}

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

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

button,
input {
    font: inherit;
}

.container {
    width: min(100% - 32px, var(--container));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    border-bottom: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.78);
    backdrop-filter: blur(18px);
}

.header-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #111827;
    background: linear-gradient(135deg, var(--accent-soft), var(--accent));
    box-shadow: 0 12px 32px rgba(245, 158, 11, 0.35);
}

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

.brand-copy strong {
    font-size: 21px;
    letter-spacing: 0.03em;
}

.brand-copy em {
    color: var(--text-muted);
    font-style: normal;
    font-size: 12px;
    margin-top: 3px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    color: var(--text-soft);
    font-weight: 650;
}

.main-nav a {
    transition: color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover {
    color: var(--accent-soft);
    transform: translateY(-1px);
}

.menu-toggle {
    width: 44px;
    height: 44px;
    display: none;
    place-items: center;
    gap: 5px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.84);
    color: var(--text-main);
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    display: block;
    border-radius: 999px;
    background: currentColor;
}

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

.hero-track,
.hero-slide,
.hero-backdrop {
    position: absolute;
    inset: 0;
}

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

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

.hero-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(8px) saturate(1.15);
    transform: scale(1.08);
    opacity: 0.35;
}

.hero-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.38)),
        linear-gradient(0deg, var(--page-bg), transparent 45%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(100% - 32px, var(--container));
    min-height: 690px;
    margin: 0 auto;
    padding: 112px 0 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 760px;
    transform: translateX(calc((100vw - min(100% - 32px, var(--container))) / -2));
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    color: var(--accent-soft);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.hero-content h1 {
    margin: 0;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.hero-content p {
    width: min(100%, 650px);
    margin: 24px 0 0;
    color: var(--text-soft);
    font-size: 18px;
    line-height: 1.8;
}

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

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

.hero-tags span,
.tag-row span {
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 999px;
    padding: 7px 12px;
    color: #fde68a;
    background: rgba(146, 64, 14, 0.26);
    font-size: 13px;
    line-height: 1;
}

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

.button-primary,
.button-ghost,
.section-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.button-primary {
    color: #111827;
    background: linear-gradient(135deg, var(--accent-soft), var(--accent));
    box-shadow: 0 16px 38px rgba(245, 158, 11, 0.28);
}

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

.button-ghost,
.section-action {
    border: 1px solid var(--line);
    color: var(--text-main);
    background: rgba(15, 23, 42, 0.62);
}

.button-ghost:hover,
.section-action:hover {
    border-color: rgba(245, 158, 11, 0.5);
    background: rgba(245, 158, 11, 0.08);
}

.button-ghost.small {
    min-height: 40px;
    padding: 0 16px;
    font-size: 14px;
}

.button-primary.full {
    width: 100%;
}

.hero-poster {
    position: absolute;
    z-index: 3;
    right: max(24px, calc((100vw - var(--container)) / 2));
    bottom: 90px;
    width: min(32vw, 360px);
    aspect-ratio: 3 / 4.2;
    overflow: hidden;
    border-radius: 30px;
    border: 1px solid rgba(248, 250, 252, 0.18);
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

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

.hero-poster:hover img {
    transform: scale(1.06);
}

.hero-controls {
    position: absolute;
    z-index: 8;
    left: 50%;
    bottom: 34px;
    display: flex;
    align-items: center;
    gap: 14px;
    transform: translateX(-50%);
}

.hero-arrow,
.hero-dot {
    border: 1px solid var(--line);
    color: var(--text-main);
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(12px);
    cursor: pointer;
}

.hero-arrow {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
}

.hero-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 999px;
}

.hero-dot.is-active {
    width: 32px;
    background: var(--accent);
    border-color: var(--accent);
}

.quick-search {
    margin-top: -42px;
    position: relative;
    z-index: 10;
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr minmax(260px, 460px);
    gap: 24px;
    align-items: center;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: rgba(15, 23, 42, 0.86);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-panel h2,
.section-heading h2,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    letter-spacing: -0.035em;
}

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

.search-box {
    position: relative;
    display: block;
}

.search-box input {
    width: 100%;
    min-height: 54px;
    padding: 0 52px 0 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    outline: none;
    color: var(--text-main);
    background: rgba(2, 6, 23, 0.64);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-box input:focus {
    border-color: rgba(245, 158, 11, 0.7);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.search-box span {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-soft);
    font-size: 20px;
}

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

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

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

.section-heading p {
    margin: 10px 0 0;
    max-width: 680px;
}

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

.category-tile {
    position: relative;
    min-height: 230px;
    padding: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: end;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--panel-strong);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.2);
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.36;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.18));
}

.category-tile span,
.category-tile p {
    position: relative;
    z-index: 2;
}

.category-tile span {
    font-size: 20px;
    font-weight: 850;
}

.category-tile p {
    margin: 10px 0 0;
    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.65;
}

.category-tile:hover img {
    transform: scale(1.08);
    opacity: 0.5;
}

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

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

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.38);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

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

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

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

.poster-badge,
.poster-play {
    position: absolute;
    z-index: 2;
}

.poster-badge {
    left: 12px;
    top: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #111827;
    background: var(--accent-soft);
    font-size: 12px;
    font-weight: 850;
}

.poster-play {
    right: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #111827;
    background: rgba(251, 191, 36, 0.92);
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.35);
}

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

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--accent-soft);
    font-size: 12px;
    font-weight: 750;
    margin-bottom: 9px;
}

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

.movie-card h2 a:hover,
.ranking-copy h2 a:hover,
.category-overview-copy h2 a:hover {
    color: var(--accent-soft);
}

.movie-card p {
    margin: 9px 0 12px;
    font-size: 13px;
}

.movie-card .tag-row span {
    padding: 5px 8px;
    font-size: 11px;
}

.empty-state {
    display: none;
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    color: var(--text-muted);
    text-align: center;
    background: var(--panel-bg);
}

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

.ranking-home {
    background: rgba(15, 23, 42, 0.38);
    border-block: 1px solid var(--line);
}

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

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

.ranking-item {
    display: grid;
    grid-template-columns: 70px 92px 1fr;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.78);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.ranking-item:hover {
    transform: translateX(4px);
    border-color: rgba(245, 158, 11, 0.35);
}

.rank-number {
    color: var(--accent-soft);
    font-size: 30px;
    font-weight: 900;
    text-align: center;
}

.ranking-poster {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 14px;
    background: #0f172a;
}

.ranking-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ranking-copy p {
    margin: 8px 0 4px;
}

.ranking-copy em {
    color: var(--text-soft);
    font-size: 13px;
    font-style: normal;
}

.page-hero {
    padding: 94px 0 62px;
    border-bottom: 1px solid var(--line);
    background:
        linear-gradient(135deg, rgba(245, 158, 11, 0.16), transparent 36%),
        rgba(15, 23, 42, 0.42);
}

.slim-hero .container,
.category-hero .container {
    max-width: 880px;
}

.page-hero h1 {
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.05;
}

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

.hero-search {
    margin-top: 26px;
    max-width: 560px;
}

.category-overview-list {
    display: grid;
    gap: 24px;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 230px 270px 1fr;
    gap: 22px;
    align-items: center;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: rgba(15, 23, 42, 0.76);
}

.category-cover {
    aspect-ratio: 16 / 12;
    overflow: hidden;
    border-radius: 20px;
    background: #0f172a;
}

.category-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-overview-copy p {
    margin: 12px 0 18px;
}

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

.mini-card-grid .movie-card:nth-child(n+5) {
    display: none;
}

.detail-wrap {
    padding: 36px 0 0;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    color: var(--text-muted);
    margin-bottom: 22px;
    font-size: 14px;
}

.breadcrumb a:hover {
    color: var(--accent-soft);
}

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

.player-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: #020617;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.movie-player {
    width: 100%;
    height: 100%;
    display: block;
    background: #020617;
    object-fit: contain;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    gap: 14px;
    padding: 24px;
    border: 0;
    color: var(--text-main);
    background: radial-gradient(circle at center, rgba(2, 6, 23, 0.25), rgba(2, 6, 23, 0.78));
    cursor: pointer;
}

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

.big-play {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    padding-left: 5px;
    border-radius: 50%;
    color: #111827;
    background: linear-gradient(135deg, var(--accent-soft), var(--accent));
    box-shadow: 0 18px 44px rgba(245, 158, 11, 0.35);
    font-size: 34px;
}

.play-overlay strong {
    font-size: 20px;
    text-align: center;
}

.detail-copy {
    margin-top: 28px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: rgba(15, 23, 42, 0.72);
}

.detail-copy h1 {
    font-size: clamp(32px, 5vw, 54px);
}

.detail-copy .lead {
    color: var(--text-soft);
    font-size: 18px;
}

.detail-copy h2 {
    margin: 30px 0 10px;
    font-size: 24px;
}

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

.detail-aside {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 18px;
}

.detail-poster {
    width: 100%;
    aspect-ratio: 3 / 4.15;
    object-fit: cover;
    border-radius: var(--radius-xl);
    border: 1px solid var(--line);
    background: #0f172a;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}

.info-card {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: rgba(15, 23, 42, 0.78);
}

.info-card h2 {
    margin: 0 0 16px;
}

.info-card dl {
    display: grid;
    grid-template-columns: 68px 1fr;
    gap: 12px;
    margin: 0 0 22px;
}

.info-card dt {
    color: var(--text-muted);
}

.info-card dd {
    margin: 0;
    color: var(--text-soft);
}

.related-section {
    padding-top: 58px;
}

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

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.86);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 38px;
    padding: 48px 0;
}

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

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

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

.footer-grid p {
    max-width: 520px;
}

.footer-bottom {
    padding: 18px;
    border-top: 1px solid var(--line);
    color: var(--text-muted);
    text-align: center;
    font-size: 14px;
}

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

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

    .category-overview-card {
        grid-template-columns: 210px 1fr;
    }

    .mini-card-grid {
        grid-column: 1 / -1;
    }

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

    .detail-aside {
        position: static;
        grid-template-columns: 240px 1fr;
    }
}

@media (max-width: 820px) {
    .header-inner {
        min-height: 68px;
    }

    .menu-toggle {
        display: grid;
    }

    .main-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 76px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: rgba(15, 23, 42, 0.96);
        box-shadow: var(--shadow);
    }

    .main-nav.is-open {
        display: flex;
    }

    .main-nav a {
        padding: 13px 14px;
        border-radius: 12px;
    }

    .main-nav a:hover {
        background: rgba(245, 158, 11, 0.08);
        transform: none;
    }

    .hero-slider,
    .hero-content {
        min-height: 720px;
    }

    .hero-content {
        padding-top: 84px;
        justify-content: start;
        transform: none;
    }

    .hero-poster {
        left: 50%;
        right: auto;
        bottom: 86px;
        width: min(64vw, 300px);
        transform: translateX(-50%) rotate(1deg);
    }

    .hero-content p {
        font-size: 16px;
    }

    .search-panel,
    .section-heading,
    .footer-grid,
    .detail-aside {
        grid-template-columns: 1fr;
    }

    .section-heading {
        align-items: start;
    }

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

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

    .ranking-compact,
    .ranking-list {
        grid-template-columns: 1fr;
    }

    .ranking-item {
        grid-template-columns: 52px 76px 1fr;
        gap: 12px;
    }

    .rank-number {
        font-size: 22px;
    }

    .category-overview-card {
        grid-template-columns: 1fr;
    }

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

    .detail-poster {
        width: min(100%, 260px);
    }
}

@media (max-width: 520px) {
    .container {
        width: min(100% - 22px, var(--container));
    }

    .brand-copy strong {
        font-size: 18px;
    }

    .brand-icon {
        width: 36px;
        height: 36px;
        border-radius: 12px;
    }

    .hero-slider,
    .hero-content {
        min-height: 700px;
    }

    .hero-content h1 {
        font-size: 40px;
    }

    .hero-poster {
        width: min(76vw, 260px);
    }

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

    .movie-grid,
    .compact-grid,
    .category-grid,
    .mini-card-grid {
        grid-template-columns: 1fr;
    }

    .category-tile {
        min-height: 190px;
    }

    .ranking-item {
        grid-template-columns: 42px 68px 1fr;
        padding: 10px;
    }

    .movie-card-body,
    .detail-copy,
    .info-card {
        padding: 18px;
    }

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