:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.72);
    --panel-strong: rgba(15, 23, 42, 0.92);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --cyan: #22d3ee;
    --blue: #3b82f6;
    --orange: #fb923c;
    --radius: 18px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.18), transparent 30%),
        radial-gradient(circle at 80% 10%, rgba(59, 130, 246, 0.16), transparent 35%),
        linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
}

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

img {
    display: block;
    max-width: 100%;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(59, 130, 246, 0.12));
}

button,
input,
select {
    font: inherit;
}

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

.header-inner,
.max-wrap,
.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    color: #ffffff;
    box-shadow: 0 14px 36px rgba(34, 211, 238, 0.22);
}

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

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

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted-strong);
    transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

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

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

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

.hero-carousel {
    position: relative;
    height: 620px;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    pointer-events: none;
    transition: opacity 0.7s ease, transform 1.2s ease;
}

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.86) 42%, rgba(2, 6, 23, 0.20) 100%),
        linear-gradient(0deg, #020617 0%, transparent 45%, rgba(2, 6, 23, 0.15) 100%);
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100vw - 1180px) / 2));
    bottom: 92px;
    width: min(650px, calc(100% - 48px));
}

.hero-badge,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(34, 211, 238, 0.20);
    border: 1px solid rgba(34, 211, 238, 0.26);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    font-size: 14px;
    font-weight: 700;
}

.hero-content h1,
.sub-hero h1,
.detail-info h1 {
    margin: 18px 0 16px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.045em;
    text-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.hero-content p,
.sub-hero p,
.detail-one-line {
    margin: 0;
    color: var(--muted-strong);
    font-size: clamp(16px, 2vw, 21px);
    line-height: 1.8;
}

.hero-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0;
}

.hero-meta span,
.detail-meta span,
.detail-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.68);
    border: 1px solid var(--line);
    font-size: 13px;
}

.hero-actions,
.center-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 12px;
    font-weight: 800;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn.primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 40px rgba(34, 211, 238, 0.22);
}

.btn.ghost {
    color: #ffffff;
    background: rgba(15, 23, 42, 0.66);
    border-color: var(--line);
}

.btn.text {
    color: var(--cyan);
    padding-inline: 6px;
}

.btn.small {
    min-height: 38px;
    padding-inline: 14px;
    font-size: 14px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 44px rgba(34, 211, 238, 0.18);
}

.hero-control {
    position: absolute;
    top: 50%;
    width: 46px;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.62);
    color: #ffffff;
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.hero-control.prev {
    left: 24px;
}

.hero-control.next {
    right: 24px;
}

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

.hero-dot {
    width: 34px;
    height: 4px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
}

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

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

.soft-band {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.28), rgba(2, 6, 23, 0));
    border-block: 1px solid rgba(148, 163, 184, 0.07);
}

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

.section-heading p {
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px auto;
    gap: 12px;
    margin: 0 0 24px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    backdrop-filter: blur(14px);
}

.filter-input,
.filter-select,
.filter-reset {
    min-height: 44px;
    border-radius: 12px;
    border: 1px solid var(--line);
    color: #ffffff;
    background: rgba(2, 6, 23, 0.62);
    outline: none;
}

.filter-input {
    padding: 0 14px;
}

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

.filter-reset {
    padding: 0 18px;
    cursor: pointer;
}

.poster-grid,
.large-grid,
.horizontal-grid,
.category-grid,
.rank-card-list {
    display: grid;
    gap: 18px;
}

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

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

.poster-grid.four-cols {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.large-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 22px;
}

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

.compact-gap {
    margin-top: 20px;
}

.movie-card {
    display: block;
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.13);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.55);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.20);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.38);
    background: rgba(15, 23, 42, 0.84);
    box-shadow: 0 22px 70px rgba(34, 211, 238, 0.10);
}

.thumb {
    position: relative;
    display: block;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.9);
}

.poster-thumb {
    aspect-ratio: 2 / 3;
}

.thumb.wide {
    aspect-ratio: 16 / 9;
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.5s ease;
}

.movie-card:hover img {
    transform: scale(1.07);
    filter: saturate(1.08);
}

.thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(2, 6, 23, 0.86) 100%);
}

.region-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 4px 8px;
    border-radius: 8px;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.68);
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 12px;
}

.play-dot,
.player-play {
    position: absolute;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #020617;
    background: rgba(255, 255, 255, 0.92);
}

.play-dot {
    top: 50%;
    left: 50%;
    width: 46px;
    height: 46px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.92);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.poster-title,
.large-title {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    color: #ffffff;
    font-weight: 800;
    line-height: 1.35;
    text-shadow: 0 8px 20px rgba(0, 0, 0, 0.65);
}

.large-title {
    font-size: 20px;
}

.movie-info {
    display: block;
    color: var(--muted);
}

.movie-info.compact {
    padding: 10px 12px 12px;
}

.movie-info.padded {
    padding: 14px;
}

.movie-info strong {
    display: block;
    color: #ffffff;
    margin-bottom: 6px;
}

