:root {
    --primary-950: #082f49;
    --primary-900: #0c4a6e;
    --primary-800: #075985;
    --primary-700: #0369a1;
    --primary-600: #0284c7;
    --primary-100: #e0f2fe;
    --accent-500: #f59e0b;
    --accent-400: #fbbf24;
    --neutral-950: #0c0a09;
    --neutral-900: #1c1917;
    --neutral-800: #292524;
    --neutral-700: #44403c;
    --neutral-600: #57534e;
    --neutral-200: #e7e5e4;
    --neutral-100: #f5f5f4;
    --neutral-50: #fafaf9;
    --white: #ffffff;
    --shadow-soft: 0 18px 50px rgba(12, 74, 110, 0.14);
    --shadow-card: 0 14px 34px rgba(28, 25, 23, 0.12);
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 10px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--neutral-900);
    background: linear-gradient(180deg, #f8fafc 0%, #f5f5f4 40%, #ffffff 100%);
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    color: var(--white);
    background: linear-gradient(90deg, var(--primary-900), var(--primary-800));
    box-shadow: 0 10px 30px rgba(8, 47, 73, 0.22);
}

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

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

.logo {
    font-size: 21px;
}

.logo-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    color: var(--primary-950);
    background: linear-gradient(135deg, var(--accent-400), #fde68a);
    box-shadow: 0 8px 20px rgba(251, 191, 36, 0.35);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links a {
    padding: 9px 12px;
    border-radius: 999px;
    font-weight: 650;
    color: rgba(255, 255, 255, 0.86);
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
}

.mobile-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: var(--white);
    border-radius: 2px;
}

main {
    min-height: 70vh;
}

.hero-slider {
    position: relative;
    min-height: 660px;
    overflow: hidden;
    color: var(--white);
    background: var(--primary-950);
}

.hero-slides,
.hero-slide,
.hero-media,
.hero-overlay {
    position: absolute;
    inset: 0;
}

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

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

.hero-media img,
.detail-backdrop img,
.category-thumbs img,
.player-cover img,
.rank-cover img,
.poster img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fallback-cover {
    background:
        radial-gradient(circle at 20% 20%, rgba(251, 191, 36, 0.32), transparent 28%),
        radial-gradient(circle at 80% 10%, rgba(2, 132, 199, 0.38), transparent 30%),
        linear-gradient(135deg, var(--primary-900), var(--neutral-900));
}

.hero-media {
    transform: scale(1.04);
    filter: saturate(1.08);
}

.hero-overlay {
    background:
        linear-gradient(90deg, rgba(8, 47, 73, 0.94) 0%, rgba(8, 47, 73, 0.72) 42%, rgba(12, 74, 110, 0.32) 72%, rgba(12, 74, 110, 0.2) 100%),
        linear-gradient(0deg, rgba(12, 10, 9, 0.64), transparent 48%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 560px;
    margin: 0 auto;
    padding: 94px 0 170px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.hero-kicker,
.eyebrow {
    margin: 0 0 12px;
    color: var(--accent-400);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-content h1 {
    max-width: 820px;
    margin: 0;
    font-size: clamp(36px, 5.4vw, 76px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-content h2 {
    margin: 18px 0 0;
    font-size: clamp(24px, 3vw, 42px);
    line-height: 1.15;
}

.hero-desc {
    max-width: 720px;
    margin: 18px 0 0;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.86);
}

.hero-tags,
.detail-meta,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.hero-tags span,
.detail-meta span,
.tag-list span {
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 18px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn.primary {
    color: var(--neutral-950);
    background: linear-gradient(135deg, var(--accent-400), var(--accent-500));
    box-shadow: 0 16px 36px rgba(245, 158, 11, 0.32);
}

.btn.ghost {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.12);
}

.hero-panel {
    position: absolute;
    left: 50%;
    bottom: 34px;
    z-index: 3;
    width: min(1180px, calc(100% - 32px));
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: minmax(260px, 450px) 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-lg);
    background: rgba(12, 74, 110, 0.7);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px);
}

.hero-search {
    display: flex;
    overflow: hidden;
    border-radius: 999px;
    background: var(--white);
}

.hero-search input,
.toolbar input,
.toolbar select {
    min-width: 0;
    border: 0;
    outline: 0;
}

.hero-search input {
    width: 100%;
    padding: 13px 16px;
    color: var(--neutral-900);
}

.hero-search button {
    border: 0;
    padding: 0 18px;
    color: var(--neutral-950);
    font-weight: 800;
    background: var(--accent-400);
    cursor: pointer;
}

.hero-category-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-category-links a {
    padding: 8px 12px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.12);
}

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

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

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

.stats-strip {
    width: min(1180px, calc(100% - 32px));
    margin: -28px auto 0;
    position: relative;
    z-index: 4;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.stats-strip div {
    padding: 20px;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.stats-strip strong {
    display: block;
    color: var(--primary-700);
    font-size: 30px;
    line-height: 1;
}

.stats-strip span {
    color: var(--neutral-600);
    font-weight: 650;
}

.content-section {
    width: min(1180px, calc(100% - 32px));
    margin: 68px auto;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 40px);
    line-height: 1.15;
}

.section-heading p:not(.eyebrow) {
    max-width: 760px;
    margin: 8px 0 0;
    color: var(--neutral-600);
}

.section-more {
    flex: none;
    padding: 10px 15px;
    border-radius: 999px;
    color: var(--primary-700);
    font-weight: 800;
    background: var(--primary-100);
}

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

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

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

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

.movie-card {
    min-width: 0;
}

.movie-card a {
    display: block;
    height: 100%;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: 0 1px 0 rgba(28, 25, 23, 0.05);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card a:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-card);
}

.movie-poster-wrap {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.poster {
    position: relative;
    aspect-ratio: 2 / 3;
}

.poster::after,
.rank-cover::after,
.detail-poster::after,
.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.42), transparent 45%);
    pointer-events: none;
}

