:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.82);
    --border: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --text-soft: #cbd5e1;
    --muted: #94a3b8;
    --emerald: #34d399;
    --cyan: #22d3ee;
    --amber: #f59e0b;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 10% 10%, rgba(20, 184, 166, 0.18), transparent 28rem),
        radial-gradient(circle at 85% 0%, rgba(34, 211, 238, 0.14), transparent 26rem),
        linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
    color: var(--text);
    font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.65;
}

body.is-locked {
    overflow: hidden;
}

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

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

button,
input,
select {
    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), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(18px);
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.24);
}

.top-nav {
    width: min(1420px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 74px;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #022c22;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    box-shadow: 0 0 28px rgba(34, 211, 238, 0.28);
}

.brand-name,
.footer-brand {
    font-size: 1.45rem;
    background: linear-gradient(90deg, var(--emerald), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link,
.nav-categories a,
.mobile-panel a {
    color: var(--text-soft);
    font-weight: 700;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.nav-categories a:hover,
.mobile-panel a:hover {
    color: var(--emerald);
}

.nav-categories {
    display: flex;
    gap: 14px;
    padding-left: 16px;
    border-left: 1px solid var(--border);
}

.nav-categories a {
    font-size: 0.92rem;
}

.nav-search,
.hero-search {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-search input,
.hero-search input,
.filters input,
.filters select {
    min-width: 220px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.82);
    color: var(--text);
    padding: 12px 16px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input:focus,
.hero-search input:focus,
.filters input:focus,
.filters select:focus {
    border-color: rgba(52, 211, 153, 0.72);
    box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.12);
}

.nav-search button,
.hero-search button,
.primary-button,
.ghost-button {
    border: 0;
    border-radius: 999px;
    padding: 12px 20px;
    cursor: pointer;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.nav-search button,
.hero-search button,
.primary-button {
    color: #04111d;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    box-shadow: 0 14px 36px rgba(34, 211, 238, 0.2);
}

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

.nav-search button:hover,
.hero-search button:hover,
.primary-button:hover,
.ghost-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 42px rgba(52, 211, 153, 0.22);
}

.menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.72);
    cursor: pointer;
}

.menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--text);
    border-radius: 10px;
}

.mobile-panel {
    display: none;
    width: min(1420px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.96);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.mobile-panel.is-open {
    display: grid;
}

main {
    overflow: hidden;
}

.hero-slider {
    position: relative;
    min-height: 720px;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.hero-track,
.hero-slide,
.hero-bg {
    position: absolute;
    inset: 0;
}

.hero-slide {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 420px);
    align-items: center;
    gap: 56px;
    width: min(1420px, calc(100% - 32px));
    margin: 0 auto;
    opacity: 0;
    transform: scale(1.02);
    pointer-events: none;
    transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-bg {
    left: 50%;
    width: 100vw;
    transform: translateX(-50%);
    opacity: 0.34;
    filter: blur(4px) saturate(1.08);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 44%, rgba(2, 6, 23, 0.94) 100%),
        radial-gradient(circle at 65% 42%, rgba(34, 211, 238, 0.24), transparent 28rem);
}

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

.hero-content {
    position: relative;
    z-index: 2;
    padding-top: 56px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--emerald);
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    line-height: 1.08;
    font-size: clamp(2.45rem, 5vw, 5.6rem);
    letter-spacing: -0.05em;
}

.hero-desc,
.page-hero p,
.detail-one-line,
.section-heading p {
    max-width: 760px;
    color: var(--text-soft);
    font-size: 1.08rem;
}

.hero-tags,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 22px 0;
}

.hero-tags span,
.tag-list span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    border: 1px solid rgba(52, 211, 153, 0.28);
    border-radius: 999px;
    color: #bbf7d0;
    background: rgba(16, 185, 129, 0.08);
    font-size: 0.82rem;
    font-weight: 800;
}

.hero-actions,
.page-hero-actions,
.detail-actions,
.next-prev-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.hero-poster {
    position: relative;
    z-index: 2;
    overflow: hidden;
    border: 1px solid rgba(52, 211, 153, 0.3);
    border-radius: 34px;
    box-shadow: var(--shadow), 0 0 80px rgba(34, 211, 238, 0.16);
    transform: rotate(1.5deg);
}

