:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: #111827;
    --card: #1e293b;
    --card-hover: #263449;
    --line: #1f2a3c;
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --blue: #2563eb;
    --blue-strong: #1d4ed8;
    --cyan: #22d3ee;
    --shadow: 0 24px 70px rgba(15, 23, 42, 0.45);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.16), transparent 28rem), var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.94);
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: 0 18px 45px rgba(2, 6, 23, 0.32);
    backdrop-filter: blur(18px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    max-width: 1280px;
    min-height: 4rem;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    white-space: nowrap;
}

.logo-mark {
    display: inline-grid;
    width: 2rem;
    height: 2rem;
    place-items: center;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    color: #fff;
    font-size: 0.9rem;
    box-shadow: 0 12px 35px rgba(37, 99, 235, 0.4);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 1.35rem;
    color: var(--soft);
    font-size: 0.96rem;
}

.desktop-nav a,
.mobile-panel nav a,
.site-footer a {
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-panel nav a:hover,
.site-footer a:hover {
    color: #fff;
}

.header-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-search input,
.mobile-panel input,
.search-page-form input,
.card-filter {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 0.8rem;
    outline: 0;
    background: #0b1220;
    color: #fff;
    padding: 0.75rem 1rem;
}

.header-search input {
    width: 15.5rem;
    padding-right: 4.4rem;
}

.header-search button,
.mobile-panel button,
.search-page-form button {
    border: 0;
    border-radius: 0.7rem;
    background: var(--blue);
    color: #fff;
    padding: 0.65rem 0.85rem;
    font-weight: 700;
}

.header-search button {
    position: absolute;
    right: 0.22rem;
    top: 50%;
    transform: translateY(-50%);
}

.mobile-toggle {
    display: none;
    border: 0;
    color: #fff;
    background: transparent;
    font-size: 1.7rem;
}

.mobile-panel {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.5rem 1.25rem 1rem;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.mobile-panel form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.mobile-panel nav {
    display: grid;
    gap: 0.3rem;
}

.mobile-panel nav a {
    border-radius: 0.75rem;
    padding: 0.8rem 0.9rem;
    color: var(--soft);
    background: rgba(15, 23, 42, 0.66);
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 0.7s ease;
    pointer-events: none;
}

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.74) 45%, rgba(2, 6, 23, 0.08));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(100%, 1280px);
    margin: 0 auto;
    padding: 4.5rem 1.25rem;
}

.hero-content > * {
    max-width: 42rem;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0 0 0.85rem;
    color: #fff;
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.eyebrow {
    border-radius: 999px;
    background: var(--blue);
    padding: 0.35rem 0.8rem;
}

.section-kicker {
    color: var(--cyan);
}

.hero h1 {
    margin: 0 0 1rem;
    color: #fff;
    font-size: clamp(2.5rem, 7vw, 4.8rem);
    font-weight: 900;
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-one-line {
    margin: 0 0 0.45rem;
    color: #e2e8f0;
    font-size: 1.18rem;
    line-height: 1.8;
}

.hero-summary {
    margin: 0 0 1.6rem;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.8;
}

.hero-tags,
.detail-tags,
.rank-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.hero-tags span,
.detail-tags span,
.rank-tags span {
    display: inline-flex;
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.86);
    color: #dbeafe;
    padding: 0.38rem 0.72rem;
    font-size: 0.82rem;
}

.hero-actions,
.intro-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-top: 1.8rem;
}

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.8rem;
    min-height: 2.9rem;
    padding: 0.75rem 1.35rem;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.primary-button {
    background: var(--blue);
    color: #fff;
    box-shadow: 0 18px 45px rgba(37, 99, 235, 0.28);
}

.primary-button:hover {
    background: var(--blue-strong);
    transform: translateY(-1px);
}

.ghost-button {
    background: rgba(30, 41, 59, 0.78);
    color: #fff;
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.ghost-button:hover {
    background: rgba(51, 65, 85, 0.86);
    transform: translateY(-1px);
}

.hero-arrow {
    position: absolute;
    z-index: 5;
    top: 50%;
    width: 2.8rem;
    height: 2.8rem;
    border: 0;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.58);
    color: #fff;
    font-size: 2.2rem;
    line-height: 1;
    transform: translateY(-50%);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(15, 23, 42, 0.86);
}

.hero-prev {
    left: 1rem;
}

.hero-next {
    right: 1rem;
}

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

