:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.88);
    --panel-solid: #111827;
    --border: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --emerald: #10b981;
    --teal: #0d9488;
    --cyan: #22d3ee;
    --amber: #f59e0b;
    --rose: #fb7185;
    --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: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(16, 185, 129, 0.16), transparent 34rem),
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.12), transparent 36rem),
        linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
}

body.nav-open {
    overflow: hidden;
}

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

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

button,
input,
select,
textarea {
    font: inherit;
}

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

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

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
}

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

.brand-mark {
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    box-shadow: 0 12px 28px rgba(16, 185, 129, 0.32);
}

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

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

.nav-link {
    color: #cbd5e1;
    font-size: 15px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #34d399;
}

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

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.72);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 99px;
    background: #e2e8f0;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-open .nav-toggle span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
}

.nav-open .nav-toggle span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.mobile-nav {
    display: none;
    padding: 0 16px 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

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

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

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

.hero-image,
.detail-backdrop {
    position: absolute;
    inset: 0;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.04);
}

.hero-overlay,
.detail-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 46%, rgba(2, 6, 23, 0.18) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.1) 46%, rgba(2, 6, 23, 0.66) 100%);
}

.hero-content {
    position: relative;
    display: flex;
    min-height: 720px;
    align-items: center;
    padding: 96px 0 120px;
}

.hero-copy {
    width: min(680px, 100%);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #5eead4;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(38px, 7vw, 78px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero p,
.page-hero p,
.detail-one-line {
    max-width: 720px;
    margin: 22px 0 0;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.8;
}

.hero-tags,
.detail-meta,
.tag-list,
.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

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

.hero-tags span,
.detail-meta span,
.tag-list span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border: 1px solid rgba(94, 234, 212, 0.2);
    border-radius: 999px;
    padding: 5px 11px;
    color: #ccfbf1;
    background: rgba(20, 184, 166, 0.12);
    font-size: 13px;
}

.hero-actions,
.detail-copy .btn {
    margin-top: 30px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 999px;
    padding: 0 20px;
    border: 1px solid transparent;
    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(-2px);
}

.btn.primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    box-shadow: 0 16px 30px rgba(16, 185, 129, 0.28);
}

.btn.secondary {
    color: #ecfeff;
    background: rgba(15, 23, 42, 0.72);
    border-color: rgba(94, 234, 212, 0.26);
}

.btn.ghost {
    color: #cbd5e1;
    background: rgba(2, 6, 23, 0.4);
    border-color: rgba(148, 163, 184, 0.22);
}

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

.hero-arrow,
.hero-dot {
    border: 0;
    color: #fff;
    background: rgba(15, 23, 42, 0.64);
    cursor: pointer;
}

.hero-arrow {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 28px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    opacity: 0.56;
}

.hero-dot.is-active {
    width: 34px;
    opacity: 1;
    background: #34d399;
}

.quick-search {
    position: relative;
    z-index: 5;
    margin-top: -52px;
}

.quick-search-inner,
.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    background: rgba(15, 23, 42, 0.82);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.quick-search h2,
.quick-search p,
.section-head h2,
.section-head p {
    margin: 0;
}

.quick-search h2,
.section-head h2 {
    font-size: 28px;
    letter-spacing: -0.03em;
}

.quick-search p,
.section-head p {
    margin-top: 7px;
    color: var(--muted);
    line-height: 1.7;
}

.site-search {
    display: flex;
    width: min(460px, 100%);
    overflow: hidden;
    border: 1px solid rgba(94, 234, 212, 0.24);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.76);
}

.site-search input,
.card-search {
    width: 100%;
    border: 0;
    outline: none;
    color: #fff;
    background: transparent;
}

.site-search input {
    padding: 0 18px;
}

.site-search button {
    border: 0;
    padding: 0 22px;
    color: #fff;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    cursor: pointer;
    font-weight: 800;
}

.section {
    padding: 72px 0;
}

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

.section-head a {
    color: #34d399;
    font-weight: 800;
}

.inline-head {
    align-items: center;
}

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

.category-chip {
    display: grid;
    min-height: 132px;
    align-content: space-between;
    border: 1px solid rgba(94, 234, 212, 0.18);
    border-radius: 20px;
    padding: 18px;
    background:
        linear-gradient(135deg, rgba(16, 185, 129, 0.14), rgba(15, 23, 42, 0.72)),
        rgba(15, 23, 42, 0.78);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.category-chip:hover {
    transform: translateY(-4px);
    border-color: rgba(94, 234, 212, 0.5);
    background:
        linear-gradient(135deg, rgba(16, 185, 129, 0.24), rgba(20, 184, 166, 0.14)),
        rgba(15, 23, 42, 0.9);
}

.category-chip span {
    font-size: 20px;
    font-weight: 900;
}

.category-chip small {
    color: var(--muted-strong);
    line-height: 1.6;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.76);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

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

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #111827);
}

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

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

.poster-badge,
.poster-type {
    position: absolute;
    top: 12px;
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    border-radius: 999px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 800;
}

.poster-badge {
    left: 12px;
    color: #022c22;
    background: #5eead4;
}

.poster-type {
    right: 12px;
    color: #f8fafc;
    background: rgba(2, 6, 23, 0.72);
}

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

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

.movie-card h3 a:hover {
    color: #34d399;
}

.movie-meta,
.movie-desc {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
}

.movie-desc {
    color: #cbd5e1;
}

