:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.78);
    --line: rgba(148, 163, 184, 0.22);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-2: #cbd5e1;
    --brand: #10b981;
    --brand-2: #34d399;
    --amber: #f59e0b;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.08));
    border-bottom: 1px solid transparent;
}

.site-header.scrolled {
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(16px);
    border-bottom-color: rgba(148, 163, 184, 0.18);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.site-nav {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 800;
    letter-spacing: -0.03em;
    font-size: 1.35rem;
}

.logo-mark {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand), #059669);
    color: #052e16;
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.35);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 26px;
}

.nav-link {
    color: #e2e8f0;
    font-weight: 600;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--brand-2);
}

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

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: currentColor;
    border-radius: 999px;
}

.hero-wrap {
    position: relative;
    height: 85vh;
    min-height: 620px;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 1s ease, transform 1.2s ease;
    pointer-events: none;
}

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

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.05);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.74) 38%, rgba(2, 6, 23, 0.22) 68%, rgba(2, 6, 23, 0.82) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.1) 45%, rgba(2, 6, 23, 0.22) 100%);
}

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

.hero-tags,
.movie-tags,
.tag-cloud,
.detail-side-meta,
.rank-meta,
.movie-meta-line,
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.hero-tags span,
.movie-tags span,
.tag-cloud span,
.detail-side-meta span,
.rank-meta span,
.movie-meta-line span,
.filter-chips button {
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.62);
    color: #d1fae5;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.78rem;
    backdrop-filter: blur(10px);
}

.hero-content h1 {
    margin: 22px 0 18px;
    font-size: clamp(3rem, 8vw, 6.8rem);
    line-height: 0.94;
    letter-spacing: -0.07em;
    max-width: 900px;
    text-shadow: 0 16px 60px rgba(0, 0, 0, 0.55);
}

.hero-content p {
    margin: 0;
    color: #dbeafe;
    font-size: clamp(1rem, 1.8vw, 1.3rem);
    line-height: 1.8;
    max-width: 680px;
}

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

.primary-btn,
.ghost-btn,
.section-more,
.rank-action,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    min-height: 46px;
    padding: 0 22px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-btn,
.rank-action {
    background: linear-gradient(135deg, var(--brand), #059669);
    color: #052e16;
    box-shadow: 0 16px 36px rgba(16, 185, 129, 0.25);
}

.ghost-btn,
.section-more,
.text-link {
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.68);
    color: var(--text);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover,
.rank-action:hover,
.text-link:hover {
    transform: translateY(-2px);
}

.hero-arrow {
    position: absolute;
    z-index: 5;
    top: 50%;
    width: 48px;
    height: 48px;
    transform: translateY(-50%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.55);
    color: white;
    font-size: 2rem;
    cursor: pointer;
    backdrop-filter: blur(12px);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    cursor: pointer;
}

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

.page-section {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 78px 0;
}

.intro-search {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 32px;
    align-items: center;
}

.section-kicker {
    color: var(--brand-2);
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-size: 0.78rem;
}

.intro-copy h2,
.section-heading h2,
.sub-hero h1,
.detail-title-block h1 {
    margin: 10px 0 14px;
    letter-spacing: -0.045em;
    line-height: 1.05;
}

.intro-copy h2,
.section-heading h2 {
    font-size: clamp(2rem, 4vw, 3.2rem);
}

.intro-copy p,
.section-heading p,
.sub-hero p,
.detail-title-block p,
.text-block p,
.category-overview-body p,
.movie-desc,
.rank-content p,
.site-footer p {
    color: var(--muted-2);
    line-height: 1.78;
}

.search-panel {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(2, 6, 23, 0.46);
    border-radius: 18px;
    padding: 0 16px;
    min-height: 54px;
}

.search-box span {
    color: var(--brand-2);
    font-size: 1.5rem;
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
}

.filter-chips {
    margin-top: 14px;
}

.filter-chips button {
    cursor: pointer;
}

.filter-chips button.active,
.filter-chips button:hover {
    background: rgba(16, 185, 129, 0.18);
    border-color: rgba(52, 211, 153, 0.52);
}

.no-results {
    margin: 18px 0 0;
    color: #fecaca;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.7);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(52, 211, 153, 0.38);
    box-shadow: 0 24px 70px rgba(16, 185, 129, 0.12);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.92);
}

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

.movie-card:hover .poster-link img {
    transform: scale(1.07);
}

.poster-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    border-radius: 999px;
    background: rgba(5, 150, 105, 0.9);
    color: white;
    padding: 5px 10px;
    font-size: 0.78rem;
    font-weight: 700;
}

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

.movie-title {
    margin: 10px 0 8px;
    font-size: 1.08rem;
    line-height: 1.32;
}

.movie-title a:hover,
.rank-content h2 a:hover,
.category-overview-body a:hover {
    color: var(--brand-2);
}

.movie-desc {
    margin: 0 0 14px;
    font-size: 0.92rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta-line span {
    padding: 4px 9px;
    color: var(--muted-2);
}

.movie-tags span {
    font-size: 0.72rem;
    padding: 4px 9px;
}

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

.category-card {
    position: relative;
    min-height: 250px;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid var(--line);
    background: var(--bg-card);
    box-shadow: var(--shadow);
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.55;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-card:hover img {
    transform: scale(1.08);
    opacity: 0.72;
}

.category-card div {
    position: absolute;
    inset: auto 0 0 0;
    padding: 22px;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), transparent);
}

.category-card span,
.category-overview-body span {
    color: var(--brand-2);
    font-size: 0.78rem;
    font-weight: 900;
}

.category-card h3 {
    margin: 8px 0;
    font-size: 1.35rem;
}

