:root {
    color-scheme: light;
    --bg: #f8fafc;
    --bg-soft: #eff6ff;
    --text: #0f172a;
    --muted: #64748b;
    --line: rgba(15, 23, 42, 0.1);
    --panel: rgba(255, 255, 255, 0.88);
    --panel-strong: #ffffff;
    --brand: #dc2626;
    --brand-dark: #b91c1c;
    --accent: #f59e0b;
    --shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(239, 68, 68, 0.12), transparent 34rem),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.16), transparent 32rem),
        linear-gradient(135deg, #f8fafc 0%, #eff6ff 48%, #f1f5f9 100%);
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
}

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

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

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: #fff;
    border-radius: 14px;
    background: linear-gradient(135deg, #ef4444, #991b1b);
    box-shadow: 0 12px 28px rgba(220, 38, 38, 0.28);
}

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

.site-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.site-nav a {
    padding: 10px 14px;
    color: #334155;
    border-radius: 999px;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease;
}

.site-nav a:hover {
    color: var(--brand);
    background: rgba(220, 38, 38, 0.08);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #0f172a;
    border-radius: 999px;
}

.hero {
    position: relative;
    overflow: hidden;
}

.hero-stage {
    position: relative;
    height: 610px;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.9s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hero-slide img,
.page-hero > img,
.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.62) 42%, rgba(2, 6, 23, 0.08) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.96), transparent 44%);
}

.hero-content {
    position: absolute;
    left: max(32px, calc((100vw - 1180px) / 2));
    bottom: 82px;
    width: min(720px, calc(100% - 64px));
    color: #fff;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 7px 12px;
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.13);
    border: 1px solid rgba(251, 191, 36, 0.22);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

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

.hero p,
.page-hero p,
.detail-one-line {
    margin: 0 0 22px;
    max-width: 720px;
    font-size: clamp(16px, 2vw, 20px);
    color: rgba(255, 255, 255, 0.84);
}

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

.hero-meta span,
.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

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

.hero-tags span,
.detail-tags a,
.tag-row span {
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 13px;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
}

.hero .hero-tags span {
    color: #fecaca;
    background: rgba(239, 68, 68, 0.18);
}

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

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

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

.btn-primary {
    color: #fff;
    background: var(--brand);
    box-shadow: 0 16px 32px rgba(220, 38, 38, 0.26);
}

.btn-primary:hover {
    background: var(--brand-dark);
}

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

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

.hero-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.52);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.active {
    width: 34px;
    background: #fff;
}

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

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

.section-head.centered {
    display: grid;
    justify-items: center;
    text-align: center;
    margin-bottom: 24px;
}

.section-head.compact-head {
    align-items: center;
}

.section-head h2 {
    margin: 10px 0 0;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.08;
    letter-spacing: -0.06em;
}

.section-head p {
    margin: 10px 0 0;
    max-width: 690px;
    color: var(--muted);
}

.more-link {
    color: var(--brand);
    font-weight: 900;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
}

.search-box span {
    color: var(--brand);
    font-weight: 900;
}

.search-box input {
    width: 100%;
    border: 0;
    outline: none;
    color: var(--text);
    background: transparent;
}

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

.filter-chips button {
    border: 0;
    cursor: pointer;
    padding: 10px 13px;
    color: #334155;
    background: #fff;
    border-radius: 999px;
    font-weight: 800;
}

.filter-chips button.active,
.filter-chips button:hover {
    color: #fff;
    background: var(--brand);
}

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

.category-tile,
.category-card,
.promo-panel,
.detail-side,
.detail-article,
.filter-panel {
    backdrop-filter: blur(18px);
}

.category-tile {
    min-height: 148px;
    padding: 22px;
    border-radius: 24px;
    border: 1px solid var(--line);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(239, 246, 255, 0.72));
    box-shadow: 0 16px 46px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.movie-card:hover,
.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.category-tile span {
    font-size: 20px;
    font-weight: 900;
}

.category-tile p {
    color: var(--muted);
    margin: 10px 0 0;
    font-size: 14px;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #1e293b, #020617);
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), transparent 58%);
}

.poster-play {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 7px 11px;
    color: #fff;
    background: var(--brand);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    min-width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, #f97316, #dc2626);
    border-radius: 999px;
}

.movie-card-body {
    padding: 14px;
}

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 12px;
}

.movie-card h2 {
    margin: 0;
    font-size: 17px;
    line-height: 1.25;
}

.movie-card h2 a:hover {
    color: var(--brand);
}

