:root {
    color-scheme: dark;
    --bg: #020617;
    --surface: rgba(15, 23, 42, 0.74);
    --surface-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(148, 163, 184, 0.16);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --emerald: #34d399;
    --emerald-strong: #10b981;
    --emerald-soft: rgba(16, 185, 129, 0.16);
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
    --radius: 18px;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(16, 185, 129, 0.22), transparent 32rem),
        linear-gradient(180deg, #020617 0%, #0f172a 52%, #020617 100%);
    color: var(--text);
}

body::before {
    position: fixed;
    inset: 0;
    pointer-events: none;
    content: "";
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent 70%);
}

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: 80;
    border-bottom: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.9);
    backdrop-filter: blur(18px);
}

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

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

.brand:hover {
    color: var(--emerald);
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--emerald), #22d3ee);
    color: #00110b;
    font-size: 14px;
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.28);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    color: var(--soft);
    font-size: 14px;
}

.desktop-nav a,
.mobile-nav a,
.footer-links a,
.section-link,
.breadcrumb a,
.category-samples a {
    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,
.mobile-nav a.active,
.footer-links a:hover,
.section-link:hover,
.breadcrumb a:hover,
.category-samples a:hover {
    color: var(--emerald);
}

.nav-toggle {
    width: 44px;
    height: 44px;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 0;
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.86);
    color: var(--text);
    cursor: pointer;
}

.nav-toggle span {
    width: 20px;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 14px;
    border-top: 1px solid var(--line);
}

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

.mobile-nav a {
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.7);
    color: var(--soft);
}

.hero-carousel {
    position: relative;
    height: min(72vh, 760px);
    min-height: 560px;
    overflow: hidden;
    isolation: isolate;
}

.hero-slides,
.hero-slide,
.hero-bg,
.hero-shade {
    position: absolute;
    inset: 0;
}

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

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

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08);
}

.hero-shade {
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.66) 42%, rgba(2, 6, 23, 0.12) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.1) 42%, rgba(2, 6, 23, 0.5) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: flex-end;
    padding-bottom: clamp(80px, 12vh, 130px);
}

.hero-copy {
    width: min(680px, 100%);
}

.eyebrow {
    margin: 0 0 12px;
    display: inline-flex;
    align-items: center;
    width: max-content;
    padding: 7px 12px;
    border: 1px solid rgba(52, 211, 153, 0.25);
    border-radius: 999px;
    background: var(--emerald-soft);
    color: var(--emerald);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1 {
    margin: 0 0 18px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.055em;
}

.hero-copy p,
.page-hero p {
    margin: 0;
    max-width: 720px;
    color: var(--soft);
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.8;
}

.hero-tags,
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.hero-tags span,
.tag-cloud span,
.card-meta span,
.card-tags {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.74);
    border: 1px solid var(--line);
    color: var(--soft);
}

.hero-tags span,
.tag-cloud span {
    padding: 8px 12px;
    font-size: 13px;
}

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

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
    background: linear-gradient(135deg, var(--emerald-strong), #22d3ee);
    color: #00110b;
    box-shadow: 0 18px 45px rgba(16, 185, 129, 0.28);
}

.ghost-btn {
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.62);
    color: var(--text);
}

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

.hero-arrow {
    position: absolute;
    z-index: 6;
    top: 50%;
    width: 46px;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.65);
    color: var(--text);
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(12px);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

.hero-dots button {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.44);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
    width: 34px;
    background: var(--emerald);
}

.section-wrap,
.detail-wrap {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 70px 0;
}

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

.section-head.compact {
    margin-bottom: 20px;
}

.section-head h2,
.detail-section h2,
.info-card h2,
.site-footer h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    letter-spacing: -0.035em;
}

.section-link {
    color: var(--soft);
    font-weight: 700;
}

.wide-band {
    width: 100%;
    padding-left: max(16px, calc((100% - 1180px) / 2));
    padding-right: max(16px, calc((100% - 1180px) / 2));
    border-block: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.44);
}

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

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

