:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: #111827;
    --text: #f8fafc;
    --muted: #94a3b8;
    --line: rgba(148, 163, 184, 0.18);
    --cyan: #22d3ee;
    --cyan-strong: #06b6d4;
    --blue: #2563eb;
    --blue-soft: rgba(37, 99, 235, 0.18);
    --shadow: 0 22px 70px rgba(8, 47, 73, 0.35);
    --radius: 22px;
    --max: 1180px;
}

* {
    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 20% 0%, rgba(34, 211, 238, 0.16), transparent 28rem),
        radial-gradient(circle at 80% 15%, rgba(37, 99, 235, 0.18), transparent 26rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
}

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

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

button,
input {
    font: inherit;
}

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

.header-inner {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
    min-height: 72px;
    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-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: white;
    box-shadow: 0 14px 34px rgba(34, 211, 238, 0.25);
}

.brand-text,
.footer-brand {
    font-size: 1.25rem;
    background: linear-gradient(90deg, #67e8f9, #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-links,
.mobile-nav,
.footer-links {
    display: flex;
    align-items: center;
    gap: 22px;
}

.nav-links a,
.mobile-nav a,
.footer-links a {
    color: #cbd5e1;
    font-weight: 600;
    transition: color 0.2s ease, transform 0.2s ease;
}

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

.menu-toggle {
    display: none;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 9px 14px;
    color: white;
    background: rgba(15, 23, 42, 0.72);
}

.mobile-nav {
    display: none;
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 14px;
    flex-wrap: wrap;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.92);
}

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

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.42), rgba(2, 6, 23, 0.14)),
        linear-gradient(0deg, #020617 0%, transparent 42%);
}

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

.hero-kicker,
.page-hero span,
.section-title span,
.detail-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 12px;
    padding: 6px 11px;
    border: 1px solid rgba(34, 211, 238, 0.25);
    border-radius: 999px;
    color: var(--cyan);
    background: rgba(34, 211, 238, 0.09);
    font-size: 0.86rem;
    font-weight: 700;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
    margin: 0 0 18px;
    font-size: clamp(2.45rem, 6vw, 5.8rem);
    line-height: 0.96;
    letter-spacing: -0.05em;
}

.hero p,
.page-hero p,
.detail-info .one-line {
    margin: 0 0 24px;
    color: #cbd5e1;
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.8;
}

.hero-tags,
.detail-meta,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.hero-tags span,
.detail-meta span,
.tag-row span,
.chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    border: 1px solid rgba(34, 211, 238, 0.22);
    border-radius: 9px;
    color: #a5f3fc;
    background: rgba(8, 145, 178, 0.12);
    font-size: 0.82rem;
    font-weight: 700;
}

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

.btn-primary,
.btn-secondary,
.btn-ghost,
.more-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.btn-primary {
    color: white;
    background: linear-gradient(90deg, var(--cyan-strong), var(--blue));
    box-shadow: 0 16px 42px rgba(6, 182, 212, 0.28);
}

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

.btn-ghost {
    color: var(--cyan);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-ghost:hover,
.more-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: rgba(34, 211, 238, 0.35);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    color: white;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(12px);
    cursor: pointer;
    font-size: 2rem;
    line-height: 1;
}

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

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

.hero-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #475569;
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

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

.block-wrap,
.page-main,
.breadcrumb {
    width: min(var(--max), calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.block-wrap {
    padding: 54px 0;
}

.quick-search {
    padding-top: 44px;
}

.section-title {
    margin-bottom: 24px;
}

.section-title h2 {
    margin: 0;
    font-size: clamp(1.6rem, 3.5vw, 2.35rem);
    line-height: 1.18;
    letter-spacing: -0.035em;
}

.section-title.compact h2 {
    font-size: 1.6rem;
}

.row-title,
.with-search {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
}

.search-box input {
    width: min(360px, 70vw);
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: 0;
    padding: 0 18px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.72);
}

.search-box input:focus {
    border-color: rgba(34, 211, 238, 0.55);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.08);
}

.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.category-pills a {
    padding: 10px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.62);
    transition: transform 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.category-pills a:hover {
    color: var(--cyan);
    border-color: rgba(34, 211, 238, 0.36);
    transform: translateY(-2px);
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.74);
    box-shadow: 0 18px 46px rgba(2, 6, 23, 0.22);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px) scale(1.01);
    border-color: rgba(34, 211, 238, 0.32);
    box-shadow: 0 24px 70px rgba(8, 145, 178, 0.22);
}

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #111827;
}

.movie-cover img,
.rank-cover img,
.category-thumbs img,
.rank-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.movie-cover img {
    transition: transform 0.5s ease, opacity 0.3s ease;
}

