:root {
    color-scheme: dark;
    --bg: #07090f;
    --bg-soft: #0d111b;
    --panel: #121826;
    --panel-strong: #192132;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.14);
    --text: #f8fafc;
    --muted: #a3adbd;
    --dim: #6b7485;
    --red: #e50914;
    --red-strong: #ff2a35;
    --gold: #ffb86b;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 16% 8%, rgba(229, 9, 20, 0.18), transparent 30%),
        radial-gradient(circle at 86% 4%, rgba(255, 184, 107, 0.12), transparent 28%),
        linear-gradient(180deg, #090b12 0%, var(--bg) 34%, #05060a 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

body.menu-open {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(7, 9, 15, 0.78);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(20px);
}

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

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    gap: 18px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.logo-mark {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--red), #8b0009);
    box-shadow: 0 12px 30px rgba(229, 9, 20, 0.34);
}

.logo-mark::before {
    content: "";
    width: 0;
    height: 0;
    margin-left: 3px;
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    border-left: 14px solid #fff;
}

.logo-text {
    font-size: 1.18rem;
}

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

.nav a {
    padding: 10px 13px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav a:hover,
.nav a.active {
    color: #fff;
    background: rgba(229, 9, 20, 0.16);
}

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

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
}

.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
    display: block;
    width: 20px;
    height: 2px;
    margin: 0 auto;
    border-radius: 999px;
    background: currentColor;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle span::before,
.menu-toggle span::after {
    content: "";
    position: relative;
}

.menu-toggle span::before {
    top: -7px;
}

.menu-toggle span::after {
    top: 5px;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    padding: 10px 0 18px;
}

.mobile-panel a {
    display: block;
    padding: 12px 0;
    color: var(--muted);
    font-weight: 700;
}

.hero {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    isolation: isolate;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

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

.hero-media {
    position: absolute;
    inset: 0;
    z-index: -2;
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.1) contrast(1.04);
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(7, 9, 15, 0.96) 0%, rgba(7, 9, 15, 0.82) 38%, rgba(7, 9, 15, 0.32) 70%, rgba(7, 9, 15, 0.82) 100%),
        linear-gradient(0deg, var(--bg) 0%, rgba(7, 9, 15, 0) 44%);
}

.hero-content {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.7fr);
    align-items: center;
    gap: 44px;
    min-height: 680px;
    padding: 96px 0 72px;
}

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 7px 12px;
    border: 1px solid rgba(229, 9, 20, 0.36);
    border-radius: 999px;
    background: rgba(229, 9, 20, 0.12);
    color: #fff;
    font-size: 0.86rem;
    font-weight: 800;
}

.kicker::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 99px;
    background: var(--red-strong);
    box-shadow: 0 0 0 6px rgba(229, 9, 20, 0.16);
}

.hero h1,
.page-title h1,
.detail-title h1 {
    margin: 20px 0 16px;
    font-size: clamp(2.45rem, 7vw, 5.6rem);
    line-height: 0.98;
    letter-spacing: -0.07em;
}

.hero-lead {
    max-width: 680px;
    margin: 0 0 22px;
    color: #d7dbe3;
    font-size: 1.08rem;
}

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

.meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: #d8dde7;
    font-size: 0.9rem;
    font-weight: 700;
}

.hero-actions,
.section-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 18px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--red), #b7000b);
    box-shadow: 0 16px 34px rgba(229, 9, 20, 0.32);
}

.btn-primary:hover {
    box-shadow: 0 18px 42px rgba(229, 9, 20, 0.42);
}

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

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.14);
}

.hero-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: 30px;
    background: rgba(15, 20, 31, 0.72);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
}

.hero-card img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

.hero-card-info {
    position: absolute;
    inset: auto 0 0;
    padding: 24px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.08));
}

.hero-card-info strong {
    display: block;
    margin-bottom: 5px;
    font-size: 1.26rem;
}

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

.hero-tab {
    width: 42px;
    height: 5px;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.26);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-tab.active {
    width: 76px;
    background: var(--red-strong);
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(130px, 0.28fr) minmax(130px, 0.28fr);
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(18, 24, 38, 0.8);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.search-panel input,
.search-panel select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 16px;
    outline: 0;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    padding: 0 14px;
}

.search-panel select option {
    background: #111827;
    color: #fff;
}

.main {
    padding: 52px 0 86px;
}

.section {
    margin-top: 56px;
}

.section:first-child {
    margin-top: 0;
}

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

.eyebrow {
    margin: 0 0 6px;
    color: var(--red-strong);
    font-size: 0.84rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.section h2,
.page-title h1 {
    margin: 0;
    font-size: clamp(1.7rem, 4vw, 2.65rem);
    line-height: 1.15;
    letter-spacing: -0.045em;
}

.section-desc,
.page-title p,
.card-note,
.detail-lead {
    margin: 10px 0 0;
    color: var(--muted);
}

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(229, 9, 20, 0.42);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
}

.movie-card a {
    display: block;
}

.poster-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: #111827;
}

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

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

