:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.86);
    --panel-strong: #111827;
    --border: rgba(34, 211, 238, 0.2);
    --border-soft: rgba(148, 163, 184, 0.16);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --cyan: #22d3ee;
    --cyan-deep: #0891b2;
    --blue: #3b82f6;
    --green: #34d399;
    --shadow: 0 24px 80px rgba(8, 145, 178, 0.18);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

* {
    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.18), transparent 34rem),
        radial-gradient(circle at 80% 12%, rgba(59, 130, 246, 0.16), transparent 28rem),
        var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

button,
input,
select {
    font: inherit;
}

button {
    border: 0;
}

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

.nav-shell {
    max-width: 1280px;
    height: 68px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, var(--cyan), #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.logo-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan-deep), var(--blue));
    box-shadow: 0 16px 40px rgba(34, 211, 238, 0.28);
    font-size: 14px;
    font-weight: 900;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.desktop-nav a,
.mobile-nav a {
    color: var(--muted-strong);
    padding: 9px 14px;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover {
    color: #ffffff;
    background: rgba(34, 211, 238, 0.12);
    transform: translateY(-1px);
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 320px;
    padding: 6px;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
}

.nav-search input,
.hero-search input,
.search-band input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    color: var(--text);
    background: transparent;
    border: 0;
    outline: none;
}

.nav-search input::placeholder,
.hero-search input::placeholder,
.search-band input::placeholder,
.filter-panel input::placeholder {
    color: #64748b;
}

.nav-search button,
.hero-search button,
.search-band button,
.primary-button,
.small-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan-deep), var(--blue));
    color: #ffffff;
    font-weight: 800;
    box-shadow: 0 16px 42px rgba(8, 145, 178, 0.28);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button {
    padding: 8px 14px;
    font-size: 14px;
}

.primary-button,
.hero-search button,
.search-band button {
    padding: 13px 22px;
}

.small-button {
    padding: 10px 16px;
    align-self: center;
    white-space: nowrap;
}

.primary-button:hover,
.small-button:hover,
.nav-search button:hover,
.hero-search button:hover,
.search-band button:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 56px rgba(8, 145, 178, 0.38);
}

.ghost-button,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    color: #cffafe;
    background: rgba(15, 23, 42, 0.62);
    border-radius: 999px;
    font-weight: 800;
    transition: background 0.2s ease, transform 0.2s ease;
}

.ghost-button {
    padding: 12px 20px;
}

.section-more {
    padding: 10px 16px;
}

.ghost-button:hover,
.section-more:hover {
    background: rgba(34, 211, 238, 0.14);
    transform: translateY(-2px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid var(--border-soft);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    padding: 8px 24px 18px;
    border-top: 1px solid var(--border-soft);
    background: rgba(2, 6, 23, 0.96);
}

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

.hero-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 92px 24px 28px;
}

.hero-slider {
    position: relative;
    min-height: 640px;
    border: 1px solid var(--border);
    border-radius: 34px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--panel-strong);
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.04);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 720px;
    min-height: 640px;
    padding: 96px 68px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.eyebrow {
    display: inline-flex;
    width: fit-content;
    color: #a5f3fc;
    background: rgba(8, 145, 178, 0.18);
    border: 1px solid rgba(34, 211, 238, 0.24);
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-intro h1 {
    margin: 18px 0 16px;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 1.05;
    letter-spacing: -0.045em;
}

.hero-content p,
.page-hero p,
.detail-intro p {
    max-width: 760px;
    color: var(--muted-strong);
    font-size: 18px;
}

.hero-tags,
.detail-tags {
    margin-top: 26px;
}

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

.hero-controls {
    position: absolute;
    left: 68px;
    bottom: 42px;
    z-index: 5;
    display: flex;
    gap: 10px;
}

.hero-controls button {
    width: 40px;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
    cursor: pointer;
    transition: background 0.2s ease, width 0.2s ease;
}

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

.search-band,
.page-main,
.site-footer,
.content-section,
.rank-preview,
.category-overview-block {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

.search-band {
    margin-top: 20px;
    padding: 28px;
    display: grid;
    grid-template-columns: 1fr minmax(280px, 480px);
    gap: 24px;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.16), rgba(59, 130, 246, 0.1));
}

.search-band h2,
.section-heading h2,
.site-footer h2,
.detail-copy h2 {
    margin: 0 0 8px;
    font-size: 28px;
    line-height: 1.2;
}

.search-band p,
.section-heading p,
.site-footer p,
.detail-copy p,
.empty-state {
    color: var(--muted);
}

.search-band form,
.hero-search {
    display: flex;
    gap: 10px;
    padding: 8px;
    border: 1px solid var(--border-soft);
    background: rgba(2, 6, 23, 0.46);
    border-radius: 999px;
}

.search-band input,
.hero-search input {
    padding: 0 14px;
}

.content-section,
.rank-preview,
.category-overview-block {
    padding: 48px 24px 0;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.78);
    box-shadow: 0 18px 44px rgba(2, 6, 23, 0.28);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.48);
    box-shadow: 0 24px 70px rgba(8, 145, 178, 0.16);
}

.poster-link,
.poster-art {
    display: block;
}

.poster-art {
    position: relative;
    aspect-ratio: 2 / 3;
    background-size: cover;
    background-position: center;
    background-color: #111827;
}