.hero-poster img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.hero-controls {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 112px;
    display: flex;
    gap: 10px;
    width: min(1420px, calc(100% - 32px));
    transform: translateX(-50%);
}

.hero-dot {
    width: 38px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.42);
    cursor: pointer;
}

.hero-dot.is-active {
    background: linear-gradient(90deg, var(--emerald), var(--cyan));
}

.hero-search {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 36px;
    width: min(740px, calc(100% - 32px));
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(18px);
    transform: translateX(-50%);
}

.hero-search input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.section-wrap {
    width: min(1420px, calc(100% - 32px));
    margin: 0 auto;
    padding: 64px 0;
}

.section-heading {
    max-width: 860px;
    margin-bottom: 28px;
}

.section-heading h2,
.section-title-row h2,
.category-preview h2,
.story-card h2,
.info-card h2,
.footer-grid h2 {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.45rem);
    letter-spacing: -0.03em;
}

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

.compact-title {
    margin-bottom: 18px;
}

.text-link {
    color: var(--emerald);
    font-weight: 900;
}

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

.category-card {
    min-height: 190px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background:
        linear-gradient(145deg, rgba(15, 23, 42, 0.86), rgba(30, 41, 59, 0.62)),
        radial-gradient(circle at top right, rgba(52, 211, 153, 0.18), transparent 12rem);
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
    transform: translateY(-6px);
    border-color: rgba(52, 211, 153, 0.4);
}

.category-card span {
    color: var(--emerald);
    font-weight: 900;
}

.category-card strong {
    display: block;
    margin: 10px 0;
    font-size: 1.35rem;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(52, 211, 153, 0.38);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.34);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.12), rgba(34, 211, 238, 0.12));
}

.poster-link img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.poster-glow {
    position: absolute;
    inset: auto 0 0;
    height: 48%;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.88));
}

.poster-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    color: #052e16;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    font-size: 0.82rem;
    font-weight: 900;
}

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

.movie-meta {
    margin: 0 0 6px;
    color: var(--emerald);
    font-size: 0.86rem;
    font-weight: 900;
}

.movie-card h3 {
    margin: 0;
    min-height: 2.8em;
    font-size: 1.05rem;
    line-height: 1.35;
}

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

.movie-desc {
    margin: 10px 0 0;
    min-height: 4.9em;
    color: var(--muted);
    font-size: 0.92rem;
}

.tag-list {
    margin: 14px 0 0;
}

.split-showcase {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 28px;
    align-items: start;
}

.rank-panel,
.story-card,
.info-card,
.filter-panel,
.category-preview {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
}

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

.rank-list,
.mini-rank-list {
    display: grid;
    gap: 14px;
}

.rank-row {
    display: grid;
    grid-template-columns: 54px 82px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(2, 6, 23, 0.34);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
    transform: translateX(4px);
    border-color: rgba(52, 211, 153, 0.35);
}

.rank-index {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #04111d;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    font-weight: 900;
}

.rank-thumb {
    overflow: hidden;
    border-radius: 14px;
}

.rank-thumb img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.rank-info h3 {
    margin: 0 0 6px;
    font-size: 1rem;
}

.rank-info p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    color: var(--text-soft);
    font-size: 0.82rem;
}

.full-rank-list .rank-row {
    grid-template-columns: 68px 96px minmax(0, 1fr);
}

.page-hero {
    width: min(1420px, calc(100% - 32px));
    margin: 36px auto 0;
    padding: 72px;
    border: 1px solid var(--border);
    border-radius: 36px;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.72)),
        radial-gradient(circle at 88% 20%, rgba(34, 211, 238, 0.2), transparent 25rem),
        radial-gradient(circle at 10% 70%, rgba(52, 211, 153, 0.16), transparent 20rem);
    box-shadow: var(--shadow);
}

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

.category-hero {
    min-height: 360px;
}

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

.category-preview-list {
    display: grid;
    gap: 28px;
}

.category-preview {
    padding: 24px;
}

