:root {
    color-scheme: dark;
    --bg: #0f172a;
    --bg-soft: #111827;
    --panel: rgba(15, 23, 42, 0.84);
    --panel-solid: #172033;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --soft: #94a3b8;
    --red: #dc2626;
    --red-2: #ef4444;
    --orange: #f97316;
    --gold: #facc15;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    background:
        radial-gradient(circle at 10% 0%, rgba(220, 38, 38, 0.25), transparent 35%),
        radial-gradient(circle at 90% 8%, rgba(249, 115, 22, 0.18), transparent 28%),
        linear-gradient(180deg, #0f172a 0%, #111827 48%, #020617 100%);
    color: var(--text);
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.96));
    border-bottom: 1px solid var(--line);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px);
}

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

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

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--red), var(--orange));
    color: #fff;
    box-shadow: 0 12px 28px rgba(220, 38, 38, 0.35);
}

.brand-name,
.footer-brand {
    font-size: 1.45rem;
    background: linear-gradient(90deg, var(--red-2), var(--orange));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link {
    position: relative;
    padding: 24px 0 22px;
    font-size: 0.94rem;
    font-weight: 700;
    color: #d1d5db;
    transition: color 0.2s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 14px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--red), var(--orange));
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s ease;
}

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

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

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

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: linear-gradient(100deg, #7f1d1d 0%, #991b1b 48%, #9a3412 100%);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    opacity: 0.2;
    transform: scale(1.04);
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.3), rgba(2, 6, 23, 0.76)),
        radial-gradient(circle at 72% 38%, rgba(255, 255, 255, 0.14), transparent 22%);
}

.hero-inner {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 620px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 420px;
    align-items: center;
    gap: 48px;
}

.hero-stage {
    position: relative;
    min-height: 390px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateY(14px);
    pointer-events: none;
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide.active {
    position: relative;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.eyebrow {
    margin: 0 0 14px;
    color: #fecaca;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(2.8rem, 7vw, 5.8rem);
    line-height: 0.98;
    letter-spacing: -0.07em;
}

.hero h1 span,
.page-hero h1 span {
    display: block;
    margin-top: 16px;
    font-size: clamp(1.55rem, 3vw, 2.8rem);
    color: #fecaca;
    letter-spacing: -0.04em;
}

.hero p,
.page-hero p,
.detail-copy p {
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(1rem, 2vw, 1.22rem);
    line-height: 1.8;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    font-weight: 900;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--red), var(--orange));
}

.btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 20px 44px rgba(220, 38, 38, 0.28);
}

.hero-panel {
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 30px;
    padding: 22px;
    background: rgba(15, 23, 42, 0.58);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero-poster {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(220, 38, 38, 0.55), rgba(249, 115, 22, 0.36));
}

.hero-poster img,
.poster-frame img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-poster::after,
.poster-frame::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 50%;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.8));
}

.hero-caption {
    margin-top: 18px;
}

.hero-caption h2 {
    margin: 0 0 8px;
    font-size: 1.35rem;
}

.hero-caption p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.hero-dots {
    display: flex;
    gap: 10px;
    margin-top: 22px;
}

.hero-dot {
    width: 34px;
    height: 4px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.24);
    cursor: pointer;
}

.hero-dot.active {
    background: linear-gradient(90deg, var(--red-2), var(--orange));
}

.search-strip {
    position: relative;
    z-index: 4;
    width: min(1180px, calc(100% - 32px));
    margin: -38px auto 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.88);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-form,
.filter-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
}

.filter-form {
    grid-template-columns: minmax(0, 1.2fr) repeat(4, minmax(120px, 0.5fr)) auto;
}

.search-form input,
.filter-form input,
.filter-form select {
    width: 100%;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 0 16px;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    outline: none;
}

.search-form input:focus,
.filter-form input:focus,
.filter-form select:focus {
    border-color: rgba(248, 113, 113, 0.75);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.18);
}

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

.full-main {
    width: 100%;
    margin: 0;
}

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

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

.section-head h2,
.category-card h2,
.player-section h2,
.story-section h2,
.related-section h2,
.footer-grid h2 {
    margin: 0;
    letter-spacing: -0.04em;
}

.section-head h2 {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.section-head p {
    max-width: 520px;
    margin: 0;
    color: var(--soft);
    line-height: 1.7;
}

.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: 22px;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.86), rgba(15, 23, 42, 0.86));
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.24);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(248, 113, 113, 0.5);
    box-shadow: 0 22px 60px rgba(220, 38, 38, 0.16);
}

.poster-frame {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background:
        radial-gradient(circle at 30% 15%, rgba(248, 113, 113, 0.55), transparent 32%),
        linear-gradient(145deg, rgba(127, 29, 29, 0.82), rgba(15, 23, 42, 0.86));
}

.poster-frame.no-image,
.hero-poster.no-image,
.detail-poster.no-image {
    background:
        radial-gradient(circle at 20% 10%, rgba(248, 113, 113, 0.45), transparent 28%),
        linear-gradient(145deg, rgba(127, 29, 29, 0.76), rgba(15, 23, 42, 0.9));
}

.card-badge,
.rank-badge,
.score-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--red), var(--orange));
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}

.card-badge {
    top: 12px;
    right: 12px;
    min-width: 54px;
    height: 28px;
    padding: 0 10px;
}

