:root {
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(14, 165, 233, 0.22);
    --line-strong: rgba(14, 165, 233, 0.5);
    --text: #e2e8f0;
    --muted: #94a3b8;
    --soft: #64748b;
    --sky: #38bdf8;
    --cyan: #22d3ee;
    --amber: #f59e0b;
    --radius: 22px;
    --shadow: 0 24px 60px rgba(8, 47, 73, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background: var(--bg);
}

body {
    margin: 0;
    min-width: 320px;
    color: var(--text);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(14, 165, 233, 0.18), transparent 32rem),
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.14), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.92));
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
    box-shadow: 0 14px 36px rgba(8, 47, 73, 0.22);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: transparent;
    background: linear-gradient(90deg, var(--sky), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
}

.brand {
    min-width: max-content;
    font-size: 22px;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    color: white;
    background: linear-gradient(135deg, var(--sky), var(--cyan));
    border-radius: 999px;
    box-shadow: 0 0 26px rgba(56, 189, 248, 0.42);
}

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

.desktop-nav a,
.mobile-menu a,
.site-footer a {
    color: var(--muted);
    transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-menu a:hover,
.site-footer a:hover {
    color: var(--sky);
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-search input,
.mobile-menu input,
.filter-panel input,
.search-console input,
.search-console select {
    color: var(--text);
    background: rgba(15, 23, 42, 0.74);
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search input {
    width: 245px;
    padding: 11px 16px;
}

.nav-search input:focus,
.mobile-menu input:focus,
.filter-panel input:focus,
.search-console input:focus,
.search-console select:focus {
    border-color: var(--sky);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.16);
    background: rgba(15, 23, 42, 0.95);
}

.nav-search button,
.mobile-menu button,
.primary-button,
.ghost-button,
.panel-link,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    cursor: pointer;
    font-weight: 700;
    border-radius: 999px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.nav-search button,
.mobile-menu button,
.primary-button,
.panel-link {
    color: white;
    background: linear-gradient(135deg, #0ea5e9, #22d3ee);
    box-shadow: 0 12px 30px rgba(14, 165, 233, 0.25);
}

.nav-search button {
    padding: 10px 16px;
}

.primary-button,
.ghost-button {
    min-height: 48px;
    padding: 0 24px;
}

.primary-button:hover,
.nav-search button:hover,
.mobile-menu button:hover,
.panel-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 38px rgba(14, 165, 233, 0.36);
}

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

.ghost-button:hover,
.section-more:hover {
    border-color: var(--line-strong);
    transform: translateY(-2px);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    color: var(--text);
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 12px;
    width: 44px;
    height: 44px;
}

.mobile-menu {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

.mobile-menu.is-open {
    display: grid;
    gap: 14px;
}

.mobile-menu form {
    display: flex;
    gap: 8px;
}

.mobile-menu input {
    flex: 1;
    min-width: 0;
    padding: 12px 16px;
}

.mobile-menu button {
    padding: 0 18px;
}

.hero {
    position: relative;
    min-height: 640px;
    height: 72vh;
    overflow: hidden;
    background: #020617;
}

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

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.82) 42%, rgba(2, 6, 23, 0.16) 100%),
        linear-gradient(0deg, #020617 0%, transparent 44%);
}

.hero-content {
    position: absolute;
    top: 50%;
    left: max(24px, calc((100% - 1180px) / 2));
    width: min(650px, calc(100% - 48px));
    transform: translateY(-46%);
}

.hero-kicker,
.detail-kicker,
.panel-heading p,
.section-heading p,
.page-hero p {
    margin: 0 0 12px;
    color: var(--sky);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-kicker {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-kicker span,
.hero-kicker strong {
    padding: 7px 12px;
    color: white;
    background: rgba(14, 165, 233, 0.66);
    border-radius: 999px;
    backdrop-filter: blur(10px);
}

.hero-kicker strong {
    color: #0f172a;
    background: rgba(245, 158, 11, 0.92);
}

.hero h1 {
    margin: 0;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 0.96;
    color: white;
    letter-spacing: -0.06em;
}

.hero p {
    width: min(620px, 100%);
    margin: 24px 0 0;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.85;
}

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

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

.hero-tags span,
.tag-list span {
    padding: 6px 10px;
    color: #bae6fd;
    background: rgba(12, 74, 110, 0.42);
    border: 1px solid rgba(14, 165, 233, 0.24);
    border-radius: 999px;
    font-size: 12px;
}

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

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 52px;
    height: 52px;
    color: white;
    font-size: 40px;
    line-height: 1;
    background: rgba(2, 6, 23, 0.58);
    border: 1px solid var(--line);
    border-radius: 999px;
    cursor: pointer;
    transform: translateY(-50%);
    backdrop-filter: blur(10px);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(14, 165, 233, 0.72);
    transform: translateY(-50%) scale(1.05);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 22px;
    height: 5px;
    padding: 0;
    background: rgba(148, 163, 184, 0.52);
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    transition: width 0.24s ease, background 0.24s ease;
}

.hero-dot.is-active {
    width: 42px;
    background: var(--sky);
}

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

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

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

.section-heading h2,
.panel-heading h2,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    color: white;
    letter-spacing: -0.04em;
}

.section-heading h2,
.panel-heading h2 {
    font-size: clamp(28px, 4vw, 42px);
}

.section-more,
.panel-link {
    min-width: max-content;
    min-height: 42px;
    padding: 0 18px;
}

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

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

.movie-card {
    overflow: hidden;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 16px 34px rgba(2, 6, 23, 0.34);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    border-color: var(--line-strong);
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.9);
}