.category-preview-head {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.category-preview-head p {
    max-width: 780px;
    margin: 8px 0 0;
    color: var(--muted);
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    padding: 20px;
}

.filters input {
    flex: 1;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 68px 0;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.3;
    filter: blur(4px) saturate(1.1);
}

.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.68), rgba(2, 6, 23, 0.96));
}

.detail-backdrop img {
    height: 100%;
    object-fit: cover;
}

.detail-layout {
    position: relative;
    z-index: 2;
    width: min(1420px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(220px, 360px) minmax(0, 1fr);
    gap: 48px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(52, 211, 153, 0.32);
    border-radius: 32px;
    box-shadow: var(--shadow);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    color: var(--muted);
}

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

.player-section {
    padding-top: 18px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(52, 211, 153, 0.28);
    border-radius: 32px;
    background: #000;
    box-shadow: var(--shadow);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: radial-gradient(circle, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.62));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
    width: 86px;
    height: 86px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    box-shadow: 0 24px 60px rgba(34, 211, 238, 0.32);
    position: relative;
}

.play-icon::after {
    content: "";
    position: absolute;
    left: 35px;
    top: 27px;
    border-left: 24px solid #04111d;
    border-top: 16px solid transparent;
    border-bottom: 16px solid transparent;
}

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

.story-card,
.info-card {
    padding: 28px;
}

.story-card p,
.info-card dd {
    color: var(--text-soft);
}

.info-card dl {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 12px;
    margin: 20px 0 0;
}

.info-card dt {
    color: var(--emerald);
    font-weight: 900;
}

.info-card dd {
    margin: 0;
}

.related-section {
    padding-top: 20px;
}

.next-prev-links {
    margin-top: 26px;
}

.result-summary {
    margin-bottom: 20px;
    color: var(--text-soft);
    font-weight: 800;
}

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

.footer-grid {
    width: min(1420px, calc(100% - 32px));
    margin: 0 auto;
    padding: 52px 0 28px;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(180px, 0.6fr) minmax(220px, 0.8fr);
    gap: 34px;
}

.footer-grid p,
.footer-grid li,
.copyright {
    color: var(--muted);
}

.footer-grid ul {
    list-style: none;
    padding: 0;
    margin: 14px 0 0;
}

.footer-grid li + li {
    margin-top: 8px;
}

.footer-grid a:hover {
    color: var(--emerald);
}

.copyright {
    width: min(1420px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 32px;
}

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

@media (max-width: 1180px) {
    .nav-categories,
    .nav-search {
        display: none;
    }

    .menu-button {
        display: block;
        margin-left: auto;
    }

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

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

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

    .rank-panel {
        position: static;
    }
}

@media (max-width: 860px) {
    .top-nav {
        min-height: 66px;
    }

    .hero-slider {
        min-height: 760px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 26px;
        padding: 48px 0 150px;
    }

    .hero-poster {
        width: min(260px, 70vw);
        margin: 0 auto;
    }

    .hero-content {
        padding-top: 12px;
        text-align: left;
    }

    .hero-controls {
        bottom: 122px;
    }

    .hero-search {
        border-radius: 24px;
        flex-direction: column;
    }

    .hero-search input,
    .hero-search button {
        width: 100%;
    }

    .section-wrap {
        padding: 44px 0;
    }

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

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

    .page-hero {
        padding: 42px 24px;
        border-radius: 28px;
    }

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

    .detail-poster {
        width: min(280px, 76vw);
    }

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

@media (max-width: 560px) {
    .brand-name {
        font-size: 1.2rem;
    }

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

    .hero-slider {
        min-height: 700px;
    }

    .hero-content h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 2.15rem;
    }

    .movie-grid,
    .small-grid,
    .tight-grid,
    .category-grid,
    .large-category-grid {
        grid-template-columns: 1fr;
    }

    .rank-row,
    .full-rank-list .rank-row {
        grid-template-columns: 44px 70px minmax(0, 1fr);
        gap: 10px;
        padding: 10px;
    }

    .rank-index {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }

    .rank-info p {
        display: none;
    }

    .filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filters input,
    .filters select {
        width: 100%;
        min-width: 0;
    }
}