.hero-dots button {
    width: 1rem;
    height: 0.25rem;
    border: 0;
    border-radius: 99px;
    background: #64748b;
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button[aria-pressed="true"] {
    width: 2.2rem;
    background: var(--blue);
}

.section-wrap,
.detail-wrap {
    width: min(100% - 2rem, 1280px);
    margin: 0 auto;
    padding: 3.25rem 0;
}

.intro-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.intro-panel h2,
.section-heading h2,
.page-hero h1 {
    margin: 0;
    color: #fff;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.intro-panel h2,
.page-hero h1 {
    font-size: clamp(2rem, 5vw, 3.6rem);
}

.intro-panel p,
.page-hero p,
.detail-content p {
    color: var(--muted);
    line-height: 1.85;
}

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

.section-heading h2 {
    font-size: clamp(1.55rem, 3vw, 2.1rem);
}

.section-heading > a {
    color: var(--cyan);
    font-weight: 800;
}

.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.category-pills a {
    border-radius: 0.85rem;
    background: var(--card);
    color: #fff;
    padding: 0.85rem 1.1rem;
    font-weight: 800;
    transition: background 0.2s ease, transform 0.2s ease;
}

.category-pills a:hover {
    background: var(--blue);
    transform: translateY(-2px);
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1.1rem;
}

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

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 0.9rem;
    background: var(--card);
    box-shadow: 0 18px 55px rgba(2, 6, 23, 0.26);
}

.movie-poster img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, filter 0.35s ease;
}

.poster-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.78));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-badge,
.movie-year {
    position: absolute;
    top: 0.55rem;
    border-radius: 0.5rem;
    color: #fff;
    padding: 0.26rem 0.5rem;
    font-size: 0.73rem;
    font-weight: 800;
}

.movie-badge {
    left: 0.55rem;
    background: var(--blue);
}

.movie-year {
    right: 0.55rem;
    background: rgba(2, 6, 23, 0.68);
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    width: 3.25rem;
    height: 3.25rem;
    place-items: center;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.92);
    color: #fff;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.82);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.movie-card:hover .poster-gradient,
.movie-card:hover .poster-play {
    opacity: 1;
}

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

.movie-card-body {
    padding-top: 0.75rem;
}

.movie-card h3 {
    margin: 0;
    color: #fff;
    font-size: 0.98rem;
    line-height: 1.45;
}

.movie-card h3 a:hover {
    color: #60a5fa;
}

.movie-card p {
    display: -webkit-box;
    margin: 0.35rem 0 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.6;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.55rem;
    color: #64748b;
    font-size: 0.76rem;
}

.movie-meta-line span + span::before {
    content: "·";
    margin-right: 0.4rem;
}

.rank-section {
    border-radius: 1.4rem;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 7rem 1fr;
    gap: 1rem;
    min-width: 0;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.72);
    padding: 0.8rem;
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
    background: rgba(30, 41, 59, 0.9);
    transform: translateY(-2px);
}

.rank-cover {
    position: relative;
    overflow: hidden;
    border-radius: 0.8rem;
    aspect-ratio: 2 / 3;
    background: var(--card);
}

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

.rank-cover span {
    position: absolute;
    left: 0.5rem;
    top: 0.5rem;
    border-radius: 0.5rem;
    background: var(--blue);
    color: #fff;
    padding: 0.25rem 0.45rem;
    font-weight: 900;
}

.rank-item h3 {
    margin: 0.2rem 0 0.45rem;
    color: #fff;
    font-size: 1.05rem;
}

.rank-item p {
    margin: 0 0 0.75rem;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.65;
}

.page-hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 330px;
    margin-bottom: 0.5rem;
    overflow: hidden;
    background: radial-gradient(circle at top right, rgba(34, 211, 238, 0.22), transparent 22rem), linear-gradient(135deg, #0f172a, #020617);
}

.page-hero > div {
    width: min(100% - 2rem, 1280px);
    margin: 0 auto;
}

.page-hero p {
    max-width: 48rem;
    margin: 1rem 0 0;
    font-size: 1.05rem;
}

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

.category-tile {
    position: relative;
    min-height: 17rem;
    overflow: hidden;
    border-radius: 1.2rem;
    background: var(--card);
    box-shadow: var(--shadow);
}

