:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(148, 163, 184, 0.18);
    --text: #ffffff;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --red: #ef4444;
    --red-dark: #dc2626;
    --red-soft: rgba(239, 68, 68, 0.18);
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
    --radius: 24px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(239, 68, 68, 0.16), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
    color: var(--text);
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 60;
    border-bottom: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.94);
    backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.brand-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: var(--red-soft);
    color: #f87171;
    box-shadow: 0 0 32px rgba(239, 68, 68, 0.24);
}

.brand-copy {
    display: grid;
    gap: 2px;
}

.brand-copy strong,
.footer-brand strong {
    font-size: 22px;
    letter-spacing: -0.03em;
}

.brand-copy small {
    color: var(--muted);
    font-size: 12px;
}

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

.desktop-nav a,
.mobile-links a,
.footer-links a {
    color: var(--muted-strong);
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-links a:hover,
.footer-links a:hover,
.section-more:hover,
.text-link:hover {
    color: #f87171;
}

.nav-search,
.mobile-search,
.filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select {
    min-width: 0;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
    color: var(--text);
    outline: none;
    padding: 12px 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.nav-search input {
    width: 210px;
}

.nav-search input:focus,
.mobile-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: rgba(239, 68, 68, 0.7);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.nav-search button,
.mobile-search button,
.primary-btn,
.ghost-btn,
.text-link {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    padding: 12px 18px;
    font-weight: 700;
}

.nav-search button,
.mobile-search button,
.primary-btn {
    background: var(--red);
    color: #ffffff;
    box-shadow: 0 14px 30px rgba(239, 68, 68, 0.2);
}

.nav-search button:hover,
.mobile-search button:hover,
.primary-btn:hover {
    background: var(--red-dark);
}

.ghost-btn {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(15, 23, 42, 0.5);
    color: #ffffff;
    backdrop-filter: blur(12px);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.7);
    cursor: pointer;
    padding: 10px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #ffffff;
    border-radius: 999px;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    padding: 18px 16px 22px;
    background: rgba(2, 6, 23, 0.98);
}

.mobile-panel.is-open {
    display: block;
}

.mobile-search {
    width: min(720px, 100%);
    margin: 0 auto 16px;
}

.mobile-search input {
    flex: 1;
}

.mobile-links {
    width: min(720px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.mobile-links a {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.62);
}

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

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: #020617;
}

.hero-track,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    transition: opacity 1s ease;
    pointer-events: none;
}

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

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

.hero-overlay,
.detail-bg-mask {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 46%, rgba(2, 6, 23, 0.22) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.36) 45%, rgba(2, 6, 23, 0.12) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1280px, calc(100% - 32px));
    min-height: 620px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 90px 0 92px;
    max-width: min(1280px, calc(100% - 32px));
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: max-content;
    max-width: 100%;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.88);
    color: #ffffff;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.section-kicker {
    background: var(--red-soft);
    color: #fca5a5;
    margin-bottom: 14px;
}

.hero h1 {
    max-width: 820px;
    margin: 20px 0 16px;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 0.96;
    letter-spacing: -0.06em;
}

.hero p {
    max-width: 720px;
    margin: 0 0 30px;
    color: var(--muted-strong);
    font-size: 19px;
    line-height: 1.75;
}

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

.hero-arrow {
    position: absolute;
    z-index: 3;
    top: 50%;
    width: 52px;
    height: 52px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.58);
    color: #ffffff;
    font-size: 34px;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.75);
    cursor: pointer;
    transition: width 0.2s ease, background-color 0.2s ease;
}

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

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

.inner-main .section-shell:first-child {
    padding-top: 72px;
}

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

.section-heading.compact {
    margin-bottom: 20px;
}

.section-heading h2,
.page-hero-small h1,
.detail-copy h1,
.detail-article h2,
.ranking-aside h2,
.site-footer h2 {
    margin: 0;
    letter-spacing: -0.04em;
}

.section-heading h2 {
    font-size: clamp(28px, 4vw, 42px);
}

.section-more,
.text-link {
    color: #f87171;
    font-weight: 800;
}

.search-panel,
.page-hero-small,
.feature-panel,
.player-card,
.detail-article article,
.ranking-aside,
.category-overview-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-panel {
    margin-top: -48px;
    position: relative;
    z-index: 4;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
    align-items: center;
    gap: 24px;
    padding: 28px;
}

.search-panel h2,
.page-hero-small h1 {
    margin: 0;
    font-size: clamp(30px, 5vw, 52px);
}

.compact-filter input,
.large-filter input {
    flex: 1;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.68);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
    transition: transform 0.24s ease, border-color 0.24s ease, background-color 0.24s ease;
}

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

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

.movie-card-featured .movie-poster {
    aspect-ratio: 16 / 9;
}

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

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

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

.poster-play {
    position: absolute;
    right: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--red);
    color: #ffffff;
    box-shadow: 0 12px 28px rgba(239, 68, 68, 0.34);
}

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

.movie-meta,
.detail-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

.movie-meta span,
.detail-meta span,
.tag-row span {
    display: inline-flex;
    max-width: 100%;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.1);
    padding: 5px 9px;
}

.movie-card h3 {
    margin: 14px 0 8px;
    font-size: 19px;
    line-height: 1.35;
}

.movie-card h3 a:hover {
    color: #f87171;
}

.movie-card p {
    min-height: 46px;
    margin: 0 0 14px;
    color: var(--muted-strong);
    font-size: 14px;
    line-height: 1.6;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #fca5a5;
    font-size: 12px;
}

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

.category-tile {
    min-height: 144px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 22px;
    background:
        linear-gradient(135deg, rgba(239, 68, 68, 0.16), transparent),
        rgba(15, 23, 42, 0.7);
    transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    border-color: rgba(239, 68, 68, 0.55);
}

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

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

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

