:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: #0f172a;
    --line: rgba(148, 163, 184, 0.16);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --rose: #fb7185;
    --rose-strong: #f43f5e;
    --orange: #fb923c;
    --gold: #facc15;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 20% 0%, rgba(244, 63, 94, 0.2), transparent 34rem),
        radial-gradient(circle at 80% 10%, rgba(251, 146, 60, 0.16), transparent 30rem),
        linear-gradient(180deg, #0f172a 0%, var(--bg) 46%, #020617 100%);
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.86);
    backdrop-filter: blur(18px);
}

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

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

.brand-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--rose-strong), var(--orange));
    box-shadow: 0 14px 30px rgba(244, 63, 94, 0.26);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.brand-text strong {
    font-size: 20px;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #fda4af, #fdba74);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-text em {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

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

.desktop-nav a,
.mobile-panel a {
    color: var(--soft);
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-panel a:hover,
.mobile-panel a.active {
    color: var(--rose);
}

.header-search {
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.88);
}

.header-search input {
    width: 220px;
    border: 0;
    outline: 0;
    padding: 10px 14px;
    color: var(--text);
    background: transparent;
}

.header-search button,
.large-search button,
.filter-bar button {
    border: 0;
    color: #fff;
    cursor: pointer;
    padding: 10px 16px;
    background: linear-gradient(135deg, var(--rose-strong), var(--orange));
}

.menu-button {
    display: none;
    margin-left: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 8px 12px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.9);
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.98);
}

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

.mobile-panel nav {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
}

.mobile-panel form {
    display: flex;
    gap: 10px;
}

.mobile-panel input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 12px;
    color: var(--text);
    background: #020617;
}

.mobile-panel button {
    border: 0;
    border-radius: 12px;
    padding: 10px 14px;
    color: #fff;
    background: var(--rose-strong);
}

.hero {
    padding: 28px 0 10px;
}

.hero-shell {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    min-height: 560px;
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 34px;
    box-shadow: var(--shadow);
    background: #111827;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 40px;
    align-items: center;
    padding: 70px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.65s ease, transform 0.65s ease;
    transform: scale(1.02);
}

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--hero-bg);
    background-size: cover;
    background-position: center;
    filter: blur(20px) saturate(1.18);
    transform: scale(1.12);
    opacity: 0.48;
}

.hero-backdrop,
.detail-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.74) 52%, rgba(2, 6, 23, 0.38) 100%),
        radial-gradient(circle at 18% 18%, rgba(244, 63, 94, 0.22), transparent 26rem);
}

.hero-content,
.hero-poster {
    position: relative;
    z-index: 1;
}

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

.hero-kicker span {
    border: 1px solid rgba(251, 113, 133, 0.35);
    border-radius: 999px;
    padding: 7px 12px;
    color: #fecdd3;
    background: rgba(244, 63, 94, 0.12);
}

.hero h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(36px, 5vw, 70px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero p {
    max-width: 660px;
    margin: 22px 0 0;
    color: #e2e8f0;
    font-size: 18px;
    line-height: 1.85;
}

.hero-tags,
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags {
    margin-top: 22px;
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    padding: 4px 9px;
    color: #cbd5e1;
    font-size: 12px;
    background: rgba(15, 23, 42, 0.72);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 999px;
    padding: 0 22px;
    font-weight: 700;
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

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

.button.primary {
    color: #fff;
    background: linear-gradient(135deg, var(--rose-strong), var(--orange));
    box-shadow: 0 18px 34px rgba(244, 63, 94, 0.28);
}

.button.ghost {
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #fff;
    background: rgba(15, 23, 42, 0.52);
}

.hero-poster {
    display: block;
    border-radius: 28px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.46);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 22px;
}

.hero-controls {
    position: absolute;
    z-index: 5;
    left: 70px;
    bottom: 42px;
    display: flex;
    gap: 10px;
}

.hero-controls button {
    width: 38px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.28);
}

.hero-controls button.active {
    background: linear-gradient(135deg, var(--rose-strong), var(--orange));
}

.section {
    padding: 44px 0;
}

.section-heading,
.intro-strip,
.split-layout,
.detail-content,
.footer-grid {
    display: grid;
    gap: 24px;
}

.section-heading {
    grid-template-columns: 1fr auto;
    align-items: end;
    margin-bottom: 24px;
}

.compact-heading {
    margin-bottom: 18px;
}

.section-eyebrow {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--rose);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.section h2,
.section-heading h2,
.content-card h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 38px);
    letter-spacing: -0.04em;
}

.intro-strip {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 480px);
    align-items: center;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
}

.intro-strip p,
.page-hero p,
.content-card p,
.site-footer p {
    color: var(--muted);
    line-height: 1.85;
}

.large-search {
    display: flex;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #020617;
}

.large-search input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    padding: 16px 18px;
    color: var(--text);
    background: transparent;
}

.large-search button {
    padding: 0 24px;
    white-space: nowrap;
}

.view-more {
    color: #fecdd3;
    font-weight: 700;
}

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

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

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(251, 113, 133, 0.38);
    background: rgba(15, 23, 42, 0.94);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #111827;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.38s ease, filter 0.38s ease;
}

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

