:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: #1e293b;
    --bg-card-strong: #111827;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --cyan: #22d3ee;
    --cyan-dark: #0891b2;
    --cyan-soft: rgba(34, 211, 238, 0.15);
    --shadow: 0 25px 80px rgba(0, 0, 0, 0.42);
    --radius: 18px;
    --max: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    background: linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
    color: var(--text);
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(15, 23, 42, 0.84);
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    backdrop-filter: blur(18px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.16);
}

.header-inner {
    width: min(var(--max), calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
}

.brand-icon {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--cyan), #2563eb);
    color: #ffffff;
    font-weight: 900;
    box-shadow: 0 12px 30px rgba(34, 211, 238, 0.28);
}

.brand-icon.small {
    width: 28px;
    height: 28px;
    border-radius: 10px;
}

.brand-text {
    font-size: 22px;
    font-weight: 850;
    letter-spacing: -0.04em;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.main-nav a {
    color: #cbd5e1;
    font-size: 14px;
    white-space: nowrap;
    transition: color 0.25s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: #ffffff;
}

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

.header-search input,
.big-search input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: #ffffff;
    background: transparent;
}

.header-search input {
    padding: 10px 4px 10px 16px;
}

.header-search button,
.big-search button {
    border: 0;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--cyan-dark));
    cursor: pointer;
    font-weight: 700;
}

.header-search button {
    padding: 10px 16px;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.8);
    cursor: pointer;
}

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

.mobile-panel {
    display: none;
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
}

.mobile-panel a {
    display: block;
    padding: 12px;
    color: #cbd5e1;
    border-radius: 12px;
}

.mobile-panel a:hover {
    color: #ffffff;
    background: rgba(34, 211, 238, 0.1);
}

.hero-slider {
    position: relative;
    height: 70vh;
    min-height: 560px;
    overflow: hidden;
    background: #020617;
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
    transition: transform 6s ease;
}

.hero-slide.is-active img {
    transform: scale(1.08);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.76) 28%, rgba(2, 6, 23, 0.22) 64%, rgba(2, 6, 23, 0.64) 100%);
}

.hero-content {
    position: absolute;
    left: max(32px, calc((100vw - var(--max)) / 2));
    bottom: 78px;
    width: min(720px, calc(100% - 64px));
}

.hero-kicker,
.detail-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    padding: 8px 13px;
    border: 1px solid rgba(34, 211, 238, 0.35);
    border-radius: 999px;
    color: #a5f3fc;
    background: rgba(8, 145, 178, 0.17);
    font-size: 13px;
    font-weight: 750;
}

.hero-content h2 {
    margin: 0;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 0.98;
    letter-spacing: -0.07em;
    text-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}

.hero-content p {
    margin: 18px 0 0;
    max-width: 640px;
    color: #d1d5db;
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.7;
}

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

.hero-meta span,
.detail-meta span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 12px;
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.16);
    font-size: 13px;
}

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

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--cyan-dark));
    box-shadow: 0 16px 38px rgba(34, 211, 238, 0.28);
}

.ghost-button {
    color: #f8fafc;
    background: rgba(15, 23, 42, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

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

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.62);
    cursor: pointer;
    font-size: 40px;
    line-height: 1;
    transition: background 0.25s ease, transform 0.25s ease;
}

.hero-arrow:hover {
    background: rgba(2, 6, 23, 0.88);
    transform: translateY(-1px);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dots button {
    width: 11px;
    height: 11px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.52);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.is-active {
    width: 34px;
    background: var(--cyan);
}

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

main {
    padding-bottom: 42px;
}

.panel,
.content-section,
.ranking-panel,
.ranking-side {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.78);
    box-shadow: var(--shadow);
}

.home-intro {
    margin-top: -38px;
    position: relative;
    z-index: 10;
    padding: 28px;
}

.home-intro h1,
.page-hero h1 {
    margin: 0;
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.12;
    letter-spacing: -0.05em;
}

.home-intro p,
.page-hero p {
    margin: 12px 0 0;
    color: var(--muted-strong);
    line-height: 1.75;
}

.big-search {
    display: flex;
    gap: 0;
    max-width: 720px;
    margin-top: 22px;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.58);
    overflow: hidden;
}

.big-search input {
    padding: 17px 22px;
}

.big-search button {
    padding: 0 30px;
}

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

.category-chips a {
    padding: 9px 14px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.72);
    transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.category-chips a:hover {
    color: #ffffff;
    border-color: rgba(34, 211, 238, 0.48);
    background: rgba(34, 211, 238, 0.12);
}

.category-chips.vertical {
    display: grid;
    margin-top: 12px;
}

.content-section,
.ranking-panel,
.ranking-side {
    padding: 24px;
    margin-top: 34px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-bottom: 22px;
}

.section-head h2,
.ranking-panel h2,
.ranking-side h2,
.detail-text h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    letter-spacing: -0.04em;
}

.section-head a {
    color: var(--cyan);
    font-weight: 750;
    white-space: nowrap;
}

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

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

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

.card-link {
    display: block;
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.13);
    border-radius: 16px;
    background: rgba(30, 41, 59, 0.82);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.card-link:hover {
    transform: translateY(-5px) scale(1.015);
    border-color: rgba(34, 211, 238, 0.32);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.38);
}

.poster-frame {
    position: relative;
    display: block;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: radial-gradient(circle at top, rgba(34, 211, 238, 0.24), rgba(15, 23, 42, 0.88) 58%);
}

.movie-card.wide .poster-frame {
    aspect-ratio: 16 / 10;
}

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

.card-link:hover .poster-frame img {
    transform: scale(1.1);
}

.poster-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.06) 62%);
    opacity: 0.74;
}

