:root {
    color-scheme: dark;
    --bg-950: #020617;
    --bg-900: #0f172a;
    --bg-850: #111c33;
    --bg-800: #1e293b;
    --bg-700: #334155;
    --text-main: #f8fafc;
    --text-soft: #cbd5e1;
    --text-muted: #94a3b8;
    --cyan: #22d3ee;
    --cyan-dark: #0891b2;
    --blue: #2563eb;
    --orange: #fb923c;
    --green: #4ade80;
    --ring: rgba(34, 211, 238, 0.45);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(180deg, var(--bg-900), var(--bg-950));
    color: var(--text-main);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(30, 41, 59, 0.96), rgba(51, 65, 85, 0.96), rgba(30, 41, 59, 0.96));
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(16px);
}

.top-nav {
    max-width: 1280px;
    height: 68px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
    font-weight: 800;
}

.brand-mark,
.footer-brand span {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: white;
    box-shadow: 0 0 24px rgba(34, 211, 238, 0.32);
}

.brand-text {
    font-size: 21px;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #67e8f9, #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-search {
    flex: 1;
    max-width: 360px;
    display: flex;
    align-items: center;
    background: rgba(15, 23, 42, 0.62);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 999px;
    overflow: hidden;
}

.nav-search input {
    min-width: 0;
    width: 100%;
    padding: 10px 16px;
    color: white;
    background: transparent;
    border: 0;
    outline: 0;
}

.nav-search input::placeholder,
.page-search input::placeholder {
    color: #94a3b8;
}

.nav-search button,
.page-search button {
    padding: 10px 16px;
    color: white;
    background: var(--cyan-dark);
    border: 0;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.nav-search button:hover,
.page-search button:hover {
    background: #06b6d4;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--text-soft);
}

.nav-link {
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: white;
}

.menu-button {
    display: none;
    margin-left: auto;
    color: white;
    background: transparent;
    border: 0;
    font-size: 26px;
    cursor: pointer;
}

.mobile-menu {
    display: none;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 18px;
    flex-direction: column;
    gap: 12px;
    color: var(--text-soft);
}

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

.hero {
    position: relative;
    height: 540px;
    overflow: hidden;
    background: var(--bg-950);
}

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

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.2));
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 56px;
    width: min(1180px, calc(100% - 40px));
    transform: translateX(-50%);
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    margin-bottom: 16px;
    padding: 6px 14px;
    border-radius: 999px;
    color: white;
    background: linear-gradient(90deg, var(--cyan-dark), var(--blue));
    font-size: 14px;
    font-weight: 700;
}

.hero-content h1,
.page-hero h1 {
    max-width: 760px;
    margin: 0 0 18px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-content p,
.page-hero p {
    max-width: 720px;
    margin: 0 0 22px;
    color: var(--text-soft);
    font-size: 18px;
    line-height: 1.8;
}

.hero-tags,
.movie-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--text-muted);
    font-size: 14px;
}

.hero-tags span,
.movie-meta span,
.detail-meta span {
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.62);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

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

.primary-button,
.ghost-button,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    padding: 13px 26px;
    color: white;
    background: linear-gradient(135deg, var(--cyan-dark), var(--blue));
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.32);
}

.ghost-button,
.section-more {
    padding: 11px 20px;
    color: var(--text-soft);
    background: rgba(15, 23, 42, 0.64);
    border: 1px solid rgba(148, 163, 184, 0.22);
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(34, 211, 238, 0.18);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    width: 44px;
    height: 44px;
    transform: translateY(-50%);
    border-radius: 999px;
    color: white;
    background: rgba(0, 0, 0, 0.48);
    border: 1px solid rgba(255, 255, 255, 0.16);
    cursor: pointer;
    font-size: 32px;
    line-height: 1;
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

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

.page-main,
.content-section {
    max-width: 1280px;
    margin: 0 auto;
}

.page-main {
    padding: 30px 24px 0;
}

.content-section {
    padding: 48px 24px 0;
}

.wide-section {
    max-width: none;
    padding-left: max(24px, calc((100vw - 1280px) / 2 + 24px));
    padding-right: 0;
}

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

.section-title {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.section-title span {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--cyan);
    background: rgba(34, 211, 238, 0.12);
}

.section-title h2 {
    margin: 0;
    font-size: 26px;
}

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

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

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

.horizontal-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 320px;
    gap: 24px;
    padding-bottom: 14px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
}

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: rgba(30, 41, 59, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: var(--ring);
    box-shadow: 0 24px 60px rgba(34, 211, 238, 0.16);
}

.poster-link,
.list-poster,
.rank-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #020617;
}

.poster-link img,
.list-poster img,
.rank-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.movie-card:hover img,
.rank-item:hover img {
    transform: scale(1.08);
}

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.65), transparent 58%);
    opacity: 0.7;
}

.play-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%);
    border-radius: 999px;
    color: white;
    background: rgba(34, 211, 238, 0.78);
    box-shadow: 0 0 28px rgba(34, 211, 238, 0.45);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.movie-card-body,
.list-body {
    padding: 18px;
}