.feature-panel {
    padding: 28px;
}

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

.mini-link,
.rank-item {
    display: flex;
    align-items: center;
    gap: 14px;
    border-radius: 18px;
    padding: 10px;
    background: rgba(2, 6, 23, 0.34);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.mini-link:hover,
.rank-item:hover {
    transform: translateX(4px);
    background: rgba(239, 68, 68, 0.1);
}

.mini-link img,
.rank-item img {
    width: 112px;
    height: 70px;
    border-radius: 14px;
    object-fit: cover;
}

.mini-link span,
.rank-copy {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.mini-link strong,
.rank-copy strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mini-link em,
.rank-copy em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.horizontal-scroll {
    display: grid;
    grid-auto-columns: minmax(270px, 1fr);
    grid-auto-flow: column;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 16px;
    scrollbar-width: none;
}

.horizontal-scroll::-webkit-scrollbar {
    display: none;
}

.page-hero-small {
    padding: 44px;
}

.page-hero-small p {
    max-width: 760px;
    margin: 16px 0 0;
    color: var(--muted-strong);
    line-height: 1.75;
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 22px;
    color: var(--muted);
    font-size: 14px;
}

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

.category-page-hero .filter-bar,
.ranking-hero .filter-bar,
.search-hero .filter-bar {
    margin-top: 26px;
    max-width: 720px;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 22px;
    padding: 18px;
}

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

.category-preview img {
    width: 100%;
    height: 86px;
    border-radius: 14px;
    object-fit: cover;
}

.category-overview-card h2 {
    margin: 4px 0 10px;
}

.category-overview-card p {
    color: var(--muted-strong);
    line-height: 1.65;
}

.ranking-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: start;
}

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

.rank-item {
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.6);
}

.rank-num {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: var(--red-soft);
    color: #fca5a5;
    font-weight: 900;
}

.ranking-aside {
    position: sticky;
    top: 96px;
    padding: 24px;
}

.aside-category-links {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.aside-category-links a {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px 14px;
    color: var(--muted-strong);
}

.aside-category-links a:hover {
    border-color: rgba(239, 68, 68, 0.5);
    color: #f87171;
}

.detail-hero {
    position: relative;
    min-height: 560px;
    overflow: hidden;
}

.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(4px);
    transform: scale(1.04);
}

.detail-shell {
    position: relative;
    z-index: 2;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 72px 0 64px;
}

.detail-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 36px;
    align-items: end;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

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

.detail-copy h1 {
    max-width: 900px;
    margin: 18px 0;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1;
}

.detail-one-line {
    max-width: 840px;
    margin: 22px 0;
    color: var(--muted-strong);
    font-size: 18px;
    line-height: 1.75;
}

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

.player-section {
    padding-bottom: 32px;
}

.player-card {
    padding: 16px;
}

.player-stage {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #000000;
}

.player-stage video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
    cursor: pointer;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: radial-gradient(circle, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.62));
    cursor: pointer;
}

.play-overlay span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--red);
    color: #ffffff;
    font-size: 34px;
    box-shadow: 0 24px 60px rgba(239, 68, 68, 0.34);
}

.play-overlay.is-hidden {
    display: none;
}

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

.detail-article article {
    padding: 28px;
}

.detail-article p {
    margin: 16px 0 0;
    color: var(--muted-strong);
    line-height: 1.85;
}

.empty-state {
    display: none;
    margin-top: 28px;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 24px;
    color: var(--muted-strong);
    text-align: center;
    background: rgba(15, 23, 42, 0.72);
}

.empty-state.is-visible {
    display: block;
}

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

.footer-shell {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(180px, 0.8fr) minmax(220px, 1fr);
    gap: 36px;
}

.site-footer p {
    max-width: 520px;
    color: var(--muted);
    line-height: 1.75;
}

.footer-links {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.footer-bottom {
    border-top: 1px solid var(--line);
    padding: 18px;
    color: var(--muted);
    text-align: center;
}

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

    .nav-search {
        margin-left: auto;
    }

    .menu-toggle {
        display: block;
    }

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

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

    .hero,
    .hero-content {
        min-height: 560px;
    }

    .hero-content {
        padding-bottom: 76px;
    }

    .search-panel,
    .split-section,
    .detail-article,
    .ranking-layout,
    .footer-shell,
    .detail-layout,
    .category-overview-card {
        grid-template-columns: 1fr;
    }

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

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

    .ranking-aside {
        position: static;
    }
}

@media (max-width: 620px) {
    .nav-shell {
        width: min(100% - 22px, 1280px);
        height: 68px;
    }

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

    .brand-copy small {
        display: none;
    }

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

    .hero,
    .hero-content {
        min-height: 540px;
    }

    .hero-content {
        width: min(100% - 28px, 1280px);
        padding: 70px 0 82px;
    }

    .hero p {
        font-size: 16px;
    }

    .hero-arrow {
        display: none;
    }

    .section-shell {
        width: min(100% - 28px, 1280px);
        padding: 44px 0;
    }

    .search-panel,
    .page-hero-small,
    .feature-panel,
    .detail-article article {
        padding: 22px;
    }

    .filter-bar,
    .mobile-search,
    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-bar input,
    .filter-bar select,
    .mobile-search input,
    .mobile-search button,
    .hero-actions a {
        width: 100%;
    }

    .movie-grid,
    .wide-card-grid,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

    .horizontal-scroll {
        grid-auto-columns: 82%;
    }

    .detail-copy h1 {
        font-size: 38px;
    }

    .detail-shell {
        padding-top: 46px;
    }
}
