:root {
    color-scheme: dark;
    --page-bg: #020617;
    --panel-bg: rgba(15, 23, 42, 0.82);
    --panel-strong: #0f172a;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --sky: #38bdf8;
    --blue: #2563eb;
    --cyan: #22d3ee;
    --radius-xl: 28px;
    --radius-lg: 20px;
    --shadow: 0 24px 70px rgba(2, 6, 23, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 18% 12%, rgba(56, 189, 248, 0.18), transparent 32rem),
        radial-gradient(circle at 78% 0%, rgba(37, 99, 235, 0.24), transparent 34rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

img {
    max-width: 100%;
    height: auto;
}

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

button,
input,
select {
    font: inherit;
}

button {
    border: 0;
}

.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(20px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1200px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    gap: 20px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 24px;
    letter-spacing: -0.03em;
    background: linear-gradient(90deg, var(--sky), var(--blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.logo-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: #fff;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--sky), var(--blue));
    box-shadow: 0 12px 28px rgba(56, 189, 248, 0.26);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    color: var(--soft);
    font-weight: 650;
}

.main-nav a {
    padding: 10px 0;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--sky);
}

.header-search {
    display: flex;
    align-items: center;
    width: min(290px, 28vw);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    overflow: hidden;
}

.header-search input {
    width: 100%;
    padding: 10px 14px;
    color: var(--text);
    border: 0;
    outline: none;
    background: transparent;
}

.header-search button {
    padding: 10px 16px;
    color: var(--sky);
    background: transparent;
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    color: var(--text);
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.9);
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.96);
}

.mobile-panel.open {
    display: block;
}

.mobile-panel-inner {
    display: grid;
    gap: 8px;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 16px 0 20px;
}

.mobile-panel a {
    padding: 12px 14px;
    border-radius: 14px;
    color: var(--soft);
    background: rgba(2, 6, 23, 0.24);
}

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

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    transform: scale(1.06);
    filter: saturate(1.1);
}

.hero-backdrop::after {
    position: absolute;
    inset: 0;
    content: "";
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.18)),
        linear-gradient(0deg, #020617 0%, transparent 36%, rgba(2, 6, 23, 0.58) 100%);
}

.hero-content {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: center;
    width: min(1200px, calc(100% - 32px));
    min-height: 680px;
    margin: 0 auto;
    gap: 44px;
    padding: 92px 0 56px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: max-content;
    padding: 9px 14px;
    margin-bottom: 22px;
    color: #bae6fd;
    border: 1px solid rgba(56, 189, 248, 0.32);
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.12);
}

.hero h1 {
    max-width: 820px;
    margin: 0;
    font-size: clamp(40px, 7vw, 82px);
    line-height: 0.96;
    letter-spacing: -0.07em;
}

.hero-summary {
    max-width: 680px;
    margin: 24px 0 0;
    color: #cbd5e1;
    font-size: clamp(17px, 2vw, 21px);
    line-height: 1.75;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 26px 0 0;
}

.hero-poster {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow);
    transform: perspective(1200px) rotateY(-7deg);
}

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

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

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

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

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--sky), var(--blue));
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.28);
}

.btn-secondary {
    color: var(--text);
    border: 1px solid rgba(148, 163, 184, 0.26);
    background: rgba(15, 23, 42, 0.72);
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 34px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(-50%);
}

.hero-dot {
    width: 42px;
    height: 4px;
    padding: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.38);
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
    width: 72px;
    background: var(--sky);
}

.hero-arrow {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    color: #fff;
    border: 1px solid rgba(226, 232, 240, 0.24);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.52);
}

.search-hero {
    position: relative;
    margin-top: -44px;
    z-index: 8;
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.88);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
}

.search-panel input,
.filter-input {
    min-height: 52px;
    width: 100%;
    padding: 0 18px;
    color: var(--text);
    border: 1px solid rgba(148, 163, 184, 0.20);
    border-radius: 16px;
    outline: none;
    background: rgba(2, 6, 23, 0.52);
}

.section {
    padding: 72px 0 0;
}

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

.section-eyebrow {
    margin-bottom: 8px;
    color: var(--sky);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.section h2,
.page-title h1,
.detail-info h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.section-lead,
.page-title p {
    max-width: 760px;
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

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

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

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

.card-link {
    display: flex;
    height: 100%;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.76);
    box-shadow: 0 12px 36px rgba(2, 6, 23, 0.20);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.card-link:hover {
    transform: translateY(-6px);
    border-color: rgba(56, 189, 248, 0.46);
    box-shadow: 0 20px 54px rgba(2, 6, 23, 0.38);
}

.poster-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.9), rgba(14, 165, 233, 0.16));
}

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

.card-link:hover img {
    transform: scale(1.05);
}

.badge-row,
.movie-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    color: #e0f2fe;
    border: 1px solid rgba(125, 211, 252, 0.20);
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.14);
    font-size: 12px;
    font-weight: 750;
}

.poster-badge {
    position: absolute;
    top: 12px;
    z-index: 2;
}

.poster-badge.year {
    left: 12px;
}

.poster-badge.type {
    right: 12px;
    color: #fff;
    background: rgba(2, 6, 23, 0.70);
}

.movie-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
}

.movie-card h3 {
    margin: 0;
    font-size: 17px;
    line-height: 1.32;
}

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

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    color: #64748b;
    font-size: 12px;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 180px;
    padding: 24px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 24px;
    background:
        radial-gradient(circle at 86% 14%, rgba(56, 189, 248, 0.18), transparent 8rem),
        rgba(15, 23, 42, 0.78);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(56, 189, 248, 0.42);
}

