:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.88);
    --panel-strong: #111827;
    --card: #0f172a;
    --card-hover: #172554;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --cyan: #22d3ee;
    --cyan-deep: #0891b2;
    --pink: #fb7185;
    --amber: #f59e0b;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
    --radius-lg: 28px;
    --radius: 18px;
    --radius-sm: 12px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 18% 8%, rgba(34, 211, 238, 0.16), transparent 32rem),
        radial-gradient(circle at 82% 20%, rgba(251, 113, 133, 0.12), transparent 26rem),
        linear-gradient(180deg, #020617 0%, #07111f 48%, #020617 100%);
    color: var(--text);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), transparent 72%);
    z-index: -1;
}

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

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

.container {
    width: min(1180px, calc(100% - 32px));
    margin-inline: auto;
}

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

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

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

.brand-mark {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 14px;
    color: #001018;
    background: linear-gradient(135deg, var(--cyan), #67e8f9 45%, var(--pink));
    box-shadow: 0 14px 36px rgba(34, 211, 238, 0.28);
}

.brand-text {
    font-size: 1.16rem;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.main-nav a,
.footer-links a,
.side-links a {
    color: var(--muted-strong);
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.main-nav a {
    padding: 10px 14px;
    border-radius: 999px;
}

.main-nav a:hover,
.footer-links a:hover,
.side-links a:hover {
    color: var(--cyan);
}

.main-nav a:hover {
    background: rgba(34, 211, 238, 0.08);
}

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

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

.hero-slider {
    position: relative;
    min-height: clamp(560px, 76vh, 820px);
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

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

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

.hero-bg,
.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.34;
    filter: saturate(1.1) contrast(1.05);
}

.image-missing {
    opacity: 0;
}

.hero-slide::before,
.detail-poster,
.poster-frame,
.hero-poster {
    background:
        linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(251, 113, 133, 0.18)),
        linear-gradient(160deg, #111827, #020617 58%, #0e7490);
}

.hero-shade,
.detail-bg-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.7) 44%, rgba(2, 6, 23, 0.22) 100%),
        linear-gradient(0deg, #020617 0%, transparent 44%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    min-height: clamp(560px, 76vh, 820px);
    grid-template-columns: minmax(0, 1.1fr) minmax(260px, 430px);
    align-items: center;
    gap: clamp(28px, 5vw, 84px);
    padding-block: 80px;
}

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

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 16px;
    padding: 8px 12px;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 999px;
    color: var(--cyan);
    background: rgba(8, 145, 178, 0.12);
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.hero-copy h1,
.page-title-block h1,
.detail-copy h1 {
    margin: 0;
    font-weight: 900;
    letter-spacing: -0.06em;
    line-height: 0.98;
}

.hero-copy h1 {
    font-size: clamp(2.8rem, 7vw, 6.8rem);
    max-width: 900px;
}

.hero-one-line,
.detail-one-line,
.page-title-block p,
.section-heading p,
.search-hero-card p,
.category-overview-card p,
.site-footer p {
    color: var(--muted-strong);
    line-height: 1.75;
}

.hero-one-line {
    max-width: 720px;
    margin: 24px 0 22px;
    font-size: clamp(1.08rem, 2vw, 1.35rem);
}

.hero-meta,
.movie-meta-line,
.detail-meta-grid,
.tag-row,
.hero-actions,
.filter-selects,
.footer-links,
.side-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-meta span,
.movie-meta-line span,
.tag-row span,
.detail-meta-grid span {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.64);
    color: var(--muted-strong);
}

.hero-meta span {
    padding: 8px 12px;
}

.hero-actions {
    margin-top: 30px;
}

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

.btn.primary {
    color: #001018;
    background: linear-gradient(135deg, var(--cyan), #67e8f9);
    box-shadow: 0 16px 34px rgba(34, 211, 238, 0.24);
}

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

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

.hero-poster {
    display: block;
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 32px;
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

.hero-poster img,
.detail-poster img,
.poster-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s ease;
}

.hero-poster:hover img,
.movie-card:hover .poster-frame img,
.detail-poster:hover img {
    transform: scale(1.07);
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 26px;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transform: translateX(-50%);
}

.hero-arrow,
.hero-dots button {
    border: 1px solid var(--line);
    color: var(--text);
    background: rgba(15, 23, 42, 0.76);
    backdrop-filter: blur(14px);
    cursor: pointer;
}

.hero-arrow {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    font-size: 2rem;
    line-height: 1;
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dots button {
    width: 34px;
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    text-indent: -999px;
    opacity: 0.55;
}

.hero-dots button[aria-current="true"] {
    width: 54px;
    border-color: rgba(34, 211, 238, 0.58);
    background: var(--cyan);
    opacity: 1;
}

.stats-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: -42px;
    position: relative;
    z-index: 8;
}

.stats-strip div,
.search-hero-card,
.section-block,
.category-overview-card,
.content-card,
.filter-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.76);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(18px);
}

