* {
    box-sizing: border-box;
}

:root {
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: #111827;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-2: #cbd5e1;
    --accent: #e5e7eb;
    --glow: rgba(59, 130, 246, 0.25);
    --radius: 18px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 20% 10%, rgba(59, 130, 246, 0.16), transparent 32rem),
        radial-gradient(circle at 85% 0%, rgba(148, 163, 184, 0.12), transparent 28rem),
        var(--bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

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

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

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

.nav-wrap {
    max-width: 1280px;
    height: 68px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #020617;
    background: linear-gradient(135deg, #f8fafc, #94a3b8);
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.55);
}

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

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 30px;
    color: var(--muted-2);
    font-size: 15px;
}

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

.desktop-nav a:hover {
    color: var(--text);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.12);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--text);
}

.mobile-nav {
    display: none;
    padding: 0 24px 18px;
    border-top: 1px solid var(--line);
}

.mobile-nav a {
    display: block;
    padding: 12px 0;
    color: var(--muted-2);
}

.mobile-nav.is-open {
    display: block;
}

main {
    padding-top: 68px;
}

.hero {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
}

.hero-stage,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 900ms ease;
}

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.12)),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.46) 40%, transparent 72%);
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100vw - 1280px) / 2 + 24px));
    right: 24px;
    bottom: 9vh;
    max-width: 780px;
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--muted-2);
    font-size: 14px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(38px, 7vw, 82px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-desc {
    max-width: 680px;
    margin: 22px 0 0;
    color: var(--muted-2);
    font-size: 18px;
    line-height: 1.8;
}

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

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

.primary-btn {
    color: #020617;
    background: #f8fafc;
    box-shadow: 0 20px 44px rgba(248, 250, 252, 0.16);
}

.ghost-btn {
    margin-left: 12px;
    color: #f8fafc;
    border: 1px solid rgba(248, 250, 252, 0.32);
    background: rgba(15, 23, 42, 0.32);
}

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

.hero-arrow {
    position: absolute;
    top: 50%;
    width: 48px;
    height: 48px;
    transform: translateY(-50%);
    border: 1px solid rgba(248, 250, 252, 0.24);
    border-radius: 999px;
    color: #f8fafc;
    background: rgba(15, 23, 42, 0.46);
    backdrop-filter: blur(8px);
    font-size: 34px;
    cursor: pointer;
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dots button {
    width: 26px;
    height: 4px;
    border: 0;
    border-radius: 999px;
    background: rgba(248, 250, 252, 0.32);
    cursor: pointer;
}

.hero-dots button.is-active {
    background: #f8fafc;
}

.quick-panel {
    max-width: 1280px;
    margin: -36px auto 0;
    padding: 20px;
    position: relative;
    z-index: 3;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.84);
    backdrop-filter: blur(20px);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

.quick-panel.in-page {
    margin-top: 24px;
}

.search-box {
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.5);
}

.search-box span {
    color: var(--muted);
    font-size: 24px;
}

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

.category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.category-chips a {
    padding: 9px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted-2);
    background: rgba(148, 163, 184, 0.08);
}

.category-chips a:hover,
.category-chips a.is-active {
    color: var(--text);
    border-color: rgba(248, 250, 252, 0.48);
}

.content-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 58px 24px 0;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 40px);
    letter-spacing: -0.04em;
}

.section-heading p {
    margin: 8px 0 0;
    color: var(--muted);
}

.section-more {
    color: var(--muted-2);
    white-space: nowrap;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(248, 250, 252, 0.3);
    box-shadow: 0 24px 58px rgba(0, 0, 0, 0.25);
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #111827;
}

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

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

.poster-mask {
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), transparent 60%);
    transition: opacity 0.25s ease;
}

.movie-card:hover .poster-mask {
    opacity: 1;
}

.play-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #020617;
    background: rgba(248, 250, 252, 0.9);
    transform: translate(-50%, -50%) scale(0.66);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.meta-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 9px;
    border-radius: 999px;
    color: #f8fafc;
    background: rgba(2, 6, 23, 0.68);
    font-size: 12px;
}

.movie-info {
    padding: 16px;
}

.movie-info h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.35;
}

.movie-info h3 a:hover {
    color: #e2e8f0;
}

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

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

.tag-row span {
    padding: 5px 8px;
    border-radius: 999px;
    color: var(--muted-2);
    background: rgba(148, 163, 184, 0.12);
    font-size: 12px;
}

.tag-row.big span {
    font-size: 13px;
    padding: 8px 11px;
}

.rank-preview {
    padding-top: 70px;
}

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

.rank-item,
.rank-row-link {
    display: grid;
    align-items: center;
    gap: 14px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.68);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-item {
    grid-template-columns: 48px 62px 1fr auto;
    min-height: 90px;
    padding: 12px;
    border-radius: 18px;
}

