:root {
    color-scheme: light;
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --emerald-700: #047857;
    --emerald-600: #059669;
    --emerald-500: #10b981;
    --emerald-400: #34d399;
    --teal-500: #14b8a6;
    --white: #ffffff;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 10px 28px rgba(15, 23, 42, 0.09);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--slate-50);
    color: var(--slate-800);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.97), rgba(30, 41, 59, 0.97));
    color: var(--white);
    box-shadow: 0 8px 30px rgba(2, 6, 23, 0.24);
    backdrop-filter: blur(14px);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: var(--slate-950);
    background: linear-gradient(135deg, var(--emerald-400), var(--teal-500));
    box-shadow: 0 10px 24px rgba(16, 185, 129, 0.28);
}

.brand strong {
    display: block;
    font-size: 22px;
    line-height: 1.1;
    letter-spacing: 0.02em;
}

.brand small {
    display: block;
    margin-top: 2px;
    color: #cbd5e1;
    font-size: 12px;
}

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

.main-nav a,
.mobile-nav a {
    color: #e2e8f0;
    transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: var(--emerald-400);
}

.nav-toggle {
    display: none;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    padding: 8px 12px;
}

.mobile-nav {
    display: none;
    padding: 0 16px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-nav.open {
    display: block;
}

.mobile-nav a {
    display: block;
    padding: 10px 0;
}

.mobile-cat-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 16px;
    margin-top: 6px;
}

.hero-shell {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    color: var(--white);
    background: linear-gradient(135deg, var(--slate-900), var(--slate-800) 45%, #064e3b);
}

.hero-bg {
    position: absolute;
    inset: -25% -10% auto;
    height: 520px;
    background:
        radial-gradient(circle at 20% 35%, rgba(52, 211, 153, 0.24), transparent 36%),
        radial-gradient(circle at 78% 20%, rgba(20, 184, 166, 0.18), transparent 30%);
    filter: blur(4px);
}

.hero-panel {
    position: relative;
    padding: 78px 0 54px;
}

.hero-slide {
    display: none;
    grid-template-columns: 1.05fr 0.75fr;
    gap: 48px;
    align-items: center;
}

.hero-slide.active {
    display: grid;
}

.hero-copy {
    max-width: 680px;
}

.eyebrow,
.section-head span,
.section-title span,
.rank-title span,
.page-hero span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.12);
    color: var(--emerald-400);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 6px 12px;
}

.hero-copy h1 {
    margin: 22px 0 18px;
    font-size: clamp(42px, 6vw, 74px);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.hero-copy p {
    max-width: 610px;
    margin: 0 0 20px;
    color: #dbeafe;
    font-size: 20px;
}

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

.hero-tags span,
.tag-row span {
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    color: var(--slate-600);
    font-size: 12px;
    font-weight: 700;
    padding: 5px 10px;
}

.hero-tags span {
    background: rgba(255, 255, 255, 0.12);
    color: #d1fae5;
}

.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;
    border-radius: 999px;
    font-weight: 800;
    padding: 10px 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn.primary {
    color: var(--white);
    background: var(--emerald-600);
    box-shadow: 0 14px 28px rgba(5, 150, 105, 0.28);
}

.btn.primary:hover {
    background: var(--emerald-700);
}

.btn.ghost {
    color: var(--slate-900);
    background: var(--white);
}

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

.hero-art {
    position: relative;
    display: block;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.34);
    transform: perspective(900px) rotateY(-6deg) rotateX(2deg);
}

.hero-art::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.24));
}

.hero-art img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.hero-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 36px;
}

.hero-search {
    display: flex;
    width: min(620px, 100%);
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 36px rgba(2, 6, 23, 0.18);
}

.hero-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--slate-800);
    background: transparent;
    padding: 15px 20px;
}

.hero-search button {
    border: 0;
    color: var(--white);
    background: var(--emerald-600);
    font-weight: 800;
    padding: 0 26px;
}

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

.hero-dots button {
    width: 32px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
}

