:root {
    color-scheme: light;
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-400: #94a3b8;
    --slate-300: #cbd5e1;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --emerald-600: #059669;
    --emerald-500: #10b981;
    --emerald-400: #34d399;
    --teal-500: #14b8a6;
    --teal-400: #2dd4bf;
    --amber-500: #f59e0b;
    --shadow-soft: 0 20px 45px rgba(15, 23, 42, 0.16);
    --shadow-card: 0 12px 30px rgba(15, 23, 42, 0.12);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 12px;
    --max-width: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.96));
    color: #fff;
    box-shadow: 0 14px 32px rgba(2, 6, 23, 0.24);
    backdrop-filter: blur(16px);
}

.header-inner {
    width: min(100% - 32px, var(--max-width));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.brand-mark,
.footer-brand span {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--slate-950);
    background: linear-gradient(135deg, var(--emerald-400), var(--teal-400));
    box-shadow: 0 10px 22px rgba(20, 184, 166, 0.34);
}

.brand-text {
    font-size: 20px;
    background: linear-gradient(90deg, var(--emerald-400), var(--teal-400));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.desktop-nav a,
.mobile-nav a {
    padding: 10px 14px;
    border-radius: 12px;
    color: var(--slate-200);
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.header-search,
.mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-search input {
    border: 1px solid rgba(148, 163, 184, 0.28);
    outline: none;
    border-radius: 14px;
    color: #fff;
    background: rgba(15, 23, 42, 0.52);
    padding: 11px 14px;
    min-width: 230px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-search input:focus {
    border-color: var(--emerald-400);
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.18);
}

.header-search button,
.mobile-search button {
    border: 0;
    color: var(--slate-950);
    border-radius: 14px;
    padding: 11px 16px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--emerald-400), var(--teal-400));
    cursor: pointer;
}

.menu-button {
    display: none;
    margin-left: auto;
    border: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    width: 42px;
    height: 42px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    width: min(100% - 32px, var(--max-width));
    margin: 0 auto;
    padding: 0 0 18px;
}

.mobile-nav.is-open {
    display: grid;
    gap: 8px;
}

.mobile-category-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding-top: 8px;
}

.hero-slider {
    position: relative;
    min-height: 76vh;
    overflow: hidden;
    color: #fff;
    background: var(--slate-900);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    background-position: center;
    background-size: cover;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.hero-content {
    width: min(100% - 32px, var(--max-width));
    min-height: 76vh;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 420px);
    align-items: center;
    gap: 48px;
    padding: 64px 0;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 800;
    color: #064e3b;
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.95), rgba(45, 212, 191, 0.95));
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 20px 0 16px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.045em;
}

.hero-lead,
.page-hero p,
.detail-lead {
    max-width: 720px;
    color: var(--slate-200);
    font-size: clamp(17px, 2.3vw, 22px);
}

.hero-tags,
.card-tags,
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags {
    margin: 26px 0;
}

.hero-tags span,
.card-tags span {
    border-radius: 999px;
    padding: 6px 10px;
    color: var(--emerald-400);
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.28);
    font-size: 13px;
    font-weight: 700;
}

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

.primary-button,
.ghost-button,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 16px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    color: var(--slate-950);
    background: linear-gradient(135deg, var(--emerald-400), var(--teal-400));
    padding: 13px 20px;
    box-shadow: 0 16px 32px rgba(20, 184, 166, 0.3);
}

.primary-button.small {
    padding: 10px 14px;
    font-size: 14px;
}

