:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(148, 163, 184, 0.18);
    --text: #e2e8f0;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --cyan: #22d3ee;
    --blue: #38bdf8;
    --amber: #fbbf24;
    --violet: #a78bfa;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
    --radius: 24px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at 10% 0%, rgba(34, 211, 238, 0.16), transparent 34rem),
        radial-gradient(circle at 90% 8%, rgba(167, 139, 250, 0.16), transparent 30rem),
        var(--bg);
    color: var(--text);
    min-height: 100vh;
}

body.menu-open {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.header-inner {
    max-width: 1440px;
    margin: 0 auto;
    min-height: 72px;
    padding: 0 28px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: -0.03em;
    white-space: nowrap;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #082f49;
    background: linear-gradient(135deg, var(--cyan), var(--amber));
    box-shadow: 0 12px 30px rgba(34, 211, 238, 0.24);
}

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

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link,
.mobile-link {
    color: var(--soft);
    padding: 10px 14px;
    border-radius: 999px;
    transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: white;
    background: rgba(34, 211, 238, 0.12);
}

.quick-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px;
}

.quick-search input,
.hero-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select,
.search-toolbar input {
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.quick-search input {
    width: 230px;
    padding: 8px 12px;
}

.quick-search button,
.hero-search button,
.mobile-search button,
.search-toolbar button {
    border: 0;
    border-radius: 999px;
    color: #062b35;
    font-weight: 800;
    padding: 9px 16px;
    background: linear-gradient(135deg, var(--cyan), var(--amber));
}

.mobile-toggle {
    display: none;
    margin-left: auto;
    border: 1px solid var(--line);
    color: white;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 14px;
    width: 42px;
    height: 42px;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    padding: 18px 24px 24px;
    background: rgba(2, 6, 23, 0.96);
}

.mobile-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    margin-top: 14px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 18px;
}

.mobile-search input {
    padding: 10px;
}

.hero-carousel {
    position: relative;
    min-height: clamp(620px, 86vh, 840px);
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

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

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

.hero-bg,
.hero-overlay {
    position: absolute;
    inset: 0;
}

.hero-bg {
    background-position: center;
    background-size: cover;
    filter: blur(16px) saturate(1.25);
    transform: scale(1.08);
    opacity: 0.48;
}

.hero-overlay {
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.88)),
        radial-gradient(circle at 76% 26%, rgba(34, 211, 238, 0.28), transparent 30rem);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1440px;
    margin: 0 auto;
    min-height: clamp(620px, 86vh, 840px);
    padding: 116px 28px 88px;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 420px);
    gap: clamp(32px, 6vw, 88px);
    align-items: center;
}

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

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--cyan);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 16px 0;
    color: white;
    font-size: clamp(42px, 7vw, 88px);
    line-height: 0.96;
    letter-spacing: -0.06em;
}

.hero-text,
.page-hero p,
.detail-one-line {
    color: var(--soft);
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.8;
}

.hero-tags,
.detail-meta,
.tag-row,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags,
.detail-meta,
.detail-tags {
    margin-top: 22px;
}

.hero-tags span,
.detail-meta span,
.tag-row span {
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.68);
    border: 1px solid rgba(125, 211, 252, 0.24);
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 13px;
}

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

.primary-btn,
.ghost-btn,
.section-more,
.panel-link,
.watch-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 900;
    transition: 0.2s ease;
}

.primary-btn {
    color: #062b35;
    background: linear-gradient(135deg, var(--cyan), var(--amber));
    box-shadow: 0 18px 42px rgba(34, 211, 238, 0.25);
    padding: 13px 22px;
}

.primary-btn.small {
    padding: 10px 16px;
}

.ghost-btn,
.section-more,
.panel-link {
    color: white;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--line);
    padding: 12px 19px;
}

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

.hero-search,
.search-toolbar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    margin-top: 32px;
    padding: 8px;
    max-width: 620px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--line);
    border-radius: 999px;
}

.hero-search input,
.search-toolbar input {
    padding: 13px 18px;
}

.hero-search button,
.search-toolbar button {
    padding: 13px 20px;
}

.hero-poster {
    position: relative;
    border-radius: 32px;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.18);
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

.hero-poster::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(2, 6, 23, 0.75));
    z-index: 1;
}

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

.hero-control {
    position: absolute;
    z-index: 4;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: white;
    background: rgba(15, 23, 42, 0.68);
    font-size: 34px;
    line-height: 1;
}

.hero-control.prev {
    left: 24px;
}

.hero-control.next {
    right: 24px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.32);
    transition: 0.2s ease;
}

.hero-dot.active {
    width: 34px;
    background: linear-gradient(135deg, var(--cyan), var(--amber));
}

.content-section,
.page-main {
    max-width: 1440px;
    margin: 0 auto;
    padding: 68px 28px;
}

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

.content-section.no-top {
    padding-top: 0;
}

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

.section-heading h2,
.rank-panel h2,
.story-card h2 {
    margin: 8px 0 0;
    color: white;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.section-heading p {
    margin: 10px 0 0;
    color: var(--muted);
    max-width: 720px;
    line-height: 1.8;
}

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

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

.movie-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.42);
    background: rgba(15, 23, 42, 0.92);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9));
}

.poster-link img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.25s ease;
}

.movie-card.compact .poster-link img {
    aspect-ratio: 2 / 2.7;
}

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

.poster-glow {
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.78));
}

.poster-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    color: #062b35;
    background: linear-gradient(135deg, var(--cyan), var(--amber));
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 900;
}

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