.hero-dots button.active {
    background: var(--emerald-400);
}

.section-block {
    margin-top: 72px;
}

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

.section-title {
    display: block;
    text-align: center;
}

.section-head h2,
.section-title h2,
.rank-title h2 {
    margin: 10px 0 6px;
    color: var(--slate-900);
    font-size: clamp(28px, 3vw, 38px);
    line-height: 1.15;
}

.section-head p,
.section-title p,
.page-hero p {
    margin: 0;
    color: var(--slate-600);
}

.section-head > a,
.text-link {
    color: var(--emerald-700);
    font-weight: 800;
}

.pill-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.pill-row a {
    border-radius: 999px;
    background: var(--white);
    box-shadow: var(--soft-shadow);
    color: var(--slate-700);
    font-weight: 800;
    padding: 12px 18px;
}

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

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

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

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

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

.movie-poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: var(--slate-200);
}

.movie-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.score {
    position: absolute;
    top: 12px;
    right: 12px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(5, 150, 105, 0.94);
    font-size: 13px;
    font-weight: 900;
    padding: 5px 9px;
}

.movie-body {
    padding: 16px;
}

.movie-meta {
    margin: 0 0 6px;
    color: var(--emerald-700);
    font-size: 12px;
    font-weight: 800;
}

.movie-body h3 {
    margin: 0 0 8px;
    color: var(--slate-900);
    font-size: 20px;
    line-height: 1.25;
}

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

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

.split-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 28px;
    align-items: start;
}

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

.category-tile {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--slate-900);
    box-shadow: var(--soft-shadow);
    padding: 22px;
}

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

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

.category-tile span,
.category-tile small {
    position: relative;
    z-index: 1;
    display: block;
}

.category-tile span {
    color: var(--white);
    font-size: 24px;
    font-weight: 900;
}

.category-tile small {
    max-width: 260px;
    margin-top: 10px;
    color: #d1fae5;
}

.rank-panel,
.content-card,
.overview-card,
.filter-bar,
.player-card {
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

.rank-panel {
    position: sticky;
    top: 96px;
    padding: 22px;
}

.rank-item {
    display: grid;
    grid-template-columns: 42px 58px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--slate-100);
}

.rank-item:last-child {
    border-bottom: 0;
}

.rank-no {
    color: var(--emerald-700);
    font-size: 20px;
    font-weight: 900;
}

.rank-item img {
    width: 58px;
    height: 76px;
    border-radius: 12px;
    object-fit: cover;
}

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

.rank-info strong {
    color: var(--slate-900);
    line-height: 1.3;
}

.rank-info em {
    margin-top: 3px;
    color: var(--slate-500);
    font-size: 12px;
    font-style: normal;
}

.rank-score {
    color: var(--emerald-700);
    font-weight: 900;
}

.page-hero,
.detail-hero {
    color: var(--white);
    background: linear-gradient(135deg, var(--slate-900), var(--slate-800) 50%, #065f46);
}

.page-hero {
    padding: 70px 0;
}

.page-hero h1 {
    margin: 16px 0 10px;
    font-size: clamp(40px, 5vw, 60px);
    line-height: 1.05;
}

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

.overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 54px;
}

.overview-card {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 22px;
    padding: 18px;
}

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

.overview-covers img {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 12px;
    object-fit: cover;
}

.overview-card h2 {
    margin: 4px 0 10px;
    color: var(--slate-900);
    font-size: 25px;
}

.overview-card p {
    color: var(--slate-600);
}

.filter-bar {
    display: grid;
    grid-template-columns: 1fr 180px 180px auto;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px;
}

.filter-bar input,
.filter-bar select,
.filter-bar button {
    width: 100%;
    border: 1px solid var(--slate-200);
    border-radius: 14px;
    background: var(--slate-50);
    color: var(--slate-700);
    outline: 0;
    padding: 12px 14px;
}

.filter-bar button {
    color: var(--white);
    background: var(--slate-800);
    font-weight: 800;
}

.empty-state {
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--soft-shadow);
    color: var(--slate-600);
    text-align: center;
    padding: 48px;
}