.poster-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, opacity 0.2s ease;
}

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

.poster-link::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent 58%);
}

.poster-play {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    color: white;
    background: rgba(14, 165, 233, 0.76);
    border-radius: 999px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.82);
    transition: opacity 0.24s ease, transform 0.24s ease;
    backdrop-filter: blur(8px);
}

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

.poster-year {
    position: absolute;
    left: 10px;
    bottom: 10px;
    z-index: 2;
    padding: 5px 9px;
    color: #cbd5e1;
    background: rgba(2, 6, 23, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    font-size: 12px;
}

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

.card-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--soft);
    font-size: 12px;
}

.card-meta span,
.detail-meta span,
.detail-meta strong {
    padding: 4px 8px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 999px;
}

.detail-meta strong {
    color: var(--amber);
}

.movie-card h3 {
    margin: 11px 0 8px;
    color: #e2e8f0;
    font-size: 15px;
    line-height: 1.45;
}

.movie-card h3 a:hover,
.ranking-body h2 a:hover,
.category-overview-card h2 a:hover {
    color: var(--sky);
}

.movie-card p {
    min-height: 42px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.65;
}

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

.category-tile {
    position: relative;
    min-height: 174px;
    overflow: hidden;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    isolation: isolate;
    background: var(--panel);
    box-shadow: 0 16px 34px rgba(2, 6, 23, 0.26);
}

.category-tile img {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.95);
    opacity: 0.52;
    transition: transform 0.5s ease;
}

.category-tile::after {
    position: absolute;
    inset: 0;
    z-index: -1;
    content: "";
    background: linear-gradient(135deg, rgba(2, 6, 23, 0.88), rgba(14, 165, 233, 0.38));
}

.category-tile:hover img {
    transform: scale(1.08);
}

.category-tile span {
    display: block;
    color: white;
    font-size: 24px;
    font-weight: 800;
}

.category-tile strong {
    display: inline-flex;
    margin-top: 12px;
    padding: 7px 12px;
    color: #cffafe;
    background: rgba(8, 47, 73, 0.72);
    border: 1px solid var(--line);
    border-radius: 999px;
}

.two-column-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 26px;
}

.ranking-panel,
.filter-panel,
.search-console,
.search-summary,
.detail-content article,
.category-overview-card,
.ranking-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 18px 42px rgba(2, 6, 23, 0.28);
}

.ranking-panel {
    position: sticky;
    top: 92px;
    align-self: start;
    padding: 22px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 42px 48px 1fr 46px;
    align-items: center;
    gap: 11px;
    padding: 10px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(14, 165, 233, 0.12);
    border-radius: 14px;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
    border-color: var(--line-strong);
    transform: translateX(4px);
}

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

.rank-number {
    color: var(--amber);
    font-weight: 900;
}

.rank-title {
    color: var(--text);
    font-size: 14px;
    line-height: 1.4;
}

.rank-score {
    color: var(--sky);
    font-weight: 800;
}

.panel-link {
    width: 100%;
    margin-top: 18px;
}

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

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 32px;
    padding: 42px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background:
        radial-gradient(circle at top right, rgba(14, 165, 233, 0.22), transparent 26rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.86));
    box-shadow: var(--shadow);
}

.page-hero h1 {
    font-size: clamp(36px, 5vw, 58px);
}

.page-hero span {
    display: block;
    max-width: 760px;
    margin-top: 16px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.8;
}

.filter-panel {
    display: grid;
    gap: 10px;
    margin-bottom: 24px;
    padding: 20px;
}