.movie-card img {
    transition: transform 0.3s ease;
}

.movie-card a:hover img {
    transform: scale(1.055);
}

.year-badge,
.play-badge {
    position: absolute;
    z-index: 2;
    padding: 5px 9px;
    border-radius: 8px;
    color: var(--white);
    font-size: 12px;
    font-weight: 800;
}

.year-badge {
    top: 10px;
    right: 10px;
    background: var(--accent-500);
}

.play-badge {
    left: 10px;
    bottom: 10px;
    background: rgba(12, 74, 110, 0.86);
}

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

.movie-card h3 {
    margin: 0;
    min-height: 46px;
    font-size: 16px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.meta-line,
.genre-line,
.one-line {
    margin: 7px 0 0;
    color: var(--neutral-600);
    font-size: 13px;
}

.genre-line {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 7px;
    color: var(--primary-700);
    background: var(--primary-100);
}

.one-line {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.rank-mini-item {
    display: grid;
    grid-template-columns: 46px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 13px;
    border-radius: var(--radius-sm);
    background: var(--white);
    box-shadow: 0 1px 0 rgba(28, 25, 23, 0.06);
}

.rank-mini-item:hover {
    box-shadow: var(--shadow-soft);
}

.rank-no {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    color: var(--neutral-950);
    font-weight: 900;
    background: var(--accent-400);
}

.rank-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 750;
}

.rank-meta {
    color: var(--neutral-600);
    font-size: 13px;
}

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

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

.category-tile {
    padding: 14px;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: 0 1px 0 rgba(28, 25, 23, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-card);
}

.category-thumbs {
    height: 130px;
    display: grid;
    grid-template-columns: 1.2fr 1fr 0.8fr;
    gap: 6px;
    overflow: hidden;
    border-radius: 14px;
}

.category-thumbs img {
    min-width: 0;
    border-radius: 10px;
}

.category-tile h3 {
    margin: 14px 0 6px;
    font-size: 18px;
}

.category-tile p {
    min-height: 48px;
    margin: 0;
    color: var(--neutral-600);
    font-size: 14px;
}

.category-tile span {
    display: inline-block;
    margin-top: 12px;
    color: var(--primary-700);
    font-weight: 800;
}

.page-hero {
    color: var(--white);
    background:
        radial-gradient(circle at 85% 15%, rgba(251, 191, 36, 0.28), transparent 24%),
        linear-gradient(135deg, var(--primary-900), var(--primary-800) 52%, var(--neutral-900));
}

.compact-hero {
    padding: 78px max(16px, calc((100% - 1180px) / 2)) 84px;
}

.compact-hero h1 {
    max-width: 860px;
    margin: 0;
    font-size: clamp(34px, 4.8vw, 62px);
    line-height: 1.08;
}

.compact-hero p:not(.eyebrow) {
    max-width: 780px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
}

.toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px;
    gap: 12px;
    margin-bottom: 22px;
    padding: 14px;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.toolbar.prominent {
    margin-top: -28px;
}

.toolbar input,
.toolbar select {
    width: 100%;
    padding: 13px 14px;
    border-radius: 12px;
    color: var(--neutral-900);
    background: var(--neutral-100);
}

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

.rank-row a {
    display: grid;
    grid-template-columns: 70px 82px 1fr 80px;
    gap: 16px;
    align-items: center;
    padding: 12px;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: 0 1px 0 rgba(28, 25, 23, 0.06);
}

.rank-row a:hover {
    box-shadow: var(--shadow-soft);
}

.rank-number {
    color: var(--primary-700);
    font-size: 24px;
    font-weight: 900;
    text-align: center;
}

.rank-cover {
    position: relative;
    width: 82px;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 12px;
}

.rank-info {
    min-width: 0;
}

.rank-info strong,
.rank-info em,
.rank-info small {
    display: block;
}

.rank-info strong {
    font-size: 18px;
}

.rank-info em {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--neutral-600);
    font-style: normal;
}