.poster-art::after,
.rank-cover::after,
.detail-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(2, 6, 23, 0.88));
}

.poster-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    border-radius: 999px;
    padding: 6px 10px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    background: rgba(2, 6, 23, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

.poster-badge {
    right: 12px;
}

.rank-badge {
    left: 12px;
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.92), rgba(59, 130, 246, 0.88));
}

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

.movie-meta-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #67e8f9;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 8px;
}

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

.movie-card h3 a:hover,
.rank-info h3 a:hover,
.footer-links a:hover {
    color: var(--cyan);
}

.movie-card p {
    min-height: 4.8em;
    margin: 10px 0 14px;
    color: var(--muted);
    font-size: 14px;
}

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

.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    color: #a5f3fc;
    background: rgba(8, 145, 178, 0.12);
    font-size: 12px;
}

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

.category-tile {
    min-height: 188px;
    padding: 22px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(8, 145, 178, 0.16));
    border: 1px solid var(--border-soft);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.category-tile span {
    color: var(--cyan);
    font-size: 22px;
    font-weight: 900;
}

.category-tile strong {
    color: var(--muted-strong);
    font-size: 14px;
    font-weight: 500;
}

.category-tile em {
    display: grid;
    gap: 4px;
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

.category-tile em a:hover {
    color: var(--cyan);
}

.page-main {
    padding: 96px 24px 0;
}

.page-hero {
    min-height: 340px;
    padding: 56px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background:
        linear-gradient(135deg, rgba(8, 145, 178, 0.18), rgba(59, 130, 246, 0.08)),
        rgba(15, 23, 42, 0.78);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.slim-hero,
.search-hero,
.rank-hero,
.category-hero {
    min-height: 300px;
}

.hero-search {
    max-width: 720px;
    margin-top: 28px;
}

.filter-panel {
    margin-top: 28px;
    padding: 14px;
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 12px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.78);
}

.filter-panel input,
.filter-panel select {
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.54);
}

.filter-panel select {
    color: var(--muted-strong);
}

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

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

.full-rank {
    padding: 34px 0 0;
}

.rank-item {
    display: grid;
    grid-template-columns: 70px 92px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.78);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.rank-number {
    color: var(--cyan);
    font-size: 28px;
    font-weight: 900;
    text-align: center;
}

.rank-cover {
    position: relative;
    width: 92px;
    height: 126px;
    border-radius: 16px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-color: #111827;
}

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

.rank-info p {
    margin: 0 0 8px;
    color: var(--muted-strong);
}

.rank-info span {
    color: var(--muted);
    font-size: 13px;
}

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

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

.detail-hero {
    display: grid;
    grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
    gap: 38px;
    align-items: stretch;
    padding: 34px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at right top, rgba(34, 211, 238, 0.16), transparent 28rem),
        rgba(15, 23, 42, 0.82);
    box-shadow: var(--shadow);
}

.detail-cover {
    position: relative;
    min-height: 520px;
    border-radius: 24px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-color: #111827;
}

.detail-intro {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.detail-intro h1 {
    font-size: clamp(34px, 5vw, 62px);
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.detail-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
    color: var(--muted-strong);
    border: 1px solid var(--border-soft);
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    background: #000000;
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.36);
}

.player-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.16), rgba(2, 6, 23, 0.48));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay span {
    width: 94px;
    height: 94px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 6px;
    background: linear-gradient(135deg, var(--cyan-deep), var(--blue));
    box-shadow: 0 24px 72px rgba(34, 211, 238, 0.36);
    font-size: 34px;
}

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

.detail-copy {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    padding-top: 34px;
}

.detail-copy article {
    padding: 28px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-soft);
    background: rgba(15, 23, 42, 0.78);
}

.search-results-section {
    min-height: 420px;
}

.empty-state {
    display: none;
    padding: 28px;
    text-align: center;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.68);
}

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

.site-footer {
    margin-top: 80px;
    padding: 48px 24px 34px;
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 34px;
}

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

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

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

.footer-bottom {
    margin-top: 34px;
    padding-top: 20px;
    border-top: 1px solid var(--border-soft);
}

.hidden-by-filter {
    display: none !important;
}

@media (max-width: 1120px) {
    .movie-grid,
    .compact-grid,
    .large-list,
    .category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .nav-search {
        display: none;
    }
}

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

    .menu-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .hero-shell,
    .page-main {
        padding-left: 16px;
        padding-right: 16px;
    }

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

    .hero-content {
        padding: 72px 28px;
    }

    .hero-controls {
        left: 28px;
        bottom: 26px;
    }

    .search-band,
    .filter-panel,
    .detail-hero,
    .detail-copy,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .page-hero {
        padding: 34px 24px;
    }

    .detail-cover {
        min-height: 420px;
    }

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

    .rank-item .small-button {
        grid-column: 2 / 4;
        justify-self: start;
    }
}

@media (max-width: 620px) {
    .movie-grid,
    .compact-grid,
    .large-list,
    .category-grid {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

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

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

    .movie-card p {
        min-height: 0;
        font-size: 13px;
    }

    .search-band form,
    .hero-search {
        border-radius: 20px;
        flex-direction: column;
    }

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

    .rank-cover {
        width: 70px;
        height: 98px;
    }

    .rank-number {
        font-size: 22px;
    }
}
