:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.76);
    --panel-strong: rgba(15, 23, 42, 0.92);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --accent: #f8fafc;
    --accent-dark: #020617;
    --radius: 22px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
    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;
    background:
        radial-gradient(circle at 15% 0%, rgba(71, 85, 105, 0.4), transparent 30%),
        radial-gradient(circle at 85% 15%, rgba(30, 41, 59, 0.7), transparent 34%),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    color: var(--text);
}

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.container {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

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

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
    gap: 24px;
}

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

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, #64748b, #1e293b);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.55);
    font-weight: 900;
}

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

.brand-text strong,
.footer-brand {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

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

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

.nav-link {
    padding: 10px 14px;
    border-radius: 12px;
    color: var(--soft);
    font-size: 14px;
    font-weight: 650;
    transition: 0.24s ease;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(148, 163, 184, 0.14);
    color: #ffffff;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.82);
    color: #ffffff;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-direction: column;
}

.menu-toggle span {
    width: 18px;
    height: 2px;
    border-radius: 99px;
    background: #ffffff;
}

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

.mobile-nav.open {
    display: grid;
    gap: 6px;
}

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

.hero-slider {
    min-height: 680px;
    position: relative;
}

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

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

.hero-slide > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.48;
    filter: saturate(1.08) contrast(1.02);
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.78) 44%, rgba(2, 6, 23, 0.38) 100%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.22) 0%, rgba(2, 6, 23, 0.92) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 680px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: center;
    gap: 56px;
    padding: 92px 0 80px;
}

.hero-copy {
    max-width: 760px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 99px;
    background: #f8fafc;
    box-shadow: 0 0 26px rgba(248, 250, 252, 0.9);
}

.hero h1,
.hero-main-title,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 74px);
    line-height: 0.98;
    letter-spacing: -0.065em;
}

.hero-movie-title {
    margin: 20px 0 0;
    font-size: clamp(28px, 4.2vw, 52px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero-copy p:not(.eyebrow) {
    margin: 22px 0 0;
    max-width: 680px;
    color: var(--soft);
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.8;
}

.hero-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.hero-meta span,
.detail-meta span,
.tag-row span,
.detail-tags a {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.13);
    color: #e2e8f0;
    border: 1px solid rgba(148, 163, 184, 0.16);
    font-size: 12px;
    font-weight: 700;
}

.hero-actions,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.primary-button,
.ghost-button,
.mini-button,
.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.24s ease, background 0.24s ease, border 0.24s ease;
}

.primary-button {
    background: #ffffff;
    color: var(--accent-dark);
    box-shadow: 0 16px 40px rgba(255, 255, 255, 0.12);
}

.ghost-button,
.section-link,
.mini-button {
    background: rgba(15, 23, 42, 0.58);
    color: #ffffff;
    border: 1px solid var(--line);
}

.primary-button:hover,
.ghost-button:hover,
.mini-button:hover,
.section-link:hover {
    transform: translateY(-2px);
}

.hero-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(226, 232, 240, 0.18);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.56);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

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

.hero-card span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.hero-card strong {
    font-size: 22px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.4);
    transition: 0.24s ease;
}

.hero-dot.is-active {
    width: 34px;
    background: #ffffff;
}

.section {
    padding: 70px 0;
}

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

.section-head h2,
.detail-text h2,
.category-card h2,
.movie-info h2 {
    margin: 0;
}

.section-head h2,
.detail-text h2 {
    font-size: clamp(26px, 3vw, 40px);
    letter-spacing: -0.04em;
}

.section-head p,
.page-hero p,
.detail-lead,
.detail-text p,
.category-card p,
.site-footer p {
    color: var(--muted);
    line-height: 1.8;
}

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

.category-tile {
    position: relative;
    min-height: 210px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--panel);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.18);
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.34;
    transition: transform 0.45s ease;
}

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

.category-tile span,
.category-tile strong {
    position: relative;
    z-index: 1;
}

.category-tile span {
    font-size: 24px;
    font-weight: 850;
}

.category-tile strong {
    margin-top: 8px;
    color: var(--soft);
    font-size: 13px;
    line-height: 1.7;
}

.category-tile:hover img {
    transform: scale(1.08);
}

.filter-panel,
.search-page-panel {
    display: grid;
    gap: 16px;
    margin-bottom: 26px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(14px);
}

.filter-panel {
    grid-template-columns: minmax(260px, 1fr) 2fr;
    align-items: center;
}

.search-box,
.search-page-panel label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.search-box input,
.search-page-panel input,
.search-page-panel select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: 0;
    background: rgba(2, 6, 23, 0.72);
    color: #ffffff;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-chip {
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.84);
    color: var(--soft);
    font-weight: 750;
}

.filter-chip.active,
.filter-chip:hover {
    background: #ffffff;
    color: var(--accent-dark);
}

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

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