.rank-list-page {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 28px;
}

.rank-list-page .rank-item {
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--soft-shadow);
    border-bottom: 0;
    padding: 14px;
}

.detail-hero {
    padding: 54px 0;
}

.detail-layout {
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: 42px;
    align-items: center;
}

.detail-cover {
    overflow: hidden;
    border-radius: 30px;
    box-shadow: 0 30px 70px rgba(2, 6, 23, 0.34);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #cbd5e1;
    font-size: 14px;
}

.breadcrumb a {
    color: #a7f3d0;
}

.detail-copy h1 {
    margin: 18px 0 12px;
    font-size: clamp(36px, 5vw, 62px);
    line-height: 1.05;
}

.detail-line {
    max-width: 820px;
    margin: 0 0 18px;
    color: #e2e8f0;
    font-size: 20px;
}

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

.detail-meta span {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #d1fae5;
    font-weight: 800;
    padding: 7px 12px;
}

.tag-row.large span {
    background: rgba(255, 255, 255, 0.12);
    color: #d1fae5;
}

.detail-copy .btn {
    margin-top: 28px;
}

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

.player-card {
    position: relative;
    overflow: hidden;
    background: #000;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: var(--white);
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.28), rgba(2, 6, 23, 0.78));
    cursor: pointer;
    text-align: center;
}

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

.play-mark {
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    border-radius: 50%;
    color: var(--slate-900);
    background: var(--emerald-400);
    box-shadow: 0 18px 38px rgba(16, 185, 129, 0.36);
    font-size: 28px;
}

.player-cover strong {
    display: block;
    max-width: 80%;
    font-size: 24px;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 26px;
    margin-top: 34px;
}

.content-card {
    padding: 26px;
}

.content-card h2 {
    margin: 0 0 14px;
    color: var(--slate-900);
    font-size: 26px;
}

.content-card h2:not(:first-child) {
    margin-top: 28px;
}

.content-card p {
    margin: 0;
    color: var(--slate-700);
    font-size: 17px;
}

.side-card dl {
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 10px 14px;
    margin: 0;
}

.side-card dt {
    color: var(--slate-500);
}

.side-card dd {
    margin: 0;
    color: var(--slate-800);
    font-weight: 700;
}

.site-footer {
    margin-top: 86px;
    padding: 54px 0 24px;
    background: var(--slate-900);
    color: #cbd5e1;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 38px;
}

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

.footer-grid p {
    max-width: 460px;
    margin: 0;
    color: #94a3b8;
}

.footer-grid a {
    display: block;
    margin: 8px 0;
    color: #cbd5e1;
}

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

.copyright {
    width: min(1180px, calc(100% - 32px));
    margin: 34px auto 0;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #64748b;
    text-align: center;
    font-size: 14px;
}

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

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

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

    .rank-panel {
        position: static;
    }
}

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

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

    .hero-shell {
        min-height: auto;
    }

    .hero-panel {
        padding: 46px 0 36px;
    }

    .hero-slide,
    .hero-slide.active,
    .detail-layout,
    .overview-card {
        display: grid;
        grid-template-columns: 1fr;
    }

    .hero-art {
        transform: none;
    }

    .hero-bottom,
    .section-head {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-search {
        border-radius: 18px;
    }

    .movie-grid,
    .featured-grid,
    .catalog-grid,
    .category-grid,
    .overview-grid,
    .rank-list-page,
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-bar {
        grid-template-columns: 1fr;
    }
}

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

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

    .brand small {
        display: none;
    }

    .hero-copy h1,
    .detail-copy h1,
    .page-hero h1 {
        font-size: 34px;
    }

    .hero-copy p,
    .detail-line {
        font-size: 17px;
    }

    .movie-grid,
    .featured-grid,
    .catalog-grid,
    .category-grid,
    .overview-grid,
    .rank-list-page,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .rank-item {
        grid-template-columns: 34px 54px 1fr;
    }

    .rank-score {
        display: none;
    }
}