.category-card h3 {
    margin: 0 0 12px;
    font-size: 24px;
}

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

.category-card span {
    display: inline-flex;
    margin-top: 22px;
    color: var(--sky);
    font-weight: 800;
}

.page-title {
    padding: 76px 0 30px;
}

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

.breadcrumb a {
    color: #bae6fd;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 18px;
    margin-bottom: 28px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
}

.filter-bar .filter-input {
    flex: 1 1 280px;
}

.filter-btn {
    min-height: 42px;
    padding: 0 15px;
    color: var(--soft);
    border: 1px solid rgba(148, 163, 184, 0.20);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.36);
}

.filter-btn.active,
.filter-btn:hover {
    color: #fff;
    border-color: rgba(56, 189, 248, 0.52);
    background: rgba(14, 165, 233, 0.22);
}

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

.rank-item {
    display: grid;
    grid-template-columns: 64px 92px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.70);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    border-color: rgba(56, 189, 248, 0.44);
}

.rank-num {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 16px;
    color: #fff;
    font-size: 20px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--sky), var(--blue));
}

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

.rank-cover img {
    width: 92px;
    height: 132px;
    object-fit: cover;
}

.rank-info h2,
.rank-info h3 {
    margin: 0 0 10px;
    font-size: 22px;
}

.rank-info p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.rank-link {
    color: var(--sky);
    font-weight: 900;
    white-space: nowrap;
}

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

.detail-hero::before {
    position: absolute;
    inset: 0;
    content: "";
    background-image: var(--poster);
    background-size: cover;
    background-position: center;
    filter: blur(26px) saturate(1.15);
    opacity: 0.34;
    transform: scale(1.08);
}

.detail-hero::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.97), rgba(2, 6, 23, 0.72)), linear-gradient(0deg, #020617, transparent 45%);
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 42px;
    align-items: center;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 72px 0 58px;
}

.detail-hero h1 {
    margin: 0;
    font-size: clamp(36px, 6vw, 66px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.detail-hero p {
    max-width: 760px;
    margin: 22px 0 0;
    color: var(--soft);
    font-size: 18px;
    line-height: 1.8;
}

.detail-poster {
    overflow: hidden;
    border-radius: 26px;
    box-shadow: var(--shadow);
}

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

.player-section {
    padding-top: 54px;
}

.player-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.82);
    box-shadow: var(--shadow);
}

.player-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.player-head h2 {
    margin: 0;
    font-size: 24px;
}

.player-box {
    position: relative;
    background: #000;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    background: radial-gradient(circle at center, rgba(14, 165, 233, 0.10), rgba(2, 6, 23, 0.44));
    cursor: pointer;
}

.player-cover.hidden {
    display: none;
}

.player-cover-inner {
    display: grid;
    gap: 14px;
    justify-items: center;
    font-weight: 900;
    font-size: 18px;
}

.play-icon {
    display: grid;
    width: 78px;
    height: 78px;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--sky), var(--blue));
    box-shadow: 0 22px 48px rgba(37, 99, 235, 0.42);
}

.play-icon::before {
    width: 0;
    height: 0;
    margin-left: 5px;
    content: "";
    border-top: 16px solid transparent;
    border-bottom: 16px solid transparent;
    border-left: 24px solid #fff;
}

.detail-info-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 24px;
    padding-top: 34px;
}

.detail-info {
    padding: 26px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
}

.detail-info + .detail-info {
    margin-top: 24px;
}

.detail-info h2 {
    margin-bottom: 18px;
    font-size: 28px;
}

.detail-info p {
    margin: 0;
    color: var(--soft);
    line-height: 1.9;
}

.info-list {
    display: grid;
    gap: 14px;
    margin: 0;
}

.info-list div {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 12px;
}

.info-list dt {
    color: var(--muted);
}

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

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

.footer-inner {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 32px;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
    color: var(--muted);
}

.footer-inner h2,
.footer-inner h3 {
    margin: 0 0 14px;
    color: var(--text);
    font-size: 18px;
}

.footer-inner p,
.footer-inner li {
    margin: 0;
    line-height: 1.8;
}

.footer-inner ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-bottom {
    border-top: 1px solid var(--line);
    padding: 18px 0;
    color: #64748b;
    text-align: center;
}

.empty-state {
    display: none;
    padding: 36px;
    color: var(--muted);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 22px;
    text-align: center;
    background: rgba(15, 23, 42, 0.62);
}

.empty-state.show {
    display: block;
}

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

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

    .hero-content,
    .detail-hero-inner,
    .detail-info-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 820px) {
    .main-nav,
    .header-search {
        display: none;
    }

    .menu-button {
        display: inline-grid;
        place-items: center;
    }

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

    .hero-content {
        padding-top: 72px;
    }

    .hero-poster {
        display: none;
    }

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

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

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

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

    .rank-item {
        grid-template-columns: 52px 74px minmax(0, 1fr);
    }

    .rank-cover img {
        width: 74px;
        height: 108px;
    }

    .rank-link {
        grid-column: 2 / -1;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .header-inner,
    .page-shell,
    .mobile-panel-inner,
    .footer-inner,
    .hero-content,
    .detail-hero-inner {
        width: min(100% - 22px, 1200px);
    }

    .logo {
        font-size: 20px;
    }

    .hero h1,
    .detail-hero h1 {
        letter-spacing: -0.045em;
    }

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

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

    .detail-info {
        padding: 20px;
    }

    .info-list div {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}