.movie-card {
    min-width: 0;
}

.movie-card.hidden,
.rank-item.hidden {
    display: none;
}

.movie-card-link {
    display: block;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.movie-card-link:hover {
    transform: translateY(-5px);
    border-color: rgba(52, 211, 153, 0.48);
    background: rgba(15, 23, 42, 0.92);
}

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

.poster-frame img,
.mini-card img,
.category-tile img,
.category-card img,
.poster-card img,
.rank-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.movie-card-link:hover .poster-frame img,
.mini-card a:hover img,
.category-tile:hover img,
.category-card a:hover img,
.rank-item a:hover img {
    transform: scale(1.06);
}

.poster-frame::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(180deg, transparent 20%, rgba(2, 6, 23, 0.74));
    opacity: 0;
    transition: opacity 0.24s ease;
}

.movie-card-link:hover .poster-frame::after {
    opacity: 1;
}

.card-play,
.player-icon {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(52, 211, 153, 0.92);
    color: #00110b;
    font-size: 22px;
    transform: translate(-50%, -50%) scale(0.86);
    opacity: 0;
    transition: transform 0.24s ease, opacity 0.24s ease;
}

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

.card-year {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.9);
    color: #00110b;
    font-size: 12px;
    font-weight: 800;
}

.card-body {
    display: grid;
    gap: 10px;
    padding: 16px;
}

.card-body strong {
    overflow: hidden;
    color: var(--text);
    font-size: 17px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-desc {
    display: -webkit-box;
    min-height: 44px;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 12px;
}

.card-meta span,
.card-tags {
    padding: 6px 9px;
}

.card-tags {
    width: max-content;
    max-width: 100%;
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.horizontal-scroll {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 280px;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 12px;
    scroll-snap-type: x proximity;
}

.mini-card a {
    display: grid;
    grid-template-columns: 108px 1fr;
    gap: 14px;
    min-height: 92px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    scroll-snap-align: start;
}

.mini-card img {
    border-radius: 12px;
    aspect-ratio: 16 / 10;
}

.mini-card span {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
}

.mini-card strong,
.rank-info strong,
.poster-card strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mini-card em,
.rank-info em,
.category-card-body em,
.category-tile em,
.poster-card span {
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
    line-height: 1.5;
}

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

.category-tile,
.category-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.category-tile {
    position: relative;
    min-height: 190px;
    display: block;
}

.category-tile img {
    position: absolute;
    inset: 0;
}

.category-tile::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.1));
}

.category-tile span {
    position: absolute;
    inset: auto 16px 16px;
    z-index: 2;
    display: grid;
    gap: 8px;
}

.category-tile strong,
.category-card-body strong {
    font-size: 20px;
}

.category-card a {
    display: block;
}

.category-card img {
    aspect-ratio: 16 / 10;
}

.category-card-body {
    display: grid;
    gap: 10px;
    padding: 18px;
}

.category-samples {
    display: grid;
    gap: 8px;
    padding: 0 18px 18px;
}

.category-samples a {
    overflow: hidden;
    color: var(--soft);
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 26px;
    align-items: start;
}

.side-panel,
.info-card,
.poster-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.side-panel {
    position: sticky;
    top: 92px;
    padding: 24px;
}

.block-btn {
    width: 100%;
    margin-top: 22px;
}

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

