:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.82);
    --border: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --accent: #f59e0b;
    --accent-strong: #d97706;
    --accent-soft: rgba(245, 158, 11, 0.16);
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    --radius-lg: 28px;
    --radius-md: 18px;
    --max-width: 1280px;
    font-family: Inter, "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, 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 85% 15%, rgba(59, 130, 246, 0.12), transparent 28rem),
        var(--bg);
    color: var(--text);
}

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

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

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

.site-nav {
    width: min(var(--max-width), calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.brand-mark {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), #f97316);
    color: #fff;
    font-weight: 900;
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.26);
}

.brand-name {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 0.02em;
}

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

.nav-link,
.mobile-nav-link {
    color: var(--muted-strong);
    font-size: 14px;
    font-weight: 700;
    transition: color 0.2s ease, transform 0.2s ease;
}

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

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.82);
    padding: 9px;
}

.nav-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--text);
    border-radius: 99px;
}

.mobile-nav {
    display: none;
    width: min(var(--max-width), calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
}

.mobile-nav.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

main,
.page-shell,
.detail-shell {
    width: min(var(--max-width), calc(100% - 32px));
    margin: 0 auto;
}

.hero-carousel {
    position: relative;
    width: 100%;
    min-height: 72vh;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.52fr);
    align-items: center;
    gap: 48px;
    padding: 70px clamp(24px, 6vw, 86px);
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.6s ease, transform 0.8s ease;
}

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

.hero-bg,
.hero-overlay,
.detail-backdrop,
.category-hero-bg {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
}

.hero-bg {
    filter: brightness(0.36) blur(2px);
    transform: scale(1.04);
}

.hero-overlay {
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.62) 50%, rgba(2, 6, 23, 0.2)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.95), transparent 38%);
}

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

.hero-content h1 {
    max-width: 920px;
    margin: 0 0 20px;
    font-size: clamp(38px, 6vw, 74px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero-content h2 {
    margin: 0 0 16px;
    font-size: clamp(26px, 3.2vw, 42px);
    color: var(--accent);
}

.hero-content p {
    max-width: 760px;
    margin: 0 0 30px;
    color: var(--muted-strong);
    font-size: clamp(16px, 2vw, 22px);
    line-height: 1.8;
}

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

.primary-button,
.secondary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-button {
    background: linear-gradient(135deg, var(--accent), #f97316);
    color: white;
    box-shadow: 0 16px 36px rgba(245, 158, 11, 0.26);
}

.secondary-button,
.ghost-button {
    background: rgba(15, 23, 42, 0.64);
    border-color: var(--border);
    color: var(--text);
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.movie-card:hover,
.category-card:hover,
.rank-card:hover {
    transform: translateY(-3px);
}

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

.hero-poster {
    width: min(100%, 360px);
    justify-self: center;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 40px 90px rgba(0, 0, 0, 0.52);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: linear-gradient(135deg, #1e293b, #0f172a);
}

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

.hero-dot {
    width: 38px;
    height: 5px;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.26);
    cursor: pointer;
}

.hero-dot.is-active {
    background: var(--accent);
}

.home-intro,
.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.home-intro {
    margin: 28px 0 18px;
}

.intro-card,
.filter-panel,
.content-section,
.rank-strip,
.category-card,
.rank-card,
.detail-text-grid article,
.video-frame {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

.intro-card {
    padding: 24px;
}

.intro-card h2 {
    margin: 8px 0 10px;
    font-size: 30px;
}

.intro-card p {
    color: var(--muted-strong);
    line-height: 1.75;
}

.hot-entry {
    background:
        linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(15, 23, 42, 0.86)),
        var(--bg-card);
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 180px 180px auto;
    gap: 14px;
    align-items: end;
    margin: 22px 0;
    padding: 18px;
}

.filter-panel label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.72);
    color: var(--text);
    padding: 0 14px;
    outline: none;
}

.filter-empty {
    color: var(--accent);
    text-align: center;
    font-weight: 800;
}

.content-section {
    margin: 22px 0;
    padding: clamp(18px, 3vw, 30px);
}

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

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

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

.section-more,
.text-button {
    color: var(--accent);
    font-weight: 900;
}

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

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

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

.movie-card:hover {
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

.poster-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

.poster-wrap img,
.rank-cover img,
.category-cover img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background:
        linear-gradient(135deg, rgba(245, 158, 11, 0.16), transparent),
        linear-gradient(145deg, #1e293b, #020617);
    transition: transform 0.45s ease;
}

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

.poster-year,
.play-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    color: white;
    font-size: 12px;
    font-weight: 900;
}

.poster-year {
    top: 10px;
    right: 10px;
    background: rgba(245, 158, 11, 0.92);
}

.play-badge {
    left: 10px;
    bottom: 10px;
    background: rgba(2, 6, 23, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

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

.movie-card h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

.movie-meta,
.movie-one-line,
.category-card p,
.rank-info p,
.detail-text-grid p,
.site-footer p {
    color: var(--muted-strong);
    line-height: 1.72;
}

.movie-meta {
    min-height: 45px;
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 13px;
}

.movie-one-line {
    display: -webkit-box;
    min-height: 64px;
    margin: 0 0 12px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    font-size: 14px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag-row span {
    padding: 5px 8px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: #fbbf24;
    font-size: 12px;
    font-weight: 800;
}

.rank-strip {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 26px;
    margin: 22px 0;
    padding: 28px;
}

.rank-strip ol {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rank-strip a {
    display: grid;
    grid-template-columns: 46px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.5);
}

.rank-num {
    color: var(--accent);
    font-weight: 900;
}

.rank-strip em {
    color: var(--muted);
    font-style: normal;
}

.page-hero,
.category-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    margin: 28px 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    box-shadow: var(--shadow);
}

.simple-hero {
    padding: clamp(28px, 5vw, 62px);
}

.simple-hero h1,
.category-hero h1,
.detail-info h1 {
    font-size: clamp(34px, 6vw, 62px);
}

.simple-hero p,
.category-hero p {
    max-width: 800px;
    color: var(--muted-strong);
    line-height: 1.8;
}

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

.category-card {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 18px;
    padding: 16px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-cover {
    overflow: hidden;
    border-radius: 18px;
}

.category-card h2 {
    margin: 0 0 8px;
}

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.category-samples a {
    color: var(--accent);
    font-size: 13px;
    font-weight: 800;
}

.category-hero {
    min-height: 340px;
    padding: clamp(28px, 5vw, 60px);
    display: flex;
    align-items: end;
}

.category-hero-bg {
    filter: brightness(0.32) blur(1px);
    transform: scale(1.03);
}

.category-hero::after,
.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.42));
}

.category-hero-content {
    max-width: 760px;
}

.rank-list {
    display: grid;
    gap: 16px;
    margin-bottom: 32px;
}

.rank-card {
    display: grid;
    grid-template-columns: 92px 1fr 140px;
    gap: 18px;
    align-items: center;
    padding: 14px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-cover {
    overflow: hidden;
    border-radius: 16px;
}

.rank-info h2 {
    margin: 2px 0 7px;
}

.score-box {
    display: grid;
    place-items: center;
    padding: 14px;
    border-radius: 18px;
    background: var(--accent-soft);
}

.score-box span {
    color: var(--accent);
    font-size: 26px;
    font-weight: 900;
}

.score-box small {
    color: var(--muted-strong);
}

.detail-hero {
    min-height: 560px;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 34px;
    align-items: end;
    padding: clamp(22px, 5vw, 56px);
}

.detail-backdrop {
    filter: brightness(0.32) blur(2px);
    transform: scale(1.04);
}

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

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: #0f172a;
}

.detail-info {
    max-width: 780px;
}

.detail-one-line {
    color: var(--muted-strong);
    font-size: 19px;
    line-height: 1.8;
}

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

.detail-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.74);
    color: var(--muted-strong);
    border: 1px solid var(--border);
}

