:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.72);
    --panel-strong: rgba(15, 23, 42, 0.92);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --emerald: #10b981;
    --emerald-soft: rgba(16, 185, 129, 0.16);
    --yellow: #facc15;
    --danger: #fb7185;
    --radius-xl: 24px;
    --radius-lg: 18px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(16, 185, 129, 0.18), transparent 32rem),
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.12), transparent 34rem),
        linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
}

body.is-menu-open {
    overflow: hidden;
}

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

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

button,
input {
    font: inherit;
}

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

.header-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.logo-mark {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #10b981, #22d3ee);
    color: white;
    box-shadow: 0 14px 32px rgba(16, 185, 129, 0.28);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.site-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted-strong);
    transition: color 0.2s ease, background 0.2s ease;
}

.site-nav a:hover {
    color: white;
    background: rgba(148, 163, 184, 0.12);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 300px;
}

.header-search input,
.local-search-input {
    width: 100%;
    border: 1px solid var(--line);
    outline: 0;
    color: white;
    background: rgba(15, 23, 42, 0.74);
    border-radius: 999px;
    padding: 11px 16px;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.local-search-input:focus {
    border-color: rgba(16, 185, 129, 0.72);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.header-search button,
.filter-buttons button,
.menu-toggle {
    border: 0;
    color: white;
    background: rgba(16, 185, 129, 0.88);
    border-radius: 999px;
    padding: 10px 16px;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.header-search button:hover,
.filter-buttons button:hover,
.menu-toggle:hover {
    transform: translateY(-1px);
    background: #059669;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 0;
}

.hero-carousel {
    position: relative;
    min-height: 70vh;
    height: 720px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.hero-track,
.hero-slide,
.hero-bg,
.hero-overlay {
    position: absolute;
    inset: 0;
}

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

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

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
}

.hero-overlay {
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.92) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.12) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.98) 0%, transparent 45%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1440px;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.hero-content h1,
.hero-content h2,
.page-hero h1 {
    max-width: 820px;
    margin: 0 0 20px;
    font-size: clamp(42px, 7vw, 88px);
    line-height: 0.95;
    letter-spacing: -0.07em;
    font-weight: 950;
}

.hero-content p,
.page-hero p {
    max-width: 680px;
    margin: 0 0 26px;
    color: var(--muted-strong);
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.75;
}

.hero-eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #6ee7b7;
    background: var(--emerald-soft);
    border: 1px solid rgba(16, 185, 129, 0.24);
    border-radius: 999px;
    padding: 8px 13px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin-bottom: 18px;
}

.hero-meta,
.detail-meta-row,
.movie-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-meta span,
.detail-meta-row span,
.movie-meta span {
    color: var(--muted-strong);
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 13px;
}

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

.btn-primary,
.btn-secondary,
.section-link,
.category-title-row a,
.category-overview-main strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    min-height: 44px;
    padding: 12px 18px;
    font-weight: 850;
    transition: transform 0.2s ease, background 0.2s ease, border 0.2s ease;
}

.btn-primary {
    color: white;
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 18px 40px rgba(16, 185, 129, 0.24);
}

.btn-secondary,
.section-link {
    color: white;
    background: rgba(15, 23, 42, 0.62);
    border: 1px solid var(--line);
}

.btn-primary:hover,
.btn-secondary:hover,
.section-link:hover,
.category-title-row a:hover,
.category-overview-main:hover strong {
    transform: translateY(-2px);
}