.movie-info em {
    display: -webkit-box;
    color: var(--muted-strong);
    font-style: normal;
    line-height: 1.6;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-meta {
    display: block;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.tag-row,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.movie-card.horizontal {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
}

.movie-card.horizontal .thumb {
    height: 100%;
    aspect-ratio: auto;
}

.movie-card.horizontal .movie-info {
    padding: 14px 14px 14px 0;
    min-width: 0;
}

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

.category-tile,
.category-overview-card,
.rank-panel,
.text-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.category-tile {
    padding: 18px;
    min-height: 170px;
}

.category-tile a:first-child {
    display: grid;
    gap: 8px;
}

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

.category-tile strong {
    color: #ffffff;
    line-height: 1.55;
}

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.category-samples a,
.inline-link-cloud a {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--muted-strong);
    background: rgba(255, 255, 255, 0.05);
    font-size: 12px;
}

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

.region-list,
.year-list,
.category-overview-list {
    display: grid;
    gap: 30px;
}

.region-block h3,
.year-block h3 {
    margin: 0 0 14px;
    padding-left: 12px;
    border-left: 4px solid var(--cyan);
    font-size: 22px;
}

.rank-panel {
    position: sticky;
    top: 96px;
    padding: 18px;
}

.rank-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.rank-panel-head span {
    color: #ffffff;
    font-size: 22px;
    font-weight: 900;
}

.rank-panel-head a {
    color: var(--cyan);
    font-size: 14px;
}

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

.rank-list a {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border-radius: 12px;
    background: rgba(2, 6, 23, 0.34);
}

.rank-num {
    color: var(--cyan);
    font-weight: 900;
}

.rank-list strong {
    overflow: hidden;
    color: #ffffff;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-list em {
    grid-column: 2 / 3;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.rank-list b {
    color: var(--orange);
    font-size: 13px;
}

.center-actions {
    justify-content: center;
}

.sub-hero {
    padding: 70px 0 34px;
}

.sub-hero h1 {
    max-width: 900px;
}

.sub-hero p {
    max-width: 760px;
}

.crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: var(--muted);
    margin-top: 18px;
}

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

.category-overview-card {
    padding: 22px;
}

.category-overview-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.category-overview-head h2 {
    margin: 12px 0 0;
    font-size: 24px;
}

.mini-grid .movie-card-wrapper:nth-child(n+5) {
    display: none;
}

.inline-link-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

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

.rank-card a {
    display: grid;
    grid-template-columns: 68px 120px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    min-height: 150px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

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

.rank-large-num {
    color: var(--cyan);
    font-size: 28px;
    font-weight: 900;
}

.rank-card img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 14px;
}

.rank-card-body strong,
.rank-card-body em,
.rank-card-body span {
    display: block;
}

.rank-card-body strong {
    margin-bottom: 8px;
    font-size: 19px;
}

.rank-card-body em {
    display: -webkit-box;
    color: var(--muted-strong);
    font-style: normal;
    line-height: 1.6;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.rank-card-body span {
    margin-top: 10px;
    color: var(--muted);
    font-size: 13px;
}

.rank-card b {
    color: var(--orange);
}

.detail-hero {
    padding: 34px 0 20px;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
    gap: 26px;
    align-items: center;
    margin-top: 22px;
}

.player-panel,
.detail-info {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--panel);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.player-box {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-box video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    padding: 0;
    background: #020617;
    cursor: pointer;
    overflow: hidden;
}

.player-cover.is-hidden {
    display: none;
}

.player-cover-bg,
.player-cover-shade {
    position: absolute;
    inset: 0;
}

.player-cover-bg {
    background-position: center;
    background-size: cover;
    filter: saturate(1.05);
    transform: scale(1.02);
}

.player-cover-shade {
    background: radial-gradient(circle, rgba(34, 211, 238, 0.16), rgba(2, 6, 23, 0.84));
}

.player-play {
    width: 86px;
    height: 86px;
    font-size: 34px;
    box-shadow: 0 24px 70px rgba(34, 211, 238, 0.25);
}

.detail-info {
    padding: 28px;
}

.detail-info h1 {
    font-size: clamp(32px, 4vw, 54px);
}

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

.text-panel {
    padding: 24px;
}

.text-panel h2 {
    margin: 0 0 14px;
    color: #ffffff;
}

.text-panel p {
    margin: 0;
    color: var(--muted-strong);
    line-height: 1.9;
    font-size: 16px;
}

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

.footer-inner {
    display: grid;
    gap: 18px;
    padding: 38px 0;
    color: var(--muted);
}

.footer-brand {
    color: #ffffff;
    font-size: 21px;
}

.footer-inner p {
    max-width: 680px;
    margin: 10px 0 0;
    line-height: 1.7;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted-strong);
}

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

.copyright {
    font-size: 13px;
}

.movie-card-wrapper.is-hidden {
    display: none;
}

@media (max-width: 1080px) {
    .poster-grid.six-cols,
    .poster-grid.five-cols {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

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

    .rank-panel {
        position: static;
    }
}

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

    .nav-toggle {
        display: block;
    }

    .primary-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: rgba(2, 6, 23, 0.96);
    }

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

    .hero-carousel {
        height: 560px;
    }

    .hero-content {
        bottom: 72px;
    }

    .hero-control {
        display: none;
    }

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

    .poster-grid.six-cols,
    .poster-grid.five-cols,
    .poster-grid.four-cols,
    .large-grid,
    .horizontal-grid,
    .category-grid,
    .rank-card-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .movie-card.horizontal .thumb {
        aspect-ratio: 16 / 9;
    }

    .movie-card.horizontal .movie-info {
        padding: 12px;
    }

    .rank-card a {
        grid-template-columns: 48px 86px minmax(0, 1fr);
    }

    .rank-card img {
        width: 86px;
        height: 100px;
    }

    .rank-card b {
        grid-column: 3;
    }

    .category-overview-head {
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .brand-text {
        font-size: 17px;
    }

    .hero-content h1,
    .sub-hero h1,
    .detail-info h1 {
        font-size: 36px;
    }

    .poster-grid.six-cols,
    .poster-grid.five-cols,
    .poster-grid.four-cols,
    .large-grid,
    .horizontal-grid,
    .category-grid,
    .rank-card-list {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

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

    .category-tile {
        min-height: 150px;
    }

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

    .rank-card img {
        width: 100%;
        height: 170px;
    }

    .player-play {
        width: 68px;
        height: 68px;
        font-size: 28px;
    }
}
