:root {
    color-scheme: light;
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --indigo: #4f46e5;
    --ink: #111827;
    --muted: #6b7280;
    --soft: #f3f6fb;
    --line: #e5e7eb;
    --white: #ffffff;
    --shadow: 0 22px 60px rgba(15, 23, 42, 0.14);
    --radius: 22px;
}

* {
    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(--ink);
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 42%, #f4f7fb 100%);
}

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-inline: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(229, 231, 235, 0.8);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.header-inner {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: #0f172a;
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--indigo));
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.32);
}

.desktop-nav,
.mobile-nav {
    align-items: center;
    gap: 6px;
}

.desktop-nav {
    display: flex;
}

.mobile-nav {
    display: none;
    padding: 0 16px 16px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    color: #334155;
    font-size: 14px;
    font-weight: 700;
    transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
    background: var(--blue);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: #eef4ff;
    padding: 9px;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    margin: 5px 0;
    background: var(--blue);
    border-radius: 999px;
}

.hero {
    position: relative;
    padding: 34px 0 18px;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 520px;
    background:
        radial-gradient(circle at 12% 20%, rgba(59, 130, 246, 0.22), transparent 30%),
        radial-gradient(circle at 88% 8%, rgba(79, 70, 229, 0.2), transparent 34%);
    pointer-events: none;
}

.hero-shell {
    position: relative;
    min-height: 520px;
    border-radius: 34px;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 54%, #2563eb 100%);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 42px;
    align-items: center;
    padding: 54px;
    opacity: 0;
    transform: translateX(24px) scale(0.98);
    pointer-events: none;
    transition: opacity 0.45s ease, transform 0.45s ease;
}

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

.hero-media {
    position: relative;
    min-height: 410px;
}

.hero-media img {
    width: 100%;
    height: 410px;
    object-fit: cover;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
}

.hero-glow {
    position: absolute;
    inset: 20px -18px -18px 34px;
    z-index: -1;
    border-radius: 30px;
    background: rgba(96, 165, 250, 0.28);
    filter: blur(18px);
}

.hero-copy {
    color: #ffffff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--blue);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-copy .eyebrow,
.detail-copy .eyebrow {
    color: #bfdbfe;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 14px 0 16px;
    font-size: clamp(34px, 6vw, 64px);
    line-height: 1.04;
    font-weight: 950;
    letter-spacing: -0.07em;
}

.hero-copy p,
.page-hero p,
.detail-copy p {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 18px;
    line-height: 1.8;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0;
}

.hero-tags span {
    display: inline-flex;
    padding: 7px 12px;
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 13px;
    font-weight: 800;
}

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

.btn,
.card-link,
.page-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 900;
    transition: 0.2s ease;
}

.btn.primary,
.card-link,
.page-links a {
    color: #ffffff;
    background: var(--blue);
    box-shadow: 0 16px 28px rgba(37, 99, 235, 0.24);
}

.btn.primary:hover,
.card-link:hover,
.page-links a:hover {
    background: var(--blue-dark);
    transform: translateY(-2px);
}

.btn.ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.hero-control {
    position: absolute;
    left: 54px;
    bottom: 34px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-prev,
.hero-next,
.hero-dot {
    border: 0;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
}

.hero-prev,
.hero-next {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
}

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

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

.hero-dot.active {
    width: 28px;
    background: #ffffff;
}

.feature-strip {
    padding: 18px 0 28px;
}

.features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.features div,
.category-tile,
.movie-card,
.ranking-panel,
.filter-panel,
.detail-content article,
.detail-content aside,
.player-shell,
.category-showcase {
    background: var(--white);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius);
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.07);
}

.features div {
    padding: 22px;
}

.features strong {
    display: block;
    font-size: 18px;
}

.features span {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 14px;
}

.section-block {
    padding: 34px 0;
}

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

.section-head h2 {
    margin: 6px 0 0;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.1;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.section-head a {
    color: var(--blue);
    font-weight: 900;
}

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

.category-tile {
    padding: 22px;
    transition: 0.2s ease;
}

.category-tile:hover,
.movie-card:hover,
.category-showcase:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 50px rgba(15, 23, 42, 0.12);
}

.category-tile strong {
    display: block;
    font-size: 20px;
    margin-bottom: 8px;
}

.category-tile span {
    color: var(--muted);
    line-height: 1.7;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 26px;
    align-items: start;
}

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

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

.movie-card {
    overflow: hidden;
    transition: 0.2s ease;
}

.card-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #dbeafe, #eef2ff);
}

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

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

.card-type,
.rank-badge {
    position: absolute;
    top: 12px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
}

.card-type {
    right: 12px;
    padding: 6px 10px;
    background: var(--blue);
}

.rank-badge {
    left: 12px;
    min-width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    background: #f97316;
}

.card-body {
    padding: 16px;
}

.card-body h3 {
    margin: 0;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 950;
}

.card-body h3 a:hover {
    color: var(--blue);
}