.play-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(34, 211, 238, 0.86);
    transform: translate(-50%, -50%) scale(0.72);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-body {
    display: grid;
    gap: 7px;
    padding: 13px;
}

.card-body strong {
    color: #ffffff;
    font-size: 15px;
    line-height: 1.38;
}

.card-line,
.card-desc {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.card-desc {
    color: #cbd5e1;
}

.split-section {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 28px;
    align-items: start;
}

.split-section .content-section,
.split-section .ranking-panel {
    margin-top: 34px;
}

.ranking-list {
    display: grid;
    gap: 10px;
}

.ranking-list.large {
    gap: 12px;
}

.ranking-item {
    display: grid;
    grid-template-columns: 48px 1fr 28px;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.42);
    transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
}

.ranking-item:hover {
    transform: translateX(4px);
    border-color: rgba(34, 211, 238, 0.35);
    background: rgba(34, 211, 238, 0.08);
}

.rank-number {
    display: grid;
    place-items: center;
    height: 42px;
    border-radius: 13px;
    color: #cffafe;
    background: rgba(34, 211, 238, 0.14);
    font-weight: 900;
}

.ranking-item strong {
    display: block;
    color: #ffffff;
    line-height: 1.35;
}

.ranking-item em {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.ranking-item b {
    color: var(--cyan);
}

.page-shell,
.detail-shell {
    padding-top: 28px;
}

.page-hero {
    padding: 32px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 8px 0 20px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: #cffafe;
}

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

.category-card a {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 18px;
    min-height: 150px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card a:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 211, 238, 0.34);
}

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

.category-thumbs img {
    width: 100%;
    height: 118px;
    object-fit: cover;
    border-radius: 14px;
    background: rgba(34, 211, 238, 0.1);
}

.category-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}

.category-copy strong {
    font-size: 26px;
    letter-spacing: -0.04em;
}

.category-copy em {
    color: var(--muted-strong);
    font-style: normal;
    line-height: 1.7;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 150px 150px;
    gap: 12px;
    margin-top: 24px;
}

.filter-bar.wide {
    grid-template-columns: minmax(220px, 1.5fr) repeat(4, minmax(120px, 1fr));
}

.filter-bar input,
.filter-bar select {
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid rgba(148, 163, 184, 0.17);
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.56);
}

.filter-bar select option {
    color: #0f172a;
}

[data-card].is-hidden {
    display: none;
}

.ranking-page-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    margin-top: 30px;
}

.player-section {
    margin-bottom: 26px;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.22);
    border-radius: 24px;
    background: #000000;
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.48);
    aspect-ratio: 16 / 9;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle at center, rgba(8, 145, 178, 0.28), rgba(2, 6, 23, 0.76) 62%);
    cursor: pointer;
}

.player-frame.is-playing .player-cover {
    opacity: 0;
    pointer-events: none;
}

.player-pulse {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--cyan-dark));
    box-shadow: 0 0 0 12px rgba(34, 211, 238, 0.12), 0 20px 50px rgba(34, 211, 238, 0.2);
    font-size: 32px;
}

.player-cover strong {
    font-size: 20px;
}

.detail-hero {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 28px;
    padding: 26px;
}

.detail-poster {
    overflow: hidden;
    border-radius: 18px;
    background: radial-gradient(circle at top, rgba(34, 211, 238, 0.22), rgba(15, 23, 42, 0.95));
}

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

.detail-info h1 {
    margin: 0;
    font-size: clamp(30px, 5vw, 52px);
    line-height: 1.12;
    letter-spacing: -0.06em;
}

.one-line {
    margin: 16px 0 0;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.75;
}

.detail-meta,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 18px;
}

.detail-text {
    padding: 28px;
    margin-top: 28px;
}

.detail-text h2 + p {
    margin-top: 12px;
}

.detail-text p {
    color: var(--muted-strong);
    line-height: 1.92;
    font-size: 16px;
}

.site-footer {
    width: min(var(--max), calc(100% - 32px));
    margin: 58px auto 0;
    padding: 32px 0 26px;
    border-top: 1px solid var(--line);
    color: var(--muted);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 28px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-size: 18px;
}

.site-footer p {
    line-height: 1.7;
}

.site-footer h3 {
    margin: 0 0 12px;
    color: #ffffff;
}

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

.site-footer a:hover {
    color: var(--cyan);
}

.footer-bottom {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    text-align: center;
    font-size: 13px;
}

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

    .header-search {
        margin-left: auto;
    }

    .menu-toggle {
        display: block;
    }

    .mobile-panel.is-open {
        display: grid;
    }

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

    .split-section,
    .ranking-page-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 760px) {
    .header-inner {
        width: min(100% - 22px, var(--max));
        gap: 12px;
    }

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

    .header-search {
        display: none;
    }

    .hero-slider {
        height: 74vh;
        min-height: 520px;
    }

    .hero-content {
        left: 18px;
        bottom: 72px;
        width: calc(100% - 36px);
    }

    .hero-arrow {
        display: none;
    }

    .home-intro,
    .page-hero,
    .content-section,
    .ranking-panel,
    .ranking-side,
    .detail-text {
        padding: 20px;
    }

    .big-search {
        display: grid;
        border-radius: 18px;
    }

    .big-search button {
        min-height: 46px;
    }

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

    .category-card a,
    .detail-hero {
        grid-template-columns: 1fr;
    }

    .filter-bar,
    .filter-bar.wide {
        grid-template-columns: 1fr;
    }

    .detail-poster img {
        min-height: 420px;
    }

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

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

    .detail-poster img {
        min-height: 300px;
    }

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

    .ranking-item b {
        display: none;
    }
}