.card-body {
    padding: 18px;
}

.card-meta,
.detail-meta,
.breadcrumb {
    color: var(--soft);
    font-size: 0.86rem;
    font-weight: 700;
}

.card-body h2 {
    margin: 8px 0 10px;
    font-size: 1.08rem;
    line-height: 1.35;
}

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

.tag-line {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag-line span,
.chip-list span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border: 1px solid rgba(248, 113, 113, 0.22);
    border-radius: 999px;
    color: #fecaca;
    background: rgba(220, 38, 38, 0.08);
    font-size: 0.78rem;
    font-weight: 800;
}

.page-hero,
.detail-hero {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: linear-gradient(100deg, #111827, #7f1d1d 48%, #9a3412);
}

.page-hero::before,
.detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    opacity: 0.16;
}

.page-hero::after,
.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.45));
}

.page-hero-inner,
.detail-hero-inner {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 84px 0 80px;
}

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

.category-card {
    min-height: 260px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background:
        radial-gradient(circle at 90% 10%, rgba(249, 115, 22, 0.22), transparent 30%),
        linear-gradient(145deg, rgba(30, 41, 59, 0.86), rgba(15, 23, 42, 0.92));
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.2);
}

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

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0;
}

.category-samples a {
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    color: #e5e7eb;
    background: rgba(255, 255, 255, 0.06);
    font-size: 0.84rem;
}

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

.rank-item {
    position: relative;
    display: grid;
    grid-template-columns: 76px 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.72);
}

.rank-thumb {
    width: 76px;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(127, 29, 29, 0.8), rgba(15, 23, 42, 0.9));
}

.rank-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-info h2 {
    margin: 0 0 7px;
    font-size: 1rem;
}

.rank-info p {
    margin: 0;
    color: var(--soft);
    font-size: 0.86rem;
}

.score-badge {
    position: static;
    min-width: 74px;
    height: 32px;
    color: #111827;
    background: linear-gradient(135deg, #fde68a, #fb923c);
}

.detail-hero-inner {
    padding-bottom: 66px;
}

.breadcrumb {
    margin-bottom: 24px;
}

.breadcrumb a {
    color: #fecaca;
}

.detail-grid {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 26px;
    aspect-ratio: 3 / 4;
    background: linear-gradient(145deg, rgba(127, 29, 29, 0.82), rgba(15, 23, 42, 0.92));
    box-shadow: var(--shadow);
}

.detail-copy h1 {
    font-size: clamp(2.4rem, 6vw, 5rem);
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 22px;
}

.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.player-section,
.story-section,
.related-section {
    padding-top: 70px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 28px;
    background: #020617;
    box-shadow: var(--shadow);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    gap: 14px;
    border: 0;
    color: #fff;
    background:
        radial-gradient(circle at center, rgba(220, 38, 38, 0.22), transparent 28%),
        rgba(2, 6, 23, 0.25);
    cursor: pointer;
}

.play-overlay span {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--red), var(--orange));
    box-shadow: 0 18px 48px rgba(220, 38, 38, 0.45);
    clip-path: polygon(34% 24%, 34% 76%, 78% 50%);
}

.play-overlay b {
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
}

.video-shell.is-playing .play-overlay {
    opacity: 0;
    pointer-events: none;
}

.story-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
}

.story-card,
.side-card {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.78);
}

.story-card p,
.side-card p {
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.85;
}

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

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

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

.site-footer {
    margin-top: 96px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), #020617);
    border-top: 1px solid var(--line);
}

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

.footer-grid p,
.footer-links a,
.footer-bottom {
    color: var(--soft);
    line-height: 1.7;
}

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

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0 32px;
    border-top: 1px solid var(--line);
    font-size: 0.9rem;
}

@media (max-width: 1024px) {
    .hero-inner,
    .detail-grid,
    .story-grid {
        grid-template-columns: 1fr;
    }

    .hero-panel,
    .detail-poster {
        max-width: 430px;
    }

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

    .filter-form {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 760px) {
    .nav-wrap {
        height: 64px;
    }

    .menu-toggle {
        display: block;
    }

    .site-nav {
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px 20px 20px;
        background: rgba(15, 23, 42, 0.98);
        border-bottom: 1px solid var(--line);
    }

    .site-nav.open {
        display: flex;
    }

    .nav-link {
        padding: 14px 0;
    }

    .nav-link::after {
        bottom: 8px;
    }

    .hero,
    .hero-inner {
        min-height: 760px;
    }

    .hero-inner {
        gap: 18px;
        padding: 58px 0 80px;
    }

    .hero-stage {
        min-height: 450px;
    }

    .search-form,
    .filter-form,
    .section-head,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .section-head {
        display: grid;
        align-items: start;
    }

    .movie-grid,
    .category-grid,
    .rank-list {
        grid-template-columns: 1fr;
    }

    .rank-item {
        grid-template-columns: 66px 1fr;
    }

    .score-badge {
        grid-column: 2;
        width: max-content;
    }

    .page-hero-inner,
    .detail-hero-inner {
        padding: 58px 0 58px;
    }

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

@media (max-width: 460px) {
    .movie-grid {
        gap: 16px;
    }

    .hero-actions,
    .detail-actions {
        display: grid;
    }

    .btn {
        width: 100%;
    }
}