.stats-strip div {
    padding: 22px;
}

.stats-strip strong {
    display: block;
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    line-height: 1;
}

.stats-strip span {
    display: block;
    margin-top: 8px;
    color: var(--muted);
}

.section-block {
    margin-top: 44px;
    padding: clamp(22px, 4vw, 34px);
}

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

.compact-heading {
    align-items: center;
}

.section-heading h2,
.search-hero-card h2,
.content-card h2,
.category-overview-card h2,
.site-footer h2 {
    margin: 0;
    font-weight: 850;
    letter-spacing: -0.035em;
}

.section-heading h2,
.search-hero-card h2 {
    font-size: clamp(1.7rem, 3.2vw, 2.6rem);
}

.section-heading p,
.search-hero-card p,
.category-overview-card p {
    margin: 8px 0 0;
}

.movie-grid {
    display: grid;
    gap: 18px;
}

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

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.88);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    border-color: rgba(34, 211, 238, 0.58);
    transform: translateY(-5px);
    box-shadow: 0 22px 50px rgba(8, 145, 178, 0.16);
}

.poster-link,
.poster-frame {
    display: block;
}

.poster-frame {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
}

.movie-card.compact .poster-frame {
    aspect-ratio: 4 / 4.7;
}

.play-chip,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
}

.play-chip {
    right: 12px;
    bottom: 12px;
    min-height: 34px;
    padding: 0 12px;
    color: #001018;
    background: var(--cyan);
    transform: translateY(12px);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-chip {
    opacity: 1;
    transform: translateY(0);
}

.rank-badge {
    top: 12px;
    left: 12px;
    min-width: 38px;
    height: 30px;
    padding: 0 10px;
    color: #001018;
    background: linear-gradient(135deg, #fbbf24, #f97316);
}

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

.movie-meta-line {
    gap: 6px;
    margin-bottom: 10px;
}

.movie-meta-line span {
    padding: 4px 8px;
    font-size: 0.72rem;
}

.movie-card h2 {
    display: -webkit-box;
    min-height: 2.65em;
    margin: 0 0 9px;
    overflow: hidden;
    font-size: 1rem;
    line-height: 1.32;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-card p {
    display: -webkit-box;
    min-height: 4.7em;
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.58;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.tag-row {
    margin-top: 13px;
    gap: 7px;
}

.tag-row span {
    padding: 5px 8px;
    font-size: 0.74rem;
}

.large-tags span {
    padding: 7px 11px;
    font-size: 0.85rem;
}

.search-hero-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 24px;
    align-items: center;
    margin-top: 44px;
    padding: clamp(22px, 4vw, 34px);
}

.home-search,
.filter-search {
    display: flex;
    gap: 10px;
}

.home-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--text);
    background: rgba(2, 6, 23, 0.68);
    outline: none;
}

.home-search input,
.filter-panel input {
    padding: 0 18px;
}

.filter-panel select {
    padding: 0 14px;
}

.home-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(34, 211, 238, 0.75);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.split-layout,
.detail-main-grid,
.detail-hero-grid {
    display: grid;
    gap: 28px;
}

.split-layout {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
}

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

.rank-row {
    display: grid;
    grid-template-columns: 46px 58px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.34);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
    border-color: rgba(34, 211, 238, 0.56);
    transform: translateX(4px);
}

.rank-number {
    color: var(--cyan);
    font-weight: 900;
    font-size: 1.1rem;
}

.rank-row img {
    width: 58px;
    height: 70px;
    border-radius: 12px;
    object-fit: cover;
    background: linear-gradient(135deg, #111827, #0e7490);
}

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

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

.rank-info small {
    margin-top: 6px;
    color: var(--muted);
}

.page-title-block {
    padding: 58px 0 8px;
}

.page-title-block h1,
.detail-copy h1 {
    font-size: clamp(2.3rem, 6vw, 5.2rem);
}

.page-title-block p {
    max-width: 780px;
    margin: 16px 0 0;
    font-size: 1.05rem;
}

.category-overview-list {
    display: grid;
    gap: 24px;
    margin-top: 28px;
}

.category-overview-card {
    padding: clamp(20px, 3vw, 30px);
}

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

.filter-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(340px, 1.2fr) auto;
    gap: 18px;
    align-items: end;
    margin: 24px 0;
    padding: 18px;
}

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

