:root {
    color-scheme: dark;
    --bg: #0f172a;
    --bg-soft: #111827;
    --panel: #1e293b;
    --panel-2: #0f172a;
    --text: #f8fafc;
    --muted: #cbd5e1;
    --muted-2: #94a3b8;
    --line: rgba(148, 163, 184, 0.22);
    --red: #ef4444;
    --red-dark: #dc2626;
    --orange: #f97316;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    --radius: 22px;
    --container: min(1180px, calc(100vw - 32px));
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background: linear-gradient(180deg, #0f172a 0%, #111827 45%, #0f172a 100%);
    color: var(--text);
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96));
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    backdrop-filter: blur(16px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}

.nav-wrap {
    width: var(--container);
    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.02em;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--red), var(--orange));
    color: #fff;
    box-shadow: 0 12px 30px rgba(239, 68, 68, 0.35);
    font-size: 14px;
}

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

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

.nav-link {
    display: inline-flex;
    align-items: center;
    height: 38px;
    padding: 0 13px;
    border-radius: 999px;
    color: #d1d5db;
    font-size: 14px;
    font-weight: 700;
    transition: 0.22s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: rgba(239, 68, 68, 0.16);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    padding: 9px;
}

.mobile-menu-button span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #fff;
    border-radius: 2px;
}

.mobile-nav {
    display: none;
    width: var(--container);
    margin: 0 auto;
    padding: 0 0 16px;
}

.mobile-nav.is-open {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.hero {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    background: linear-gradient(120deg, #7f1d1d, #991b1b 48%, #c2410c);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.hero-image,
.page-hero-bg,
.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.28;
    filter: saturate(1.25) contrast(1.05);
}

.hero-shade,
.detail-hero::before,
.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(248, 113, 113, 0.28), transparent 30%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.78) 45%, rgba(15, 23, 42, 0.36));
}

.hero::after,
.detail-hero::after,
.page-hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 150px;
    background: linear-gradient(0deg, #0f172a, transparent);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: var(--container);
    min-height: 640px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    max-width: 980px;
}

.hero-kicker,
.section-head p,
.page-hero p {
    margin: 0 0 10px;
    color: #fecaca;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero h1,
.hero h2,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(42px, 8vw, 86px);
    line-height: 0.98;
    letter-spacing: -0.06em;
    color: #fff;
    text-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
}

.hero h1 span {
    display: block;
    margin-top: 18px;
    font-size: clamp(28px, 4vw, 48px);
    letter-spacing: -0.04em;
    color: #fed7aa;
}

.hero h2 {
    max-width: 800px;
}

.hero-desc,
.page-hero span,
.detail-one-line {
    max-width: 760px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(17px, 2vw, 22px);
}

.tag-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.14);
    border: 1px solid rgba(248, 113, 113, 0.24);
    color: #fecaca;
    font-size: 12px;
    font-weight: 700;
}

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

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

.btn-primary,
.btn-ghost,
.btn-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 900;
    transition: 0.22s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--red), var(--orange));
    color: #fff;
    box-shadow: 0 18px 38px rgba(239, 68, 68, 0.32);
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 24px 55px rgba(239, 68, 68, 0.42);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.26);
    color: #fff;
    backdrop-filter: blur(12px);
}

.btn-link {
    color: #fed7aa;
}

.small-actions {
    margin-top: 24px;
}

.hero-controls {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 48px;
    transform: translateX(-50%);
    width: var(--container);
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
}

.hero-controls button {
    pointer-events: auto;
    border: 0;
    color: #fff;
}

.hero-controls > button {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 32px;
    line-height: 1;
    backdrop-filter: blur(12px);
}

.hero-dots {
    display: flex;
    gap: 9px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(12px);
    pointer-events: auto;
}

.hero-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
}

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

.section {
    width: var(--container);
    margin: 0 auto;
    padding: 68px 0;
}

.intro-section {
    padding-top: 48px;
}

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

.section-head.centered {
    display: block;
    max-width: 780px;
    margin: 0 auto 28px;
    text-align: center;
}

.section-head h2,
.story-card h2,
.site-footer h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.section-head span {
    display: block;
    margin-top: 12px;
    color: var(--muted);
}

.section-head a {
    color: #fca5a5;
    font-weight: 900;
}

.dark-panel {
    width: min(1240px, calc(100vw - 24px));
    padding: 48px 30px;
    border: 1px solid var(--line);
    border-radius: 32px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.82), rgba(15, 23, 42, 0.86));
    box-shadow: var(--shadow);
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: rgba(30, 41, 59, 0.86);
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-7px);
    border-color: rgba(248, 113, 113, 0.55);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.34);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #020617;
}

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

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

.poster-link::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.82), transparent 55%);
    opacity: 0.9;
}

.poster-play {
    position: absolute;
    z-index: 2;
    right: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--red), var(--orange));
    color: #fff;
    box-shadow: 0 12px 32px rgba(239, 68, 68, 0.42);
}

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

.movie-meta-line {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    color: var(--muted-2);
    font-size: 12px;
    font-weight: 800;
}

.movie-card h2,
.rank-card h2 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 17px;
    line-height: 1.3;
}

.movie-card h2 a:hover,
.rank-card h2 a:hover,
.inline-links a:hover,
.tile-links a:hover {
    color: #fca5a5;
}

.movie-card p,
.rank-card p,
.category-tile p,
.story-card p,
.site-footer p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.movie-card .tag-row {
    margin-top: 13px;
}

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

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

.category-tile {
    border-radius: 24px;
    padding: 22px;
    background:
        linear-gradient(135deg, rgba(239, 68, 68, 0.12), transparent 36%),
        rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.18);
    transition: 0.25s ease;
}