.category-tile-cover {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.48;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

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

.category-tile:hover .category-tile-cover {
    opacity: 0.66;
    transform: scale(1.06);
}

.category-tile-body {
    position: absolute;
    inset: auto 0 0;
    z-index: 2;
    padding: 1.4rem;
}

.category-tile-body p {
    margin: 0 0 0.6rem;
    color: var(--cyan);
    font-weight: 900;
}

.category-tile-body h2 {
    margin: 0 0 1rem;
    color: #fff;
    font-size: 1.35rem;
    line-height: 1.5;
}

.category-tile-body div {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category-tile-body span {
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
    color: #e2e8f0;
    padding: 0.35rem 0.6rem;
    font-size: 0.78rem;
}

.filter-panel {
    display: grid;
    gap: 0.75rem;
    padding-bottom: 0;
}

.filter-panel label {
    color: #fff;
    font-weight: 900;
}

.card-filter {
    max-width: 38rem;
}

.detail-wrap {
    padding-bottom: 1rem;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin: 1.35rem 0 1.2rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.breadcrumb a:hover {
    color: #fff;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 20rem;
    gap: 1.4rem;
    align-items: start;
}

.player-card,
.detail-content,
.side-card {
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 1.1rem;
    background: rgba(15, 23, 42, 0.84);
    box-shadow: 0 16px 50px rgba(2, 6, 23, 0.26);
}

.player-card {
    overflow: hidden;
}

.player-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

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

.video-play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: radial-gradient(circle, rgba(2, 6, 23, 0.15), rgba(2, 6, 23, 0.56));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.video-play-overlay span {
    display: grid;
    width: 5.8rem;
    height: 5.8rem;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    color: #fff;
    font-size: 2.4rem;
    box-shadow: 0 18px 55px rgba(37, 99, 235, 0.45);
    transition: transform 0.2s ease;
}

.video-play-overlay:hover span {
    transform: scale(1.06);
}

.video-play-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.detail-content {
    margin-top: 1rem;
    padding: 1.4rem;
}

.detail-content h1 {
    margin: 0 0 1rem;
    color: #fff;
    font-size: clamp(1.7rem, 4vw, 2.6rem);
    line-height: 1.2;
    letter-spacing: -0.04em;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 1rem;
}

.detail-meta span {
    border-radius: 0.6rem;
    background: rgba(30, 41, 59, 0.88);
    color: #dbeafe;
    padding: 0.4rem 0.65rem;
    font-size: 0.85rem;
}

.detail-content section {
    margin-top: 1.4rem;
}

.detail-content h2,
.side-card h2 {
    margin: 0 0 0.7rem;
    color: #fff;
    font-size: 1.2rem;
}

.detail-content p {
    margin: 0;
    color: var(--soft);
}

.detail-side {
    position: sticky;
    top: 5.2rem;
    display: grid;
    gap: 1rem;
}

.side-card {
    padding: 1rem;
}

.poster-side img {
    border-radius: 0.85rem;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: var(--card);
}

.full-button {
    width: 100%;
    margin-top: 1rem;
}

.info-side dl {
    display: grid;
    gap: 0.8rem;
    margin: 0;
}

.info-side div {
    display: grid;
    gap: 0.25rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    padding-bottom: 0.75rem;
}

.info-side dt {
    color: #64748b;
    font-size: 0.78rem;
}

.info-side dd {
    margin: 0;
    color: #e2e8f0;
    line-height: 1.5;
}

.search-panel {
    padding-bottom: 0;
}

.search-page-form {
    display: flex;
    gap: 0.75rem;
    max-width: 50rem;
}

.search-page-form input {
    flex: 1;
}

.search-page-form button {
    min-width: 6rem;
}

.search-status {
    min-height: 1.5rem;
    margin-top: 1rem;
    color: var(--muted);
}

.site-footer {
    margin-top: 4rem;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    background: #0f172a;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    width: min(100% - 2rem, 1280px);
    margin: 0 auto;
    padding: 3rem 0;
}

.footer-logo {
    margin-bottom: 1rem;
}

.site-footer p,
.site-footer li,
.footer-bottom {
    color: var(--muted);
    line-height: 1.75;
}

.site-footer h2 {
    margin: 0 0 1rem;
    color: #fff;
    font-size: 1rem;
}

.site-footer ul {
    display: grid;
    gap: 0.55rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-bottom {
    width: min(100% - 2rem, 1280px);
    margin: 0 auto;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    padding: 1.25rem 0;
    text-align: center;
    font-size: 0.9rem;
}

[hidden] {
    display: none !important;
}

@media (max-width: 1100px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

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

    .rank-grid,
    .wide-rank-grid,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .detail-side {
        position: static;
        grid-template-columns: 16rem 1fr;
    }
}

@media (max-width: 820px) {
    .hero {
        min-height: 560px;
    }

    .hero-shade {
        background: linear-gradient(180deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.96));
    }

    .intro-panel,
    .section-heading,
    .search-page-form {
        align-items: stretch;
        flex-direction: column;
    }

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

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

    .rank-item {
        grid-template-columns: 6rem 1fr;
    }

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

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

@media (max-width: 560px) {
    .header-inner {
        padding: 0 1rem;
    }

    .logo {
        font-size: 1.05rem;
    }

    .hero-arrow {
        display: none;
    }

    .hero-content {
        padding: 3.2rem 1rem;
    }

    .hero-one-line {
        font-size: 1rem;
    }

    .section-wrap,
    .detail-wrap,
    .page-hero > div,
    .footer-grid,
    .footer-bottom {
        width: min(100% - 1.25rem, 1280px);
    }

    .movie-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.85rem;
    }

    .movie-card h3 {
        font-size: 0.9rem;
    }

    .movie-card p {
        font-size: 0.78rem;
    }

    .rank-item {
        grid-template-columns: 5.2rem 1fr;
        padding: 0.65rem;
    }

    .detail-content,
    .side-card {
        padding: 1rem;
    }

    .video-play-overlay span {
        width: 4.4rem;
        height: 4.4rem;
        font-size: 1.8rem;
    }
}
