:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: #111827;
    --panel-card: #1e293b;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --cyan: #22d3ee;
    --blue: #2563eb;
    --cyan-soft: rgba(34, 211, 238, 0.16);
    --shadow: 0 24px 70px rgba(2, 6, 23, 0.55);
    --radius: 24px;
    --max: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.13), transparent 34rem),
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.15), transparent 36rem),
        var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.9);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(var(--max), calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
    font-weight: 800;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding-left: 2px;
    border-radius: 14px;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    color: white;
    box-shadow: 0 12px 32px rgba(34, 211, 238, 0.25);
    transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
    transform: scale(1.06) rotate(-2deg);
}

.brand-text {
    font-size: 1.2rem;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #67e8f9, #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link {
    color: var(--soft);
    font-weight: 650;
    font-size: 0.95rem;
    transition: color 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
}

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

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

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

.mobile-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: var(--soft);
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.92);
}

.mobile-nav.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.mobile-link,
.mobile-nav .nav-link {
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--soft);
    background: rgba(148, 163, 184, 0.06);
}

main {
    padding-top: 68px;
}

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

.hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 170px;
    background: linear-gradient(180deg, transparent, var(--bg));
    z-index: 3;
}

.hero-track {
    position: relative;
    min-height: 720px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 400px;
    align-items: center;
    gap: 48px;
    width: 100%;
    padding: 110px max(24px, calc((100vw - var(--max)) / 2)) 150px;
    background-image:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.78) 44%, rgba(2, 6, 23, 0.45)),
        var(--hero-bg);
    background-position: center;
    background-size: cover;
    opacity: 0;
    transform: scale(1.02);
    pointer-events: none;
    transition: opacity 0.7s ease, transform 0.9s ease;
}

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

.hero-copy {
    position: relative;
    z-index: 2;
    max-width: 720px;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--cyan);
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.hero h1,
.hero h2,
.page-hero h1,
.detail-hero h1 {
    margin: 0;
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.hero h1 {
    font-size: clamp(2.6rem, 6vw, 5.8rem);
    max-width: 820px;
}

.hero h2 {
    margin-top: 18px;
    font-size: clamp(1.5rem, 3vw, 2.7rem);
    background: linear-gradient(90deg, #67e8f9, #60a5fa 62%, #f8fafc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p,
.page-hero p,
.detail-copy p {
    max-width: 680px;
    color: var(--soft);
    font-size: 1.08rem;
}

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

.hero-tags span,
.tag-row span {
    padding: 5px 10px;
    border: 1px solid rgba(34, 211, 238, 0.25);
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.12);
    color: #a5f3fc;
    font-size: 0.78rem;
    font-weight: 650;
}

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

.primary-btn,
.ghost-btn,
.filter-panel button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    color: white;
    box-shadow: 0 18px 42px rgba(37, 99, 235, 0.33);
}

.ghost-btn,
.filter-panel button {
    background: rgba(15, 23, 42, 0.76);
    border-color: var(--line);
    color: var(--soft);
}

.primary-btn:hover,
.ghost-btn:hover,
.filter-panel button:hover {
    transform: translateY(-2px);
}

.ghost-btn:hover {
    border-color: rgba(34, 211, 238, 0.35);
    color: var(--cyan);
}

.hero-poster {
    position: relative;
    z-index: 2;
    border-radius: 32px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

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

.hero-poster span {
    position: absolute;
    right: 18px;
    bottom: 18px;
    padding: 8px 12px;
    border-radius: 999px;
    color: white;
    background: rgba(6, 182, 212, 0.86);
    font-size: 0.86rem;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.hero-dots {
    position: absolute;
    z-index: 5;
    left: max(24px, calc((100vw - var(--max)) / 2));
    bottom: 84px;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 38px;
    height: 5px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(203, 213, 225, 0.25);
    cursor: pointer;
}

.hero-dot.is-active {
    background: linear-gradient(90deg, #22d3ee, #2563eb);
}

.hero-category-bar {
    position: absolute;
    right: max(24px, calc((100vw - var(--max)) / 2));
    bottom: 68px;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    max-width: 560px;
}

.hero-category-bar a {
    padding: 9px 13px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.72);
    color: var(--soft);
    backdrop-filter: blur(10px);
}

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

.hero-orb {
    position: absolute;
    z-index: 1;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    filter: blur(18px);
    opacity: 0.25;
}

.orb-one {
    top: 90px;
    left: -120px;
    background: #06b6d4;
}

.orb-two {
    right: -110px;
    bottom: 120px;
    background: #2563eb;
}

.section-block,
.page-main,
.detail-main {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
}

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

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

.section-head h2,
.story-card h2,
.rank-card h2,
.overview-card h2 {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 2.4rem);
    line-height: 1.18;
}

.section-more {
    color: var(--cyan);
    font-weight: 800;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 170px 170px auto;
    gap: 12px;
    padding: 14px;
    margin-bottom: 28px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.74);
    box-shadow: 0 18px 50px rgba(2, 6, 23, 0.24);
}

.quick-search .filter-panel {
    grid-template-columns: minmax(220px, 1fr) auto;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: rgba(2, 6, 23, 0.58);
}

.search-box span {
    color: var(--cyan);
    font-size: 1.2rem;
}

.search-box input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: rgba(2, 6, 23, 0.58);
    color: var(--text);
    outline: none;
}