.card-meta {
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 10px;
}

.card-meta span:not(:last-child)::after {
    content: "·";
    margin-left: 8px;
    color: rgba(148, 163, 184, 0.54);
}

.movie-card h3 {
    margin: 0;
    color: white;
    font-size: 20px;
    line-height: 1.35;
}

.movie-card.compact h3 {
    font-size: 18px;
}

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

.card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
}

.card-category {
    color: var(--cyan);
    font-size: 13px;
    font-weight: 800;
}

.watch-link {
    color: white;
    background: rgba(34, 211, 238, 0.12);
    border: 1px solid rgba(34, 211, 238, 0.18);
    padding: 8px 12px;
    font-size: 13px;
}

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

.category-card {
    position: relative;
    min-height: 230px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    overflow: hidden;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    padding: 20px;
    box-shadow: var(--shadow);
}

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

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

.category-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.14), rgba(2, 6, 23, 0.92));
}

.category-card strong,
.category-card em {
    position: relative;
    z-index: 1;
}

.category-card strong {
    color: white;
    font-size: 24px;
}

.category-card em {
    margin-top: 10px;
    color: var(--soft);
    font-style: normal;
    line-height: 1.7;
}

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

.rank-panel,
.story-card,
.page-hero,
.detail-hero,
.player-shell,
.category-wide-card,
.rank-table {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.24);
}

.rank-panel {
    position: sticky;
    top: 96px;
    padding: 24px;
}

.rank-list {
    display: grid;
    gap: 10px;
    margin: 22px 0;
}

.rank-item,
.rank-row {
    display: grid;
    gap: 6px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.62);
    border: 1px solid rgba(148, 163, 184, 0.12);
    transition: 0.2s ease;
}

.rank-item:hover,
.rank-row:hover {
    border-color: rgba(34, 211, 238, 0.34);
    transform: translateX(4px);
}

.rank-number {
    color: var(--amber);
    font-weight: 900;
}

.rank-title,
.rank-row strong {
    color: white;
    font-weight: 850;
}

.rank-meta,
.rank-row em {
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    color: var(--muted);
    margin: 6px 0 24px;
}

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

.breadcrumb em {
    color: rgba(148, 163, 184, 0.4);
    font-style: normal;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(36px, 6vw, 68px);
    margin-bottom: 34px;
    background:
        radial-gradient(circle at 84% 16%, rgba(34, 211, 238, 0.2), transparent 26rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.72));
}

.page-hero h1 {
    font-size: clamp(38px, 6vw, 68px);
}

.compact-hero {
    min-height: 280px;
}

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

.filter-bar input,
.filter-bar select {
    width: 100%;
    color: var(--text);
    background: rgba(2, 6, 23, 0.52);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 13px 14px;
}

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

.category-wide-card {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 26px;
    padding: 22px;
}

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

.category-wide-cover img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 16px;
    background: var(--bg-soft);
}

.category-wide-card h2 {
    margin: 8px 0 12px;
    color: white;
    font-size: 32px;
}

.category-wide-card p {
    color: var(--soft);
    line-height: 1.8;
    margin: 0 0 22px;
}

.rank-table {
    display: grid;
    gap: 8px;
    padding: 16px;
}

.rank-row {
    grid-template-columns: 64px minmax(160px, 1fr) minmax(220px, 0.8fr);
    align-items: center;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(250px, 360px) 1fr;
    gap: clamp(24px, 5vw, 54px);
    align-items: center;
    padding: clamp(24px, 5vw, 48px);
    background:
        radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.18), transparent 26rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.74));
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: var(--bg-soft);
}

.detail-copy h1 {
    font-size: clamp(38px, 6vw, 72px);
}

.player-section {
    margin-top: 34px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    background: #000;
}

.movie-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    object-fit: contain;
}

.play-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    gap: 16px;
    align-content: center;
    border: 0;
    color: white;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.42), rgba(2, 6, 23, 0.86));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-large {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #062b35;
    background: linear-gradient(135deg, var(--cyan), var(--amber));
    box-shadow: 0 24px 54px rgba(34, 211, 238, 0.28);
    font-size: 34px;
    padding-left: 5px;
}

.play-cover strong {
    font-size: clamp(22px, 4vw, 38px);
}

.detail-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin-top: 34px;
}

.story-card {
    padding: 28px;
}

.story-card p {
    color: var(--soft);
    line-height: 2;
    margin: 16px 0 0;
}

.search-page .movie-grid:empty::after,
.category-movies:empty::after {
    content: "暂无匹配内容";
    color: var(--muted);
    padding: 40px;
    grid-column: 1 / -1;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

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

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

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

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

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

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

    .rank-panel {
        position: static;
    }
}

@media (max-width: 920px) {
    .desktop-nav,
    .quick-search {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

    body.menu-open .mobile-panel {
        display: grid;
    }

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

    .hero-poster {
        max-width: 360px;
        margin: 0 auto;
        transform: none;
    }

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

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

    .rank-row {
        grid-template-columns: 52px 1fr;
    }

    .rank-row em {
        grid-column: 2;
    }
}

@media (max-width: 640px) {
    .header-inner,
    .content-section,
    .page-main,
    .footer-inner {
        padding-left: 18px;
        padding-right: 18px;
    }

    .hero-content {
        padding: 96px 18px 84px;
    }

    .hero-search,
    .search-toolbar {
        grid-template-columns: 1fr;
        border-radius: 22px;
    }

    .hero-control {
        display: none;
    }

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

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

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

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