:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #07111f;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-solid: #0f172a;
    --panel-light: #172033;
    --text: #e5eefb;
    --muted: #94a3b8;
    --line: rgba(148, 163, 184, 0.18);
    --accent: #10b981;
    --accent-strong: #34d399;
    --accent-soft: rgba(16, 185, 129, 0.14);
    --gold: #fbbf24;
    --danger: #f43f5e;
    --radius: 22px;
    --shadow: 0 22px 70px rgba(0, 0, 0, 0.36);
    --max: 1200px;
}

* {
    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 8% 0%, rgba(16, 185, 129, 0.18), transparent 32rem),
        radial-gradient(circle at 92% 7%, rgba(56, 189, 248, 0.12), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #07111f 42%, #020617 100%);
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.header-inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

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

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-weight: 900;
    color: #052e22;
    background: linear-gradient(135deg, var(--accent-strong), #a7f3d0);
    box-shadow: 0 10px 32px rgba(16, 185, 129, 0.35);
}

.brand-text {
    display: grid;
    gap: 1px;
}

.brand-text strong,
.footer-brand {
    font-size: 1.25rem;
    font-weight: 850;
    letter-spacing: 0.03em;
}

.brand-text small {
    color: var(--muted);
    font-size: 0.72rem;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.main-nav a {
    color: #cbd5e1;
    padding: 10px 13px;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: #ecfdf5;
    background: rgba(16, 185, 129, 0.14);
}

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

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

.section-wrap,
.breadcrumb {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 20px;
}

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

.hero-track,
.hero-slide {
    min-height: 650px;
}

.hero-slide {
    position: relative;
    display: none;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 48px;
    max-width: var(--max);
    margin: 0 auto;
    padding: 86px 20px 78px;
}

.hero-slide.is-active {
    display: grid;
    animation: heroFade 0.7s ease both;
}

@keyframes heroFade {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-bg {
    position: absolute;
    inset: 0 calc((100vw - min(100vw, var(--max))) / -2);
    z-index: -2;
    opacity: 0.3;
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.92)),
        linear-gradient(180deg, transparent, #020617);
}

.hero-bg img {
    height: 100%;
    object-fit: cover;
    filter: blur(2px) saturate(1.18);
}

.hero-content {
    max-width: 680px;
}

.eyebrow,
.section-kicker {
    margin: 0 0 10px;
    color: var(--accent-strong);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(2.4rem, 6vw, 5.2rem);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero-summary {
    max-width: 650px;
    margin: 24px 0 0;
    color: #cbd5e1;
    font-size: 1.08rem;
}

.hero-actions,
.detail-info .btn {
    margin-top: 28px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn.primary {
    color: #022c22;
    background: linear-gradient(135deg, var(--accent-strong), #a7f3d0);
    box-shadow: 0 18px 36px rgba(16, 185, 129, 0.22);
}

.btn.ghost {
    color: #d1fae5;
    border-color: rgba(52, 211, 153, 0.45);
    background: rgba(16, 185, 129, 0.08);
}

.btn.text {
    color: #cbd5e1;
    border-color: var(--line);
    background: rgba(15, 23, 42, 0.55);
}

.hero-poster {
    position: relative;
    border-radius: 34px;
    overflow: hidden;
    transform: rotate(1.8deg);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-poster::before {
    content: "";
    display: block;
    aspect-ratio: 2 / 3;
}

.hero-poster img {
    position: absolute;
    inset: 0;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.hero-poster:hover img {
    transform: scale(1.05);
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 34px;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(14px);
}

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #64748b;
    cursor: pointer;
}

.hero-dot.is-active {
    width: 28px;
    border-radius: 999px;
    background: var(--accent-strong);
}

.quick-search {
    margin-top: 44px;
    padding-top: 0;
    display: grid;
    grid-template-columns: 1fr minmax(280px, 480px);
    gap: 26px;
    align-items: center;
}

.quick-search h2,
.section-head h2,
.feature-panel h2,
.detail-copy h2 {
    margin: 0;
    font-size: clamp(1.7rem, 3vw, 2.5rem);
    letter-spacing: -0.035em;
}

.home-search,
.filter-toolbar {
    display: flex;
    gap: 12px;
    align-items: center;
}

.home-search {
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
}

.home-search input,
.search-box input,
.select-box select {
    width: 100%;
    border: 1px solid var(--line);
    color: var(--text);
    background: rgba(2, 6, 23, 0.8);
    outline: none;
}

.home-search input {
    border: 0;
    padding: 0 14px;
    background: transparent;
}

.home-search button {
    min-width: 92px;
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    color: #022c22;
    font-weight: 850;
    background: var(--accent-strong);
    cursor: pointer;
}

.section-wrap {
    margin-top: 72px;
}

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

.section-link {
    color: var(--accent-strong);
    font-weight: 800;
}

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

.category-tile,
.feature-panel,
.category-overview-card,
.filter-toolbar,
.detail-copy,
.player-shell,
.rank-item,
.movie-card {
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.84), rgba(15, 23, 42, 0.56));
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

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

.category-tile:hover {
    transform: translateY(-4px);
    border-color: rgba(52, 211, 153, 0.5);
}

.category-tile span {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--accent-strong);
    background: var(--accent-soft);
    font-size: 0.78rem;
    font-weight: 800;
}

.category-tile strong {
    display: block;
    margin-top: 28px;
    font-size: 1.45rem;
}

.category-tile p,
.feature-panel p,
.category-overview-card p,
.page-hero p,
.detail-copy p {
    color: var(--muted);
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
    gap: 20px;
}

.compact-grid {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

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

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(52, 211, 153, 0.42);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

.poster-link::before {
    content: "";
    display: block;
    aspect-ratio: 2 / 3;
}

.poster-link img {
    position: absolute;
    inset: 0;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, filter 0.35s ease;
}

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

.poster-badge {
    position: absolute;
    left: 10px;
    top: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #dcfce7;
    background: rgba(2, 6, 23, 0.76);
    font-size: 0.75rem;
    font-weight: 800;
    backdrop-filter: blur(12px);
}

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

.movie-card h3 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-info h3 a:hover,
.category-overview-card h2 a:hover {
    color: var(--accent-strong);
}

.movie-meta,
.movie-one-line {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.movie-one-line {
    display: -webkit-box;
    min-height: 3.1em;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.tag-list span,
.tag-cloud a {
    border: 1px solid rgba(52, 211, 153, 0.2);
    color: #bbf7d0;
    background: rgba(16, 185, 129, 0.08);
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 0.72rem;
}

.split-section {
    display: grid;
    grid-template-columns: 0.78fr 1.22fr;
    gap: 24px;
    align-items: stretch;
}

.feature-panel {
    border-radius: 28px;
    padding: 34px;
    background:
        radial-gradient(circle at 20% 0%, rgba(16, 185, 129, 0.22), transparent 20rem),
        linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.68));
}

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

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

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

.rank-item {
    display: grid;
    grid-template-columns: 56px 86px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 20px;
}

.rank-number {
    color: var(--gold);
    font-size: 1.3rem;
    font-weight: 950;
    text-align: center;
}

.rank-poster {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    background: #0f172a;
}

.rank-poster::before {
    content: "";
    display: block;
    aspect-ratio: 2 / 3;
}

.rank-poster img {
    position: absolute;
    inset: 0;
    height: 100%;
    object-fit: cover;
}

.rank-info h3,
.rank-info p {
    margin: 0;
}

.rank-info p {
    color: var(--muted);
    font-size: 0.86rem;
}

.page-hero {
    max-width: var(--max);
    margin: 0 auto;
    padding: 72px 20px 8px;
}

.small-hero h1 {
    max-width: 820px;
    font-size: clamp(2.2rem, 5vw, 4.2rem);
}

.small-hero p:last-child {
    max-width: 760px;
    margin-top: 18px;
    font-size: 1.05rem;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 28px;
    align-items: center;
    padding: 22px;
    border-radius: 28px;
}

.category-cover-stack {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.category-cover-stack img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 14px;
    background: #0f172a;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-cloud a {
    padding: 8px 13px;
    font-size: 0.9rem;
}

.filter-toolbar {
    position: sticky;
    top: 72px;
    z-index: 20;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 210px;
    gap: 14px;
    margin-bottom: 24px;
    padding: 14px;
    border-radius: 20px;
    backdrop-filter: blur(18px);
}

.search-box,
.select-box {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 750;
}

.search-box input,
.select-box select {
    min-height: 46px;
    padding: 0 14px;
    border-radius: 14px;
}

.empty-result {
    margin: 26px 0 0;
    color: var(--muted);
    text-align: center;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 26px;
    color: var(--muted);
    font-size: 0.9rem;
}

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

.detail-hero {
    display: grid;
    grid-template-columns: 330px 1fr;
    gap: 38px;
    align-items: center;
}

.detail-poster {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: #0f172a;
}

.detail-poster img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.detail-info h1 {
    font-size: clamp(2.1rem, 4.5vw, 4.5rem);
}

.detail-line {
    max-width: 760px;
    color: #dbeafe;
    font-size: 1.08rem;
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 26px 0 0;
}

.detail-meta div {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.58);
}

.detail-meta dt {
    color: var(--muted);
    font-size: 0.78rem;
}

.detail-meta dd {
    margin: 4px 0 0;
    font-weight: 850;
}

.player-section {
    scroll-margin-top: 96px;
}

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

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

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: #ecfdf5;
    background:
        radial-gradient(circle at center, rgba(16, 185, 129, 0.2), transparent 18rem),
        linear-gradient(180deg, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.68));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #022c22;
    background: var(--accent-strong);
    box-shadow: 0 20px 50px rgba(16, 185, 129, 0.38);
    font-size: 2.3rem;
    line-height: 1;
}

.play-overlay strong {
    font-size: 1.12rem;
}

.detail-copy {
    border-radius: 28px;
    padding: 30px;
}

.detail-copy h2 + p {
    margin-top: 10px;
}

.related-grid {
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
}

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

.footer-inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 34px 20px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 28px;
    align-items: start;
}

.footer-inner p,
.copyright {
    color: var(--muted);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: end;
}

.footer-links a {
    color: #cbd5e1;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
}

.footer-links a:hover {
    color: var(--accent-strong);
}

.copyright {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 20px 28px;
    font-size: 0.88rem;
}

[hidden] {
    display: none !important;
}

@media (max-width: 1024px) {
    .hero-slide,
    .detail-hero,
    .split-section,
    .category-overview-card {
        grid-template-columns: 1fr;
    }

    .hero-poster,
    .detail-poster {
        max-width: 360px;
    }

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

    .side-grid,
    .home-rank-list {
        grid-template-columns: 1fr 1fr;
    }

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

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

    .nav-toggle {
        display: block;
    }

    .main-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: calc(100% + 8px);
        display: none;
        padding: 12px;
        flex-direction: column;
        align-items: stretch;
        border: 1px solid var(--line);
        border-radius: 20px;
        background: rgba(2, 6, 23, 0.94);
        box-shadow: var(--shadow);
    }

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

    .main-nav a {
        border-radius: 14px;
    }

    .hero,
    .hero-track,
    .hero-slide {
        min-height: auto;
    }

    .hero-slide {
        padding-top: 56px;
        padding-bottom: 92px;
        gap: 30px;
    }

    .hero h1,
    .page-hero h1,
    .detail-info h1 {
        letter-spacing: -0.04em;
    }

    .hero-poster,
    .detail-poster {
        max-width: 260px;
    }

    .quick-search,
    .filter-toolbar,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .home-search {
        border-radius: 22px;
        flex-direction: column;
        align-items: stretch;
    }

    .home-search input {
        min-height: 44px;
    }

    .section-wrap {
        margin-top: 52px;
    }

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

    .category-grid,
    .side-grid,
    .home-rank-list {
        grid-template-columns: 1fr;
    }

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

    .rank-item {
        grid-template-columns: 42px 70px 1fr;
    }

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

    .detail-copy {
        padding: 22px;
    }

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

@media (max-width: 440px) {
    .movie-grid,
    .compact-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .brand-text small {
        display: none;
    }

    .play-circle {
        width: 64px;
        height: 64px;
        font-size: 1.85rem;
    }
}