.search-box input {
    min-height: auto;
    border: 0;
    background: transparent;
}

.filter-panel select {
    padding: 0 12px;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.86), rgba(15, 23, 42, 0.94));
    box-shadow: 0 14px 38px rgba(2, 6, 23, 0.22);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px) scale(1.01);
    border-color: rgba(34, 211, 238, 0.36);
    box-shadow: 0 24px 58px rgba(34, 211, 238, 0.13);
}

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

.poster-link img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 0.5s ease, opacity 0.25s ease;
}

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

.poster-link::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.82));
    opacity: 0.78;
}

.card-badge,
.card-year,
.hover-play {
    position: absolute;
    z-index: 2;
}

.card-badge {
    top: 12px;
    left: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.88);
    color: #082f49;
    font-size: 0.75rem;
    font-weight: 900;
}

.card-year {
    right: 12px;
    top: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.72);
    color: var(--soft);
    border: 1px solid rgba(148, 163, 184, 0.18);
    backdrop-filter: blur(10px);
    font-size: 0.75rem;
}

.hover-play {
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    padding-left: 3px;
    border-radius: 50%;
    background: rgba(6, 182, 212, 0.88);
    color: white;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .hover-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.card-body {
    padding: 18px;
}

.card-meta {
    margin-bottom: 7px;
    color: var(--cyan);
    font-size: 0.78rem;
    font-weight: 800;
}

.card-body h3 {
    margin: 0 0 8px;
    font-size: 1.08rem;
    line-height: 1.3;
}

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

.card-body p {
    margin: 0 0 14px;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.category-card,
.overview-card a {
    display: block;
    height: 100%;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background:
        linear-gradient(135deg, rgba(34, 211, 238, 0.12), transparent),
        rgba(15, 23, 42, 0.78);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-card span,
.overview-card h2 {
    display: block;
    margin-bottom: 8px;
    font-size: 1.15rem;
    color: var(--text);
    font-weight: 900;
}

.category-card p,
.overview-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 54px 86px 1fr;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.78);
}

.rank-num {
    color: var(--cyan);
    font-size: 1.2rem;
    font-weight: 950;
}

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

.rank-info {
    display: grid;
    gap: 2px;
}

.rank-info strong {
    line-height: 1.3;
}

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

.page-main,
.detail-main {
    padding-top: 112px;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 48px;
    padding: 52px;
    border: 1px solid var(--line);
    border-radius: 32px;
    background:
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.22), transparent 24rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.9));
    box-shadow: var(--shadow);
}