.movie-card:hover .movie-cover img {
    transform: scale(1.08);
    opacity: 0.82;
}

.movie-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent 62%);
}

.play-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 1;
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border-radius: 50%;
    color: white;
    background: rgba(6, 182, 212, 0.82);
    transform: translate(-50%, -50%) scale(0.86);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.movie-body {
    padding: 16px;
}

.movie-meta-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 0.84rem;
}

.movie-card h3,
.rank-card h2 {
    margin: 0 0 10px;
    color: white;
    line-height: 1.35;
}

.movie-card h3 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1.06rem;
}

.movie-card h3 a:hover,
.rank-card h2 a:hover {
    color: var(--cyan);
}

.movie-card p,
.rank-card p,
.category-info p,
.footer-inner p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.side-rank {
    position: sticky;
    top: 96px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 22px 64px rgba(2, 6, 23, 0.26);
}

.rank-item {
    display: grid;
    grid-template-columns: 36px 72px 1fr;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.rank-item:last-of-type {
    border-bottom: 0;
}

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

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

.rank-text strong,
.rank-text em {
    display: block;
}

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

.rank-text em {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.82rem;
    font-style: normal;
}

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

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

.category-entry {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    min-height: 168px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(8, 47, 73, 0.5));
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.category-entry:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 211, 238, 0.34);
    box-shadow: var(--shadow);
}

.category-thumbs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

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

.category-thumbs img:first-child {
    grid-row: span 2;
    aspect-ratio: auto;
}

.category-info h2 {
    margin: 0 0 10px;
    font-size: 1.35rem;
}

.category-info span {
    display: inline-flex;
    margin-top: 14px;
    color: var(--cyan);
    font-weight: 800;
}

.page-main {
    padding-top: 34px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    margin: 0 auto 28px;
    padding: clamp(34px, 8vw, 84px);
    border: 1px solid var(--line);
    border-radius: calc(var(--radius) + 8px);
    background:
        linear-gradient(135deg, rgba(8, 145, 178, 0.26), rgba(37, 99, 235, 0.15)),
        rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

.small-hero h1,
.category-hero h1 {
    font-size: clamp(2rem, 5vw, 4.4rem);
}

.slim-actions {
    margin-top: 24px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
    margin-bottom: 18px;
    color: var(--muted);
}

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

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
    gap: 30px;
    align-items: center;
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto 42px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(34, 211, 238, 0.22);
    border-radius: calc(var(--radius) + 8px);
    background: #000;
    box-shadow: 0 28px 80px rgba(2, 132, 199, 0.22);
}

.player-shell video {
    width: 100%;
    height: 100%;
    background: #000;
    object-fit: cover;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: white;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.2), rgba(2, 6, 23, 0.52));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay span {
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan-strong), var(--blue));
    box-shadow: 0 20px 60px rgba(6, 182, 212, 0.36);
    font-size: 2.2rem;
}

.player-shell.is-playing .player-overlay {
    visibility: hidden;
    opacity: 0;
}

.detail-info {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: calc(var(--radius) + 8px);
    background: rgba(15, 23, 42, 0.72);
}

.detail-info h1 {
    font-size: clamp(2rem, 4vw, 4.2rem);
}

.detail-text {
    padding-top: 18px;
    padding-bottom: 28px;
}

.detail-text p {
    margin: 0 0 18px;
    color: #cbd5e1;
    font-size: 1.04rem;
    line-height: 1.95;
}

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

.rank-card {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 20px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.74);
}

.rank-cover {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    border-radius: 18px;
}

.rank-cover span {
    position: absolute;
    left: 10px;
    top: 10px;
    display: grid;
    min-width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 50%;
    color: white;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    font-weight: 900;
}

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

.footer-inner {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
    padding: 36px 0;
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 28px;
}

.footer-links {
    justify-content: flex-end;
    flex-wrap: wrap;
}

.is-hidden-by-filter {
    display: none !important;
}

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

    .menu-toggle {
        display: inline-flex;
    }

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

    .split-layout,
    .detail-hero,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .side-rank {
        position: static;
    }

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

    .detail-info {
        padding: 22px;
    }
}

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

    .hero-content {
        bottom: 72px;
    }

    .hero-arrow {
        display: none;
    }

    .row-title,
    .with-search {
        align-items: stretch;
        flex-direction: column;
    }

    .search-box input {
        width: 100%;
    }

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

    .category-entry,
    .rank-card {
        grid-template-columns: 1fr;
    }

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

    .category-thumbs img:first-child {
        grid-row: auto;
    }

    .rank-item {
        grid-template-columns: 30px 64px 1fr;
    }

    .footer-links {
        justify-content: flex-start;
    }
}
