:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-solid: #111827;
    --line: rgba(148, 163, 184, 0.2);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --subtle: #94a3b8;
    --blue: #38bdf8;
    --blue-strong: #2563eb;
    --cyan: #22d3ee;
    --violet: #7c3aed;
    --pink: #ec4899;
    --shadow: 0 24px 70px rgba(2, 8, 23, 0.45);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 5%, rgba(37, 99, 235, 0.22), transparent 30%),
        radial-gradient(circle at 85% 10%, rgba(34, 211, 238, 0.16), transparent 28%),
        linear-gradient(180deg, #020617 0%, #0f172a 44%, #020617 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.65;
    min-height: 100vh;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.92), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 16px 44px rgba(2, 8, 23, 0.35);
    backdrop-filter: blur(18px);
}

.site-nav {
    width: min(1240px, calc(100% - 32px));
    height: 70px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--blue-strong), var(--cyan));
    box-shadow: 0 0 28px rgba(56, 189, 248, 0.45);
}

.brand-text {
    font-weight: 800;
    font-size: 19px;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #60a5fa, #67e8f9, #ffffff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.nav-panel {
    display: flex;
    align-items: center;
    gap: 22px;
}

.nav-link {
    color: #dbeafe;
    font-size: 15px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #ffffff;
    transform: translateY(-1px);
}

.nav-link-muted {
    color: #a5b4fc;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(226, 232, 240, 0.2);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.68);
    color: #fff;
}

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

.hero {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.hero-stage {
    position: absolute;
    inset: 0;
}

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

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

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    filter: saturate(1.05) contrast(1.04);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 43%, rgba(2, 6, 23, 0.26) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.14) 46%, rgba(2, 6, 23, 0.04) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 72vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 86px 0 150px;
    max-width: 1240px;
}

.hero-content > * {
    max-width: 680px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-radius: 999px;
    color: #fff;
    background: rgba(37, 99, 235, 0.82);
    border: 1px solid rgba(125, 211, 252, 0.45);
    box-shadow: 0 10px 36px rgba(37, 99, 235, 0.38);
    backdrop-filter: blur(12px);
}

.hero-badge strong {
    color: #bfdbfe;
}

.hero h1 {
    margin: 20px 0 16px;
    font-size: clamp(40px, 7vw, 74px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero p {
    margin: 0;
    color: #dbeafe;
    font-size: clamp(17px, 2vw, 21px);
    text-shadow: 0 2px 20px rgba(2, 6, 23, 0.42);
}

.hero-tags,
.detail-tags,
.card-tags,
.side-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

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

.hero-tags span,
.detail-tags span,
.card-tags span,
.side-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.64);
    border: 1px solid rgba(148, 163, 184, 0.24);
    backdrop-filter: blur(10px);
    font-size: 13px;
}

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

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

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--blue-strong), var(--cyan));
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.35);
}

.btn-soft {
    color: #e0f2fe;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(226, 232, 240, 0.2);
}

.btn-ghost {
    color: #bfdbfe;
    background: rgba(30, 64, 175, 0.28);
    border: 1px solid rgba(96, 165, 250, 0.28);
}

.hero-arrow {
    position: absolute;
    z-index: 4;
    top: 50%;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(226, 232, 240, 0.18);
    border-radius: 999px;
    color: #fff;
    background: rgba(15, 23, 42, 0.62);
    cursor: pointer;
    font-size: 32px;
    line-height: 1;
    transform: translateY(-50%);
    backdrop-filter: blur(12px);
}

.hero-prev {
    left: max(18px, calc((100% - 1240px) / 2));
}

.hero-next {
    right: max(18px, calc((100% - 1240px) / 2));
}

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

.hero-dot {
    width: 34px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.28);
    cursor: pointer;
}

.hero-dot.is-active {
    background: #67e8f9;
    box-shadow: 0 0 18px rgba(103, 232, 249, 0.72);
}

.hero-search-card {
    position: absolute;
    z-index: 6;
    left: 50%;
    bottom: 72px;
    width: min(780px, calc(100% - 32px));
    transform: translateX(-50%);
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.74);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

