:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: rgba(15, 23, 42, 0.96);
    --card: rgba(30, 41, 59, 0.72);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --accent: #10b981;
    --accent-2: #34d399;
    --warn: #f59e0b;
    --danger: #fb7185;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(16, 185, 129, 0.18), transparent 32rem),
        radial-gradient(circle at top right, rgba(20, 184, 166, 0.12), transparent 28rem),
        var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, #000, transparent 72%);
}

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

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

button,
input,
select {
    font: inherit;
}

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

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

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

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.logo-mark {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: #052e2b;
    background: linear-gradient(135deg, var(--accent-2), #a7f3d0);
    box-shadow: 0 0 28px rgba(16, 185, 129, 0.35);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    color: var(--soft);
    font-size: 15px;
}

.nav-link {
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-2);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.7);
}

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

.mobile-nav a {
    display: block;
    padding: 12px 0;
    color: var(--soft);
}

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

.hero {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

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

.hero-bg,
.detail-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05) contrast(1.05);
    opacity: 0.55;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.72)),
        linear-gradient(0deg, #020617 0%, transparent 42%);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 72vh;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) 360px;
    align-items: center;
    gap: 48px;
    padding: 76px 0 96px;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--accent-2);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-copy h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(42px, 8vw, 82px);
    line-height: 0.96;
    letter-spacing: -0.06em;
}

.hero-copy p {
    max-width: 680px;
    margin: 24px 0 0;
    color: var(--soft);
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.7;
}

.hero-tags,
.detail-meta,
.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

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

.hero-tags span,
.chip,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border: 1px solid rgba(52, 211, 153, 0.28);
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.12);
    color: #d1fae5;
    font-size: 13px;
    white-space: nowrap;
}

.chip-link:hover {
    border-color: rgba(52, 211, 153, 0.75);
}

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

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

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

.btn.primary {
    color: #052e2b;
    background: linear-gradient(135deg, var(--accent-2), #a7f3d0);
    box-shadow: 0 14px 42px rgba(16, 185, 129, 0.28);
}

.btn.ghost {
    color: var(--text);
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.72);
}

.hero-poster {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(15, 23, 42, 0.65);
    box-shadow: var(--shadow);
    aspect-ratio: 3 / 4;
}

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

.hero-poster:hover img {
    transform: scale(1.05);
}

.hero-poster span {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    display: grid;
    place-items: center;
    height: 44px;
    border-radius: 999px;
    color: #052e2b;
    font-weight: 800;
    background: rgba(167, 243, 208, 0.92);
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 28px;
    z-index: 5;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 18px;
}

.hero-prev,
.hero-next {
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.78);
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dots button {
    width: 28px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
}

.hero-dots button.active {
    background: var(--accent-2);
}

.page-main {
    padding-top: 36px;
}

.page-hero {
    margin-bottom: 34px;
    padding: 64px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background:
        radial-gradient(circle at right, rgba(16, 185, 129, 0.18), transparent 28rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.94));
    box-shadow: var(--shadow);
}

.compact-hero,
.category-hero,
.ranking-hero {
    min-height: 260px;
}

.page-hero h1 {
    margin: 0;
    font-size: clamp(34px, 6vw, 58px);
    letter-spacing: -0.05em;
}

.page-hero p {
    max-width: 760px;
    margin: 18px 0 0;
    color: var(--soft);
    font-size: 18px;
    line-height: 1.8;
}

.search-panel,
.content-section,
.hot-section,
.detail-content {
    margin-top: 42px;
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 520px);
    gap: 24px;
    align-items: end;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
}

.search-panel h2,
.section-head h2,
.hot-copy h2,
.prose-card h2 {
    margin: 0;
    font-size: 28px;
    letter-spacing: -0.035em;
}

.search-panel p,
.hot-copy p,
.prose-card p,
.category-overview-card p,
.site-footer p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.75;
}

.search-tools {
    display: grid;
    gap: 12px;
}

.search-input,
.sort-control,
.genre-control {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: none;
    color: var(--text);
    background: rgba(2, 6, 23, 0.78);
}

.search-input:focus,
.sort-control:focus,
.genre-control:focus {
    border-color: rgba(52, 211, 153, 0.75);
}

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

.text-link {
    color: var(--accent-2);
    font-weight: 800;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(52, 211, 153, 0.42);
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.28);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.9);
}

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

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

.poster-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 42%, rgba(2, 6, 23, 0.78));
}

