:root {
    color-scheme: dark;
    --dark-950: #050505;
    --dark-900: #0a0a0a;
    --dark-850: #101010;
    --dark-800: #121212;
    --dark-700: #1a1a1a;
    --dark-600: #262626;
    --line: rgba(255, 255, 255, 0.08);
    --soft-line: rgba(255, 255, 255, 0.05);
    --text: #ffffff;
    --muted: #a3a3a3;
    --faint: #737373;
    --accent: #dc2626;
    --accent-soft: rgba(220, 38, 38, 0.16);
    --accent-strong: #991b1b;
    --gold: #eab308;
    --radius: 18px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
    --glow: 0 0 24px rgba(220, 38, 38, 0.28);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--dark-900);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: rgba(10, 10, 10, 0.94);
    backdrop-filter: blur(14px);
}

.nav-wrap {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand-mark {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: var(--glow);
    font-size: 15px;
}

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

.nav-link,
.mobile-link {
    color: #d4d4d4;
    font-size: 14px;
    font-weight: 650;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease;
}

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

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: #ffffff;
    background: var(--accent-soft);
}

.mobile-toggle {
    display: none;
    border: 0;
    color: #ffffff;
    background: transparent;
    cursor: pointer;
    font-size: 24px;
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--line);
    padding: 10px 16px 18px;
    background: rgba(10, 10, 10, 0.98);
}

.mobile-nav.is-open {
    display: grid;
    gap: 8px;
}

.mobile-link {
    padding: 10px 12px;
}

.hero {
    position: relative;
    min-height: 540px;
    height: 70vh;
    overflow: hidden;
    background: #000000;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    opacity: 0;
    pointer-events: none;
    background-size: cover;
    background-position: center;
    transition: opacity 0.65s ease;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(10, 10, 10, 0.98) 0%, rgba(10, 10, 10, 0.76) 42%, rgba(10, 10, 10, 0.18) 100%),
        linear-gradient(0deg, var(--dark-900) 0%, rgba(10, 10, 10, 0.2) 45%, rgba(10, 10, 10, 0.35) 100%);
}

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

.hero-content {
    position: relative;
    z-index: 2;
    padding-bottom: 76px;
}

.hero-copy {
    max-width: 720px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    color: #ffffff;
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero h1 {
    max-width: 680px;
    font-size: clamp(42px, 6vw, 78px);
}

.hero p {
    max-width: 660px;
    margin: 18px 0 0;
    color: #d4d4d4;
    font-size: clamp(16px, 2vw, 19px);
}

.hero-meta,
.detail-meta,
.card-meta,
.rank-meta,
.breadcrumb,
.inline-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.hero-meta {
    margin-top: 24px;
    color: #d4d4d4;
}

.hero-meta span,
.inline-meta span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
}

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

.btn {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 11px 18px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #ffffff;
    box-shadow: var(--glow);
}

.btn-ghost {
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

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

.hero-dot {
    width: 32px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    cursor: pointer;
}

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

.section {
    padding: 56px 0;
}

.section-soft {
    background: linear-gradient(180deg, var(--dark-900), var(--dark-800));
}

.section-head,
.page-headline {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
}

.section-head h2,
.page-headline h1,
.info-panel h2,
.related h2,
.player-copy h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 36px);
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.section-head p,
.page-headline p,
.category-card p,
.info-panel p,
.player-copy p,
.search-lead {
    margin: 8px 0 0;
    color: var(--muted);
}

.section-head a {
    color: var(--accent);
    font-weight: 800;
}

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

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

.movie-row {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 3px 0 18px;
    scrollbar-width: thin;
}

.movie-row .movie-card {
    min-width: 210px;
}

.movie-card {
    display: block;
    min-width: 0;
    border: 1px solid var(--soft-line);
    border-radius: var(--radius);
    background: rgba(26, 26, 26, 0.72);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(220, 38, 38, 0.38);
    background: rgba(26, 26, 26, 0.95);
    box-shadow: var(--glow);
}

.poster-frame {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background:
        radial-gradient(circle at 40% 20%, rgba(220, 38, 38, 0.18), transparent 36%),
        linear-gradient(145deg, #1a1a1a, #050505);
}

.poster-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.001);
    transition: transform 0.45s ease, filter 0.45s ease;
}

.movie-card:hover .poster-image {
    transform: scale(1.08);
    filter: brightness(0.72);
}

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.88));
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border-radius: 999px;
    background: var(--accent);
    color: #ffffff;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.72);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.poster-score {
    position: absolute;
    right: 10px;
    top: 10px;
    padding: 4px 8px;
    border-radius: 8px;
    background: rgba(10, 10, 10, 0.88);
    color: #ffffff;
    font-size: 12px;
    font-weight: 850;
}

.card-body {
    display: grid;
    gap: 8px;
    padding: 14px;
}