.hero-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    color: #fff;
    background: rgba(2, 6, 23, 0.58);
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 16px;
    outline: none;
    padding: 0 14px;
}

.hero-search input::placeholder,
.filter-panel input::placeholder {
    color: #94a3b8;
}

.hero-search button {
    min-width: 108px;
    border: 0;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, var(--blue-strong), var(--cyan));
    font-weight: 800;
    cursor: pointer;
}

.hero-quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 12px;
    color: #bfdbfe;
    font-size: 14px;
}

.hero-quick-links a:hover {
    color: #fff;
}

.page-main,
.content-section {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.page-main {
    padding: 28px 0 52px;
}

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

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.15;
}

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

.section-more {
    flex: 0 0 auto;
    color: #67e8f9;
    font-weight: 700;
}

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

.category-tile {
    position: relative;
    min-height: 150px;
    overflow: hidden;
    border-radius: 24px;
    background: var(--panel-solid);
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 20px 44px rgba(2, 8, 23, 0.28);
}

.category-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.tile-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.18));
}

.category-tile strong,
.category-tile em {
    position: absolute;
    left: 16px;
    right: 16px;
    z-index: 2;
}

.category-tile strong {
    bottom: 38px;
    font-size: 18px;
}

.category-tile em {
    bottom: 16px;
    color: #bfdbfe;
    font-style: normal;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.84), rgba(2, 6, 23, 0.94));
    box-shadow: 0 18px 48px rgba(2, 8, 23, 0.28);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(96, 165, 250, 0.45);
    box-shadow: 0 24px 58px rgba(37, 99, 235, 0.2);
}

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

.card-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.poster-glow {
    position: absolute;
    inset: auto 0 0;
    height: 52%;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), transparent);
}

.rank-badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    left: 12px;
    min-width: 36px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--pink), var(--blue-strong));
    font-weight: 900;
}

.card-body {
    padding: 16px;
}

.card-meta {
    color: #93c5fd;
    font-size: 13px;
    margin-bottom: 6px;
}

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

.card-body h3 a:hover {
    color: #67e8f9;
}

.card-body p {
    margin: 10px 0 12px;
    color: var(--muted);
    font-size: 14px;
}

.card-tags {
    gap: 6px;
}

.card-tags span {
    min-height: 24px;
    padding: 2px 8px;
    font-size: 12px;
}

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

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

.rank-row {
    display: grid;
    grid-template-columns: 44px 58px 1fr auto;
    align-items: center;
    gap: 14px;
    min-height: 82px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.7);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row:hover {
    transform: translateX(4px);
    border-color: rgba(103, 232, 249, 0.42);
}

.rank-num {
    color: #67e8f9;
    font-weight: 900;
    font-size: 22px;
    text-align: center;
}

.rank-row img {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    object-fit: cover;
}

.rank-info {
    min-width: 0;
}

.rank-info strong,
.rank-info em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-info em {
    color: var(--subtle);
    font-style: normal;
    font-size: 13px;
}

.rank-score {
    color: #bfdbfe;
    font-weight: 800;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    color: #bfdbfe;
    margin: 4px 0 20px;
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #fff;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 32px;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.22), rgba(34, 211, 238, 0.07)),
        rgba(15, 23, 42, 0.74);
    box-shadow: var(--shadow);
}

.compact-hero {
    padding: 44px;
}

.eyebrow {
    margin: 0 0 8px;
    color: #67e8f9;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(32px, 5vw, 58px);
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.page-hero p,
.detail-one-line {
    max-width: 800px;
    color: var(--muted);
    font-size: 18px;
}

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

.category-card-large {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.7);
    overflow: hidden;
}

.category-card-link {
    display: grid;
    grid-template-columns: 180px 1fr;
    align-items: center;
    gap: 18px;
    padding: 18px;
}

