:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.72);
    --line: rgba(148, 163, 184, 0.18);
    --text: #ffffff;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --accent: #ef4444;
    --accent-soft: rgba(239, 68, 68, 0.14);
    --radius: 22px;
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}

* {
    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 32rem),
        linear-gradient(135deg, #020617 0%, #0f172a 52%, #020617 100%);
}

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

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

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 80;
    background: rgba(2, 6, 23, 0.92);
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    backdrop-filter: blur(18px);
}

.nav-shell {
    width: min(1280px, calc(100% - 32px));
    height: 74px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #ef4444, #991b1b);
    box-shadow: 0 0 32px rgba(239, 68, 68, 0.35);
    font-size: 15px;
}

.brand-text strong {
    display: block;
    font-size: 20px;
    line-height: 1;
    letter-spacing: -0.02em;
}

.brand-text small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
    flex: 1 1 auto;
}

.nav-link {
    color: var(--muted-strong);
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
}

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

.header-search input,
.filter-bar input {
    width: 260px;
    height: 42px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
    color: var(--text);
    outline: none;
    padding: 0 16px;
}

.header-search input:focus,
.filter-bar input:focus {
    border-color: rgba(239, 68, 68, 0.7);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.16);
}

.header-search button,
.primary-btn,
.ghost-btn {
    height: 42px;
    border: 0;
    border-radius: 999px;
    padding: 0 18px;
    font-weight: 700;
    cursor: pointer;
}

.header-search button,
.primary-btn {
    color: #ffffff;
    background: var(--accent);
}

.ghost-btn {
    display: inline-flex;
    align-items: center;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.68);
    border: 1px solid rgba(148, 163, 184, 0.28);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 14px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.76);
}

.mobile-panel {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
}

.mobile-nav-link {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    color: var(--muted-strong);
}

.mobile-nav-link:hover {
    background: rgba(239, 68, 68, 0.12);
    color: #ffffff;
}

.page-main {
    padding-top: 74px;
}

.hero-carousel {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: var(--bg);
}

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

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

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, #020617 0%, rgba(2, 6, 23, 0.68) 48%, rgba(2, 6, 23, 0.18) 100%),
        linear-gradient(to right, rgba(2, 6, 23, 0.84), transparent 70%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding-top: 280px;
    max-width: 780px;
}

.hero-pill,
.section-kicker,
.detail-category {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    padding: 8px 14px;
    color: #fecaca;
    background: rgba(239, 68, 68, 0.18);
    border: 1px solid rgba(239, 68, 68, 0.32);
    font-size: 13px;
    font-weight: 700;
}

.hero-content h1,
.hero-content h2 {
    margin: 18px 0 16px;
    max-width: 760px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero-content p {
    max-width: 680px;
    margin: 0 0 28px;
    color: var(--muted-strong);
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.8;
}

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

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 52px;
    height: 52px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 999px;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.55);
    backdrop-filter: blur(10px);
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
}

.hero-prev {
    left: 28px;
}

.hero-next {
    right: 28px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.65);
    cursor: pointer;
    transition: all 0.25s ease;
}

.hero-dot.is-active {
    width: 32px;
    background: var(--accent);
}

.content-section,
.detail-layout,
.breadcrumb,
.page-hero {
    width: min(1280px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.content-section {
    padding: 56px 0;
}

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

.section-heading h2,
.page-hero h1,
.detail-article h1,
.list-panel h2,
.side-panel h2 {
    margin: 10px 0 0;
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1.14;
    letter-spacing: -0.03em;
}

.section-heading p,
.page-hero p {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.75;
}

.with-link > a {
    color: #fca5a5;
    font-weight: 700;
}

.movie-grid {
    display: grid;
    gap: 22px;
}

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

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

.movie-card {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-card);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    border-color: rgba(239, 68, 68, 0.58);
    background: rgba(15, 23, 42, 0.92);
}

.card-link {
    display: block;
    height: 100%;
}

.poster-wrap {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #0f172a;
}

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

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

.poster-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.88), transparent 60%);
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.9);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
    transition: all 0.25s ease;
}

.movie-card:hover .poster-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.year-badge,
.rank-badge {
    position: absolute;
    z-index: 3;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 800;
    background: rgba(2, 6, 23, 0.76);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.year-badge {
    right: 12px;
    bottom: 12px;
}

.rank-badge {
    left: 12px;
    top: 12px;
    background: rgba(239, 68, 68, 0.92);
}

.card-body {
    padding: 18px;
}

.card-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    font-size: 13px;
}

.card-body h3 {
    margin: 10px 0 8px;
    min-height: 2.8em;
    color: #ffffff;
    font-size: 17px;
    line-height: 1.35;
}

.card-body p {
    margin: 0;
    min-height: 3.6em;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tag-row span {
    border-radius: 999px;
    padding: 5px 9px;
    color: #cbd5e1;
    background: rgba(148, 163, 184, 0.1);
    font-size: 12px;
}

.feature-card .poster-wrap {
    aspect-ratio: 16 / 9;
}

.scroll-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(270px, 310px);
    gap: 20px;
    padding: 8px 2px 18px;
    overflow-x: auto;
    scrollbar-width: thin;
}

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