.movie-title {
    display: block;
    margin-bottom: 8px;
    color: white;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.movie-title:hover {
    color: var(--cyan);
}

.movie-card p,
.list-body p,
.rank-content p {
    margin: 0 0 14px;
    color: var(--text-muted);
    line-height: 1.65;
}

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

.tag-row span {
    padding: 4px 9px;
    border-radius: 999px;
    color: #67e8f9;
    background: rgba(8, 145, 178, 0.17);
    font-size: 12px;
}

.list-stack {
    display: grid;
    gap: 16px;
}

.list-card {
    display: grid;
    grid-template-columns: 220px 1fr;
}

.list-card .list-poster {
    aspect-ratio: auto;
    height: 100%;
    min-height: 150px;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 36px;
}

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

.category-tile,
.category-overview-card,
.detail-panel,
.side-card,
.player-card {
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: var(--radius);
    background: rgba(30, 41, 59, 0.78);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

.category-tile {
    min-height: 170px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 40%), rgba(30, 41, 59, 0.86);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    border-color: var(--ring);
}

.category-tile span {
    margin-bottom: 10px;
    font-size: 22px;
    font-weight: 900;
}

.category-tile p,
.category-overview-card p,
.page-hero p {
    color: var(--text-soft);
}

.page-hero {
    position: relative;
    padding: 58px;
    overflow: hidden;
    border-radius: 28px;
    background: radial-gradient(circle at 85% 15%, rgba(34, 211, 238, 0.2), transparent 32%), linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(2, 6, 23, 0.95));
    box-shadow: var(--shadow);
}

.small-hero h1 {
    font-size: clamp(32px, 4vw, 50px);
}

.page-search {
    display: flex;
    max-width: 680px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.74);
}

.page-search input {
    flex: 1;
    min-width: 0;
    padding: 14px 18px;
    color: white;
    border: 0;
    outline: 0;
    background: transparent;
}

.inline-filter {
    margin-top: 22px;
}

.filter-status {
    min-height: 22px;
    margin-top: 12px;
    color: var(--text-muted);
}

.category-overview {
    display: grid;
    gap: 28px;
}

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

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

.category-overview-card h2 {
    margin: 0 0 8px;
    font-size: 26px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 64px 180px 1fr 76px;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border-radius: var(--radius);
    background: rgba(30, 41, 59, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.12);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    border-color: var(--ring);
}

.rank-number {
    color: var(--cyan);
    font-size: 26px;
    font-weight: 900;
    text-align: center;
}

.rank-cover {
    border-radius: 14px;
}

.rank-score {
    color: #fbbf24;
    font-size: 24px;
    font-weight: 900;
    text-align: center;
}

.compact-rank .rank-item {
    grid-template-columns: 54px 110px 1fr 58px;
}

.compact-rank .rank-content p,
.compact-rank .movie-meta {
    display: none;
}

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

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

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

.player-card {
    padding: 14px;
    background: #020617;
}

.player-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    background: #000;
}

.player-video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.54), rgba(0, 0, 0, 0.18));
    border: 0;
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.big-play {
    width: 84px;
    height: 84px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.86);
    box-shadow: 0 0 50px rgba(34, 211, 238, 0.42);
    font-size: 34px;
}

.player-message {
    position: absolute;
    left: 18px;
    bottom: 18px;
    padding: 8px 12px;
    border-radius: 999px;
    color: white;
    background: rgba(15, 23, 42, 0.74);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.player-message.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.detail-panel {
    margin-top: 20px;
    padding: 28px;
}

.detail-panel h1 {
    margin: 0 0 16px;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.16;
}

.detail-panel h2,
.side-card h2 {
    margin: 28px 0 12px;
    color: white;
    font-size: 22px;
}

.detail-panel p {
    margin: 0;
    color: var(--text-soft);
    font-size: 17px;
    line-height: 1.9;
}

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

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

.detail-cover {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.side-card {
    padding: 22px;
}

.side-card h2 {
    margin-top: 0;
}

.side-card dl {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 10px 12px;
    margin: 0 0 22px;
}

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

.side-card dd {
    margin: 0;
    color: var(--text-main);
}

.full-button {
    width: 100%;
}

.related-section {
    padding-bottom: 30px;
}

.site-footer {
    margin-top: 70px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0), rgba(2, 6, 23, 0.96));
}

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 48px 24px 28px;
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.9fr 1fr;
    gap: 34px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    font-size: 20px;
    font-weight: 900;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: white;
}

.site-footer p,
.site-footer a {
    display: block;
    color: var(--text-muted);
    line-height: 1.8;
}

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

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 24px 34px;
    color: var(--text-muted);
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    text-align: center;
}

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

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

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

    .detail-side {
        position: static;
    }

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

@media (max-width: 820px) {
    .top-nav {
        height: auto;
        min-height: 66px;
        flex-wrap: wrap;
        padding: 14px 18px;
    }

    .nav-search,
    .nav-links {
        display: none;
    }

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

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

    .hero {
        height: 560px;
    }

    .hero-content {
        bottom: 64px;
    }

    .hero-arrow {
        display: none;
    }

    .content-section,
    .page-main {
        padding-left: 16px;
        padding-right: 16px;
    }

    .page-hero {
        padding: 34px 22px;
        border-radius: 22px;
    }

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

    .horizontal-row {
        grid-auto-columns: 280px;
    }

    .list-card,
    .rank-item,
    .compact-rank .rank-item {
        grid-template-columns: 1fr;
    }

    .rank-number,
    .rank-score {
        text-align: left;
    }

    .rank-cover {
        width: 100%;
    }

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

@media (max-width: 540px) {
    .movie-grid,
    .all-movie-grid,
    .mini-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .hero-content h1,
    .page-hero h1 {
        font-size: 32px;
    }

    .hero-content p,
    .page-hero p {
        font-size: 16px;
    }

    .hero-actions,
    .page-search {
        flex-direction: column;
        align-items: stretch;
        border-radius: 22px;
    }

    .page-search button,
    .nav-search button {
        border-radius: 0;
    }

    .detail-panel {
        padding: 22px;
    }

    .big-play {
        width: 70px;
        height: 70px;
    }
}