.ghost-button {
    color: #fff;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.primary-button:hover,
.ghost-button:hover,
.text-link:hover {
    transform: translateY(-2px);
}

.hero-poster {
    position: relative;
    display: block;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 38px 80px rgba(2, 6, 23, 0.48);
    transform: rotate(1.5deg);
}

.hero-poster img {
    width: 100%;
    height: min(58vh, 560px);
    object-fit: cover;
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: rgba(15, 23, 42, 0.46);
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    backdrop-filter: blur(10px);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

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

.hero-dot.is-active {
    width: 34px;
    background: linear-gradient(135deg, var(--emerald-400), var(--teal-400));
}

.section {
    padding: 72px max(16px, calc((100vw - var(--max-width)) / 2));
}

.section-light {
    background: #fff;
}

.section-muted {
    background: linear-gradient(180deg, var(--slate-50), var(--slate-100));
}

.section-dark {
    color: #fff;
    background: var(--slate-900);
}

.section-rank {
    background: linear-gradient(135deg, #ecfdf5, #f0fdfa);
}

.section-head {
    max-width: 760px;
    margin-bottom: 34px;
}

.section-head-row {
    max-width: none;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
}

.section-head h2 {
    margin: 12px 0 8px;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.section-head p {
    color: var(--slate-600);
    font-size: 17px;
}

.text-link {
    color: var(--emerald-600);
    font-weight: 900;
}

.text-link.light {
    color: var(--emerald-400);
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06), var(--shadow-card);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.card-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--slate-900);
}

.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.movie-card:hover .card-cover img,
.compact-card:hover img,
.category-tile:hover img {
    transform: scale(1.08);
}

.card-year,
.rank-badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    left: 12px;
    border-radius: 999px;
    padding: 5px 9px;
    color: #fff;
    background: rgba(15, 23, 42, 0.74);
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.rank-badge {
    background: linear-gradient(135deg, var(--amber-500), #ef4444);
}

.card-play {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--slate-950);
    background: linear-gradient(135deg, var(--emerald-400), var(--teal-400));
    box-shadow: 0 14px 26px rgba(2, 6, 23, 0.28);
}

.card-body {
    padding: 18px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    color: var(--slate-500);
    font-size: 13px;
    font-weight: 700;
}

.card-meta a {
    color: var(--emerald-600);
}

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

.card-body h2 a:hover {
    color: var(--emerald-600);
}

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

.card-tags {
    gap: 6px;
}

.card-tags span {
    padding: 4px 8px;
    font-size: 12px;
}

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

.category-tile,
.compact-card {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 22px;
    background: var(--slate-800);
    box-shadow: var(--shadow-card);
}

.category-tile img,
.compact-card img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    opacity: 0.76;
    transition: transform 0.45s ease, opacity 0.2s ease;
}

.category-tile span,
.compact-card span {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 42px;
    color: #fff;
    font-size: 20px;
    font-weight: 900;
    text-shadow: 0 3px 16px rgba(0, 0, 0, 0.58);
}

.category-tile em {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 16px;
    color: var(--slate-200);
    font-size: 13px;
    font-style: normal;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 52px 118px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    border-radius: 18px;
    padding: 14px;
    background: #fff;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease;
}

.rank-row:hover {
    transform: translateY(-4px);
}

.rank-row strong {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, var(--emerald-500), var(--teal-500));
    font-size: 22px;
}

.rank-row img {
    width: 118px;
    height: 72px;
    object-fit: cover;
    border-radius: 14px;
}

.rank-row b,
.rank-row small {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-row small {
    color: var(--slate-500);
}

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

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

.compact-card img {
    height: 150px;
}

.compact-card span {
    bottom: 16px;
    font-size: 16px;
}

.page-hero,
.detail-hero {
    color: #fff;
    background-position: center;
    background-size: cover;
}

.page-hero {
    padding: 96px max(16px, calc((100vw - var(--max-width)) / 2));
}

.simple-hero {
    background: radial-gradient(circle at 15% 10%, rgba(52, 211, 153, 0.28), transparent 34%), linear-gradient(135deg, var(--slate-950), var(--slate-800));
}

.page-hero > div {
    max-width: 820px;
}

.filter-panel {
    margin-bottom: 28px;
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 22px;
    background: var(--slate-50);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.filter-search input {
    width: 100%;
    min-width: 0;
    color: var(--slate-900);
    background: #fff;
}

.filter-search.large input {
    padding: 16px 18px;
    font-size: 18px;
}

.filter-chips {
    margin-top: 14px;
}

.filter-chip {
    border: 1px solid rgba(5, 150, 105, 0.18);
    border-radius: 999px;
    padding: 8px 12px;
    color: var(--emerald-600);
    background: #fff;
    font-weight: 800;
    cursor: pointer;
}

.filter-chip.is-active,
.filter-chip:hover {
    color: #fff;
    background: linear-gradient(135deg, var(--emerald-500), var(--teal-500));
}

[data-movie-card].is-hidden {
    display: none;
}

.category-overview-list {
    width: min(100% - 32px, var(--max-width));
    margin: 34px auto 72px;
    display: grid;
    gap: 24px;
}

.category-overview-card {
    padding: 28px;
    border-radius: var(--radius-xl);
    background: #fff;
    box-shadow: var(--shadow-card);
}

.category-overview-head {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}

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

.category-overview-head p {
    margin: 0;
    color: var(--slate-600);
}

.breadcrumb {
    width: min(100% - 32px, var(--max-width));
    margin: 20px auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--slate-600);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--emerald-600);
    font-weight: 800;
}

