:root {
    --mist-950: #020617;
    --mist-900: #0f172a;
    --mist-800: #1e293b;
    --mist-700: #334155;
    --mist-600: #475569;
    --mist-300: #cbd5e1;
    --mist-100: #f1f5f9;
    --mist-50: #f8fafc;
    --lake-900: #0c4a6e;
    --lake-800: #075985;
    --lake-700: #0369a1;
    --lake-600: #0284c7;
    --lake-500: #0ea5e9;
    --lake-100: #e0f2fe;
    --sepia-100: #f5f1ea;
    --sepia-50: #faf8f5;
    --gold: #f59e0b;
    --white: #ffffff;
    --shadow-soft: 0 20px 60px rgba(15, 23, 42, 0.12);
    --shadow-card: 0 12px 30px rgba(15, 23, 42, 0.10);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--mist-900);
    background: linear-gradient(180deg, var(--sepia-50) 0%, #ffffff 48%, var(--mist-50) 100%);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

button,
input {
    font: inherit;
}

button {
    border: 0;
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(18px);
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

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

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--mist-900);
}

.logo__mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    color: var(--white);
    background: linear-gradient(135deg, var(--lake-600), var(--mist-900));
    box-shadow: 0 12px 24px rgba(2, 132, 199, 0.25);
}

.logo__text {
    font-size: 20px;
}

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

.main-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--mist-700);
    font-weight: 650;
    transition: color 0.2s ease, background 0.2s ease;
}

.main-nav a:hover {
    color: var(--lake-700);
    background: var(--lake-100);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: var(--mist-100);
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--mist-900);
}

.hero {
    position: relative;
    min-height: 760px;
    overflow: hidden;
    color: var(--white);
    background: linear-gradient(120deg, var(--mist-900), var(--mist-800) 50%, var(--lake-900));
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 220px;
    background: linear-gradient(180deg, rgba(250, 248, 245, 0), var(--sepia-50));
    pointer-events: none;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 0.7s ease;
    pointer-events: none;
}

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

.hero-slide__backdrop {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: radial-gradient(circle at 20% 30%, rgba(14, 165, 233, 0.35), transparent 34%),
                radial-gradient(circle at 70% 20%, rgba(245, 158, 11, 0.18), transparent 28%),
                linear-gradient(120deg, var(--mist-900), var(--lake-900));
}

.hero-slide__backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.24;
    filter: blur(5px) saturate(1.12);
    transform: scale(1.05);
}

.hero-slide__backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.72) 44%, rgba(12, 74, 110, 0.5));
}

.hero-slide__content {
    position: relative;
    z-index: 2;
    min-height: 650px;
    display: grid;
    grid-template-columns: 1.18fr 0.82fr;
    align-items: center;
    gap: 56px;
    padding-top: 70px;
    padding-bottom: 120px;
}

.hero-slide__copy {
    animation: slideUp 0.58s ease both;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: #bae6fd;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-slide h1,
.page-hero h1,
.detail-hero h1 {
    margin: 0;
    font-size: clamp(36px, 6vw, 66px);
    line-height: 1.06;
    letter-spacing: -0.05em;
}

.hero-slide p {
    max-width: 720px;
    margin: 22px 0 0;
    color: #dbeafe;
    font-size: clamp(17px, 2vw, 22px);
}

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

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

.hero-slide__tags span,
.tag-cloud span,
.movie-card__tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.hero-slide__tags span {
    color: #e0f2fe;
    background: rgba(224, 242, 254, 0.16);
    border: 1px solid rgba(224, 242, 254, 0.2);
}

.hero-slide__actions,
.page-hero__actions,
.detail-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

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

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

.button--primary {
    color: var(--white);
    background: linear-gradient(135deg, var(--lake-600), var(--lake-800));
    box-shadow: 0 16px 34px rgba(2, 132, 199, 0.26);
}

.button--ghost {
    color: inherit;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-slide__poster {
    display: block;
    width: min(360px, 100%);
    justify-self: center;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 42px 90px rgba(0, 0, 0, 0.42);
    transform: rotate(1.5deg);
}

.poster,
.category-card__image {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, var(--mist-800), var(--lake-800));
}

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

.poster.is-missing::after,
.category-card__image.is-missing::after,
.hero-slide__backdrop.is-missing::before {
    content: attr(data-fallback-title);
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 18px;
    text-align: center;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 800;
    background: radial-gradient(circle at 30% 20%, rgba(14, 165, 233, 0.42), transparent 34%),
                linear-gradient(135deg, var(--mist-900), var(--lake-900));
}

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

.hero-dots button {
    width: 30px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
}

.hero-dots button.is-active {
    background: var(--white);
}

.hero-search {
    position: absolute;
    left: 50%;
    bottom: 32px;
    z-index: 5;
    transform: translateX(-50%);
}

.search-panel {
    padding: 22px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.92);
    color: var(--mist-900);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
}