.hero-control {
    position: absolute;
    z-index: 5;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: white;
    background: rgba(0, 0, 0, 0.38);
    cursor: pointer;
    font-size: 34px;
    line-height: 1;
    backdrop-filter: blur(10px);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

.hero-dots button.is-active {
    width: 34px;
    background: var(--emerald);
}

.content-section,
.detail-layout {
    max-width: 1440px;
    margin: 0 auto;
    padding: 72px 24px 0;
}

.surface-panel,
.category-showcase,
.ranking-panel,
.category-overview-card,
.detail-info,
.player-card,
.side-cover-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.surface-panel,
.category-showcase {
    padding: 30px;
}

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

.section-heading h2,
.category-title-row h3,
.detail-info h2,
.side-cover-card h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 40px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.section-heading p,
.category-title-row p,
.category-overview-card p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

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

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

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

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

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

.cover-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: 16px;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.movie-card-large .cover-link {
    aspect-ratio: 16 / 9;
}

.cover-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s ease, filter 0.55s ease;
}

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

.cover-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.76), transparent 52%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.movie-card:hover .cover-shade {
    opacity: 1;
}

.score-badge,
.rank-number {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    color: #111827;
    background: var(--yellow);
    border-radius: 999px;
    padding: 6px 9px;
    font-size: 12px;
    font-weight: 900;
}

.rank-number {
    left: 10px;
    right: auto;
    color: white;
    background: rgba(244, 63, 94, 0.92);
}

.play-hover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    color: white;
    font-size: 46px;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-hover {
    opacity: 1;
    transform: scale(1);
}

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

.movie-card h3 {
    margin: 0 0 8px;
    color: white;
    font-size: 16px;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.movie-card h3 a:hover {
    color: #6ee7b7;
}

.movie-line {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mini-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.mini-tags span,
.detail-tags span {
    border: 1px solid rgba(16, 185, 129, 0.22);
    border-radius: 999px;
    color: #a7f3d0;
    background: rgba(16, 185, 129, 0.08);
    padding: 5px 9px;
    font-size: 12px;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 400px;
    gap: 26px;
}

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

.category-pill-grid a {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 114px;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 18px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.84), rgba(15, 23, 42, 0.38));
}

.category-pill-grid strong {
    font-size: 18px;
}

.category-pill-grid span {
    color: var(--muted);
    line-height: 1.55;
}

.ranking-panel {
    padding: 24px;
}

.compact-heading {
    align-items: center;
    margin-bottom: 18px;
}

.compact-heading h2 {
    font-size: 24px;
}

.compact-list {
    display: grid;
    gap: 12px;
}

.compact-card {
    display: grid;
    grid-template-columns: auto 68px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 10px;
    background: rgba(2, 6, 23, 0.38);
    transition: background 0.2s ease, transform 0.2s ease;
}

.compact-card:hover {
    background: rgba(15, 23, 42, 0.84);
    transform: translateX(3px);
}

.compact-card img {
    width: 68px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
    overflow: hidden;
}

.compact-card strong,
.compact-card em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compact-card strong {
    color: white;
    margin-bottom: 4px;
}

.compact-card em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.compact-rank {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: white;
    background: rgba(16, 185, 129, 0.22);
    font-weight: 900;
}

.category-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.category-title-row a,
.category-overview-main strong {
    color: white;
    background: rgba(16, 185, 129, 0.18);
    border: 1px solid rgba(16, 185, 129, 0.28);
}

.page-hero {
    max-width: 1440px;
    margin: 36px auto 0;
    padding: 78px 24px;
    border: 1px solid var(--line);
    border-radius: 32px;
    background:
        linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(2, 6, 23, 0.88)),
        radial-gradient(circle at bottom right, rgba(34, 211, 238, 0.18), transparent 34rem);
    box-shadow: var(--shadow);
}

.small-hero,
.category-hero,
.ranking-hero,
.search-hero {
    min-height: 320px;
    display: flex;
    align-items: center;
}

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

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

