:root {
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: #111c33;
    --panel-strong: #172033;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-2: #cbd5e1;
    --cyan: #22d3ee;
    --cyan-dark: #0891b2;
    --amber: #f59e0b;
    --green: #22c55e;
    --pink: #ec4899;
    --radius-lg: 28px;
    --radius: 18px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 36rem), var(--bg);
    color: var(--text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

body.menu-open {
    overflow: hidden;
}

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

img {
    display: block;
    width: 100%;
    height: auto;
    background: #0f172a;
}

button,
input {
    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.82);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.nav-wrap {
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 72px;
}

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

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--cyan), var(--cyan-dark));
    color: #001018;
    box-shadow: 0 12px 36px rgba(34, 211, 238, 0.28);
}

.brand-text {
    white-space: nowrap;
    font-size: 20px;
}

.site-menu {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.site-menu::-webkit-scrollbar {
    display: none;
}

.site-menu a {
    color: var(--muted-2);
    font-size: 14px;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.site-menu a:hover {
    color: var(--cyan);
}

.top-search,
.wide-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-search input,
.wide-search input,
.filter-bar input {
    width: 210px;
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: none;
    padding: 10px 14px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.82);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.top-search input:focus,
.wide-search input:focus,
.filter-bar input:focus {
    border-color: rgba(34, 211, 238, 0.82);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.top-search button,
.wide-search button,
.btn,
.filter-bar a {
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    color: #001018;
    background: var(--cyan);
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.top-search button:hover,
.wide-search button:hover,
.btn:hover,
.filter-bar a:hover {
    transform: translateY(-1px);
    background: #67e8f9;
}

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

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--text);
    border-radius: 999px;
}

.hero-carousel {
    position: relative;
    background: #020617;
}

.hero-stage {
    position: relative;
    height: 72vh;
    min-height: 560px;
    overflow: hidden;
}

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

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

.hero-slide img {
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
}

.hero-overlay,
.detail-bg::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.18)), linear-gradient(0deg, #020617, rgba(2, 6, 23, 0.12) 46%, rgba(2, 6, 23, 0.78));
}

.hero-content {
    position: absolute;
    left: max(32px, calc((100vw - 1180px) / 2));
    bottom: 76px;
    width: min(720px, calc(100% - 64px));
    z-index: 2;
}

.hero-kicker,
.page-hero span {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(34, 211, 238, 0.42);
    border-radius: 999px;
    padding: 6px 12px;
    color: var(--cyan);
    background: rgba(8, 145, 178, 0.16);
    font-size: 13px;
    font-weight: 700;
}

.hero-content h1,
.page-hero h1,
.detail-copy h1 {
    margin: 16px 0 16px;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero-content p,
.page-hero p,
.detail-copy p {
    margin: 0 0 26px;
    color: var(--muted-2);
    font-size: clamp(16px, 2vw, 20px);
}

.hero-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn.primary {
    background: var(--cyan);
}

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

.btn.ghost:hover {
    color: var(--cyan);
    background: rgba(15, 23, 42, 0.95);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    color: var(--text);
    background: rgba(2, 6, 23, 0.58);
    cursor: pointer;
    transform: translateY(-50%);
    font-size: 32px;
}

.hero-arrow:hover {
    background: rgba(8, 145, 178, 0.78);
}

.hero-arrow.prev {
    left: 22px;
}

.hero-arrow.next {
    right: 22px;
}

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

.hero-dots button {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.active {
    width: 34px;
    background: var(--cyan);
}

.quick-search-panel {
    padding: 24px 0;
    background: #020617;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.quick-search-inner {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 520px);
    gap: 22px;
    align-items: center;
}

.quick-search-inner h2 {
    margin: 0 0 4px;
    font-size: 22px;
}

.quick-search-inner p {
    margin: 0;
    color: var(--muted);
}

.wide-search input {
    width: 100%;
}

.content-section {
    padding: 72px 0;
}

.content-section.slate {
    background: #0f172a;
}

.content-section.dark {
    background: linear-gradient(180deg, #020617, #0f172a);
}

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

.section-head h2 {
    display: inline-block;
    margin: 0;
    font-size: clamp(26px, 3vw, 36px);
    letter-spacing: -0.03em;
}

.section-head p {
    margin: 8px 0 0;
    color: var(--muted);
}

.section-icon {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    margin-right: 10px;
    border-radius: 14px;
    color: var(--cyan);
    background: rgba(34, 211, 238, 0.12);
}

.section-more {
    color: var(--cyan);
    font-weight: 700;
    white-space: nowrap;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.88);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.18);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.44);
    background: rgba(17, 28, 51, 0.98);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #111827;
}