.category-tile,
.overview-card,
.list-panel,
.player-card,
.detail-article,
.side-panel,
.side-poster,
.page-hero {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.86), rgba(30, 41, 59, 0.48));
    box-shadow: var(--shadow);
}

.category-tile {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 150px;
    padding: 22px;
    overflow: hidden;
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.category-tile:hover,
.overview-card:hover {
    border-color: rgba(239, 68, 68, 0.58);
    transform: translateY(-3px);
}

.category-tile span {
    margin-bottom: 10px;
    font-size: 22px;
    font-weight: 800;
}

.category-tile small {
    color: var(--muted);
    line-height: 1.65;
}

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

.list-panel {
    padding: 28px;
}

.mini-card {
    margin-top: 16px;
    border-radius: 16px;
}

.mini-card-link {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 12px;
}

.mini-card img {
    width: 112px;
    height: 70px;
    border-radius: 12px;
    object-fit: cover;
    flex: 0 0 auto;
}

.mini-card strong {
    display: block;
    color: #ffffff;
    line-height: 1.45;
}

.mini-card small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
}

.inner-page {
    padding-bottom: 64px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 28px;
    color: var(--muted);
    font-size: 14px;
}

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

.small-hero {
    margin-top: 28px;
    padding: 42px;
}

.filter-bar {
    margin-top: 24px;
}

.filter-bar input {
    width: min(520px, 100%);
}

.overview-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 20px;
    overflow: hidden;
}

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

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

.overview-card h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.overview-card p {
    margin: 0 0 16px;
    color: var(--muted);
    line-height: 1.7;
}

.overview-card span {
    color: #fca5a5;
    font-weight: 800;
}

.ranking-list {
    display: grid;
    gap: 14px;
}

.ranking-item {
    border-radius: 18px;
}

.ranking-item a {
    display: grid;
    grid-template-columns: 64px 120px minmax(0, 1fr) 70px;
    align-items: center;
    gap: 18px;
    padding: 14px;
}

.ranking-number {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #ffffff;
    background: rgba(239, 68, 68, 0.86);
    font-weight: 900;
}

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

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

.ranking-info strong {
    font-size: 18px;
}

.ranking-info small,
.ranking-info em {
    margin-top: 6px;
    color: var(--muted);
    font-style: normal;
    line-height: 1.5;
}

.ranking-item b {
    color: #fca5a5;
    font-size: 24px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 26px;
    padding-top: 28px;
}

.detail-main {
    min-width: 0;
}

.player-card {
    overflow: hidden;
}

.video-shell {
    position: relative;
    background: #000000;
    aspect-ratio: 16 / 9;
}

.movie-player {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
}

.play-cover {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.55), rgba(2, 6, 23, 0.16));
    cursor: pointer;
}

.play-cover[hidden] {
    display: none;
}

.play-cover span {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.92);
    box-shadow: 0 0 40px rgba(239, 68, 68, 0.45);
    font-size: 26px;
}

.detail-article {
    margin-top: 22px;
    padding: 34px;
}

.detail-article h1 {
    margin-top: 18px;
}

.detail-meta {
    margin: 20px 0;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
}

.lead-text {
    color: #e2e8f0;
    font-size: 18px;
    line-height: 1.8;
}

.detail-article h2 {
    margin: 28px 0 12px;
    font-size: 24px;
}

.detail-article p {
    color: var(--muted-strong);
    line-height: 1.9;
}

.detail-tags {
    margin: 20px 0 4px;
}

.detail-aside {
    position: sticky;
    top: 96px;
    height: fit-content;
}

.side-poster {
    overflow: hidden;
}

.side-poster img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.side-poster div {
    padding: 18px;
}

.side-poster strong,
.side-poster small {
    display: block;
}

.side-poster small {
    margin-top: 6px;
    color: #fca5a5;
}

.side-panel {
    margin-top: 20px;
    padding: 20px;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.8);
}

.footer-grid {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 28px;
    padding: 34px 0;
}

.footer-brand {
    margin-bottom: 10px;
    font-size: 22px;
    font-weight: 900;
}

.site-footer p,
.site-footer h3 {
    margin: 0;
}

.site-footer p {
    color: var(--muted);
    line-height: 1.7;
}

.site-footer h3 {
    margin-bottom: 12px;
    font-size: 16px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}

.footer-links a {
    color: var(--muted);
    font-size: 14px;
}

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

.is-hidden {
    display: none !important;
}

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

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

    .header-search input {
        width: 220px;
    }

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

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

    .detail-aside {
        position: static;
    }
}

@media (max-width: 760px) {
    .nav-shell {
        height: 66px;
        gap: 12px;
    }

    .brand-text small,
    .header-search {
        display: none;
    }

    .page-main {
        padding-top: 66px;
    }

    .hero-carousel {
        min-height: 560px;
    }

    .hero-content {
        padding-top: 210px;
    }

    .hero-arrow {
        display: none;
    }

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

    .grid-four,
    .grid-three,
    .category-grid,
    .overview-grid,
    .dual-lists,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .ranking-item b {
        display: none;
    }

    .ranking-item img {
        width: 86px;
        height: 62px;
    }

    .small-hero,
    .detail-article {
        padding: 24px;
    }

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