:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.72);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --accent: #14b8a6;
    --accent-2: #38bdf8;
    --accent-3: #a855f7;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(20, 184, 166, 0.16), transparent 32rem),
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.13), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
}

body.nav-open {
    overflow: hidden;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    border-bottom: 1px solid transparent;
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.site-header.scrolled,
.nav-open .site-header {
    background: rgba(2, 6, 23, 0.82);
    border-color: var(--line);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

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

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

.brand {
    font-size: 20px;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 10px 26px rgba(20, 184, 166, 0.28);
}

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

.nav-link,
.mobile-link {
    color: #cbd5e1;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link {
    padding: 10px 16px;
    border-radius: 999px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: #ffffff;
    background: rgba(20, 184, 166, 0.14);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.72);
    padding: 10px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    background: #e2e8f0;
    margin: 5px 0;
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.94);
}

.mobile-link {
    display: block;
    padding: 14px;
    border-radius: 14px;
}

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

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: saturate(1.15);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.72) 44%, rgba(2, 6, 23, 0.46)),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.18) 35%, rgba(2, 6, 23, 0.25) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 760px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 52px;
    align-items: center;
    padding-top: 90px;
}

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

.eyebrow,
.section-title span,
.panel-title span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 18px 0 10px;
    font-size: clamp(34px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.hero h2 {
    margin: 0 0 18px;
    color: #ccfbf1;
    font-size: clamp(22px, 3vw, 40px);
    font-weight: 900;
}

.hero p {
    max-width: 710px;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.85;
}

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

.hero-tags span,
.detail-meta span,
.meta-row span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.62);
    font-size: 12px;
    font-weight: 700;
}

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

.primary-btn,
.ghost-btn,
.text-link,
.search-page-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-btn,
.search-page-form button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 14px 36px rgba(20, 184, 166, 0.24);
}

.primary-btn:hover,
.search-page-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 45px rgba(20, 184, 166, 0.34);
}

.ghost-btn {
    border: 1px solid rgba(148, 163, 184, 0.28);
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.66);
}

.ghost-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(20, 184, 166, 0.55);
    background: rgba(20, 184, 166, 0.12);
}

.hero-poster {
    position: relative;
    display: block;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow);
    isolation: isolate;
}

.hero-poster::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 30px;
    background: linear-gradient(135deg, var(--accent), transparent, var(--accent-3));
    z-index: -1;
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 3 / 4.25;
    object-fit: cover;
    transform: scale(1.01);
    transition: transform 0.3s ease;
}

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

.hero-control {
    position: absolute;
    left: 50%;
    bottom: 42px;
    z-index: 4;
    display: flex;
    gap: 12px;
    transform: translateX(-50%);
}

.hero-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(203, 213, 225, 0.45);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
    width: 34px;
    background: var(--accent);
}

.search-strip,
.section-block,
.page-shell,
.detail-content,
.related-section {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.search-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    margin-top: -36px;
    position: relative;
    z-index: 5;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.86);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.search-strip strong {
    display: block;
    margin-bottom: 4px;
    font-size: 20px;
}

.search-strip span {
    color: var(--muted);
}

.search-inline {
    width: min(430px, 100%);
}

.search-inline input,
.search-page-form input {
    width: 100%;
    height: 48px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    outline: 0;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.58);
    padding: 0 20px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-inline input:focus,
.search-page-form input:focus {
    border-color: rgba(20, 184, 166, 0.66);
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
}

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

.section-title,
.panel-title {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.section-title.compact,
.panel-title {
    align-items: center;
}

.section-title h2,
.panel-title h2 {
    margin: 6px 0 0;
    font-size: clamp(26px, 3vw, 36px);
    letter-spacing: -0.04em;
}

.section-title a,
.text-link {
    color: #99f6e4;
    font-weight: 900;
}

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

.category-card,
.category-large-card,
.story-card,
.rank-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(18px);
}

.category-card {
    position: relative;
    min-height: 196px;
    padding: 20px;
    overflow: hidden;
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.25));
}

.category-card span,
.category-card p {
    position: relative;
    z-index: 1;
}

.category-card span {
    display: block;
    margin-top: 76px;
    font-size: 22px;
    font-weight: 900;
}

.category-card p {
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.7;
}

.category-card:hover img {
    transform: scale(1.08);
    opacity: 0.44;
}

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

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

.movie-card {
    display: block;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.7);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card.hidden {
    display: none;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(20, 184, 166, 0.45);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
}

.poster-frame {
    position: relative;
    margin: 0;
    overflow: hidden;
    background: #0f172a;
}

.poster-frame img {
    width: 100%;
    aspect-ratio: 3 / 4.1;
    object-fit: cover;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.movie-card:hover .poster-frame img {
    transform: scale(1.08);
    filter: saturate(1.15);
}

.quality-badge,
.play-dot {
    position: absolute;
    display: inline-grid;
    place-items: center;
    color: #ffffff;
    font-weight: 900;
}

.quality-badge {
    top: 12px;
    left: 12px;
    min-width: 40px;
    height: 24px;
    border-radius: 999px;
    background: rgba(20, 184, 166, 0.9);
    font-size: 12px;
}

.play-dot {
    right: 12px;
    bottom: 12px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(10px);
}

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

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

.movie-card p {
    min-height: 48px;
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

.meta-row {
    gap: 6px;
    margin-bottom: 12px;
}

.meta-row span {
    min-height: 24px;
    padding: 3px 8px;
    font-size: 11px;
}

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

.tag-row.large {
    gap: 8px;
    margin: 18px 0 26px;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 370px;
    gap: 30px;
    align-items: start;
}

.rank-panel {
    position: sticky;
    top: 92px;
    padding: 22px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 42px 56px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.13);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.34);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    border-color: rgba(20, 184, 166, 0.42);
}

