* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-solid: #0f172a;
    --panel-soft: rgba(30, 41, 59, 0.62);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --cyan: #22d3ee;
    --blue: #2563eb;
    --orange: #fb923c;
    --green: #4ade80;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 10% 0%, rgba(34, 211, 238, 0.12), transparent 34rem),
        radial-gradient(circle at 90% 10%, rgba(37, 99, 235, 0.14), transparent 32rem),
        var(--bg);
    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;
    max-width: 100%;
}

img.image-missing {
    visibility: hidden;
}

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(2, 6, 23, 0.92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.24);
}

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

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

.brand-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: #031018;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    border-radius: 12px;
    box-shadow: 0 0 28px rgba(34, 211, 238, 0.35);
}

.brand-text,
.footer-brand {
    font-size: 24px;
    background: linear-gradient(90deg, var(--cyan), #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-left: auto;
}

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

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

.header-search {
    position: relative;
    width: 260px;
}

.header-search input,
.mobile-search input,
.intro-search input,
.page-filter input {
    width: 100%;
    color: var(--text);
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(100, 116, 139, 0.5);
    border-radius: 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    height: 42px;
    padding: 0 14px 0 38px;
}

.search-mark {
    position: absolute;
    left: 14px;
    top: 50%;
    color: var(--muted);
    transform: translateY(-50%);
}

.header-search input:focus,
.mobile-search input:focus,
.intro-search input:focus,
.page-filter input:focus {
    border-color: rgba(34, 211, 238, 0.85);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    color: var(--text);
    background: transparent;
    border: 0;
    font-size: 28px;
}

.mobile-panel {
    display: none;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

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

.mobile-search input {
    height: 44px;
    padding: 0 14px;
}

.mobile-nav {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.hero {
    position: relative;
    height: min(76vh, 720px);
    min-height: 520px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background: #020617;
}

.hero-track,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    display: grid;
    align-items: center;
    opacity: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.02);
    transition: opacity 0.6s ease, transform 0.9s ease;
}

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

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(0deg, rgba(2, 6, 23, 1) 0%, transparent 38%),
        radial-gradient(circle at 70% 40%, rgba(34, 211, 238, 0.12), transparent 22rem);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    max-width: 720px;
    margin-left: max(16px, calc((100vw - 1240px) / 2));
}

.hero-labels,
.card-meta,
.detail-meta,
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.hero-labels span,
.hero-labels a,
.rank-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 12px;
    color: var(--cyan);
    background: rgba(8, 145, 178, 0.22);
    border: 1px solid rgba(34, 211, 238, 0.42);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.hero h1 {
    margin: 22px 0 18px;
    max-width: 760px;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 660px;
    margin: 0 0 26px;
    color: #dbeafe;
    font-size: clamp(17px, 2.2vw, 21px);
    line-height: 1.75;
}

.hero-tags,
.tag-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.hero-tags span,
.tag-row span {
    color: #a5f3fc;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary,
.intro-search button,
.search-page-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    border-radius: 14px;
    border: 0;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary,
.intro-search button,
.search-page-form button {
    color: #ffffff;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.32);
}

.btn-secondary {
    color: #e0f2fe;
    background: rgba(15, 23, 42, 0.70);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.btn-primary:hover,
.btn-secondary:hover,
.intro-search button:hover,
.search-page-form button:hover {
    transform: translateY(-2px);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 44px;
    height: 44px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.44);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 999px;
    font-size: 34px;
    line-height: 1;
    transform: translateY(-50%);
}

.hero-control:hover {
    background: rgba(0, 0, 0, 0.66);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

.hero-dots {
    position: absolute;
    right: 40px;
    bottom: 40px;
    z-index: 4;
    display: flex;
    gap: 8px;
}

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

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

.page-main,
.detail-main,
.content-section,
.intro-panel,
.category-overview-grid,
.detail-content {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.content-section,
.intro-panel,
.category-overview-grid,
.detail-content {
    margin-top: 64px;
}

.intro-panel,
.page-hero,
.story-panel,
.category-overview-card {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.56));
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.intro-panel {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 28px;
    align-items: center;
    padding: 34px;
}

.intro-copy span,
.section-heading span,
.page-hero span {
    color: var(--cyan);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.intro-copy h2,
.section-heading h2,
.page-hero h1,
.story-panel h2 {
    margin: 8px 0 0;
    font-size: clamp(26px, 3.8vw, 42px);
    letter-spacing: -0.04em;
}

.intro-copy p,
.page-hero p,
.story-panel p,
.category-overview-card p {
    color: var(--soft);
    line-height: 1.8;
}

.intro-search,
.search-page-form {
    display: flex;
    gap: 12px;
}

.intro-search input,
.page-filter input {
    height: 52px;
    padding: 0 16px;
}

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

.section-heading a {
    color: var(--cyan);
    font-weight: 800;
}

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

.movie-card {
    overflow: hidden;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.20);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 211, 238, 0.45);
    box-shadow: 0 24px 80px rgba(8, 145, 178, 0.16);
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background:
        radial-gradient(circle at 20% 10%, rgba(34, 211, 238, 0.28), transparent 55%),
        linear-gradient(135deg, #0f172a, #111827);
}

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

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

.play-chip {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 6px 10px;
    color: #031018;
    background: var(--cyan);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    color: #031018;
    background: linear-gradient(135deg, #facc15, #fb923c);
    border: 0;
}

.card-body {
    padding: 18px;
}

.card-meta,
.detail-meta,
.breadcrumbs {
    color: var(--muted);
    font-size: 13px;
}

.card-body h3 {
    margin: 10px 0 8px;
    color: var(--text);
    font-size: 18px;
    line-height: 1.35;
}

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

.card-body p {
    min-height: 46px;
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.movie-card-horizontal {
    display: grid;
    grid-template-columns: 220px 1fr;
}

.movie-card-horizontal .poster {
    aspect-ratio: auto;
    height: 100%;
    min-height: 150px;
}

.movie-card-horizontal .card-body p {
    min-height: 0;
}

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

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

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

.category-tile {
    position: relative;
    min-height: 150px;
    padding: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: end;
    background-size: cover;
    background-position: center;
    border: 1px solid var(--line);
    border-radius: 24px;
}

.category-tile::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.22));
}

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

.category-tile span {
    margin-bottom: 8px;
    color: var(--text);
    font-size: 22px;
    font-weight: 900;
}

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

.page-hero {
    margin-top: 38px;
    padding: 42px;
}

.compact-hero {
    background:
        radial-gradient(circle at 90% 10%, rgba(34, 211, 238, 0.14), transparent 24rem),
        linear-gradient(145deg, rgba(15, 23, 42, 0.90), rgba(15, 23, 42, 0.58));
}

.page-filter {
    max-width: 620px;
    margin-top: 24px;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
    padding: 18px;
}

.category-cover {
    min-height: 190px;
    background-size: cover;
    background-position: center;
    border-radius: 20px;
}

.category-overview-card h2 {
    margin: 8px 0 10px;
    font-size: 28px;
}

.category-overview-card h2 a:hover {
    color: var(--cyan);
}

.mini-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.mini-links a {
    color: var(--cyan);
    background: rgba(8, 145, 178, 0.14);
    border: 1px solid rgba(34, 211, 238, 0.22);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
}

.detail-hero {
    padding: 34px 0 28px;
    background:
        radial-gradient(circle at 80% 0%, rgba(34, 211, 238, 0.12), transparent 28rem),
        linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0));
}

