:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.86);
    --bg-glass: rgba(15, 23, 42, 0.72);
    --line: rgba(148, 163, 184, 0.18);
    --line-strong: rgba(34, 211, 238, 0.32);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --cyan: #06b6d4;
    --cyan-strong: #22d3ee;
    --blue: #2563eb;
    --yellow: #facc15;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
    --radius: 22px;
    --radius-sm: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 10% 0%, rgba(8, 145, 178, 0.32), transparent 34rem),
        radial-gradient(circle at 90% 6%, rgba(37, 99, 235, 0.26), transparent 36rem),
        linear-gradient(180deg, #020617 0%, #0f172a 52%, #020617 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, black, transparent 82%);
}

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

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

button,
input,
select {
    font: inherit;
}

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

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

.site-nav {
    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: 900;
    letter-spacing: -0.04em;
}

.brand-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: white;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 16px 38px rgba(6, 182, 212, 0.34);
    transition: transform 0.25s ease;
}

.brand:hover .brand-icon,
.footer-brand:hover .brand-icon {
    transform: scale(1.08) rotate(-4deg);
}

.brand-text {
    font-size: 1.35rem;
    background: linear-gradient(90deg, var(--cyan-strong), #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

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

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

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.7);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 2px;
    background: var(--text);
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--line);
    padding: 10px 16px 18px;
    background: rgba(2, 6, 23, 0.96);
}

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

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

.mobile-cat-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.hero {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    background: #020617;
}

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

.hero-slide.active {
    opacity: 1;
    z-index: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.28), rgba(37, 99, 235, 0.22));
    transform: scale(1.04);
}

.hero-slide.active img {
    animation: slowZoom 7s ease forwards;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.62) 45%, rgba(2, 6, 23, 0.1) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.14) 50%, rgba(2, 6, 23, 0.4) 100%);
}

.hero-copy {
    position: absolute;
    inset: auto 0 0 0;
    z-index: 2;
    padding: 88px 0 74px;
}

.hero-copy-inner {
    width: min(760px, calc(100% - 32px));
    margin-left: max(16px, calc((100vw - 1280px) / 2));
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 8px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    color: var(--cyan-strong);
    background: rgba(8, 145, 178, 0.14);
    font-weight: 800;
}

.hero h1,
.hero h2 {
    margin: 0 0 18px;
    font-size: clamp(2.6rem, 7vw, 6.2rem);
    line-height: 0.95;
    letter-spacing: -0.07em;
}

.hero p {
    max-width: 680px;
    margin: 0 0 24px;
    color: var(--muted-strong);
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.8;
}

.hero-actions,
.section-actions,
.filter-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 20px;
    border-radius: 14px;
    border: 1px solid var(--line);
    color: var(--text);
    background: rgba(15, 23, 42, 0.68);
    font-weight: 800;
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    background: rgba(30, 41, 59, 0.94);
    border-color: rgba(34, 211, 238, 0.45);
}

.btn-primary {
    border-color: transparent;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--cyan-strong), #3b82f6);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 52px;
    height: 52px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    color: white;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
    background: rgba(255, 255, 255, 0.24);
    transform: translateY(-50%) scale(1.04);
}

.hero-control.prev {
    left: 18px;
    transform: translateY(-50%);
}

.hero-control.next {
    right: 18px;
    transform: translateY(-50%);
}

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

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

.hero-dot.active {
    width: 34px;
    background: white;
}

main {
    position: relative;
    z-index: 1;
}

.section {
    padding: 72px 0 0;
}

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

.section-kicker {
    color: var(--cyan-strong);
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section h1,
.section h2,
.page-title h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1.06;
    letter-spacing: -0.055em;
}

.section-heading p,
.page-title p,
.category-hero p,
.detail-intro p {
    color: var(--muted-strong);
    line-height: 1.8;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature-card {
    min-height: 330px;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    background: var(--bg-card);
}

.feature-card img {
    width: 100%;
    height: 100%;
    min-height: 330px;
    object-fit: cover;
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.26), rgba(37, 99, 235, 0.22));
    transition: transform 0.55s ease;
}

.feature-card:hover img {
    transform: scale(1.08);
}

.feature-card-copy {
    position: absolute;
    inset: auto 0 0;
    padding: 28px;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.64) 70%, transparent 100%);
}

.feature-card h2,
.feature-card h3 {
    margin: 0 0 10px;
    font-size: 1.55rem;
}

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

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

.movie-card,
.compact-card,
.category-tile,
.search-panel,
.detail-panel,
.rank-item {
    border: 1px solid var(--line);
    background: var(--bg-card);
    box-shadow: 0 18px 58px rgba(0, 0, 0, 0.22);
}

.movie-card {
    overflow: hidden;
    border-radius: 20px;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    border-color: rgba(34, 211, 238, 0.42);
    box-shadow: 0 28px 72px rgba(6, 182, 212, 0.14);
}

.movie-card-link {
    display: block;
    height: 100%;
}

.poster-frame {
    margin: 0;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(37, 99, 235, 0.2)),
        #0f172a;
}

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

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

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

.movie-meta,
.detail-meta,
.rank-copy span,
.compact-card span {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 0.82rem;
}

.movie-meta span,
.detail-meta span {
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.1);
}

.movie-card h2,
.movie-card h3,
.compact-card h3,
.rank-copy h2 {
    margin: 10px 0 8px;
    color: white;
    font-size: 1.08rem;
    line-height: 1.35;
}

