:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.76);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(148, 163, 184, 0.18);
    --muted: #94a3b8;
    --text: #f8fafc;
    --cyan: #22d3ee;
    --cyan-soft: rgba(34, 211, 238, 0.18);
    --violet: #8b5cf6;
    --radius: 24px;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 18% 0%, rgba(34, 211, 238, 0.16), transparent 34rem),
        radial-gradient(circle at 80% 16%, rgba(139, 92, 246, 0.18), transparent 35rem),
        linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(2, 6, 23, 0.86);
    backdrop-filter: blur(18px);
}

.nav-wrap {
    max-width: 1280px;
    height: 72px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 22px;
}

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

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

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

.desktop-nav a,
.mobile-panel a,
.footer-links a {
    color: #cbd5e1;
    font-size: 14px;
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover,
.footer-links a:hover {
    color: var(--cyan);
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 300px;
}

.nav-search input,
.mobile-panel input,
.search-page-form input,
.local-filter {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.82);
    padding: 11px 16px;
    outline: none;
}

.nav-search input:focus,
.mobile-panel input:focus,
.search-page-form input:focus,
.local-filter:focus {
    border-color: rgba(34, 211, 238, 0.72);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.08);
}

.nav-search button,
.mobile-panel button,
.search-page-form button,
.filter-bar button,
.primary-btn,
.ghost-btn {
    border: 0;
    border-radius: 999px;
    padding: 11px 18px;
    color: white;
    background: linear-gradient(135deg, #06b6d4, #8b5cf6);
    cursor: pointer;
    box-shadow: 0 14px 34px rgba(14, 165, 233, 0.2);
    transition: transform 0.2s ease, opacity 0.2s ease, border-color 0.2s ease;
}

.nav-search button:hover,
.mobile-panel button:hover,
.search-page-form button:hover,
.filter-bar button:hover,
.primary-btn:hover,
.ghost-btn:hover {
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    border: 0;
    background: transparent;
    color: white;
    font-size: 28px;
}

.mobile-panel {
    display: none;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 18px;
    gap: 14px;
    flex-wrap: wrap;
}

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

.mobile-panel form {
    display: flex;
    gap: 10px;
    width: 100%;
}

.hero {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    background: #020617;
}

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

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

.hero-slide img {
    height: 100%;
    object-fit: cover;
    opacity: 0.72;
    transform: scale(1.04);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 43%, rgba(2, 6, 23, 0.18) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0) 48%);
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 13%;
    width: min(1180px, calc(100% - 48px));
    transform: translateX(-50%);
    max-width: 1180px;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 14px;
    padding: 7px 13px;
    border: 1px solid rgba(34, 211, 238, 0.3);
    border-radius: 999px;
    color: var(--cyan);
    background: rgba(34, 211, 238, 0.12);
    font-size: 13px;
    font-weight: 700;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.05em;
    max-width: 820px;
}

.hero p,
.page-hero p,
.detail-info .lead {
    max-width: 760px;
    margin: 18px 0 0;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.8;
}

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

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

.hero-tags span,
.tag-row span,
.detail-meta span,
.card-meta span,
.card-meta a {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #c4f1ff;
    background: rgba(15, 23, 42, 0.74);
    border: 1px solid rgba(148, 163, 184, 0.18);
    font-size: 12px;
}

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

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.ghost-btn {
    background: rgba(15, 23, 42, 0.66);
    border: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow: none;
}

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

.hero-dot {
    width: 36px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.28);
    cursor: pointer;
}

.hero-dot.is-active {
    background: var(--cyan);
}

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

.hero-after {
    padding-top: 42px;
}

.section-heading {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px 24px;
    align-items: end;
    margin-bottom: 28px;
}

.section-heading span {
    color: var(--cyan);
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 12px;
}

.section-heading h2 {
    grid-column: 1;
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    letter-spacing: -0.04em;
}

.section-heading p {
    grid-column: 1;
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

.section-heading a {
    grid-row: 2 / span 2;
    grid-column: 2;
    color: var(--cyan);
    font-weight: 700;
}

.grid {
    display: grid;
    gap: 22px;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 18px 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(-5px);
    border-color: rgba(34, 211, 238, 0.36);
    background: rgba(15, 23, 42, 0.92);
}

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

.poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.84);
}

.poster img,
.category-tile img,
.category-cover img,
.detail-poster img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.movie-card:hover .poster img,
.category-tile:hover img,
.category-panel:hover .category-cover img {
    transform: scale(1.06);
}

.play-chip,
.rank-badge {
    position: absolute;
    z-index: 3;
    border-radius: 999px;
    color: white;
    font-weight: 800;
}

.play-chip {
    right: 12px;
    bottom: 12px;
    padding: 7px 12px;
    background: rgba(34, 211, 238, 0.86);
    font-size: 13px;
}

.rank-badge {
    top: 12px;
    left: 12px;
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #f97316, #ef4444);
    box-shadow: 0 12px 28px rgba(239, 68, 68, 0.28);
}