.card-body strong {
    display: -webkit-box;
    min-height: 48px;
    overflow: hidden;
    color: #ffffff;
    font-size: 15px;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-desc {
    display: -webkit-box;
    min-height: 42px;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    gap: 6px;
    color: var(--faint);
    font-size: 12px;
}

.card-meta em {
    font-style: normal;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-row span,
.tag-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: #d4d4d4;
    font-size: 12px;
    padding: 4px 8px;
}

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

.category-card {
    display: block;
    min-height: 160px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 100% 0%, rgba(220, 38, 38, 0.16), transparent 32%),
        rgba(26, 26, 26, 0.78);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(220, 38, 38, 0.34);
    box-shadow: var(--glow);
}

.category-card strong {
    display: block;
    color: #ffffff;
    font-size: 23px;
}

.category-card span {
    display: inline-flex;
    margin-top: 18px;
    color: var(--accent);
    font-weight: 800;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 58px 84px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(26, 26, 26, 0.72);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    border-color: rgba(220, 38, 38, 0.34);
}

.rank-num {
    color: var(--accent);
    font-size: 26px;
    font-weight: 900;
    text-align: center;
}

.rank-cover {
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    background-color: var(--dark-600);
}

.rank-title strong {
    display: block;
    color: #ffffff;
    font-size: 17px;
}

.rank-title p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.rank-score {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--gold);
    font-size: 18px;
    font-weight: 900;
}

.page-hero {
    padding: 56px 0 32px;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at 12% 0%, rgba(220, 38, 38, 0.18), transparent 32%),
        linear-gradient(180deg, var(--dark-850), var(--dark-900));
}

.page-hero h1 {
    font-size: clamp(34px, 5vw, 56px);
}

.page-hero p {
    max-width: 760px;
    color: var(--muted);
    font-size: 16px;
}

.catalog-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 24px;
    color: var(--muted);
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: center;
    margin-top: 36px;
}

.pagination a,
.pagination strong,
.pagination span {
    display: inline-flex;
    min-width: 40px;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid var(--line);
    padding: 8px 12px;
    color: #d4d4d4;
    background: rgba(255, 255, 255, 0.04);
}

.pagination strong {
    color: #ffffff;
    background: var(--accent);
    border-color: var(--accent);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 0.9fr);
    gap: 28px;
    padding: 34px 0 56px;
}

.breadcrumb {
    padding-top: 24px;
    color: var(--muted);
    font-size: 14px;
}

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

.player-panel {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: #000000;
    box-shadow: var(--shadow);
}

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

.play-trigger {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.72)),
        var(--poster-image, transparent);
    background-size: cover;
    background-position: center;
    cursor: pointer;
}

.play-trigger span {
    display: grid;
    width: 76px;
    height: 76px;
    place-items: center;
    border-radius: 999px;
    background: var(--accent);
    box-shadow: var(--glow);
    font-size: 30px;
}

.play-trigger strong {
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(10, 10, 10, 0.72);
    font-size: 16px;
}

.player-panel.is-playing .play-trigger {
    display: none;
}

.player-copy,
.info-panel,
.side-panel {
    margin-top: 22px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(26, 26, 26, 0.72);
}

.player-copy h2,
.info-panel h2 {
    font-size: 24px;
}

.detail-title h1 {
    margin-bottom: 18px;
    font-size: clamp(31px, 4vw, 48px);
}

.side-poster {
    aspect-ratio: 2 / 3;
    border-radius: var(--radius);
    background-size: cover;
    background-position: center;
    background-color: var(--dark-600);
    box-shadow: var(--shadow);
}

.detail-meta {
    margin-top: 20px;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
}

.related {
    padding-bottom: 64px;
}

.search-box {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    margin-top: 22px;
    max-width: 760px;
}

.search-box input {
    min-height: 52px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    padding: 0 18px;
    outline: none;
}

.search-box input:focus {
    border-color: rgba(220, 38, 38, 0.62);
    box-shadow: var(--glow);
}

.search-results {
    margin-top: 30px;
}

.site-footer {
    border-top: 1px solid var(--line);
    padding: 36px 0;
    background: #050505;
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

.site-footer p {
    max-width: 620px;
    color: var(--muted);
    margin: 10px 0 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-content: start;
    justify-content: flex-end;
}

.footer-links a {
    color: #d4d4d4;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    padding: 8px 12px;
}

.footer-links a:hover {
    color: #ffffff;
    background: var(--accent-soft);
}

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

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

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

    .mobile-toggle {
        display: inline-flex;
    }

    .hero {
        height: 76vh;
        min-height: 520px;
    }

    .hero-slide::before {
        background:
            linear-gradient(0deg, var(--dark-900) 0%, rgba(10, 10, 10, 0.35) 100%),
            linear-gradient(90deg, rgba(10, 10, 10, 0.92), rgba(10, 10, 10, 0.46));
    }

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

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

    .rank-score {
        grid-column: 3;
    }

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

    .footer-grid,
    .section-head,
    .page-headline {
        align-items: flex-start;
        flex-direction: column;
    }

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 560px) {
    .container {
        width: min(100% - 24px, 1240px);
    }

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

    .hero h1 {
        font-size: 38px;
    }

    .movie-grid,
    .movie-grid-large,
    .category-grid {
        gap: 14px;
    }

    .card-body {
        padding: 12px;
    }

    .search-box {
        grid-template-columns: 1fr;
    }
}