.search-panel label {
    display: block;
    margin-bottom: 10px;
    color: var(--mist-600);
    font-weight: 800;
}

.search-panel__row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

.search-panel input,
.filter-bar input {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    color: var(--mist-900);
    background: var(--white);
    border: 1px solid rgba(148, 163, 184, 0.38);
    border-radius: 999px;
    outline: 0;
}

.search-panel input:focus,
.filter-bar input:focus {
    border-color: var(--lake-500);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.13);
}

.search-panel__quick {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.search-panel__quick a {
    color: var(--lake-700);
    font-size: 14px;
    font-weight: 750;
}

.section {
    padding: 74px 0;
}

.section--lift {
    position: relative;
    z-index: 6;
    margin-top: -14px;
    padding-top: 0;
    padding-bottom: 38px;
}

.section--soft {
    background: rgba(241, 245, 249, 0.72);
}

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

.section-heading h2 {
    margin: 0;
    color: var(--mist-900);
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.16;
}

.section-heading p {
    margin: 6px 0 0;
    color: var(--mist-600);
}

.section-heading__more {
    color: var(--lake-700);
    font-weight: 800;
}

.feature-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.feature-strip div {
    padding: 24px;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.feature-strip strong,
.feature-strip span {
    display: block;
}

.feature-strip strong {
    font-size: 22px;
}

.feature-strip span {
    margin-top: 4px;
    color: var(--mist-600);
}

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

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

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

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

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
}

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

.movie-card__poster {
    position: relative;
    display: block;
}

.movie-card__play {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(2, 132, 199, 0.92);
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(2, 132, 199, 0.32);
}

.movie-card__body {
    padding: 15px;
}

.movie-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--lake-700);
    font-size: 12px;
    font-weight: 800;
}

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

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

.movie-card__tags span,
.tag-cloud span {
    color: var(--lake-700);
    background: var(--lake-100);
}

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

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

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

.rank-panel,
.side-card,
.prose-card,
.player-card {
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.rank-panel,
.side-card {
    padding: 24px;
    position: sticky;
    top: 96px;
}

.rank-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.rank-panel__head h2,
.side-card h2 {
    margin: 0;
}

.rank-panel__head a {
    color: var(--lake-700);
    font-weight: 800;
}

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

.rank-item a {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 6px 12px;
    align-items: center;
    padding: 12px;
    border-radius: 16px;
    background: var(--mist-50);
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item a:hover {
    background: var(--lake-100);
    transform: translateX(4px);
}

.rank-item__number {
    grid-row: span 2;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: var(--white);
    background: linear-gradient(135deg, var(--mist-900), var(--lake-700));
    font-weight: 900;
}

.rank-item__title {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: 800;
}

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

.rank-list--page {
    gap: 12px;
}

.rank-list--page .rank-item a {
    grid-template-columns: 62px minmax(0, 1fr) auto;
}

.rank-list--page .rank-item__meta {
    grid-column: 3;
    grid-row: 1 / span 2;
}

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

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

.category-card {
    position: relative;
    min-height: 240px;
    overflow: hidden;
    border-radius: var(--radius-lg);
    color: var(--white);
    background: var(--mist-900);
    box-shadow: var(--shadow-card);
}

.category-card__image {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
}

.category-card__image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.92));
}

.category-card__content {
    position: relative;
    z-index: 2;
    display: flex;
    min-height: 240px;
    flex-direction: column;
    justify-content: flex-end;
    padding: 22px;
}

.category-card__content span,
.category-card__content strong {
    color: #bae6fd;
    font-size: 13px;
    font-weight: 900;
}

.category-card h2,
.category-card h3 {
    margin: 8px 0;
    font-size: 24px;
    line-height: 1.1;
}

.category-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
}

.page-hero,
.detail-hero {
    color: var(--white);
    background: radial-gradient(circle at 80% 0%, rgba(14, 165, 233, 0.25), transparent 32%),
                linear-gradient(120deg, var(--mist-900), var(--mist-800) 54%, var(--lake-900));
}