.filter-count {
    margin: 0 0 13px;
    color: var(--cyan);
    font-weight: 800;
    white-space: nowrap;
}

.filter-grid {
    padding-bottom: 48px;
}

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

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

.movie-detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 620px;
}

.detail-hero-grid {
    position: relative;
    z-index: 2;
    grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
    align-items: center;
    min-height: 620px;
    padding-block: 60px;
}

.detail-poster {
    display: block;
    aspect-ratio: 3 / 4.3;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.detail-one-line {
    max-width: 820px;
    margin: 22px 0;
    font-size: 1.15rem;
}

.detail-meta-grid {
    gap: 10px;
    margin-bottom: 16px;
}

.detail-meta-grid span {
    display: inline-grid;
    gap: 2px;
    min-width: 116px;
    padding: 9px 13px;
    border-radius: 16px;
}

.detail-meta-grid strong {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
}

.detail-main-grid {
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
    margin-top: 42px;
}

.detail-main,
.detail-aside {
    display: grid;
    gap: 22px;
}

.player-section {
    scroll-margin-top: 96px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #000;
    box-shadow: var(--shadow);
}

.movie-player {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    gap: 12px;
    border: 0;
    color: var(--text);
    background:
        radial-gradient(circle, rgba(34, 211, 238, 0.18), transparent 18rem),
        rgba(2, 6, 23, 0.46);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 800;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-start.is-hidden {
    opacity: 0;
    visibility: hidden;
}

.play-symbol {
    display: grid;
    width: 76px;
    height: 76px;
    place-items: center;
    margin: auto;
    border-radius: 50%;
    color: #001018;
    background: var(--cyan);
    box-shadow: 0 18px 40px rgba(34, 211, 238, 0.28);
}

.player-note {
    margin: 12px 4px 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.content-card {
    padding: clamp(20px, 3vw, 28px);
}

.content-card h2 {
    margin-bottom: 14px;
    font-size: 1.45rem;
}

.content-card p {
    margin: 0;
    color: var(--muted-strong);
    line-height: 1.88;
}

.info-list {
    display: grid;
    gap: 14px;
    margin: 0;
}

.info-list div {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
}

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

.info-list dd {
    margin: 0;
    color: var(--text);
}

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

.side-links {
    display: grid;
}

.side-links a {
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.side-links a:last-child {
    border-bottom: 0;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr 1fr;
    gap: 34px;
    padding-block: 42px;
}

.footer-brand {
    margin-bottom: 12px;
}

.site-footer h2 {
    margin-bottom: 14px;
    font-size: 1rem;
}

.footer-links {
    flex-direction: column;
    align-items: start;
    gap: 10px;
}

.copyright {
    padding: 18px 0 28px;
    color: var(--muted);
    font-size: 0.9rem;
}

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

    .four-col,
    .rank-feature-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

@media (max-width: 860px) {
    .nav-toggle {
        display: inline-block;
    }

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

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

    .hero-content,
    .detail-hero-grid,
    .search-hero-card,
    .split-layout,
    .footer-grid,
    .filter-panel {
        grid-template-columns: 1fr;
    }

    .hero-content {
        padding-top: 110px;
    }

    .hero-poster {
        display: none;
    }

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

    .section-heading,
    .category-overview-head {
        align-items: start;
        flex-direction: column;
    }

    .four-col,
    .three-col,
    .six-col,
    .two-col {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-count {
        margin-bottom: 0;
    }
}

@media (max-width: 560px) {
    .container {
        width: min(100% - 22px, 1180px);
    }

    .hero-slider,
    .hero-content {
        min-height: 620px;
    }

    .hero-copy h1,
    .page-title-block h1,
    .detail-copy h1 {
        letter-spacing: -0.045em;
    }

    .stats-strip,
    .four-col,
    .three-col,
    .six-col,
    .two-col {
        grid-template-columns: 1fr;
    }

    .home-search,
    .filter-search,
    .filter-selects {
        flex-direction: column;
    }

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

    .rank-row {
        grid-template-columns: 38px 54px minmax(0, 1fr);
    }
}