.category-card p {
    margin: 0;
    color: var(--muted-2);
    line-height: 1.6;
    font-size: 0.9rem;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 76px 70px 1fr auto;
    align-items: center;
    gap: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
    padding: 12px 16px 12px 12px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
}

.rank-cover {
    display: block;
    width: 76px;
    aspect-ratio: 2 / 3;
    border-radius: 16px;
    overflow: hidden;
}

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

.rank-number {
    color: var(--brand-2);
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.rank-content h2 {
    margin: 0 0 8px;
    font-size: 1.1rem;
}

.rank-content p {
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sub-hero {
    min-height: 420px;
    padding: 140px max(24px, calc((100vw - 1180px) / 2)) 80px;
    display: flex;
    align-items: end;
    background:
        radial-gradient(circle at 15% 10%, rgba(16, 185, 129, 0.2), transparent 24rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0.98));
    border-bottom: 1px solid var(--line);
}

.sub-hero > div {
    max-width: 800px;
}

.sub-hero h1 {
    font-size: clamp(2.6rem, 7vw, 5.6rem);
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 220px 1fr;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--bg-card);
    box-shadow: var(--shadow);
}

.category-preview {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    padding: 4px;
    background: rgba(2, 6, 23, 0.7);
}

.category-preview img {
    width: 100%;
    height: 132px;
    object-fit: cover;
    border-radius: 14px;
}

.category-overview-body {
    padding: 26px;
}

.category-overview-body h2 {
    margin: 8px 0 12px;
}

.detail-hero {
    position: relative;
    padding-top: 100px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.detail-bg {
    position: absolute;
    inset: 0;
    opacity: 0.22;
    filter: blur(20px) saturate(1.3);
    transform: scale(1.08);
}

.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.35), #020617 92%);
}

.detail-wrap {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0 66px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted-2);
    margin-bottom: 22px;
}

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

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 26px;
    align-items: stretch;
}

.player-panel,
.detail-info-card {
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
    overflow: hidden;
}

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

.movie-player {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
    position: relative;
    z-index: 1;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    border: 0;
    cursor: pointer;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.75));
    color: var(--text);
    display: grid;
    place-content: center;
    gap: 14px;
    text-align: center;
}

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

.play-icon {
    width: 76px;
    height: 76px;
    display: inline-grid;
    place-items: center;
    margin: 0 auto;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand-2), var(--brand));
    color: #022c22;
    font-size: 2rem;
    box-shadow: 0 20px 50px rgba(16, 185, 129, 0.35);
}

.detail-info-card {
    padding: 14px;
}

.detail-poster {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 20px;
}

.detail-side-meta {
    margin-top: 14px;
}

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

.detail-title-block h1 {
    font-size: clamp(2.4rem, 5vw, 4.6rem);
}

.info-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 28px 0;
}

.info-list div {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.56);
    padding: 16px;
}

.info-list dt {
    color: var(--muted);
    margin-bottom: 8px;
}

.info-list dd {
    margin: 0;
    color: var(--text);
    font-weight: 800;
}

.tag-cloud {
    margin-bottom: 32px;
}

.text-block {
    border-top: 1px solid var(--line);
    padding-top: 28px;
    margin-top: 28px;
}

.text-block h2,
.detail-sidebar h2 {
    margin: 0 0 14px;
    font-size: 1.6rem;
}

.text-block p {
    margin: 0;
    font-size: 1.05rem;
}

.detail-sidebar {
    position: sticky;
    top: 92px;
}

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

.related-list .movie-card {
    display: grid;
    grid-template-columns: 110px 1fr;
    border-radius: 20px;
}

.related-list .poster-link {
    height: 100%;
}

.related-list .movie-card-body {
    padding: 12px;
}

.related-list .movie-desc,
.related-list .movie-tags {
    display: none;
}

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

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 28px;
}

.footer-inner p {
    max-width: 560px;
}

.footer-links {
    display: flex;
    gap: 18px;
    align-items: start;
}

.footer-links a:hover {
    color: var(--brand-2);
}

.copyright {
    width: min(1180px, calc(100% - 32px));
    margin: 26px auto 0;
    color: var(--muted);
}

[hidden],
.movie-card.is-hidden,
.rank-row.is-hidden {
    display: none !important;
}

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

    .category-overview-grid,
    .intro-search,
    .detail-content,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .detail-info-card {
        display: none;
    }

    .detail-sidebar {
        position: static;
    }
}

@media (max-width: 760px) {
    .site-nav {
        min-height: 64px;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 70px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 18px;
        border: 1px solid var(--line);
        border-radius: 20px;
        background: rgba(15, 23, 42, 0.96);
        backdrop-filter: blur(18px);
    }

    .nav-links.open {
        display: flex;
    }

    .hero-wrap {
        height: 78vh;
        min-height: 560px;
    }

    .hero-content {
        bottom: 12%;
    }

    .hero-arrow {
        display: none;
    }

    .page-section {
        padding: 54px 0;
    }

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

    .movie-card-body {
        padding: 12px;
    }

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

    .rank-row {
        grid-template-columns: 64px 1fr;
        gap: 12px;
    }

    .rank-number {
        position: absolute;
        margin-left: 50px;
        margin-top: -76px;
        padding: 4px 8px;
        border-radius: 999px;
        background: rgba(2, 6, 23, 0.78);
        font-size: 0.9rem;
    }

    .rank-action {
        grid-column: 2;
        width: max-content;
        min-height: 38px;
    }

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

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

    .footer-inner,
    .footer-links {
        flex-direction: column;
    }
}

@media (max-width: 460px) {
    .movie-grid,
    .small-grid,
    .category-page-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .info-list {
        grid-template-columns: 1fr;
    }

    .related-list .movie-card {
        grid-template-columns: 96px 1fr;
    }
}