.rank-item:hover,
.rank-row-link:hover {
    transform: translateY(-2px);
    border-color: rgba(248, 250, 252, 0.32);
}

.rank-no {
    color: #e2e8f0;
    font-weight: 800;
    font-size: 18px;
}

.rank-item img {
    width: 62px;
    height: 72px;
    border-radius: 12px;
    object-fit: cover;
}

.rank-title {
    font-weight: 700;
}

.rank-score {
    color: #f8fafc;
    font-weight: 800;
}

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

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

.category-card {
    position: relative;
    min-height: 210px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #0f172a;
}

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

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.16));
}

.category-card span,
.category-card p {
    position: relative;
    z-index: 2;
}

.category-card span {
    font-size: 22px;
    font-weight: 800;
}

.category-card p {
    margin: 8px 0 0;
    color: var(--muted-2);
    line-height: 1.6;
}

.category-card:hover img {
    opacity: 0.55;
    transform: scale(1.06);
}

.page-main {
    padding-top: 92px;
}

.page-hero {
    max-width: 1280px;
    margin: 0 auto;
    padding: 66px 24px 28px;
}

.compact-hero {
    border-bottom: 1px solid var(--line);
}

.page-hero p:last-child {
    max-width: 780px;
    color: var(--muted-2);
    font-size: 18px;
    line-height: 1.8;
}

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

.rank-row-link {
    grid-template-columns: 66px 88px 1fr auto;
    padding: 12px 18px;
    border-radius: 20px;
}

.rank-row img {
    width: 88px;
    height: 116px;
    border-radius: 14px;
    object-fit: cover;
}

.rank-row-body {
    display: grid;
    gap: 8px;
}

.rank-row-body strong {
    font-size: 20px;
}

.rank-row-body em,
.rank-row-body small {
    color: var(--muted);
    font-style: normal;
    line-height: 1.55;
}

.detail-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 92px 24px 0;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    color: var(--muted);
    font-size: 14px;
}

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

.detail-hero {
    display: grid;
    grid-template-columns: 330px 1fr;
    gap: 38px;
    margin-top: 28px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.55)),
        radial-gradient(circle at top right, var(--glow), transparent 28rem);
}

.detail-cover {
    overflow: hidden;
    border-radius: 24px;
    background: #111827;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
}

.detail-cover img {
    width: 100%;
    height: 100%;
    min-height: 460px;
    object-fit: cover;
}

.detail-copy {
    align-self: center;
}

.detail-copy .lead {
    max-width: 820px;
    color: var(--muted-2);
    font-size: 19px;
    line-height: 1.9;
}

.player-section,
.detail-content {
    margin-top: 42px;
}

.player-section h2,
.detail-content h2 {
    margin: 0 0 18px;
    font-size: 28px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: #000;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.4);
}

.player-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    background: #000;
}

.player-trigger {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #020617;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.35), rgba(2, 6, 23, 0.08));
    cursor: pointer;
}

.player-trigger span {
    width: 86px;
    height: 86px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(248, 250, 252, 0.94);
    font-size: 34px;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35);
}

.player-trigger.is-hidden {
    display: none;
}

.detail-content {
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.62);
}

.detail-content p {
    margin: 0 0 24px;
    color: var(--muted-2);
    font-size: 17px;
    line-height: 1.9;
}

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

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

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 34px 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    color: var(--muted);
}

.footer-logo {
    color: var(--text);
    font-weight: 800;
    font-size: 20px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

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

.is-filtered-out {
    display: none;
}

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

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

    .detail-hero {
        grid-template-columns: 280px 1fr;
    }
}

@media (max-width: 820px) {
    .desktop-nav {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .hero {
        min-height: 76vh;
    }

    .hero-content {
        left: 20px;
        bottom: 12vh;
    }

    .hero-arrow {
        display: none;
    }

    .quick-panel {
        margin: -26px 16px 0;
    }

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

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

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

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

    .detail-cover img {
        min-height: auto;
    }

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

    .rank-row-link .rank-score {
        display: none;
    }
}

@media (max-width: 560px) {
    .nav-wrap {
        padding: 0 16px;
    }

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

    .hero-content h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 36px;
    }

    .hero-desc,
    .detail-copy .lead,
    .page-hero p:last-child {
        font-size: 16px;
    }

    .primary-btn,
    .ghost-btn {
        width: 100%;
        margin: 10px 0 0;
    }

    .content-section {
        padding: 44px 16px 0;
    }

    .movie-grid,
    .movie-grid.dense,
    .movie-grid.compact,
    .category-grid,
    .category-grid.large {
        grid-template-columns: 1fr;
    }

    .detail-main,
    .page-hero {
        padding-left: 16px;
        padding-right: 16px;
    }

    .detail-hero,
    .detail-content {
        padding: 18px;
        border-radius: 20px;
    }

    .rank-item {
        grid-template-columns: 38px 54px 1fr;
    }

    .rank-item .rank-score {
        display: none;
    }
}