.movie-card p,
.compact-card p,
.rank-copy p {
    margin: 0;
    color: var(--muted-strong);
    line-height: 1.65;
}

.movie-card p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 14px;
}

.tag-row span,
.pill-row a,
.pill-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border: 1px solid rgba(34, 211, 238, 0.22);
    border-radius: 999px;
    color: #a5f3fc;
    background: rgba(8, 145, 178, 0.12);
    font-size: 0.78rem;
    font-weight: 800;
}

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

.category-tile {
    position: relative;
    min-height: 180px;
    padding: 24px;
    overflow: hidden;
    border-radius: var(--radius);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: auto -40px -56px auto;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(34, 211, 238, 0.16);
}

.category-tile:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.42);
}

.category-tile h2,
.category-tile h3 {
    margin: 0 0 12px;
    font-size: 1.35rem;
}

.category-tile p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: var(--muted-strong);
    line-height: 1.7;
}

.page-title,
.category-hero,
.detail-hero {
    padding: 58px 0 24px;
}

.category-hero-box,
.detail-hero-box,
.search-panel {
    border: 1px solid var(--line);
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(8, 145, 178, 0.18), rgba(37, 99, 235, 0.12)),
        rgba(15, 23, 42, 0.82);
    box-shadow: var(--shadow);
}

.category-hero-box {
    padding: 38px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 0.92rem;
}

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

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

.rank-item {
    border-radius: 18px;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
    transform: translateX(6px);
    border-color: rgba(34, 211, 238, 0.42);
}

.rank-item a {
    display: grid;
    grid-template-columns: 64px 78px 1fr;
    align-items: center;
    gap: 18px;
    padding: 12px 18px;
}

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

.rank-item img {
    width: 78px;
    height: 104px;
    object-fit: cover;
    border-radius: 12px;
    background: #0f172a;
}

.rank-copy h2 {
    font-size: 1.12rem;
}

.compact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.compact-card {
    border-radius: 18px;
    overflow: hidden;
}

.compact-card a {
    display: grid;
    grid-template-columns: 86px 1fr;
    gap: 14px;
    padding: 12px;
}

.compact-card img {
    width: 86px;
    height: 112px;
    object-fit: cover;
    border-radius: 12px;
    background: #0f172a;
}

.search-panel {
    padding: 28px;
}

.search-box {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    margin-bottom: 18px;
}

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

.search-box input:focus,
.filter-row select:focus {
    border-color: rgba(34, 211, 238, 0.58);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.09);
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.search-results-empty {
    padding: 36px;
    border: 1px dashed var(--line);
    border-radius: 18px;
    color: var(--muted-strong);
    text-align: center;
}

.detail-hero-box {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 34px;
    padding: 32px;
}

.detail-cover {
    overflow: hidden;
    border-radius: 24px;
    aspect-ratio: 4 / 5;
    background: #0f172a;
    box-shadow: var(--shadow);
}

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

.detail-intro h1 {
    margin: 12px 0 16px;
    font-size: clamp(2.2rem, 5vw, 4.8rem);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.detail-panel {
    padding: 30px;
    border-radius: 24px;
}

.detail-panel h2 {
    margin: 0 0 14px;
    font-size: 1.5rem;
}

.detail-panel p {
    color: var(--muted-strong);
    line-height: 1.9;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid rgba(34, 211, 238, 0.28);
    background: #000;
    box-shadow: var(--shadow);
}

.player-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.play-trigger {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: white;
    background:
        radial-gradient(circle at center, rgba(34, 211, 238, 0.16), transparent 44%),
        rgba(2, 6, 23, 0.38);
    cursor: pointer;
}

.play-trigger span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    color: white;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 20px 60px rgba(6, 182, 212, 0.4);
    font-size: 2rem;
    transition: transform 0.2s ease;
}

.play-trigger:hover span {
    transform: scale(1.08);
}

.player-shell.is-playing .play-trigger {
    display: none;
}

.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 18px;
}

@keyframes slowZoom {
    from {
        transform: scale(1.04);
    }
    to {
        transform: scale(1.11);
    }
}

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

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

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

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

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

    .menu-toggle {
        display: block;
    }

    .hero {
        min-height: 78vh;
    }

    .hero-copy {
        padding-bottom: 82px;
    }

    .hero-copy-inner {
        margin: 0 auto;
    }

    .hero-control {
        display: none;
    }

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

    .movie-grid,
    .category-grid,
    .compact-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

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

    .filter-row,
    .search-box,
    .detail-hero-box {
        grid-template-columns: 1fr;
    }

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

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

    .rank-item img {
        width: 64px;
        height: 86px;
    }
}

@media (max-width: 520px) {
    .container {
        width: min(100% - 24px, 1280px);
    }

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

    .hero h1,
    .hero h2 {
        font-size: 2.55rem;
    }

    .category-hero-box,
    .detail-hero-box,
    .search-panel,
    .detail-panel {
        padding: 22px;
        border-radius: 22px;
    }

    .compact-card a {
        grid-template-columns: 76px 1fr;
    }

    .compact-card img {
        width: 76px;
        height: 100px;
    }
}

.category-tile-rich {
    min-height: 260px;
}

.mini-posters {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 18px;
}

.mini-posters img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 10px;
    background: #0f172a;
}