.card-body p {
    min-height: 46px;
    margin: 10px 0 12px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.card-link {
    width: 100%;
    min-height: 38px;
    font-size: 14px;
}

.ranking-panel {
    position: sticky;
    top: 88px;
    padding: 22px;
}

.section-head.compact {
    margin-bottom: 14px;
}

.section-head.compact h2 {
    font-size: 28px;
}

.mini-card {
    display: grid;
    grid-template-columns: auto 58px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.mini-card:last-child {
    border-bottom: 0;
}

.mini-rank {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: var(--blue);
    font-size: 12px;
    font-weight: 900;
}

.mini-card img {
    width: 58px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 12px;
}

.mini-card strong,
.mini-card em {
    display: block;
}

.mini-card strong {
    font-size: 14px;
    line-height: 1.4;
}

.mini-card em {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.page-hero {
    padding: 62px 0 24px;
}

.page-hero h1 {
    color: var(--ink);
}

.page-hero p {
    width: min(760px, 100%);
    color: var(--muted);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    color: #64748b;
    font-size: 14px;
}

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

.category-showcase-grid,
.rank-hero-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.category-showcase,
.rank-hero-card {
    position: relative;
    min-height: 260px;
    padding: 24px;
    overflow: hidden;
    color: #ffffff;
}

.category-showcase img,
.rank-hero-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.shade,
.rank-hero-card::after {
    position: absolute;
    inset: 0;
    z-index: 1;
    content: "";
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.86));
}

.category-showcase strong,
.category-showcase em,
.rank-hero-card span,
.rank-hero-card strong,
.rank-hero-card em {
    position: relative;
    z-index: 2;
    display: block;
}

.category-showcase strong,
.rank-hero-card strong {
    margin-top: 130px;
    font-size: 28px;
    font-weight: 950;
}

.category-showcase em,
.rank-hero-card em {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.82);
    font-style: normal;
    line-height: 1.7;
}

.rank-hero-card {
    display: block;
    border-radius: 26px;
    overflow: hidden;
    min-height: 320px;
    box-shadow: var(--shadow);
}

.rank-hero-card span {
    width: fit-content;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.92);
    font-weight: 950;
}

.filter-panel {
    padding: 22px;
    margin-top: 18px;
}

.filter-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 14px;
}

.filter-grid label {
    display: grid;
    gap: 7px;
    color: #475569;
    font-size: 13px;
    font-weight: 900;
}

.filter-grid input,
.filter-grid select {
    width: 100%;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0 14px;
    color: var(--ink);
    background: #ffffff;
    outline: 0;
}

.filter-grid input:focus,
.filter-grid select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.empty-state {
    margin-top: 24px;
    padding: 28px;
    border-radius: 20px;
    text-align: center;
    color: var(--muted);
    background: #ffffff;
    border: 1px solid var(--line);
}

.detail-hero {
    padding: 44px 0;
    background: linear-gradient(135deg, #0f172a, #1d4ed8);
}

.detail-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 38px;
    align-items: center;
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.detail-copy {
    color: #ffffff;
}

.detail-copy .breadcrumb {
    color: rgba(255, 255, 255, 0.72);
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.detail-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    color: #e0f2fe;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-weight: 800;
}

.player-section {
    padding: 38px 0 0;
}

.player-shell {
    position: relative;
    overflow: hidden;
    background: #020617;
}

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

.watch-button {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    width: 100%;
    height: 100%;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.2), rgba(15, 23, 42, 0.64));
    transition: opacity 0.2s ease;
}

.watch-button span {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--blue);
    box-shadow: 0 24px 60px rgba(37, 99, 235, 0.42);
    font-size: 30px;
}

.watch-button strong {
    padding: 9px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
}

.player-shell.playing .watch-button {
    opacity: 0;
    pointer-events: none;
}

.player-message {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    color: #fecaca;
    font-size: 14px;
    pointer-events: none;
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    padding: 34px 0 8px;
    align-items: start;
}

.detail-content article,
.detail-content aside {
    padding: 26px;
}

.detail-content h2 {
    margin: 0 0 14px;
    font-size: 26px;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.detail-content p {
    margin: 0 0 24px;
    color: #334155;
    font-size: 16px;
    line-height: 1.92;
}

.detail-content dl {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px 14px;
    margin: 0 0 22px;
}

.detail-content dt {
    color: var(--muted);
    font-weight: 800;
}

.detail-content dd {
    margin: 0;
    color: var(--ink);
    font-weight: 800;
}

.site-footer {
    margin-top: 50px;
    padding: 46px 0;
    color: #cbd5e1;
    background: #0f172a;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 36px;
}

.footer-brand {
    color: #ffffff;
}

.site-footer p {
    margin: 16px 0 0;
    max-width: 520px;
    line-height: 1.8;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 16px;
}

.site-footer a:not(.brand) {
    display: block;
    margin: 9px 0;
    color: #cbd5e1;
}

.site-footer a:hover {
    color: #ffffff;
}

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

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

    .ranking-panel {
        position: static;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .mobile-nav.open {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-shell {
        min-height: 760px;
        border-radius: 24px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        padding: 28px;
        gap: 24px;
    }

    .hero-media,
    .hero-media img {
        min-height: 0;
        height: 320px;
    }

    .hero-control {
        left: 28px;
        bottom: 24px;
    }

    .features,
    .category-grid,
    .category-showcase-grid,
    .rank-hero-grid,
    .footer-grid,
    .filter-grid,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .detail-grid {
        align-items: start;
    }

    .detail-poster {
        max-width: 280px;
    }
}

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

    .brand {
        font-size: 15px;
    }

    .hero-shell {
        min-height: 720px;
    }

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

    .hero-copy p,
    .page-hero p,
    .detail-copy p {
        font-size: 15px;
    }

    .movie-grid,
    .movie-grid.wide {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .card-body {
        padding: 12px;
    }

    .card-body h3 {
        font-size: 15px;
    }

    .card-body p {
        font-size: 13px;
    }

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

    .watch-button span {
        width: 64px;
        height: 64px;
    }
}