.breadcrumbs {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto 24px;
}

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

.detail-grid {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 38px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: var(--panel-solid);
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.detail-copy h1 {
    margin: 18px 0 14px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.detail-one-line {
    max-width: 780px;
    color: var(--soft);
    font-size: 18px;
    line-height: 1.8;
}

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

.detail-tags {
    margin-bottom: 26px;
}

.player-section {
    width: min(1240px, calc(100% - 32px));
    margin: 28px auto 0;
}

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

.main-video {
    width: 100%;
    height: 100%;
    background: #000000;
}

.play-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    gap: 14px;
    color: #ffffff;
    background:
        radial-gradient(circle at center, rgba(34, 211, 238, 0.18), transparent 20rem),
        rgba(2, 6, 23, 0.48);
    border: 0;
    text-align: center;
}

.play-cover.is-hidden {
    display: none;
}

.play-cover span {
    display: grid;
    width: 78px;
    height: 78px;
    place-items: center;
    color: #031018;
    background: linear-gradient(135deg, var(--cyan), #60a5fa);
    border-radius: 999px;
    font-size: 34px;
    box-shadow: 0 0 45px rgba(34, 211, 238, 0.42);
}

.play-cover strong {
    max-width: min(720px, 80%);
    font-size: clamp(22px, 4vw, 38px);
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.story-panel {
    padding: 28px;
}

.story-panel h2 {
    font-size: 26px;
    margin-bottom: 12px;
}

.related-section {
    padding-bottom: 64px;
}

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

.footer-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

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

.footer-inner p {
    width: 100%;
    margin: 4px 0 0;
    color: var(--muted);
}

[data-search-results]:empty::before {
    content: "输入关键词后显示相关影片";
    color: var(--muted);
}

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

    .menu-toggle {
        display: block;
    }

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

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

    .rank-list,
    .detail-content,
    .intro-panel {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .header-inner,
    .page-main,
    .detail-main,
    .content-section,
    .intro-panel,
    .category-overview-grid,
    .detail-content,
    .player-section,
    .breadcrumbs,
    .detail-grid,
    .footer-inner {
        width: min(100% - 24px, 1240px);
    }

    .hero {
        min-height: 620px;
    }

    .hero-content {
        width: min(100% - 24px, 1240px);
        margin-left: 12px;
    }

    .hero-control {
        display: none;
    }

    .hero-dots {
        right: 18px;
        bottom: 22px;
    }

    .movie-grid,
    .category-grid,
    .rank-list,
    .category-overview-card,
    .detail-grid,
    .movie-card-horizontal {
        grid-template-columns: 1fr;
    }

    .category-overview-card {
        padding: 14px;
    }

    .detail-poster {
        max-width: 360px;
        margin: 0 auto;
    }

    .intro-panel,
    .page-hero,
    .story-panel {
        padding: 24px;
    }

    .intro-search,
    .search-page-form {
        flex-direction: column;
    }

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

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }
}