.category-cover-stack {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.category-cover-stack img {
    height: 132px;
    width: 100%;
    object-fit: cover;
    border-radius: 16px;
}

.category-card-body strong {
    display: block;
    font-size: 24px;
}

.category-card-body em {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-style: normal;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1.5fr) repeat(3, minmax(140px, 0.7fr)) auto;
    gap: 12px;
    align-items: end;
    padding: 16px;
    margin-bottom: 22px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
}

.filter-panel label {
    display: grid;
    gap: 7px;
    color: #bfdbfe;
    font-size: 13px;
}

.filter-count {
    margin: 0;
    color: var(--muted);
    white-space: nowrap;
}

.detail-main {
    width: min(1160px, calc(100% - 32px));
}

.detail-hero {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 34px;
    padding: 28px;
    align-items: center;
}

.detail-cover img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 24px 50px rgba(2, 8, 23, 0.42);
}

.detail-info {
    min-width: 0;
}

.detail-tags {
    margin-top: 18px;
}

.player-section {
    margin-top: 26px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #000;
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.player-shell video,
.player-cover,
.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.player-shell video {
    background: #000;
}

.player-cover {
    border: 0;
    padding: 0;
    cursor: pointer;
    color: #fff;
    background: #000;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover img {
    object-fit: cover;
    opacity: 0.56;
    filter: blur(1px) saturate(1.05);
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 45%, rgba(37, 99, 235, 0.18), rgba(2, 6, 23, 0.78));
}

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

.play-mark {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--blue-strong), var(--cyan));
    box-shadow: 0 0 44px rgba(56, 189, 248, 0.6);
    font-size: 34px;
    transform: translate(-50%, -50%);
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
    margin-top: 28px;
}

.detail-article,
.detail-side {
    padding: 24px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.72);
}

.detail-article h2,
.detail-side h2 {
    margin: 0 0 12px;
}

.detail-article p {
    color: var(--muted);
    margin: 0 0 22px;
}

.detail-side dl {
    display: grid;
    grid-template-columns: 78px 1fr;
    gap: 10px 14px;
    margin: 0 0 18px;
}

.detail-side dt {
    color: var(--subtle);
}

.detail-side dd {
    margin: 0;
    color: #e0f2fe;
}

.site-footer {
    margin-top: 60px;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(2, 6, 23, 0.76);
}

.footer-inner {
    width: min(1240px, calc(100% - 32px));
    min-height: 86px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    color: var(--muted);
}

.footer-brand {
    color: #e0f2fe;
    font-weight: 800;
}

.footer-links {
    display: flex;
    gap: 18px;
}

.footer-links a:hover {
    color: #fff;
}

[data-card].is-hidden {
    display: none;
}

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

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

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

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

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

    .brand-text {
        max-width: 62vw;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nav-toggle {
        display: block;
    }

    .nav-panel {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px;
        border: 1px solid rgba(148, 163, 184, 0.22);
        border-radius: 22px;
        background: rgba(15, 23, 42, 0.96);
        box-shadow: var(--shadow);
    }

    .nav-panel.is-open {
        display: flex;
    }

    .nav-link {
        padding: 12px 10px;
        border-radius: 14px;
    }

    .nav-link:hover,
    .nav-link.is-active {
        background: rgba(37, 99, 235, 0.22);
    }

    .hero,
    .hero-content {
        min-height: 82vh;
    }

    .hero-content {
        padding: 64px 0 190px;
    }

    .hero-arrow {
        display: none;
    }

    .hero-search-card {
        bottom: 58px;
    }

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

    .hero-search button {
        min-height: 46px;
    }

    .category-strip,
    .movie-grid,
    .movie-grid-wide,
    .category-large-grid,
    .detail-hero,
    .detail-content {
        grid-template-columns: 1fr;
    }

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

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

    .compact-hero {
        padding: 28px;
    }

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

    .rank-row {
        grid-template-columns: 36px 52px 1fr;
    }

    .rank-score {
        display: none;
    }

    .footer-inner {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 520px) {
    .movie-grid,
    .movie-grid-wide {
        gap: 14px;
    }

    .movie-card {
        border-radius: 20px;
    }

    .card-body {
        padding: 14px;
    }

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

    .btn {
        width: 100%;
    }

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