.detail-hero {
    width: min(100% - 32px, var(--max-width));
    margin: 0 auto 34px;
    border-radius: 32px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 36px;
    padding: 34px;
    box-shadow: var(--shadow-soft);
}

.detail-poster img {
    width: 100%;
    height: 460px;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 24px 55px rgba(2, 6, 23, 0.42);
}

.detail-copy {
    align-self: center;
}

.detail-copy h1 {
    font-size: clamp(34px, 5vw, 58px);
}

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

.detail-meta div {
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.07);
}

.detail-meta dt {
    color: var(--slate-300);
    font-size: 12px;
    font-weight: 800;
}

.detail-meta dd {
    margin: 4px 0 0;
    color: #fff;
    font-weight: 900;
}

.detail-tags {
    margin-bottom: 26px;
}

.watch-section {
    width: min(100% - 32px, var(--max-width));
    margin: 0 auto 34px;
    border-radius: 28px;
    padding: 28px;
    background: var(--slate-950);
    color: #fff;
    box-shadow: var(--shadow-soft);
}

.watch-head h2 {
    margin: 10px 0 22px;
    font-size: clamp(26px, 4vw, 38px);
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000;
    aspect-ratio: 16 / 9;
}

.movie-player-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    border: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    color: #fff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.78));
    cursor: pointer;
}

.player-cover.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-circle {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--slate-950);
    background: linear-gradient(135deg, var(--emerald-400), var(--teal-400));
    font-size: 32px;
    box-shadow: 0 22px 45px rgba(20, 184, 166, 0.36);
}

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

.article-card {
    max-width: 940px;
    margin: 0 auto;
    border-radius: 28px;
    padding: 34px;
    background: #fff;
    box-shadow: var(--shadow-card);
}

.article-card h2 {
    margin: 0 0 14px;
    font-size: 28px;
}

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

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

.site-footer {
    color: var(--slate-300);
    background: var(--slate-950);
}

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

.footer-brand {
    color: #fff;
    font-size: 19px;
}

.footer-grid p {
    max-width: 460px;
    color: var(--slate-400);
}

.footer-grid h2 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 18px;
}

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

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

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    padding: 18px;
    color: var(--slate-500);
    text-align: center;
}

@media (max-width: 1100px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

    .menu-button {
        display: inline-grid;
        place-items: center;
    }

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

    .hero-poster {
        display: none;
    }

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

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

@media (max-width: 780px) {
    .header-inner {
        height: 64px;
    }

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

    .hero-slider,
    .hero-content {
        min-height: 68vh;
    }

    .hero-content {
        padding: 46px 0;
    }

    .hero-control {
        display: none;
    }

    .section,
    .page-hero {
        padding-top: 52px;
        padding-bottom: 52px;
    }

    .section-head-row,
    .category-overview-head {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .rank-row {
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .rank-row img {
        display: none;
    }

    .detail-hero,
    .watch-section {
        width: min(100% - 20px, var(--max-width));
        border-radius: 22px;
        padding: 20px;
    }

    .detail-poster img {
        height: 360px;
    }

    .detail-meta {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 26px;
    }
}

@media (max-width: 520px) {
    .brand-mark {
        width: 30px;
        height: 30px;
    }

    .mobile-category-links,
    .movie-grid,
    .movie-grid-featured,
    .category-grid,
    .wide-grid,
    .wide-grid.mini {
        grid-template-columns: 1fr;
    }

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

    .card-cover,
    .compact-card img,
    .category-tile img {
        height: auto;
    }

    .article-card {
        padding: 24px;
    }
}