.page-hero {
    padding: 98px 0 76px;
}

.page-hero p {
    max-width: 760px;
    margin: 18px 0 0;
    color: #dbeafe;
    font-size: 19px;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    margin-bottom: 30px;
    padding: 16px;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.filter-bar__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-bar__chips button {
    min-height: 38px;
    padding: 0 13px;
    border-radius: 999px;
    color: var(--mist-700);
    background: var(--mist-100);
    font-weight: 800;
}

.filter-bar__chips button.is-active {
    color: var(--white);
    background: var(--lake-700);
}

.empty-state {
    margin-top: 26px;
    padding: 18px;
    text-align: center;
    color: var(--mist-600);
    border-radius: var(--radius-md);
    background: var(--white);
}

.detail-hero {
    padding: 44px 0 74px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
    color: #dbeafe;
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #ffffff;
}

.detail-hero__grid {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
}

.poster--detail {
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.34);
}

.detail-hero__line {
    margin: 18px 0 0;
    color: #dbeafe;
    font-size: 20px;
}

.meta-table {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 24px 0;
}

.meta-table div {
    padding: 13px 15px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.meta-table dt {
    color: #bae6fd;
    font-size: 12px;
    font-weight: 900;
}

.meta-table dd {
    margin: 4px 0 0;
    color: var(--white);
    font-weight: 760;
}

.player-card {
    overflow: hidden;
}

.player-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 24px;
    color: var(--white);
    background: linear-gradient(135deg, var(--mist-900), var(--lake-900));
}

.player-card__head h2 {
    margin: 0;
    font-size: 22px;
}

.player-card__head span {
    color: #bae6fd;
    font-weight: 800;
}

.player {
    position: relative;
    overflow: hidden;
    background: #000000;
}

.player video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player__overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 10px;
    color: var(--white);
    background: radial-gradient(circle, rgba(2, 132, 199, 0.18), rgba(0, 0, 0, 0.58));
}

.player__overlay.is-hidden {
    display: none;
}

.player__icon {
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    padding-left: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
    font-size: 30px;
}

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

.prose-card {
    padding: 28px;
}

.prose-card h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.prose-card p {
    margin: 0 0 14px;
    color: var(--mist-700);
}

.side-card p {
    color: var(--mist-600);
}

.site-footer {
    padding: 46px 0;
    color: #cbd5e1;
    background: var(--mist-900);
}

.site-footer__inner {
    display: grid;
    gap: 14px;
}

.logo--footer {
    color: var(--white);
}

.site-footer p {
    margin: 0;
    max-width: 680px;
}

.site-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.site-footer__links a {
    color: #bae6fd;
    font-weight: 800;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

    .hero-slide__content,
    .layout-two,
    .ranking-layout {
        grid-template-columns: 1fr;
    }

    .rank-panel,
    .side-card {
        position: static;
    }
}

@media (max-width: 760px) {
    .site-header__inner {
        min-height: 64px;
    }

    .main-nav {
        position: fixed;
        top: 64px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border-radius: 20px;
        background: rgba(255, 255, 255, 0.98);
        box-shadow: var(--shadow-soft);
    }

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

    .nav-toggle {
        display: block;
    }

    .hero {
        min-height: 840px;
    }

    .hero-slide__content {
        min-height: 680px;
        grid-template-columns: 1fr;
        gap: 26px;
        padding-top: 44px;
        padding-bottom: 190px;
    }

    .hero-slide__poster {
        width: 230px;
        justify-self: start;
    }

    .hero-dots {
        bottom: 178px;
    }

    .hero-search {
        bottom: 20px;
    }

    .search-panel__row,
    .filter-bar,
    .feature-strip,
    .content-layout,
    .detail-hero__grid,
    .meta-table {
        grid-template-columns: 1fr;
    }

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

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

    .section {
        padding: 48px 0;
    }

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

    .detail-hero__grid {
        gap: 24px;
    }

    .detail-hero__poster {
        width: 230px;
    }

    .rank-list--page .rank-item a {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .rank-list--page .rank-item__meta {
        grid-column: 2;
        grid-row: auto;
    }
}

@media (max-width: 480px) {
    .container,
    .site-header__inner {
        width: min(100% - 24px, 1180px);
    }

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

    .logo__text {
        font-size: 18px;
    }
}