.play-dot,
.rank-mark {
    position: absolute;
    display: grid;
    place-items: center;
}

.play-dot {
    right: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--rose-strong), var(--orange));
    box-shadow: 0 12px 24px rgba(244, 63, 94, 0.3);
}

.rank-mark {
    left: 12px;
    top: 12px;
    min-width: 38px;
    height: 30px;
    border-radius: 999px;
    padding: 0 10px;
    color: #111827;
    font-weight: 900;
    background: linear-gradient(135deg, #fde68a, #fb923c);
}

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

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

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

.movie-card h3 a:hover {
    color: var(--rose);
}

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

.card-compact p {
    min-height: 0;
}

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

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

.category-tile,
.category-overview-card,
.content-card,
.rank-panel,
.filter-bar {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
}

.category-tile,
.category-overview-card {
    display: block;
    min-height: 138px;
    padding: 22px;
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile:hover,
.category-overview-card:hover {
    transform: translateY(-4px);
    border-color: rgba(251, 113, 133, 0.38);
}

.category-tile span,
.category-overview-card span {
    font-size: 20px;
    font-weight: 800;
}

.category-tile p,
.category-overview-card p {
    color: var(--muted);
    line-height: 1.7;
}

.category-overview-card em {
    color: #fecdd3;
    font-style: normal;
    font-weight: 700;
}

.rank-panel {
    position: sticky;
    top: 96px;
    padding: 22px;
}

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

.mini-card {
    display: grid;
    grid-template-columns: 62px 1fr;
    gap: 12px;
    align-items: center;
    padding: 8px;
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.45);
}

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

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

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

.page-hero {
    padding: 72px 0 20px;
}

.page-hero h1 {
    max-width: 760px;
}

.page-hero p {
    max-width: 760px;
    font-size: 18px;
}

.filter-bar {
    display: flex;
    gap: 12px;
    padding: 16px;
}

.filter-bar input,
.filter-bar select {
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0 14px;
    color: var(--text);
    background: #020617;
}

.filter-bar input {
    flex: 1;
}

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

.empty-state.show {
    display: block;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    background-image: var(--detail-bg);
    background-size: cover;
    background-position: center;
}

.detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    backdrop-filter: blur(18px);
    background: rgba(2, 6, 23, 0.66);
}

.detail-inner {
    position: relative;
    z-index: 1;
    padding: 46px 0 60px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
    color: var(--muted);
}

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

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

.detail-cover {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 28px;
    object-fit: cover;
    box-shadow: var(--shadow);
}

.detail-one-line {
    max-width: 820px;
    color: #e2e8f0;
    font-size: 18px;
    line-height: 1.85;
}

.detail-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 26px 0;
}

.detail-facts span {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 14px;
    color: var(--soft);
    background: rgba(15, 23, 42, 0.62);
}

.detail-facts strong {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: #000;
    box-shadow: var(--shadow);
}

.player-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    border: 0;
    color: #fff;
    cursor: pointer;
    background: radial-gradient(circle at center, rgba(244, 63, 94, 0.22), rgba(0, 0, 0, 0.52));
}

.player-cover span {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--rose-strong), var(--orange));
    box-shadow: 0 18px 36px rgba(244, 63, 94, 0.34);
}

.player-cover.is-hidden {
    display: none;
}

.player-message {
    position: absolute;
    left: 18px;
    bottom: 18px;
    color: #fecdd3;
    font-size: 14px;
}

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

.content-card {
    padding: 28px;
}

.content-card p {
    margin: 14px 0 0;
    color: #cbd5e1;
    font-size: 16px;
}

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

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

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    grid-template-columns: 1.4fr 1fr 1fr;
    padding: 42px 0;
}

.footer-brand {
    margin-bottom: 16px;
}

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

.footer-links a {
    color: var(--muted);
}

.footer-links a:hover {
    color: var(--rose);
}

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

    .menu-button {
        display: inline-flex;
    }

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

    .hero-slide {
        grid-template-columns: 1fr;
        padding: 36px;
    }

    .hero-poster {
        width: min(260px, 70vw);
    }

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

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

    .rank-panel {
        position: static;
    }
}

@media (max-width: 760px) {
    .container,
    .header-inner,
    .mobile-panel,
    .hero-shell,
    .footer-grid {
        width: min(100% - 22px, 1180px);
    }

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

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

    .hero-slide {
        padding: 28px 22px 66px;
        align-content: center;
    }

    .hero h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: clamp(32px, 11vw, 48px);
    }

    .hero p,
    .page-hero p,
    .detail-one-line {
        font-size: 16px;
    }

    .hero-controls {
        left: 24px;
        bottom: 24px;
    }

    .section {
        padding: 30px 0;
    }

    .section-heading,
    .filter-bar {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .filter-bar,
    .large-search,
    .mobile-panel form {
        flex-direction: column;
    }

    .large-search {
        border-radius: 20px;
    }

    .large-search button {
        min-height: 48px;
    }

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

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

    .movie-card h3 {
        font-size: 16px;
    }

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

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

    .detail-cover {
        width: min(230px, 70vw);
    }

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

    .content-card {
        padding: 22px;
    }
}

@media (max-width: 420px) {
    .movie-grid,
    .ranking-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }
}