.page-hero h1 {
    font-size: clamp(2.2rem, 5vw, 4.7rem);
}

.overview-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-bottom: 14px;
    border-radius: 15px;
    color: white;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
}

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

.rank-card {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 20px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.78);
}

.rank-card-cover {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
}

.rank-card-cover span {
    position: absolute;
    z-index: 2;
    top: 10px;
    left: 10px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(6, 182, 212, 0.92);
    color: #082f49;
    font-weight: 950;
}

.rank-card-cover img {
    width: 100%;
    height: 116px;
    object-fit: cover;
}

.rank-card-body p {
    color: var(--muted);
}

.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rank-meta span {
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--soft);
    border: 1px solid var(--line);
    background: rgba(148, 163, 184, 0.07);
    font-size: 0.82rem;
}

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

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

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 32px;
    align-items: center;
    background-image:
        linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.82)),
        var(--detail-bg);
    background-position: center;
    background-size: cover;
}

.detail-hero h1 {
    font-size: clamp(2.2rem, 5vw, 4.5rem);
}

.detail-cover {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 26px;
    box-shadow: var(--shadow);
}

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

.player-section {
    padding: 12px 0 52px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 28px;
    background: black;
    box-shadow: 0 30px 80px rgba(2, 6, 23, 0.7);
}

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

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

.play-overlay span {
    display: grid;
    place-items: center;
    width: 92px;
    height: 92px;
    padding-left: 6px;
    border-radius: 50%;
    color: white;
    font-size: 2rem;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    box-shadow: 0 20px 54px rgba(34, 211, 238, 0.28);
}

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

.story-section {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin-bottom: 36px;
}

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

.story-card p {
    color: var(--soft);
}

.meta-card {
    grid-column: 1 / -1;
}

.meta-card dl {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 10px 16px;
    margin: 0;
}

.meta-card dt {
    color: var(--cyan);
    font-weight: 800;
}

.meta-card dd {
    margin: 0;
    color: var(--soft);
}

.site-footer {
    margin-top: 64px;
    border-top: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.86);
}

.footer-grid {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
    padding: 46px 0;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 32px;
}

.footer-brand p,
.footer-links a,
.copyright {
    color: var(--muted);
}

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

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

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

.no-results {
    grid-column: 1 / -1;
    padding: 28px;
    text-align: center;
    border: 1px dashed var(--line);
    border-radius: 22px;
    color: var(--muted);
}

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

    .mobile-toggle {
        display: block;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        padding-top: 96px;
    }

    .hero-poster {
        display: none;
    }

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

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

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

    .detail-cover {
        max-width: 320px;
    }
}

@media (max-width: 760px) {
    .header-inner {
        height: 62px;
    }

    main {
        padding-top: 62px;
    }

    .brand-text {
        font-size: 1rem;
    }

    .hero,
    .hero-track {
        min-height: 660px;
    }

    .hero-slide {
        padding: 86px 18px 150px;
    }

    .hero h1 {
        font-size: clamp(2.2rem, 14vw, 3.9rem);
    }

    .hero-dots {
        left: 18px;
        bottom: 108px;
    }

    .hero-category-bar {
        right: 18px;
        left: 18px;
        bottom: 34px;
        justify-content: flex-start;
    }

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

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

    .filter-panel,
    .quick-search .filter-panel {
        grid-template-columns: 1fr;
    }

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

    .card-body {
        padding: 14px;
    }

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

    .rank-card {
        grid-template-columns: 120px 1fr;
    }

    .rank-card-cover img {
        height: 100%;
        min-height: 108px;
    }

    .page-main,
    .detail-main {
        padding-top: 92px;
    }

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

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

    .mobile-nav.is-open {
        grid-template-columns: 1fr;
    }
}

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

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