.movie-card {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.movie-card.is-hidden {
    display: none;
}

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 18px;
    background: linear-gradient(145deg, #0f172a, #1e293b);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease, opacity 0.3s ease;
}

.movie-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 32%, rgba(0, 0, 0, 0.72) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

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

.rating-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    padding: 5px 8px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.58);
    color: #ffffff;
    font-size: 12px;
    font-weight: 850;
    backdrop-filter: blur(8px);
}

.play-circle {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.82);
    transition: 0.28s ease;
    backdrop-filter: blur(12px);
}

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

.movie-info {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.movie-info h2 {
    font-size: 15px;
    line-height: 1.38;
    letter-spacing: -0.01em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-info a:hover h2 {
    color: #ffffff;
}

.movie-meta {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

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

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

.movie-card.horizontal {
    grid-template-columns: 128px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.62);
}

.movie-card.horizontal .movie-poster {
    aspect-ratio: 16 / 10;
    border-radius: 16px;
}

.rank-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rank-number {
    display: inline-grid;
    place-items: center;
    min-width: 42px;
    height: 34px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-weight: 900;
}

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

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 86px 0 58px;
    background:
        linear-gradient(135deg, rgba(30, 41, 59, 0.76), rgba(2, 6, 23, 0.92)),
        radial-gradient(circle at 85% 0%, rgba(100, 116, 139, 0.34), transparent 30%);
    border-bottom: 1px solid var(--line);
}

.page-hero .container,
.detail-hero .container {
    position: relative;
    z-index: 1;
}

.page-hero h1 {
    max-width: 900px;
}

.page-hero p {
    max-width: 760px;
    font-size: 18px;
}

.category-list {
    display: grid;
    gap: 18px;
}

.category-card {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 24px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.62);
}

.category-cover {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    overflow: hidden;
    border-radius: 18px;
}

.category-cover img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.search-page-panel {
    grid-template-columns: 2fr 1fr 1fr;
}

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

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

.detail-grid {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 40px;
    align-items: center;
}

.detail-cover {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: var(--bg-soft);
    box-shadow: var(--shadow);
}

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

.detail-cover span {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.62);
    color: #ffffff;
    font-weight: 900;
    backdrop-filter: blur(8px);
}

.detail-lead {
    max-width: 820px;
    margin: 22px 0 0;
    font-size: 20px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: #000000;
    box-shadow: var(--shadow);
}

.movie-video,
.player-layer,
.player-layer img {
    width: 100%;
    height: 100%;
}

.movie-video {
    display: block;
    background: #000000;
}

.player-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    background: #000000;
    overflow: hidden;
}

.player-layer img {
    position: absolute;
    inset: 0;
    object-fit: cover;
    opacity: 0.55;
    filter: blur(1px) saturate(1.05);
}

.player-layer::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.1), rgba(2, 6, 23, 0.82));
}

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

.player-play {
    position: relative;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
    font-size: 34px;
    backdrop-filter: blur(16px);
    transition: transform 0.25s ease, background 0.25s ease;
}

.player-layer:hover .player-play {
    transform: scale(1.08);
    background: rgba(255, 255, 255, 0.28);
}

.detail-text {
    display: grid;
    gap: 14px;
    max-width: 980px;
}

.detail-text p {
    margin: 0 0 16px;
    font-size: 17px;
}

.empty-state {
    margin: 18px 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.62);
    color: var(--muted);
}

.site-footer {
    margin-top: 40px;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.65), rgba(2, 6, 23, 0.96));
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 34px;
    padding: 54px 0 34px;
}

.footer-grid h2 {
    margin: 0 0 14px;
    font-size: 17px;
}

.footer-links {
    display: grid;
    gap: 10px;
    color: var(--muted);
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 0 34px;
    color: var(--muted);
    border-top: 1px solid var(--line);
    font-size: 13px;
}

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

    .menu-toggle {
        display: inline-flex;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .hero-card {
        max-width: 260px;
    }

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

    .filter-panel,
    .search-page-panel,
    .category-card,
    .detail-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .container {
        width: min(100% - 24px, 1200px);
    }

    .header-inner {
        min-height: 68px;
    }

    .brand-text small {
        display: none;
    }

    .hero,
    .hero-slider,
    .hero-content {
        min-height: 620px;
    }

    .hero-content {
        padding: 72px 0 80px;
    }

    .hero-card {
        display: none;
    }

    .hero-actions {
        gap: 10px;
    }

    .primary-button,
    .ghost-button,
    .mini-button,
    .section-link {
        width: 100%;
    }

    .section {
        padding: 46px 0;
    }

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

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

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

    .movie-card.horizontal {
        grid-template-columns: 96px minmax(0, 1fr);
    }

    .movie-card.horizontal .mini-button {
        grid-column: 1 / -1;
    }

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

    .detail-cover {
        max-width: 220px;
    }

    .player-shell {
        border-radius: 18px;
    }

    .footer-bottom {
        flex-direction: column;
    }
}