.filter-panel label {
    color: var(--sky);
    font-weight: 800;
}

.filter-panel input {
    width: 100%;
    padding: 15px 18px;
    border-radius: 16px;
}

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

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

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

.category-covers img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 12px;
}

.category-overview-card h2 {
    margin: 0 0 10px;
    font-size: 24px;
}

.category-overview-card p {
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.75;
}

.category-overview-card span {
    color: var(--sky);
    font-weight: 800;
}

.search-console {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 180px;
    gap: 12px;
    margin-bottom: 18px;
    padding: 18px;
}

.search-console input,
.search-console select {
    min-height: 48px;
    padding: 0 16px;
    border-radius: 16px;
}

.search-summary {
    margin-bottom: 24px;
    padding: 16px 18px;
    color: var(--muted);
}

.ranking-page-list {
    display: grid;
    gap: 18px;
}

.ranking-card {
    display: grid;
    grid-template-columns: 128px 1fr;
    gap: 18px;
    padding: 16px;
}

.ranking-poster {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
}

.ranking-poster img {
    aspect-ratio: 2 / 3;
    height: 100%;
    object-fit: cover;
}

.ranking-poster span {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 9px;
    color: #020617;
    background: var(--amber);
    border-radius: 999px;
    font-weight: 900;
}

.ranking-body p {
    color: var(--muted);
    line-height: 1.75;
}

.ranking-body h2 {
    margin: 6px 0 10px;
    font-size: 26px;
}

.detail-hero {
    padding: 28px;
}

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

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

.detail-layout {
    display: grid;
    grid-template-columns: 290px 1fr;
    gap: 30px;
    align-items: center;
}

.detail-poster img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: 0 24px 58px rgba(2, 6, 23, 0.45);
}

.detail-info h1 {
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
}

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

.detail-one-line {
    max-width: 760px;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.85;
}

.detail-tags {
    margin: 22px 0;
}

.player-section {
    margin-bottom: 34px;
}

.player-wrap {
    position: relative;
    overflow: hidden;
    background: #000;
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.player-wrap video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    cursor: pointer;
    background: linear-gradient(135deg, rgba(2, 6, 23, 0.34), rgba(14, 165, 233, 0.18));
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

.player-cover span {
    display: grid;
    place-items: center;
    width: 92px;
    height: 92px;
    color: white;
    font-size: 34px;
    background: linear-gradient(135deg, #0ea5e9, #22d3ee);
    border-radius: 999px;
    box-shadow: 0 20px 45px rgba(14, 165, 233, 0.38);
}

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

.detail-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 10px;
}

.detail-content article {
    padding: 24px;
}

.detail-content h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.detail-content p {
    margin: 0;
    color: var(--muted);
    line-height: 1.9;
}

.related-block {
    padding-top: 42px;
}

.site-footer {
    margin-top: 82px;
    padding: 46px 0 30px;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.72);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 28px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: white;
    font-size: 16px;
}

.site-footer p,
.site-footer a {
    color: var(--muted);
    line-height: 1.8;
}

.site-footer a {
    display: block;
    margin: 7px 0;
}

.copyright {
    width: min(1180px, calc(100% - 32px));
    margin: 30px auto 0;
    padding-top: 20px;
    color: var(--soft);
    text-align: center;
    border-top: 1px solid rgba(14, 165, 233, 0.16);
}

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

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

    .two-column-section,
    .detail-content {
        grid-template-columns: 1fr;
    }

    .ranking-panel {
        position: static;
    }
}

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

    .menu-toggle {
        display: inline-grid;
        place-items: center;
    }

    .hero {
        min-height: 620px;
        height: auto;
    }

    .hero-content {
        top: auto;
        bottom: 86px;
        transform: none;
    }

    .hero-arrow {
        display: none;
    }

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

    .detail-layout,
    .category-overview-card,
    .ranking-card,
    .footer-grid,
    .search-console {
        grid-template-columns: 1fr;
    }

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

    .page-hero,
    .detail-hero {
        padding: 26px;
    }
}

@media (max-width: 560px) {
    .nav-shell {
        height: 64px;
    }

    .brand {
        font-size: 18px;
    }

    .hero h1 {
        font-size: 40px;
    }

    .hero p {
        font-size: 15px;
    }

    .movie-grid,
    .compact-grid,
    .library-grid,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

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

    .movie-card p,
    .tag-list {
        display: none;
    }

    .section-block {
        padding-top: 46px;
    }

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

    .player-wrap {
        border-radius: 18px;
    }

    .player-cover span {
        width: 74px;
        height: 74px;
        font-size: 28px;
    }
}
