:root {
    color-scheme: light;
    --red-900: #7f1d1d;
    --red-800: #991b1b;
    --red-700: #b91c1c;
    --red-600: #dc2626;
    --red-500: #ef4444;
    --yellow-400: #facc15;
    --yellow-300: #fde047;
    --gray-950: #030712;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --white: #ffffff;
    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
    --shadow-card: 0 10px 28px rgba(15, 23, 42, 0.10);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --max-width: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: #f8fafc;
    color: var(--gray-900);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, var(--red-600), var(--red-700));
    box-shadow: 0 12px 30px rgba(127, 29, 29, 0.22);
}

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

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
    font-size: 20px;
    font-weight: 800;
    white-space: nowrap;
}

.site-logo__mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-900);
    background: var(--yellow-400);
    border-radius: 999px;
    box-shadow: 0 8px 16px rgba(250, 204, 21, 0.26);
}

.site-nav__links {
    display: flex;
    align-items: center;
    gap: 18px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 15px;
    font-weight: 650;
}

.site-nav__links a {
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.site-nav__links a:hover,
.site-nav__links a.is-active {
    color: var(--yellow-300);
    border-color: var(--yellow-300);
}

.nav-toggle {
    display: none;
    border: 0;
    color: var(--white);
    background: rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    padding: 8px 14px;
}

main {
    min-height: 64vh;
}

.home-hero {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    color: var(--white);
    background: radial-gradient(circle at 15% 15%, rgba(250, 204, 21, 0.24), transparent 30%),
        linear-gradient(135deg, var(--red-900), var(--red-700) 52%, #450a0a);
}

.hero-background {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.18));
}

.hero-track {
    position: relative;
    width: min(100% - 32px, var(--max-width));
    min-height: 560px;
    margin: 0 auto;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    gap: 44px;
    align-items: center;
    opacity: 0;
    transform: translateY(18px);
    pointer-events: none;
    transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-slide__media {
    order: 2;
    position: relative;
    max-width: 360px;
    justify-self: end;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

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

.hero-slide__copy {
    order: 1;
    max-width: 700px;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--yellow-300);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-slide h1,
.page-hero h1,
.detail-hero h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-slide__summary {
    max-width: 650px;
    margin: 22px 0 22px;
    color: rgba(255, 255, 255, 0.90);
    font-size: clamp(17px, 2vw, 22px);
}

.hero-slide__tags,
.detail-tags,
.movie-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    color: #7c2d12;
    background: #fef3c7;
    font-size: 13px;
    font-weight: 700;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 22px;
    border-radius: 14px;
    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(--gray-900);
    background: var(--yellow-400);
    box-shadow: 0 14px 30px rgba(250, 204, 21, 0.26);
}

.btn-primary:hover {
    background: #fbbf24;
}

.btn-ghost {
    color: var(--white);
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.30);
    backdrop-filter: blur(10px);
}

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

.hero-arrow,
.hero-dot {
    border: 0;
    color: var(--white);
    background: rgba(255, 255, 255, 0.17);
    cursor: pointer;
}

.hero-arrow {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    font-size: 28px;
    line-height: 1;
}

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

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

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

.stats-strip {
    width: min(100% - 32px, var(--max-width));
    margin: -30px auto 0;
    position: relative;
    z-index: 4;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.stats-strip a {
    padding: 24px;
    border-radius: 20px;
    color: var(--gray-900);
    background: var(--white);
    box-shadow: var(--shadow-card);
    font-size: 18px;
    font-weight: 900;
    text-align: center;
    transition: transform 0.2s ease, color 0.2s ease;
}

.stats-strip a:hover {
    color: var(--red-600);
    transform: translateY(-4px);
}

.content-section {
    width: min(100% - 32px, var(--max-width));
    margin: 0 auto;
    padding: 64px 0;
}

.content-section--soft {
    width: 100%;
    max-width: none;
    padding: 72px max(16px, calc((100vw - var(--max-width)) / 2));
    background: linear-gradient(135deg, #ffffff, #fff1f2);
}

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

.section-heading h2 {
    margin: 0;
    color: var(--gray-900);
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.12;
}

.section-heading a,
.text-link {
    color: var(--red-600);
    font-weight: 800;
}

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

.movie-grid--featured {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 18px;
}

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.movie-card__poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #fee2e2;
}

.movie-card__poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.movie-card__play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    background: rgba(0, 0, 0, 0.34);
    font-size: 38px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.movie-card:hover .movie-card__play {
    opacity: 1;
}

.movie-card__body {
    padding: 15px;
}

.movie-card__title {
    display: block;
    color: var(--gray-900);
    font-size: 17px;
    font-weight: 900;
    line-height: 1.3;
    min-height: 44px;
}

.movie-card__title:hover {
    color: var(--red-600);
}

.movie-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 8px 0;
    color: var(--gray-500);
    font-size: 13px;
}