.rank-info small {
    color: var(--neutral-600);
}

.rank-score {
    color: var(--accent-500);
    font-size: 22px;
    font-weight: 900;
    text-align: right;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background: var(--primary-950);
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.45;
    filter: blur(8px) saturate(1.2);
    transform: scale(1.04);
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(8, 47, 73, 0.96), rgba(8, 47, 73, 0.7), rgba(12, 74, 110, 0.45)),
        linear-gradient(0deg, rgba(12, 10, 9, 0.75), transparent 65%);
}

.detail-layout {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 76px 0;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 36px;
    align-items: center;
}

.detail-poster {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
}

.detail-info h1 {
    margin: 0;
    font-size: clamp(36px, 5vw, 68px);
    line-height: 1.08;
}

.detail-one-line {
    max-width: 800px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
}

.player-section {
    margin-top: 48px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    aspect-ratio: 16 / 9;
    background: var(--neutral-950);
    box-shadow: 0 30px 80px rgba(12, 10, 9, 0.25);
}

.site-video,
.player-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.site-video {
    display: none;
    background: #000;
}

.player-cover {
    border: 0;
    color: var(--white);
    cursor: pointer;
}

.player-cover-mask {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle, rgba(251, 191, 36, 0.16), transparent 32%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.36));
}

.player-play-icon {
    position: absolute;
    left: 50%;
    top: 45%;
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    color: var(--neutral-950);
    font-size: 30px;
    background: var(--accent-400);
    transform: translate(-50%, -50%);
    box-shadow: 0 20px 50px rgba(251, 191, 36, 0.32);
}

.player-cover strong {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(45% + 56px);
    font-size: 20px;
}

.player-cover.is-hidden {
    display: none;
}

.copy-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 22px;
}

.copy-grid article,
.text-page article,
.text-page div {
    padding: 26px;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.copy-grid h2,
.text-page h2 {
    margin: 0 0 12px;
}

.copy-grid p,
.text-page p,
.text-page li {
    color: var(--neutral-700);
}

.text-page ul {
    margin: 0;
    padding-left: 22px;
}

.site-footer {
    color: rgba(255, 255, 255, 0.82);
    background: var(--neutral-900);
    margin-top: 70px;
    padding: 48px 0 24px;
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 28px;
}

.footer-grid h3 {
    margin: 0 0 12px;
    color: var(--white);
}

.footer-grid a {
    display: block;
    margin: 7px 0;
}

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

.footer-logo {
    color: var(--white);
    font-size: 18px;
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 30px auto 0;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: rgba(255, 255, 255, 0.62);
}

.is-filter-hidden {
    display: none !important;
}

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

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

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

@media (max-width: 780px) {
    .site-nav {
        height: 62px;
    }

    .mobile-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 70px;
        display: none;
        padding: 12px;
        border-radius: var(--radius-md);
        background: var(--primary-900);
        box-shadow: 0 22px 60px rgba(8, 47, 73, 0.3);
    }

    .nav-links.is-open {
        display: grid;
        gap: 4px;
    }

    .hero-slider {
        min-height: 760px;
    }

    .hero-content {
        padding-top: 68px;
        padding-bottom: 250px;
    }

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

    .stats-strip {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .movie-grid,
    .featured-grid,
    .dense-grid,
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .category-tile-grid,
    .category-tile-grid.large {
        grid-template-columns: 1fr;
    }

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

    .rank-row a {
        grid-template-columns: 44px 72px 1fr;
    }

    .rank-score {
        grid-column: 3;
        text-align: left;
    }

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

    .detail-layout {
        grid-template-columns: 1fr;
        padding: 44px 0;
    }

    .detail-poster {
        width: min(240px, 72vw);
    }

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

@media (max-width: 480px) {
    .logo {
        font-size: 18px;
    }

    .stats-strip,
    .movie-grid,
    .featured-grid,
    .dense-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .movie-card h3 {
        min-height: auto;
    }
}