.play-dot {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #052e2b;
    background: rgba(167, 243, 208, 0.94);
}

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    min-width: 38px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: #451a03;
    font-size: 13px;
    font-weight: 900;
    background: linear-gradient(135deg, #fde68a, #f59e0b);
}

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

.movie-card h3 {
    margin: 12px 0 0;
    font-size: 18px;
    line-height: 1.35;
}

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

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

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

.category-tile {
    position: relative;
    min-height: 160px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.88);
}

.category-tile img {
    width: 100%;
    height: 100%;
    min-height: 160px;
    object-fit: cover;
    opacity: 0.75;
    transition: transform 0.4s ease;
}

.category-tile:hover img {
    transform: scale(1.08);
}

.tile-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 10%, rgba(2, 6, 23, 0.88));
}

.category-tile strong,
.category-tile em {
    position: absolute;
    left: 16px;
    right: 16px;
}

.category-tile strong {
    bottom: 38px;
    font-size: 20px;
}

.category-tile em {
    bottom: 16px;
    color: var(--soft);
    font-style: normal;
}

.hot-section {
    display: grid;
    grid-template-columns: 0.82fr 1.18fr;
    gap: 28px;
    align-items: start;
    margin-bottom: 72px;
    padding: 28px;
    border: 1px solid rgba(52, 211, 153, 0.22);
    border-radius: 26px;
    background:
        radial-gradient(circle at left, rgba(16, 185, 129, 0.2), transparent 22rem),
        rgba(15, 23, 42, 0.72);
}

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

.hot-list a,
.mini-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.5);
}

.hot-list a:hover,
.mini-links a:hover {
    border-color: rgba(52, 211, 153, 0.52);
    color: var(--accent-2);
}

.hot-list em {
    flex: none;
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 20px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.74);
}

.category-cover {
    overflow: hidden;
    border-radius: 16px;
    aspect-ratio: 4 / 5;
}

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

.category-overview-card h2 {
    margin: 0;
    font-size: 24px;
}

.mini-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 16px;
}

.mini-links a {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    margin-top: -36px;
    background: #020617;
}

.detail-bg {
    background-image: var(--detail-image);
    background-size: cover;
    background-position: center;
    opacity: 0.32;
    filter: blur(6px) saturate(1.1);
    transform: scale(1.04);
}

.detail-mask {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.68)),
        linear-gradient(0deg, #020617 0%, transparent 42%);
}

.detail-layout {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 38px;
    align-items: center;
    min-height: 620px;
    padding: 74px 0 70px;
}

.player-card {
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 24px;
    overflow: hidden;
    background: #000;
    box-shadow: var(--shadow);
}

.video-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

.movie-video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: var(--text);
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
}

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

.big-play {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #052e2b;
    font-size: 34px;
    background: rgba(167, 243, 208, 0.94);
    box-shadow: 0 0 40px rgba(16, 185, 129, 0.38);
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
    color: var(--muted);
}

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

.detail-copy h1 {
    margin: 0;
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1;
    letter-spacing: -0.055em;
}

.detail-one-line {
    margin: 20px 0 0;
    color: var(--soft);
    font-size: 18px;
    line-height: 1.75;
}

.detail-meta,
.detail-tags {
    margin-top: 18px;
}

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

.prose-card {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.74);
}

.prose-card p {
    color: var(--soft);
    font-size: 16px;
}

.related-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 72px;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr 1fr;
    gap: 32px;
    padding: 42px 0;
}

.footer-logo {
    margin-bottom: 12px;
}

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

.footer-links {
    display: grid;
    gap: 9px;
    color: var(--muted);
}

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

.footer-bottom {
    padding: 18px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    text-align: center;
}

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

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

    .nav-toggle {
        display: inline-grid;
        place-items: center;
    }

    .hero-content,
    .detail-layout,
    .hot-section,
    .search-panel,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        display: none;
    }

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

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

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

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

    .hero,
    .hero-content {
        min-height: 78vh;
    }

    .hero-content {
        padding: 54px 0 92px;
    }

    .hero-copy h1 {
        font-size: 42px;
    }

    .movie-grid,
    .related-grid,
    .category-grid,
    .hot-list,
    .mini-links {
        grid-template-columns: 1fr;
    }

    .page-hero {
        padding: 36px 22px;
        border-radius: 22px;
    }

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

    .category-cover {
        aspect-ratio: 16 / 9;
    }

    .detail-layout {
        min-height: auto;
        padding: 36px 0 54px;
    }

    .detail-hero {
        min-height: auto;
    }
}
