:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(148, 163, 184, 0.18);
    --muted: #94a3b8;
    --text: #f8fafc;
    --soft: #cbd5e1;
    --sky: #38bdf8;
    --sky-deep: #0284c7;
    --violet: #8b5cf6;
    --rose: #f43f5e;
    --radius: 24px;
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.46);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(14, 165, 233, 0.22), transparent 32rem),
        radial-gradient(circle at top right, rgba(139, 92, 246, 0.18), transparent 34rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
    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 var(--line);
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(18px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.brand-mark {
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    color: white;
    background: linear-gradient(135deg, var(--sky), var(--violet));
    box-shadow: 0 14px 34px rgba(56, 189, 248, 0.28);
}

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

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

.nav-link,
.mobile-link {
    color: var(--soft);
    padding: 10px 14px;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: white;
    background: rgba(56, 189, 248, 0.14);
}

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

.mobile-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 2px;
    background: white;
}

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

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

.hero-carousel {
    position: relative;
    min-height: 650px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 48px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    left: 50%;
    transform: translateX(-50%);
    padding: 86px 0 72px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.55s ease;
}

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

.hero-backdrop {
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: 0.25;
    filter: blur(12px) saturate(1.2);
}

.hero-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.64), rgba(2, 6, 23, 0.96));
}

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

.hero-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.hero-tags span,
.detail-tags span,
.card-meta span,
.poster-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border: 1px solid rgba(125, 211, 252, 0.25);
    border-radius: 999px;
    color: #bae6fd;
    background: rgba(14, 165, 233, 0.12);
}

.hero-copy h1 {
    margin: 0 0 20px;
    max-width: 820px;
    font-size: clamp(42px, 7vw, 84px);
    line-height: 0.96;
    letter-spacing: -0.06em;
}

.hero-copy p {
    max-width: 690px;
    margin: 0;
    color: var(--soft);
    font-size: 18px;
    line-height: 1.8;
}

.hero-actions,
.section-more {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    color: white;
    background: linear-gradient(135deg, var(--sky-deep), var(--violet));
    box-shadow: 0 18px 44px rgba(14, 165, 233, 0.26);
}

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

.primary-button:hover,
.secondary-button:hover {
    transform: translateY(-2px);
}

.hero-poster {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.18);
    border-radius: 34px;
    background: #0f172a;
    box-shadow: var(--shadow);
}

.hero-poster::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.36), transparent 42%, rgba(139, 92, 246, 0.36));
    z-index: 1;
    pointer-events: none;
}

.hero-poster img,
.poster-link img,
.category-tile img,
.category-cover img,
.detail-poster img,
.rank-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.hero-dot {
    width: 36px;
    height: 8px;
    border: 0;
    border-radius: 99px;
    background: rgba(148, 163, 184, 0.35);
    cursor: pointer;
}

.hero-dot.active {
    background: var(--sky);
}

.quick-entry {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 28px;
    margin-top: -34px;
    position: relative;
    z-index: 5;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.82);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.quick-entry h2 {
    margin: 0 0 8px;
    font-size: 24px;
}

.quick-entry p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.quick-links a {
    padding: 9px 13px;
    border-radius: 999px;
    color: #bae6fd;
    background: rgba(14, 165, 233, 0.12);
}

.section-block,
.page-main {
    padding: 64px 0;
}

.section-heading {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-bottom: 26px;
}

.section-heading span,
.page-hero span {
    color: var(--sky);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.section-heading h2,
.page-hero h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 46px);
    letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

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

.category-tile,
.category-overview-card,
.movie-card,
.rank-item,
.filter-panel,
.detail-section,
.video-shell,
.page-hero,
.detail-hero {
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: 0 18px 50px rgba(2, 6, 23, 0.22);
    backdrop-filter: blur(16px);
}

.category-tile {
    position: relative;
    min-height: 230px;
    overflow: hidden;
    border-radius: 24px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.category-tile img {
    position: absolute;
    inset: 0;
    z-index: -2;
    opacity: 0.64;
    filter: saturate(1.08);
}

.category-tile::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.92));
}

.category-tile span {
    font-size: 20px;
    font-weight: 800;
}