.tag-list {
    margin-top: 12px;
}

.split-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(360px, 0.8fr);
    gap: 28px;
}

.rank-panel,
.text-panel,
.side-panel,
.player-card,
.category-preview {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.76);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
}

.rank-panel {
    position: sticky;
    top: 90px;
    height: max-content;
    padding: 22px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 42px 46px 1fr auto;
    gap: 12px;
    align-items: center;
    min-height: 72px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 16px;
    padding: 10px;
    background: rgba(2, 6, 23, 0.38);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.rank-row:hover {
    transform: translateX(4px);
    border-color: rgba(52, 211, 153, 0.34);
    background: rgba(20, 184, 166, 0.1);
}

.rank-num {
    color: #5eead4;
    font-size: 18px;
    font-weight: 900;
    text-align: center;
}

.rank-row img {
    width: 46px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
}

.rank-info {
    display: grid;
    gap: 4px;
    min-width: 0;
}

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

.rank-info strong {
    color: #f8fafc;
    font-size: 15px;
}

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

.rank-score {
    color: #fbbf24;
    font-weight: 900;
}

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

.page-main {
    min-height: 70vh;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top left, rgba(16, 185, 129, 0.22), transparent 34rem),
        linear-gradient(135deg, #020617, #0f172a);
}

.page-hero {
    padding: 92px 0 64px;
}

.category-hero {
    padding: 84px 0 56px;
}

.small-hero h1,
.category-hero h1 {
    font-size: clamp(34px, 5vw, 58px);
}

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

.breadcrumb a:hover {
    color: #34d399;
}

.filter-bar {
    margin-bottom: 26px;
    align-items: stretch;
}

.card-search {
    min-height: 48px;
    border: 1px solid rgba(94, 234, 212, 0.22);
    border-radius: 999px;
    padding: 0 18px;
    background: rgba(2, 6, 23, 0.6);
}

.filter-buttons {
    align-items: center;
}

.filter-btn {
    min-height: 40px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 999px;
    padding: 0 14px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.84);
    cursor: pointer;
}

.filter-btn:hover,
.filter-btn.active {
    color: #042f2e;
    border-color: transparent;
    background: #5eead4;
}

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

.stacked-sections {
    display: grid;
    gap: 28px;
}

.category-preview {
    padding: 22px;
}

.detail-hero {
    min-height: 680px;
}

.detail-hero-inner {
    position: relative;
    padding: 70px 0 80px;
}

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

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

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

.detail-copy h1 {
    font-size: clamp(34px, 5.4vw, 72px);
}

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

.large-tags span {
    min-height: 32px;
    padding: 6px 13px;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
    gap: 28px;
}

.detail-content {
    display: grid;
    gap: 24px;
}

.player-card {
    padding: 16px;
}

.video-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 18px;
    background: #000;
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background:
        radial-gradient(circle, rgba(16, 185, 129, 0.18), transparent 46%),
        rgba(2, 6, 23, 0.54);
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-icon {
    display: inline-flex;
    width: 74px;
    height: 74px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #022c22;
    background: #5eead4;
    box-shadow: 0 18px 34px rgba(16, 185, 129, 0.34);
    font-size: 30px;
}

.play-overlay strong {
    font-size: 22px;
}

.play-overlay em {
    color: #ccfbf1;
    font-style: normal;
}

.text-panel,
.side-panel {
    padding: 24px;
}

.text-panel h2,
.side-panel h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.text-panel p {
    margin: 0;
    color: #d1d5db;
    line-height: 1.95;
}

.side-panel {
    position: sticky;
    top: 90px;
    height: max-content;
}

.side-rank {
    display: grid;
    gap: 10px;
}

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

.site-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(2, 6, 23, 0.94);
}

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

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

.site-footer p {
    max-width: 520px;
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

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

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

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

.footer-links a:hover {
    color: #34d399;
}

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    padding: 18px;
    color: var(--muted);
    text-align: center;
}

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

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

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

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

    .nav-toggle {
        display: block;
    }

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

    .quick-search-inner,
    .filter-bar,
    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-search {
        width: 100%;
    }

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

    .detail-poster {
        width: min(280px, 100%);
    }

    .rank-panel,
    .side-panel {
        position: static;
    }

    .full-rank {
        grid-template-columns: 1fr;
    }
}

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

    .brand-name {
        font-size: 18px;
    }

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

    .hero-content {
        padding-top: 76px;
    }

    .hero h1,
    .page-hero h1,
    .detail-copy h1 {
        letter-spacing: -0.04em;
    }

    .hero p,
    .page-hero p,
    .detail-one-line {
        font-size: 16px;
        line-height: 1.75;
    }

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

    .quick-search {
        margin-top: -32px;
    }

    .category-grid,
    .category-index-grid,
    .movie-grid,
    .compact-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

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

    .movie-card h3 {
        font-size: 15px;
    }

    .movie-desc {
        display: none;
    }

    .section {
        padding: 50px 0;
    }

    .page-hero,
    .category-hero {
        padding: 64px 0 44px;
    }

    .detail-hero-inner {
        padding: 52px 0 58px;
    }

    .rank-row {
        grid-template-columns: 34px 42px 1fr auto;
        gap: 8px;
    }

    .rank-score {
        display: none;
    }
}

@media (max-width: 430px) {
    .category-grid,
    .category-index-grid,
    .movie-grid,
    .compact-grid {
        grid-template-columns: 1fr;
    }
}