.movie-card__meta span:not(:last-child)::after {
    content: "·";
    margin-left: 7px;
}

.movie-card__desc {
    display: -webkit-box;
    min-height: 45px;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--gray-600);
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-card--compact .movie-card__body {
    padding: 12px;
}

.movie-card--compact .movie-card__title {
    font-size: 15px;
    min-height: 40px;
}

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

.category-card {
    display: grid;
    min-height: 170px;
    padding: 24px;
    border-radius: var(--radius-lg);
    color: var(--white);
    background: linear-gradient(135deg, var(--red-600), var(--red-900));
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-card span {
    width: fit-content;
    height: fit-content;
    padding: 4px 10px;
    border-radius: 999px;
    color: var(--gray-900);
    background: var(--yellow-400);
    font-size: 13px;
    font-weight: 900;
}

.category-card strong {
    align-self: end;
    font-size: 25px;
    line-height: 1.1;
}

.category-card em {
    color: rgba(255, 255, 255, 0.72);
    font-style: normal;
    font-size: 14px;
}

.page-hero {
    position: relative;
    width: min(100% - 32px, var(--max-width));
    margin: 34px auto 0;
    padding: 56px;
    overflow: hidden;
    border-radius: var(--radius-xl);
    color: var(--white);
    background: radial-gradient(circle at 80% 20%, rgba(250, 204, 21, 0.26), transparent 28%),
        linear-gradient(135deg, var(--red-900), var(--red-600));
    box-shadow: var(--shadow-soft);
}

.page-hero p:not(.eyebrow) {
    max-width: 760px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
}

.page-hero--compact h1,
.page-hero--category h1,
.page-hero--ranking h1 {
    font-size: clamp(36px, 5vw, 58px);
}

.page-hero--ranking {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    align-items: center;
    gap: 36px;
}

.ranking-hero-poster {
    display: block;
    overflow: hidden;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
}

.ranking-hero-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.ranking-hero-poster span {
    display: block;
    padding: 14px;
    font-weight: 900;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 26px;
}

.toolbar--top {
    margin: 0 0 22px;
}

.page-search {
    flex: 1 1 260px;
    min-height: 48px;
    padding: 0 18px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 14px;
    color: var(--gray-900);
    background: rgba(255, 255, 255, 0.92);
    outline: none;
}

.toolbar--top .page-search,
.content-section .page-search {
    border-color: var(--gray-200);
    background: var(--white);
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 28px;
    align-items: center;
    padding: 24px;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.category-overview-card__posters {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.category-overview-card__posters img {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    object-fit: cover;
    background: #fee2e2;
}

.category-overview-card h2 {
    margin: 0 0 8px;
    font-size: 28px;
}

.category-overview-card p {
    margin: 0 0 12px;
    color: var(--gray-600);
}

.muted-line {
    color: var(--gray-500) !important;
    font-size: 14px;
}

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

.rank-list--small {
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
}

.rank-card {
    position: relative;
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 16px;
    min-height: 112px;
    padding: 16px 18px 16px 72px;
    border-radius: 20px;
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.rank-card__poster {
    overflow: hidden;
    border-radius: 12px;
    background: #fee2e2;
}

.rank-card__poster img {
    width: 100%;
    height: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.rank-card__index {
    position: absolute;
    left: 18px;
    top: 18px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--gray-900);
    background: var(--yellow-400);
    font-weight: 900;
}

.rank-card__title {
    display: inline-block;
    margin-bottom: 6px;
    font-size: 18px;
    font-weight: 900;
}

.rank-card__title:hover {
    color: var(--red-600);
}

.rank-card p {
    margin: 0 0 8px;
    color: var(--gray-600);
    font-size: 14px;
}

.rank-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--gray-500);
    font-size: 13px;
}

.detail-hero {
    width: min(100% - 32px, var(--max-width));
    margin: 34px auto 0;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 36px;
    align-items: center;
    padding: 42px;
    border-radius: var(--radius-xl);
    color: var(--white);
    background: radial-gradient(circle at 80% 18%, rgba(250, 204, 21, 0.24), transparent 30%),
        linear-gradient(135deg, var(--red-900), #450a0a);
    box-shadow: var(--shadow-soft);
}

.detail-hero__poster {
    overflow: hidden;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.32);
}

.detail-hero__poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: var(--yellow-300);
}

.detail-hero__summary {
    margin: 18px 0;
    color: rgba(255, 255, 255, 0.90);
    font-size: 19px;
}

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

.detail-meta span {
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    font-weight: 700;
}

.player-section,
.detail-layout {
    width: min(100% - 32px, var(--max-width));
    margin: 32px auto 0;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: var(--gray-950);
    box-shadow: var(--shadow-soft);
}

.player-shell video {
    width: 100%;
    min-height: min(62vw, 640px);
    max-height: 720px;
    display: block;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    gap: 10px;
    border: 0;
    color: var(--white);
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.72));
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.player-shell.is-playing .player-cover {
    opacity: 0;
    pointer-events: none;
}