.category-overview-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.category-overview-main span {
    font-size: 28px;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.slim-list {
    margin-top: 18px;
}

.filter-toolbar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 14px;
    margin-bottom: 24px;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-buttons button {
    background: rgba(15, 23, 42, 0.84);
    border: 1px solid var(--line);
}

.filter-buttons button.is-active {
    background: var(--emerald);
    border-color: transparent;
}

.no-results {
    display: none;
    border: 1px dashed rgba(148, 163, 184, 0.32);
    border-radius: 18px;
    color: var(--muted-strong);
    text-align: center;
    padding: 24px;
}

.no-results.is-visible {
    display: block;
}

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

.detail-main {
    min-width: 0;
}

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

.breadcrumb a:hover {
    color: #6ee7b7;
}

.player-card {
    padding: 18px;
    margin-bottom: 24px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: black;
    aspect-ratio: 16 / 9;
}

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

.play-trigger {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    gap: 10px;
    border: 0;
    color: white;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.55), rgba(2, 6, 23, 0.12));
    cursor: pointer;
}

.play-trigger span {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.94);
    box-shadow: 0 18px 45px rgba(16, 185, 129, 0.28);
    font-size: 34px;
}

.play-trigger strong {
    font-size: 18px;
    letter-spacing: 0.02em;
}

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

.detail-info {
    padding: 30px;
}

.detail-info h1 {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 58px);
    letter-spacing: -0.06em;
    line-height: 1.02;
}

.detail-one-line {
    margin: 0 0 18px;
    color: #6ee7b7;
    font-size: 20px;
    line-height: 1.7;
}

.detail-tags {
    margin: 18px 0 28px;
}

.detail-info h2 {
    margin-top: 28px;
    margin-bottom: 12px;
    font-size: 26px;
}

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

.related-section {
    padding-left: 0;
    padding-right: 0;
}

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

.side-cover-card {
    padding: 18px;
}

.side-cover-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 18px;
    margin-bottom: 16px;
}

.side-cover-card p {
    color: var(--muted);
    line-height: 1.7;
}

.full-btn {
    width: 100%;
}

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

.footer-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 34px 24px;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    align-items: center;
    gap: 24px;
}

.footer-inner p {
    color: var(--muted);
    line-height: 1.7;
    margin: 0;
}

.footer-links {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 14px;
    color: var(--muted-strong);
}

.footer-links a:hover {
    color: #6ee7b7;
}

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

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

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

    .detail-side {
        position: static;
        grid-template-columns: 340px minmax(0, 1fr);
    }
}

@media (max-width: 860px) {
    .header-inner {
        flex-wrap: wrap;
        padding: 12px 16px;
    }

    .site-nav,
    .header-search {
        display: none;
        width: 100%;
    }

    body.is-menu-open .site-nav,
    body.is-menu-open .header-search {
        display: flex;
    }

    body.is-menu-open .site-nav {
        flex-direction: column;
        align-items: stretch;
    }

    .menu-toggle {
        display: grid;
        place-items: center;
        margin-left: auto;
    }

    .hero-carousel {
        height: 620px;
    }

    .hero-content {
        padding: 0 18px;
    }

    .hero-control {
        display: none;
    }

    .content-section,
    .detail-layout {
        padding: 52px 16px 0;
    }

    .page-hero {
        margin: 20px 16px 0;
        padding: 52px 20px;
        border-radius: 24px;
    }

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

    .category-overview-grid,
    .category-pill-grid,
    .filter-toolbar,
    .footer-inner,
    .detail-side {
        grid-template-columns: 1fr;
    }

    .section-heading,
    .category-title-row,
    .footer-inner {
        align-items: flex-start;
    }

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

@media (max-width: 560px) {
    .hero-content h1,
    .hero-content h2,
    .page-hero h1 {
        font-size: 40px;
    }

    .movie-grid {
        gap: 16px;
    }

    .movie-line,
    .mini-tags {
        display: none;
    }

    .movie-card h3 {
        font-size: 14px;
    }

    .surface-panel,
    .category-showcase,
    .ranking-panel,
    .detail-info,
    .player-card,
    .side-cover-card {
        padding: 18px;
        border-radius: 20px;
    }

    .compact-card {
        grid-template-columns: auto 58px minmax(0, 1fr);
    }

    .compact-card img {
        width: 58px;
        height: 44px;
    }
}