.category-tile p {
    margin: 8px 0 0;
    color: var(--soft);
    font-size: 14px;
    line-height: 1.6;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 14px;
    margin-bottom: 24px;
    padding: 16px;
    border-radius: 22px;
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: white;
    background: rgba(2, 6, 23, 0.58);
    padding: 0 14px;
    outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(56, 189, 248, 0.7);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(56, 189, 248, 0.45);
    background: rgba(15, 23, 42, 0.92);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #0f172a;
}

.poster-badge {
    position: absolute;
    left: 10px;
    top: 10px;
    color: white;
    background: rgba(2, 6, 23, 0.7);
}

.poster-play {
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    color: white;
    background: rgba(14, 165, 233, 0.84);
    box-shadow: 0 10px 24px rgba(14, 165, 233, 0.28);
}

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

.movie-card h3,
.rank-item h3 {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.35;
}

.movie-card p,
.rank-item p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
    font-size: 14px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    font-size: 12px;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 16px;
    padding: 12px;
    border-radius: 22px;
}

.rank-cover {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 16px;
}

.rank-cover span {
    position: absolute;
    left: 8px;
    top: 8px;
    width: 32px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    font-weight: 900;
    color: white;
    background: linear-gradient(135deg, var(--rose), var(--violet));
}

.rank-content {
    min-width: 0;
    align-self: center;
}

.page-hero {
    margin-bottom: 34px;
    padding: clamp(28px, 6vw, 56px);
    border-radius: 30px;
    background:
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.22), transparent 24rem),
        rgba(15, 23, 42, 0.76);
}

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

.breadcrumb a {
    color: #bae6fd;
}

.category-overview-grid {
    display: grid;
    gap: 18px;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 230px 1fr;
    gap: 22px;
    padding: 16px;
    border-radius: 26px;
}

.category-cover {
    overflow: hidden;
    aspect-ratio: 16 / 10;
    border-radius: 20px;
}

.category-overview-card h2 {
    margin: 4px 0 10px;
}

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

.category-mini-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.category-mini-links a {
    padding: 8px 12px;
    border-radius: 999px;
    color: #bae6fd;
    background: rgba(14, 165, 233, 0.1);
}

.detail-main {
    padding: 30px 0 68px;
}

.detail-hero {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 34px;
    align-items: center;
    padding: 22px;
    border-radius: 32px;
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: 26px;
    background: #0f172a;
}

.detail-copy h1 {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.detail-one-line {
    max-width: 820px;
    color: var(--soft);
    line-height: 1.8;
    font-size: 18px;
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 24px 0;
}

.detail-meta div {
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.36);
}

.detail-meta dt {
    color: var(--muted);
    font-size: 12px;
}

.detail-meta dd {
    margin: 5px 0 0;
    color: white;
    font-weight: 700;
}

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

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: black;
}

.movie-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: black;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    border: 0;
    color: white;
    cursor: pointer;
    background:
        radial-gradient(circle, rgba(14, 165, 233, 0.34), transparent 19rem),
        rgba(2, 6, 23, 0.32);
}

.player-overlay.hidden {
    display: none;
}

.player-overlay span {
    width: 78px;
    height: 78px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    color: white;
    background: linear-gradient(135deg, var(--sky-deep), var(--violet));
    box-shadow: 0 24px 70px rgba(14, 165, 233, 0.38);
}

.player-overlay strong {
    font-size: 20px;
}

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

.detail-section {
    padding: clamp(20px, 4vw, 32px);
    border-radius: 26px;
}

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

.detail-section p {
    margin: 0;
    color: var(--soft);
    line-height: 1.95;
}

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

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.88);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 28px;
    color: var(--muted);
}

.footer-inner strong {
    color: white;
    font-size: 18px;
}

.footer-inner p {
    line-height: 1.7;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.footer-links a {
    padding: 8px 11px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.1);
}

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

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

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

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

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

    .mobile-toggle {
        display: block;
    }

    .hero-carousel {
        min-height: 780px;
    }

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

    .hero-poster {
        width: min(320px, 78vw);
    }

    .quick-entry,
    .filter-panel,
    .detail-hero,
    .footer-inner,
    .category-overview-card {
        grid-template-columns: 1fr;
    }

    .quick-links,
    .footer-links {
        justify-content: flex-start;
    }

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

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

@media (max-width: 560px) {
    .movie-grid,
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }

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

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

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