.player-cover__icon {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--gray-900);
    background: var(--yellow-400);
    font-size: 32px;
    box-shadow: 0 18px 38px rgba(250, 204, 21, 0.26);
}

.player-cover strong {
    font-size: 28px;
}

.player-cover em {
    color: rgba(255, 255, 255, 0.76);
    font-style: normal;
}

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

.detail-panel {
    padding: 28px;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.detail-panel h2 {
    margin: 0 0 14px;
    color: var(--gray-900);
    font-size: 26px;
}

.detail-panel p {
    margin: 0;
    color: var(--gray-700);
    font-size: 17px;
}

.site-footer {
    margin-top: 78px;
    padding: 48px 0;
    color: #d1d5db;
    background: var(--gray-900);
}

.footer-grid {
    width: min(100% - 32px, var(--max-width));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 1.2fr;
    gap: 36px;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: var(--white);
    font-size: 18px;
}

.site-footer p {
    margin: 0;
    color: #cbd5e1;
}

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

.site-footer li {
    margin: 7px 0;
}

.site-footer a:hover {
    color: var(--yellow-300);
}

.footer-columns {
    columns: 2;
}

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

@media (max-width: 980px) {
    .site-nav__links {
        position: absolute;
        left: 0;
        right: 0;
        top: 68px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px 24px 20px;
        background: var(--red-700);
    }

    .site-nav__links.is-open {
        display: flex;
    }

    .site-nav__links a {
        padding: 11px 0;
    }

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

    .hero-slide,
    .detail-hero,
    .page-hero--ranking,
    .category-overview-card,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-slide__media {
        display: none;
    }

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

@media (max-width: 640px) {
    .site-nav {
        width: min(100% - 20px, var(--max-width));
    }

    .site-logo {
        font-size: 17px;
    }

    .home-hero,
    .hero-track {
        min-height: 620px;
    }

    .hero-slide {
        align-content: center;
    }

    .stats-strip,
    .movie-grid,
    .movie-grid--featured,
    .rank-list--small {
        grid-template-columns: 1fr;
    }

    .content-section,
    .player-section,
    .detail-layout,
    .detail-hero,
    .page-hero {
        width: min(100% - 20px, var(--max-width));
    }

    .content-section,
    .content-section--soft {
        padding-top: 42px;
        padding-bottom: 42px;
    }

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

    .section-heading {
        display: block;
    }

    .section-heading a {
        display: inline-block;
        margin-top: 10px;
    }

    .rank-card {
        grid-template-columns: 64px minmax(0, 1fr);
        padding-left: 60px;
    }

    .category-overview-card__posters {
        grid-template-columns: repeat(4, 1fr);
    }

    .footer-grid {
        gap: 24px;
    }
}