.player-section {
    margin: 24px 0;
}

.video-frame {
    position: relative;
    overflow: hidden;
    padding: 0;
    background: #000;
}

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

.video-play-button {
    position: absolute;
    inset: 50% auto auto 50%;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), #f97316);
    color: white;
    font-weight: 900;
    transform: translate(-50%, -50%);
    cursor: pointer;
    box-shadow: 0 20px 50px rgba(245, 158, 11, 0.32);
}

.video-play-button.is-hidden {
    display: none;
}

.video-status {
    position: absolute;
    left: 16px;
    bottom: 12px;
    margin: 0;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.72);
    color: var(--muted-strong);
    font-size: 13px;
}

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

.detail-text-grid article {
    padding: 24px;
}

.detail-text-grid h2 {
    margin: 0 0 12px;
}

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

.footer-grid {
    width: min(var(--max-width), calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0;
}

.site-footer h3 {
    margin: 0 0 12px;
}

.site-footer ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

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

.image-missing {
    opacity: 0.45;
}

[hidden] {
    display: none !important;
}

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

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

    .nav-toggle {
        display: inline-block;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 26px;
        min-height: 760px;
    }

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

    .home-intro,
    .footer-grid,
    .filter-panel,
    .rank-strip,
    .category-grid,
    .detail-text-grid,
    .detail-hero {
        grid-template-columns: 1fr;
    }

    .rank-card {
        grid-template-columns: 86px 1fr;
    }

    .score-box {
        grid-column: 1 / -1;
    }

    .detail-hero {
        min-height: 0;
        align-items: start;
    }

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

@media (max-width: 720px) {
    main,
    .page-shell,
    .detail-shell,
    .site-nav,
    .mobile-nav {
        width: min(100% - 20px, var(--max-width));
    }

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

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

    .hero-slide {
        min-height: 690px;
        padding: 40px 18px 70px;
    }

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

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

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

    .movie-card h3 {
        font-size: 16px;
    }

    .movie-one-line,
    .movie-meta {
        min-height: auto;
    }

    .rank-strip ol {
        grid-template-columns: 1fr;
    }

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

    .filter-panel {
        padding: 14px;
    }
}