.rank-item a {
    display: grid;
    grid-template-columns: 64px 130px 1fr;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.rank-item a:hover {
    transform: translateY(-3px);
    border-color: rgba(52, 211, 153, 0.42);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: rgba(16, 185, 129, 0.14);
    color: var(--emerald);
    font-weight: 900;
}

.rank-item img {
    aspect-ratio: 16 / 10;
    border-radius: 14px;
}

.rank-info {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.rank-info em {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

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

.compact-rank .rank-item:nth-child(n + 11) {
    display: none;
}

.page-hero {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    min-height: 360px;
    margin: 34px auto 0;
    display: grid;
    align-items: end;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(15, 23, 42, 0.92));
    box-shadow: var(--shadow);
}

.page-hero > div {
    position: relative;
    z-index: 2;
    padding: clamp(28px, 6vw, 60px);
}

.page-hero img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.28;
}

.small-hero {
    min-height: 300px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 180px;
    gap: 14px;
    margin-bottom: 28px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
}

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

.filter-panel input,
.filter-panel select {
    width: 100%;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 13px;
    outline: 0;
    background: rgba(2, 6, 23, 0.7);
    color: var(--text);
    padding: 0 14px;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(52, 211, 153, 0.55);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.detail-wrap {
    padding-top: 34px;
}

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

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    align-items: start;
}

.detail-main,
.detail-side {
    min-width: 0;
}

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

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

.movie-video {
    background: #000;
}

.player-cover {
    z-index: 4;
    border: 0;
    padding: 0;
    cursor: pointer;
    background: #000;
    color: var(--text);
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.player-cover img {
    object-fit: cover;
}

.player-cover-shade {
    background:
        radial-gradient(circle, rgba(52, 211, 153, 0.22), transparent 30%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.74), rgba(2, 6, 23, 0.3));
}

.player-cover .player-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.detail-title,
.detail-section {
    padding: 28px 0 0;
}

.detail-title h1 {
    margin: 0 0 16px;
    font-size: clamp(32px, 5vw, 54px);
    line-height: 1.08;
    letter-spacing: -0.045em;
}

.detail-title p,
.detail-section p {
    color: var(--soft);
    font-size: 16px;
    line-height: 1.9;
}

.detail-section h2 {
    margin-bottom: 14px;
}

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

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

.detail-side {
    position: sticky;
    top: 92px;
    display: grid;
    gap: 18px;
}

.poster-card {
    overflow: hidden;
}

.poster-card img {
    aspect-ratio: 16 / 10;
}

.poster-card div {
    display: grid;
    gap: 8px;
    padding: 16px;
}

.info-card {
    padding: 20px;
}

.info-card h2 {
    margin-bottom: 18px;
    font-size: 22px;
}

.info-card dl {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 12px;
    margin: 0;
    color: var(--soft);
}

.info-card dt {
    color: var(--muted);
}

.info-card dd {
    margin: 0;
}

.info-card a {
    color: var(--emerald);
}

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

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

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

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

.site-footer h2 {
    margin-bottom: 16px;
    font-size: 18px;
}

.footer-links {
    display: grid;
    gap: 10px;
    color: var(--muted);
    font-size: 14px;
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0 32px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
    text-align: center;
}

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

    .nav-toggle {
        display: flex;
    }

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

    .split-section,
    .detail-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .side-panel,
    .detail-side {
        position: static;
    }

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

@media (max-width: 680px) {
    .hero-carousel {
        min-height: 620px;
    }

    .hero-arrow {
        display: none;
    }

    .hero-content {
        padding-bottom: 96px;
    }

    .section-wrap,
    .detail-wrap {
        width: min(100% - 24px, 1180px);
        padding: 46px 0;
    }

    .section-head {
        align-items: start;
        flex-direction: column;
    }

    .movie-grid,
    .featured-grid,
    .category-grid,
    .category-overview-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .rank-item a {
        grid-template-columns: 48px 92px 1fr;
        gap: 12px;
        padding: 12px;
    }

    .rank-number {
        width: 42px;
        height: 42px;
        border-radius: 12px;
        font-size: 13px;
    }

    .rank-info em {
        display: none;
    }

    .page-hero {
        min-height: 280px;
        border-radius: 22px;
    }

    .horizontal-scroll {
        grid-auto-columns: 250px;
    }

    .mini-card a {
        grid-template-columns: 96px 1fr;
    }
}