.movie-card.compact .poster-link {
    aspect-ratio: 3 / 4;
}

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

.movie-card:hover .poster-link img,
.rank-item:hover img,
.category-overview-card:hover .category-number {
    transform: scale(1.05);
}

.poster-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    border-radius: 999px;
    padding: 5px 10px;
    color: #001018;
    background: var(--cyan);
    font-size: 12px;
    font-weight: 800;
}

.card-body {
    padding: 18px;
}

.card-meta,
.rank-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 13px;
}

.card-meta a,
.rank-meta a {
    color: var(--cyan);
}

.movie-card h2,
.rank-body h2,
.category-overview-card h2 {
    margin: 0 0 10px;
    font-size: 20px;
    line-height: 1.3;
}

.movie-card h2 a:hover,
.rank-body h2 a:hover,
.category-overview-card h2 a:hover {
    color: var(--cyan);
}

.movie-card p,
.rank-body p,
.category-overview-card p {
    margin: 0 0 14px;
    color: var(--muted-2);
    font-size: 14px;
}

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

.tag-row span {
    border-radius: 999px;
    padding: 5px 9px;
    color: var(--muted-2);
    background: rgba(148, 163, 184, 0.12);
    font-size: 12px;
}

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

.category-card,
.category-overview-card {
    display: block;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(8, 145, 178, 0.12));
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover,
.category-overview-card:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 211, 238, 0.48);
}

.category-card span,
.category-number {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-bottom: 16px;
    border-radius: 14px;
    color: #001018;
    background: var(--cyan);
    font-weight: 900;
}

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

.category-card p,
.category-overview-card p {
    color: var(--muted-2);
}

.category-overview-card {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 18px;
}

.category-overview-card ul,
.site-footer ul {
    padding: 0;
    margin: 12px 0 0;
    list-style: none;
}

.category-overview-card li,
.site-footer li {
    margin: 8px 0;
}

.category-overview-card a:hover,
.site-footer a:hover {
    color: var(--cyan);
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 86px 110px 1fr;
    gap: 16px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
    background: rgba(15, 23, 42, 0.88);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    border-color: rgba(34, 211, 238, 0.42);
}

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

.rank-cover {
    display: block;
    overflow: hidden;
    border-radius: 14px;
    aspect-ratio: 3 / 4;
}

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

.page-hero {
    position: relative;
    padding: 96px 0 56px;
    overflow: hidden;
    background: radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.18), transparent 28rem), linear-gradient(180deg, #020617, #0f172a);
}

.page-hero .container {
    position: relative;
    z-index: 2;
}

.page-hero h1 {
    max-width: 860px;
}

.page-hero p {
    max-width: 760px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 14px;
}

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

.breadcrumb em {
    color: var(--text);
    font-style: normal;
}

.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.category-tabs a {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 12px;
    color: var(--muted-2);
    background: rgba(15, 23, 42, 0.68);
}

.category-tabs a:hover {
    color: var(--cyan);
    border-color: rgba(34, 211, 238, 0.48);
}

.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    background: rgba(2, 6, 23, 0.42);
}

.filter-bar input {
    width: min(100%, 520px);
}

.empty-state {
    display: none;
    margin-top: 30px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 30px;
    color: var(--muted-2);
    text-align: center;
    background: rgba(15, 23, 42, 0.82);
}