.movie-card p {
    min-height: 46px;
    margin: 8px 0 12px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.tag-row span {
    font-size: 12px;
    padding: 4px 8px;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 28px;
    align-items: stretch;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 38px 62px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid var(--line);
    transition: transform 0.2s ease, border 0.2s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    border-color: rgba(220, 38, 38, 0.35);
}

.rank-item strong {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: #fff;
    border-radius: 12px;
    background: var(--brand);
}

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

.rank-item b,
.rank-item em {
    display: block;
}

.rank-item b {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 16px;
}

.rank-item em {
    margin-top: 5px;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.promo-panel {
    position: relative;
    overflow: hidden;
    padding: 34px;
    color: #fff;
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(248, 113, 113, 0.54), transparent 20rem),
        linear-gradient(135deg, #111827, #450a0a);
    box-shadow: var(--shadow);
}

.promo-panel span {
    color: #fbbf24;
    font-weight: 900;
}

.promo-panel h2 {
    margin: 12px 0;
    font-size: clamp(28px, 4vw, 46px);
    letter-spacing: -0.06em;
}

.promo-panel p {
    color: rgba(255, 255, 255, 0.78);
}

.page-hero {
    position: relative;
    min-height: 360px;
    display: grid;
    align-items: end;
    padding: 120px max(32px, calc((100vw - 1180px) / 2)) 52px;
    color: #fff;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(239, 68, 68, 0.55), transparent 28rem),
        linear-gradient(135deg, #020617, #1e1b4b 46%, #7f1d1d);
}

.page-hero.small-hero,
.page-hero.category-hero {
    min-height: 310px;
}

.page-hero > div {
    position: relative;
    z-index: 2;
    width: min(760px, 100%);
}

.ranking-hero > img {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.ranking-hero .hero-overlay {
    z-index: 1;
}

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

.category-card {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
    padding: 16px;
    border-radius: 28px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-cover-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 7px;
}

.category-cover-row img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 12px;
    background: #0f172a;
}

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

.category-card p {
    color: var(--muted);
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: #020617;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.42;
    filter: blur(2px);
}

.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.66), rgba(2, 6, 23, 0.88)),
        linear-gradient(0deg, #020617, transparent 55%);
}

.detail-layout {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 560px;
    margin: 0 auto;
    padding: 86px 0 52px;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 36px;
    align-items: end;
}

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

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

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

.detail-info h1 {
    max-width: 840px;
}

.detail-info .btn {
    margin-top: 22px;
}

.player-section {
    padding-top: 42px;
}

.player-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.2);
}

.player-wrap video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.play-mask {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    cursor: pointer;
    background:
        radial-gradient(circle, rgba(220, 38, 38, 0.38), transparent 12rem),
        rgba(2, 6, 23, 0.28);
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

.play-mask.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-mask span {
    width: 86px;
    height: 86px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 20px 46px rgba(0, 0, 0, 0.28);
    position: relative;
}

.play-mask span::after {
    content: "";
    position: absolute;
    left: 35px;
    top: 26px;
    width: 0;
    height: 0;
    border-top: 17px solid transparent;
    border-bottom: 17px solid transparent;
    border-left: 24px solid var(--brand);
}

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

.detail-article,
.detail-side {
    padding: 26px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--line);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.detail-text-block + .detail-text-block {
    margin-top: 28px;
}

.detail-text-block h2,
.detail-side h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.detail-text-block p {
    margin: 0;
    color: #334155;
    line-height: 1.9;
}

.side-links {
    display: grid;
    gap: 10px;
}

.side-links a {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.side-links span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 800;
}

.side-links em {
    color: var(--muted);
    font-style: normal;
}

.site-footer {
    margin-top: 40px;
    color: #cbd5e1;
    background: #020617;
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0;
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr;
    gap: 28px;
}

.footer-logo {
    color: #fff;
    font-size: 22px;
}

.site-footer p {
    max-width: 520px;
    color: #94a3b8;
}

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

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

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 26px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    font-size: 14px;
}

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

@media (max-width: 1180px) {
    .movie-grid,
    .movie-grid.large-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

@media (max-width: 860px) {
    .nav-toggle {
        display: block;
    }

    .site-nav {
        position: absolute;
        top: 72px;
        left: 16px;
        right: 16px;
        display: none;
        padding: 12px;
        border-radius: 20px;
        background: rgba(255, 255, 255, 0.96);
        box-shadow: var(--shadow);
        border: 1px solid var(--line);
    }

    .site-nav.is-open {
        display: grid;
    }

    .hero-stage {
        height: 560px;
    }

    .hero-content {
        left: 20px;
        bottom: 72px;
        width: calc(100% - 40px);
    }

    .filter-panel,
    .split-layout,
    .detail-layout,
    .detail-content-grid,
    .footer-grid,
    .category-list-grid,
    .category-card {
        grid-template-columns: 1fr;
    }

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

    .rank-list.two-column {
        grid-template-columns: 1fr;
    }

    .detail-layout {
        align-items: start;
        padding-top: 42px;
    }

    .detail-poster {
        width: min(240px, 68vw);
    }
}

@media (max-width: 620px) {
    .nav-shell,
    .section-shell,
    .footer-grid,
    .footer-bottom,
    .detail-layout {
        width: min(100% - 22px, 1180px);
    }

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

    .hero-stage {
        height: 540px;
    }

    .hero-meta span,
    .detail-meta span {
        font-size: 13px;
    }

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

    .section-head {
        display: grid;
        gap: 12px;
    }

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

    .movie-card-body {
        padding: 12px;
    }

    .movie-card p {
        display: none;
    }

    .tag-row {
        margin-top: 10px;
    }

    .page-hero {
        min-height: 280px;
        padding: 96px 16px 38px;
    }

    .detail-info h1,
    .hero h1,
    .page-hero h1 {
        letter-spacing: -0.05em;
    }

    .play-mask span {
        width: 68px;
        height: 68px;
    }

    .play-mask span::after {
        left: 28px;
        top: 21px;
        border-top-width: 13px;
        border-bottom-width: 13px;
        border-left-width: 20px;
    }
}