.card-body {
    padding: 16px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

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

.movie-card h3 a:hover {
    color: var(--cyan);
}

.movie-card p {
    margin: 0 0 14px;
    color: #cbd5e1;
    line-height: 1.7;
    font-size: 14px;
}

.tag-row {
    gap: 6px;
}

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

.category-tile {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    border-radius: var(--radius);
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    isolation: isolate;
    border: 1px solid rgba(148, 163, 184, 0.16);
}

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

.category-tile img {
    position: absolute;
    inset: 0;
    z-index: -2;
}

.category-tile span {
    font-size: 22px;
    font-weight: 900;
}

.category-tile p {
    margin: 8px 0 0;
    color: #cbd5e1;
    font-size: 13px;
    line-height: 1.7;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 380px;
    display: flex;
    align-items: flex-end;
    background:
        linear-gradient(135deg, rgba(14, 116, 144, 0.35), transparent 44%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.8), #020617);
}

.page-hero > div {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
    padding: 90px 0 64px;
}

.slim-hero {
    min-height: 300px;
}

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

.category-panel {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
}

.category-cover {
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

.category-panel span {
    color: var(--cyan);
    font-weight: 800;
}

.category-panel h2 {
    margin: 8px 0 10px;
    font-size: 30px;
}

.category-panel p {
    color: #cbd5e1;
    line-height: 1.8;
}

.category-panel ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0;
    margin: 16px 0 0;
    list-style: none;
}

.category-panel li a {
    display: inline-flex;
    padding: 7px 12px;
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(34, 211, 238, 0.12);
}

.filter-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.filter-bar .local-filter {
    max-width: 320px;
}

.filter-bar button {
    background: rgba(15, 23, 42, 0.84);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: none;
}

.filter-bar button.is-active {
    background: linear-gradient(135deg, #06b6d4, #8b5cf6);
}

.detail-hero {
    min-height: 660px;
    align-items: center;
}

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

.detail-bg {
    height: 100%;
    object-fit: cover;
    opacity: 0.38;
    filter: blur(4px);
    transform: scale(1.04);
}

.detail-overlay {
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.76) 58%, rgba(2, 6, 23, 0.44) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0) 36%);
}

.detail-wrap {
    position: relative;
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
    padding: 110px 0 76px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 28px;
    color: #cbd5e1;
    font-size: 14px;
}

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

.detail-grid {
    display: grid;
    grid-template-columns: minmax(230px, 330px) 1fr;
    gap: 36px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    aspect-ratio: 3 / 4;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-meta {
    margin: 22px 0 0;
}

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

.video-frame {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    aspect-ratio: 16 / 9;
    background: #000;
    box-shadow: var(--shadow);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.movie-video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 14px;
    align-content: center;
    border: 0;
    color: white;
    cursor: pointer;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.72));
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

.player-overlay span {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #06b6d4, #8b5cf6);
    font-size: 34px;
    box-shadow: 0 18px 48px rgba(34, 211, 238, 0.28);
}

.player-overlay strong {
    font-size: 18px;
}

.player-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.article-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    padding-top: 20px;
}

.article-card {
    padding: 28px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
}

.article-card h2 {
    margin: 0 0 18px;
    font-size: 28px;
}

.article-card p {
    margin: 0 0 16px;
    color: #dbeafe;
    line-height: 1.9;
}

.search-page-form {
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
}

.search-results:empty::before {
    content: "输入关键词后显示匹配影片";
    color: var(--muted);
    padding: 28px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.62);
}

.site-footer {
    max-width: 1280px;
    margin: 0 auto;
    padding: 44px 24px 60px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    display: flex;
    justify-content: space-between;
    gap: 24px;
    color: var(--muted);
}

.footer-brand {
    color: white;
}

.site-footer p {
    margin: 14px 0 0;
    max-width: 620px;
    line-height: 1.8;
}

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

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

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

    .menu-toggle {
        display: block;
    }

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

@media (max-width: 780px) {
    .nav-wrap {
        height: auto;
        min-height: 68px;
        padding: 12px 18px;
    }

    .nav-search {
        display: none;
    }

    .hero {
        min-height: 76vh;
    }

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

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

    .hero p,
    .page-hero p,
    .detail-info .lead {
        font-size: 16px;
    }

    .section,
    .page-hero > div,
    .detail-wrap {
        padding-left: 18px;
        padding-right: 18px;
        width: 100%;
    }

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

    .section-heading a {
        grid-row: auto;
        grid-column: auto;
    }

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

    .category-panel,
    .detail-grid,
    .article-section {
        grid-template-columns: 1fr;
    }

    .category-cover {
        aspect-ratio: 16 / 9;
    }

    .detail-hero {
        min-height: auto;
    }

    .detail-wrap {
        padding-top: 86px;
    }

    .detail-poster {
        max-width: 270px;
    }

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

@media (max-width: 520px) {
    .movie-grid,
    .four-grid,
    .rank-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions,
    .search-page-form,
    .mobile-panel form {
        flex-direction: column;
    }

    .search-page-form button,
    .mobile-panel button {
        width: 100%;
    }
}