.category-tile:hover {
    transform: translateY(-5px);
    border-color: rgba(248, 113, 113, 0.52);
}

.tile-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    margin-bottom: 18px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--red), var(--orange));
}

.category-tile h2 {
    margin: 0 0 10px;
    color: #fff;
    font-size: 22px;
}

.tile-links,
.inline-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.tile-links a,
.inline-links a {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: #e5e7eb;
    font-size: 12px;
    font-weight: 800;
}

.search-panel {
    max-width: 760px;
    margin: 0 auto 34px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(30, 41, 59, 0.74);
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.18);
}

.search-panel label {
    display: block;
    margin-bottom: 10px;
    color: #fff;
    font-weight: 900;
}

.search-line {
    display: flex;
    gap: 10px;
}

.search-line input {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 16px;
    outline: none;
    background: rgba(15, 23, 42, 0.84);
    color: #fff;
}

.search-line input:focus {
    border-color: rgba(248, 113, 113, 0.7);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.16);
}

.search-line button {
    min-width: 76px;
    border: 0;
    border-radius: 16px;
    background: rgba(239, 68, 68, 0.18);
    color: #fecaca;
    font-weight: 900;
}

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

.rank-section {
    padding-bottom: 86px;
}

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

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

.rank-card {
    position: relative;
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 16px;
    min-height: 142px;
    padding: 14px;
    border-radius: 22px;
    background: rgba(30, 41, 59, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.rank-poster {
    display: block;
    width: 92px;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 16px;
    background: #020617;
}

.rank-number {
    position: absolute;
    left: 8px;
    top: 8px;
    z-index: 2;
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--red), var(--orange));
    color: #fff;
    font-weight: 900;
    box-shadow: 0 10px 28px rgba(239, 68, 68, 0.36);
}

.tag-row.compact span {
    font-size: 11px;
    min-height: 24px;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 380px;
    background: linear-gradient(120deg, #111827, #7f1d1d);
}

.page-hero.slim {
    min-height: 320px;
}

.page-hero > div {
    position: relative;
    z-index: 2;
    width: var(--container);
    margin: 0 auto;
    min-height: inherit;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

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

.detail-hero {
    min-height: 720px;
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    width: var(--container);
    min-height: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
    color: #e5e7eb;
    font-size: 14px;
}

.breadcrumb a {
    color: #fecaca;
    font-weight: 800;
}

.detail-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 42px;
    align-items: center;
}

.detail-cover {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: var(--shadow);
    background: #020617;
}

.detail-info h1 {
    font-size: clamp(42px, 6vw, 76px);
}

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

.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 5px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-weight: 800;
}

.player-section {
    padding-top: 0;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 32px;
    background: #000;
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.movie-player {
    width: 100%;
    height: 100%;
    background: #000;
    object-fit: contain;
}

.player-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    background:
        radial-gradient(circle at 50% 48%, rgba(239, 68, 68, 0.18), transparent 35%),
        rgba(2, 6, 23, 0.5);
    color: #fff;
}

.player-start span {
    width: 96px;
    height: 96px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--red), var(--orange));
    font-size: 34px;
    box-shadow: 0 22px 55px rgba(239, 68, 68, 0.44);
}

.player-start strong {
    display: block;
    font-size: 20px;
}

.player-shell.is-playing .player-start {
    display: none;
}

.content-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 22px;
}

.story-card {
    padding: 28px;
    border-radius: 28px;
    background: rgba(30, 41, 59, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.story-card.accent {
    background:
        linear-gradient(135deg, rgba(239, 68, 68, 0.14), transparent 40%),
        rgba(30, 41, 59, 0.82);
}

.story-card h2 {
    margin-bottom: 16px;
    font-size: 30px;
}

.story-card p {
    font-size: 16px;
    line-height: 1.9;
}

.site-footer {
    margin-top: 30px;
    padding: 54px 0 24px;
    background: linear-gradient(180deg, #111827, #020617);
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.footer-grid {
    width: var(--container);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 36px;
}

.footer-brand {
    margin-bottom: 16px;
    color: #fff;
    font-size: 22px;
}

.site-footer h2 {
    margin-bottom: 14px;
    font-size: 18px;
    letter-spacing: 0;
}

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

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

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

.footer-bottom {
    width: var(--container);
    margin: 38px auto 0;
    padding-top: 22px;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    color: #64748b;
    text-align: center;
    font-size: 14px;
}

@media (max-width: 1100px) {
    .movie-grid,
    .compact-grid,
    .category-grid,
    .category-grid.big {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

    .mobile-menu-button {
        display: block;
    }

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

    .hero-controls {
        bottom: 28px;
    }

    .section {
        padding: 48px 0;
    }

    .section-head {
        display: block;
    }

    .section-head a {
        display: inline-flex;
        margin-top: 12px;
    }

    .movie-grid,
    .compact-grid,
    .category-grid,
    .category-grid.big,
    .rank-grid,
    .content-grid,
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

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

    .detail-cover {
        max-width: 260px;
    }
}

@media (max-width: 560px) {
    :root {
        --container: min(100vw - 20px, 1180px);
    }

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

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

    .hero-actions,
    .search-line,
    .rank-card {
        flex-direction: column;
    }

    .hero-controls > button {
        display: none;
    }

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

    .rank-card {
        display: grid;
        grid-template-columns: 86px 1fr;
    }

    .dark-panel {
        padding: 32px 16px;
    }

    .story-card {
        padding: 22px;
    }

    .player-start span {
        width: 76px;
        height: 76px;
        font-size: 26px;
    }
}