.empty-state.show {
    display: block;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 86px 0 58px;
    background: #020617;
}

.detail-bg {
    position: absolute;
    inset: 0;
    opacity: 0.32;
}

.detail-bg img {
    height: 100%;
    object-fit: cover;
    filter: blur(3px);
    transform: scale(1.04);
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
}

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

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

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

.detail-copy {
    max-width: 760px;
}

.detail-copy h1 {
    margin-top: 18px;
}

.detail-meta span {
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(148, 163, 184, 0.12);
}

.detail-tags {
    margin: 16px 0 24px;
}

.player-section {
    padding: 42px 0;
    background: #020617;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.22);
    border-radius: var(--radius-lg);
    background: #000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.movie-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    border: 0;
    padding: 0;
    color: var(--text);
    background: #000;
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-cover img {
    position: absolute;
    inset: 0;
    height: 100%;
    object-fit: cover;
    opacity: 0.58;
}

.play-badge {
    position: relative;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    border-radius: 999px;
    color: #001018;
    background: var(--cyan);
    box-shadow: 0 18px 60px rgba(34, 211, 238, 0.34);
    font-size: 34px;
}

.play-text {
    position: absolute;
    z-index: 2;
    margin-top: 128px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.player-shell.is-playing .player-cover {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.detail-content article {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px;
    background: rgba(2, 6, 23, 0.28);
}

.detail-text-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.detail-content h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.detail-content p {
    margin: 0;
    color: var(--muted-2);
    font-size: 16px;
}

.detail-nav-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 30px;
}

.detail-nav-links a {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 18px;
    color: var(--muted-2);
    background: rgba(15, 23, 42, 0.82);
}

.detail-nav-links a:hover {
    color: var(--cyan);
    border-color: rgba(34, 211, 238, 0.44);
}

.site-footer {
    border-top: 1px solid var(--line);
    background: #020617;
}

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

.site-footer p {
    max-width: 560px;
    color: var(--muted);
}

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

.site-footer li a {
    color: var(--muted-2);
}

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

[data-filter-item].hidden,
.movie-card.hidden,
.rank-item.hidden {
    display: none;
}

@media (max-width: 1060px) {
    .top-search {
        display: none;
    }

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

    .compact-list {
        grid-template-columns: 1fr;
    }

    .quick-search-inner,
    .detail-text-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .nav-wrap {
        justify-content: space-between;
    }

    .site-menu {
        position: fixed;
        inset: 72px 0 auto 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        max-height: calc(100vh - 72px);
        overflow-y: auto;
        padding: 12px 16px 24px;
        background: rgba(2, 6, 23, 0.98);
        border-bottom: 1px solid var(--line);
    }

    body.menu-open .site-menu {
        display: flex;
    }

    .site-menu a {
        padding: 14px 0;
        border-bottom: 1px solid rgba(148, 163, 184, 0.12);
        font-size: 16px;
    }

    .menu-toggle {
        display: block;
    }

    .hero-stage {
        min-height: 620px;
        height: 76vh;
    }

    .hero-content {
        left: 20px;
        bottom: 76px;
        width: calc(100% - 40px);
    }

    .hero-arrow {
        display: none;
    }

    .content-section {
        padding: 52px 0;
    }

    .section-head,
    .filter-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .movie-grid,
    .small-grid,
    .category-grid,
    .category-overview-grid,
    .detail-layout,
    .detail-nav-links,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .rank-item {
        grid-template-columns: 74px 86px 1fr;
        gap: 12px;
    }

    .rank-body p {
        display: none;
    }

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

    .player-section {
        padding: 24px 0;
    }

    .play-badge {
        width: 68px;
        height: 68px;
        font-size: 28px;
    }
}

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

    .brand-text {
        font-size: 17px;
    }

    .hero-content h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 34px;
    }

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

    .btn,
    .wide-search button,
    .filter-bar a {
        text-align: center;
    }

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

    .rank-cover {
        width: 130px;
    }
}