.poster-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.56), transparent 44%);
}

.badge {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 2;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(229, 9, 20, 0.92);
    color: #fff;
    font-size: 0.76rem;
    font-weight: 900;
}

.score {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 2;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.68);
    color: var(--gold);
    font-size: 0.78rem;
    font-weight: 900;
}

.movie-info {
    padding: 13px 13px 15px;
}

.movie-title {
    display: -webkit-box;
    min-height: 48px;
    margin: 0;
    overflow: hidden;
    color: #fff;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.34;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 9px;
    color: var(--dim);
    font-size: 0.82rem;
    font-weight: 700;
}

.card-line {
    display: -webkit-box;
    margin: 9px 0 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.86rem;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 230px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 92% 12%, rgba(229, 9, 20, 0.2), transparent 34%),
        linear-gradient(140deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(229, 9, 20, 0.42);
}

.category-card h2,
.category-card h3 {
    margin: 0 0 12px;
    font-size: 1.5rem;
}

.category-card p {
    margin: 0;
    color: var(--muted);
}

.category-card .mini-posters {
    display: flex;
    gap: 8px;
    margin-top: 28px;
}

.category-card .mini-posters img {
    width: 54px;
    height: 76px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid var(--line);
}

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

.rank-card {
    display: grid;
    grid-template-columns: 52px 90px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.045);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-card:hover {
    transform: translateX(4px);
    border-color: rgba(229, 9, 20, 0.42);
}

.rank-num {
    color: var(--red-strong);
    font-size: 1.55rem;
    font-weight: 950;
    letter-spacing: -0.06em;
}

.rank-card img {
    width: 90px;
    aspect-ratio: 2 / 3;
    border-radius: 14px;
    object-fit: cover;
}

.rank-card h3 {
    margin: 0 0 8px;
    font-size: 1.05rem;
}

.rank-card p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.9rem;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.page-hero {
    padding: 62px 0 24px;
}

.page-title {
    max-width: 820px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 0.92rem;
}

.breadcrumb a {
    color: #fff;
}

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

.detail-hero {
    padding: 54px 0 34px;
}

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

.detail-poster {
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

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

.detail-title h1 {
    font-size: clamp(2.2rem, 6vw, 4.2rem);
}

.detail-copy {
    display: grid;
    gap: 20px;
    margin-top: 34px;
}

.copy-panel {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.045);
}

.copy-panel h2 {
    margin: 0 0 12px;
    font-size: 1.35rem;
}

.copy-panel p {
    margin: 0;
    color: #d7dbe3;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 18px;
}

.tag-cloud span,
.tag-cloud a {
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #d7dbe3;
    background: rgba(255, 255, 255, 0.05);
    font-size: 0.86rem;
    font-weight: 700;
}

.player-section {
    margin-top: 34px;
}

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

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    cursor: pointer;
    z-index: 3;
}

.player-cover.hidden {
    opacity: 0;
    pointer-events: none;
}

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.45) saturate(1.08);
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(229, 9, 20, 0.18), rgba(0, 0, 0, 0.44) 48%, rgba(0, 0, 0, 0.72));
}

.play-button {
    position: relative;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 92px;
    height: 92px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--red), #9d0008);
    color: #fff;
    box-shadow: 0 22px 54px rgba(229, 9, 20, 0.42);
    cursor: pointer;
}

.play-button::before {
    content: "";
    margin-left: 6px;
    border-top: 18px solid transparent;
    border-bottom: 18px solid transparent;
    border-left: 28px solid currentColor;
}

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

.footer {
    border-top: 1px solid var(--line);
    padding: 36px 0;
    background: rgba(4, 5, 8, 0.7);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 24px;
}

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

.footer a:hover {
    color: var(--red-strong);
}

.footer h2,
.footer h3 {
    margin: 0 0 10px;
    color: #fff;
}

.footer-links {
    display: grid;
    gap: 7px;
}

.no-results {
    display: none;
    padding: 38px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    color: var(--muted);
    text-align: center;
}

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

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

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

    .menu-toggle,
    .mobile-panel.open {
        display: block;
    }

    .hero,
    .hero-content {
        min-height: auto;
    }

    .hero-content {
        grid-template-columns: 1fr;
        padding: 72px 0 92px;
    }

    .hero-card {
        max-width: 360px;
    }

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

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

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

    .ranking-list,
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

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

    .header-inner {
        height: 64px;
    }

    .logo-mark {
        width: 36px;
        height: 36px;
        border-radius: 12px;
    }

    .logo-text {
        font-size: 1rem;
    }

    .hero h1,
    .page-title h1 {
        letter-spacing: -0.045em;
    }

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

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

    .rank-card {
        grid-template-columns: 44px 72px minmax(0, 1fr);
        gap: 12px;
    }

    .rank-card img {
        width: 72px;
    }

    .movie-info {
        padding: 11px;
    }

    .hero-tabs {
        bottom: 18px;
    }

    .hero-tab {
        width: 28px;
    }

    .hero-tab.active {
        width: 52px;
    }
}