.rank-num {
    color: var(--accent);
    font-weight: 900;
    font-size: 18px;
}

.rank-item img {
    width: 56px;
    height: 74px;
    border-radius: 12px;
    object-fit: cover;
}

.rank-text {
    min-width: 0;
}

.rank-text strong,
.rank-text em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-text strong {
    margin-bottom: 5px;
}

.rank-text em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.page-shell {
    padding-top: 112px;
}

.page-hero {
    position: relative;
    padding: 64px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 30px;
    background:
        radial-gradient(circle at 20% 0%, rgba(20, 184, 166, 0.22), transparent 26rem),
        radial-gradient(circle at 82% 18%, rgba(168, 85, 247, 0.18), transparent 24rem),
        rgba(15, 23, 42, 0.78);
    box-shadow: var(--shadow);
}

.small-hero h1 {
    margin: 16px 0;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.06em;
}

.small-hero p {
    max-width: 760px;
    color: #cbd5e1;
    font-size: 17px;
    line-height: 1.9;
}

.page-search {
    display: block;
    margin-top: 24px;
}

.category-list-page {
    display: grid;
    gap: 22px;
}

.category-large-card {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 24px;
    padding: 20px;
}

.category-cover {
    overflow: hidden;
    border-radius: 18px;
}

.category-cover img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.category-large-card:hover .category-cover img {
    transform: scale(1.06);
}

.category-large-card h2 {
    margin: 8px 0;
    font-size: 28px;
}

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

.mini-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 18px;
}

.mini-links a {
    padding: 7px 10px;
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(2, 6, 23, 0.44);
    font-size: 13px;
}

.detail-page {
    padding-bottom: 36px;
}

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

.detail-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(4px) saturate(1.1);
    transform: scale(1.04);
}

.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.74), rgba(2, 6, 23, 0.55)),
        linear-gradient(0deg, #020617, rgba(2, 6, 23, 0.2) 48%, rgba(2, 6, 23, 0.6));
}

.detail-inner {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 620px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
    padding-top: 86px;
}

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

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

.crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
}

.crumbs a {
    color: #99f6e4;
}

.detail-copy h1 {
    margin: 18px 0 16px;
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.08;
    letter-spacing: -0.06em;
}

.lead {
    max-width: 760px;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.9;
}

.player-section {
    width: min(1180px, calc(100% - 32px));
    margin: -80px auto 0;
    position: relative;
    z-index: 3;
}

.player-box {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(20, 184, 166, 0.3);
    border-radius: 28px;
    background: #000000;
    box-shadow: var(--shadow);
}

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

.play-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.12), rgba(2, 6, 23, 0.52));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-layer span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 18px 45px rgba(20, 184, 166, 0.38);
    font-size: 34px;
}

.player-box.is-playing .play-layer {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
    padding-top: 34px;
}

.story-card {
    padding: 26px;
}

.story-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.story-card p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.95;
}

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

.search-page-form {
    display: flex;
    gap: 12px;
    max-width: 680px;
    margin-top: 26px;
}

.search-page-form input {
    border-radius: 18px;
}

.search-page-form button {
    border: 0;
    border-radius: 18px;
    cursor: pointer;
}

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

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 30px;
    padding: 42px 0;
}

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

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

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.footer-links a {
    color: #cbd5e1;
    font-weight: 800;
}

@media (max-width: 1040px) {
    .hero-content,
    .detail-inner,
    .split-layout {
        grid-template-columns: 1fr;
    }

    .hero-poster,
    .detail-poster {
        width: min(330px, 72vw);
    }

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

    .rank-panel {
        position: static;
    }
}

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

    .menu-toggle {
        display: block;
    }

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

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

    .hero-content {
        padding-top: 108px;
        gap: 24px;
    }

    .hero-actions,
    .search-strip,
    .footer-inner,
    .search-page-form {
        flex-direction: column;
        align-items: stretch;
    }

    .search-strip {
        margin-top: -24px;
    }

    .category-grid,
    .movie-grid,
    .feature-grid,
    .related-grid,
    .detail-content {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

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

    .section-title {
        align-items: start;
        flex-direction: column;
    }

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

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

    .detail-inner {
        padding-top: 112px;
    }

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

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

@media (max-width: 520px) {
    .nav-wrap {
        width: min(100% - 22px, 1180px);
    }

    .brand {
        font-size: 17px;
    }

    .hero h1,
    .detail-copy h1,
    .small-hero h1 {
        letter-spacing: -0.045em;
    }

    .hero p,
    .lead,
    .small-hero p {
        font-size: 15px;
    }

    .category-grid,
    .movie-grid,
    .feature-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .movie-card p {
        min-height: 0;
    }

    .rank-item {
        grid-template-columns: 36px 50px minmax(0, 1fr);
    }

    .rank-item img {
        width: 50px;
        height: 66px;
    }
}
