:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-solid: #111827;
    --panel-light: rgba(30, 41, 59, 0.82);
    --border: rgba(148, 163, 184, 0.16);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --accent: #2dd4bf;
    --accent-dark: #0f766e;
    --accent-soft: rgba(45, 212, 191, 0.14);
    --danger: #f97316;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
    --radius: 18px;
    --max: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 0%, rgba(20, 184, 166, 0.18), transparent 36rem),
        radial-gradient(circle at 80% 12%, rgba(59, 130, 246, 0.12), transparent 34rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    backdrop-filter: blur(14px);
}

.nav-shell {
    width: min(100% - 32px, var(--max));
    height: 66px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 22px;
}

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

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

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    color: #06201e;
    background: linear-gradient(135deg, #5eead4, #14b8a6);
    border-radius: 12px;
    box-shadow: 0 10px 34px rgba(20, 184, 166, 0.35);
    font-size: 13px;
}

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

.nav-link,
.mobile-link {
    color: var(--muted-strong);
    font-weight: 650;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: var(--accent);
}

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

.nav-search input,
.mobile-search input,
.hero-search input,
.card-search {
    width: 100%;
    color: var(--text);
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid var(--border);
    border-radius: 999px;
    outline: none;
}

.nav-search input,
.mobile-search input {
    height: 38px;
    padding: 0 16px;
}

.nav-search button,
.mobile-search button,
.hero-search button {
    border: 0;
    color: #06201e;
    background: var(--accent);
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
}

.nav-search button,
.mobile-search button {
    height: 38px;
    padding: 0 16px;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    margin-left: auto;
    border: 0;
    background: transparent;
    color: var(--text);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 5px auto;
    background: var(--text);
    border-radius: 2px;
}

.mobile-panel {
    display: none;
    padding: 10px 20px 18px;
    background: rgba(15, 23, 42, 0.98);
    border-top: 1px solid var(--border);
}

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

.mobile-search {
    display: flex;
    gap: 8px;
}

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

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    filter: saturate(1.05) contrast(1.08);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 38%, rgba(2, 6, 23, 0.14) 72%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.95), transparent 46%);
}

.hero-content {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 50%;
    width: min(100% - 32px, var(--max));
    transform: translate(-50%, -45%);
    max-width: var(--max);
}

.hero-content h1,
.hero-content h2 {
    max-width: 720px;
    margin: 12px 0 18px;
    font-size: clamp(42px, 6vw, 76px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 640px;
    margin: 0 0 22px;
    color: var(--muted-strong);
    font-size: clamp(17px, 2vw, 21px);
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: max-content;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid rgba(45, 212, 191, 0.2);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 800;
}

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

.hero-tags span,
.detail-tags span,
.tag-row span {
    color: var(--muted-strong);
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 13px;
}

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

.primary-button,
.ghost-button,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 12px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button {
    color: #06201e;
    background: var(--accent);
    box-shadow: 0 14px 34px rgba(45, 212, 191, 0.24);
}

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

.ghost-button,
.section-more {
    color: var(--text);
    background: rgba(15, 23, 42, 0.74);
    border: 1px solid var(--border);
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 32px;
    z-index: 3;
    display: flex;
    gap: 10px;
    width: min(100% - 32px, var(--max));
    transform: translateX(-50%);
}

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

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

.home-search-wrap {
    position: relative;
    z-index: 5;
    width: min(100% - 32px, var(--max));
    margin: -36px auto 0;
}

.hero-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 18px;
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.hero-search input {
    min-height: 52px;
    padding: 0 18px;
    font-size: 16px;
}

.hero-search button {
    min-height: 52px;
    padding: 0 24px;
}

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

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

.section-block,
.split-section,
.search-panel,
.page-hero,
.detail-layout,
.related-block {
    margin: 54px 0;
}

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

.section-head h2,
.search-panel h2,
.page-hero h1,
.detail-copy h1,
.detail-copy h2,
.side-card h2,
.poster-panel h2,
.footer-grid h2 {
    margin: 8px 0 0;
    line-height: 1.18;
}

.section-head h2 {
    font-size: clamp(28px, 3vw, 42px);
}

.compact-head h2 {
    font-size: 30px;
}

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

.category-tile,
.category-overview-card,
.notice-panel,
.ranking-panel,
.search-panel,
.page-hero,
.detail-copy,
.poster-panel,
.side-card,
.player-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(14px);
}

.category-tile {
    min-height: 210px;
    padding: 24px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover,
.category-overview-card:hover,
.movie-card:hover {
    transform: translateY(-4px);
    border-color: rgba(45, 212, 191, 0.36);
}

.category-tile strong,
.category-card-main h2 {
    display: block;
    margin-bottom: 10px;
    font-size: 24px;
}

.category-tile p,
.category-card-main p,
.notice-panel p,
.page-hero p,
.poster-panel p,
.detail-copy p {
    color: var(--muted-strong);
}

.category-tile div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.category-tile div span {
    color: var(--accent);
    background: rgba(45, 212, 191, 0.1);
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 12px;
}

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

.featured-grid .movie-card:first-child {
    grid-column: span 2;
}

.movie-card {
    overflow: hidden;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #0f172a;
}

.compact-card .poster-link {
    aspect-ratio: 16 / 10;
}

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

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

.type-badge,
.year-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 800;
}

.type-badge {
    left: 12px;
    bottom: 12px;
    color: #06201e;
    background: var(--accent);
}

.year-badge {
    right: 12px;
    bottom: 12px;
    color: var(--text);
    background: rgba(2, 6, 23, 0.72);
}

.rank-badge {
    left: 12px;
    top: 12px;
    color: #fff;
    background: linear-gradient(135deg, #f97316, #ef4444);
}

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

.movie-card-body h2 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card-body h2 a:hover {
    color: var(--accent);
}

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

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

.tag-row span {
    padding: 3px 8px;
    font-size: 12px;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
    gap: 22px;
}

.ranking-panel,
.notice-panel {
    padding: 24px;
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 40px 68px 1fr;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: rgba(15, 23, 42, 0.62);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 14px;
}

.ranking-number {
    color: var(--accent);
    font-size: 22px;
    font-weight: 900;
    text-align: center;
}

.ranking-item img {
    width: 68px;
    height: 48px;
    object-fit: cover;
    border-radius: 10px;
}

.ranking-copy {
    display: grid;
    gap: 3px;
}

.ranking-copy strong {
    color: var(--text);
}

.ranking-copy em {
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

.notice-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    min-height: 360px;
}

.notice-panel h2 {
    margin: 14px 0;
    font-size: 34px;
    line-height: 1.15;
}

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

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

.page-hero {
    padding: 34px;
    background:
        radial-gradient(circle at 85% 15%, rgba(45, 212, 191, 0.16), transparent 24rem),
        var(--panel);
}

.page-hero h1 {
    max-width: 760px;
    font-size: clamp(34px, 4vw, 56px);
}

.page-hero p {
    max-width: 760px;
    font-size: 17px;
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(260px, 0.45fr) 1fr;
    gap: 24px;
    align-items: center;
    padding: 24px;
}

.search-controls {
    display: grid;
    gap: 14px;
}

.card-search {
    min-height: 50px;
    padding: 0 18px;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.filter-chip {
    min-height: 36px;
    padding: 0 14px;
    color: var(--muted-strong);
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--border);
    border-radius: 999px;
    cursor: pointer;
}

.filter-chip:hover,
.filter-chip.is-active {
    color: #06201e;
    background: var(--accent);
}

.empty-state {
    margin-top: 24px;
    padding: 24px;
    color: var(--muted-strong);
    text-align: center;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.category-overview-card {
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card-main {
    display: block;
    padding: 24px;
    border-bottom: 1px solid var(--border);
}

.category-overview-card ul {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 18px 24px 24px;
    list-style: none;
}

.category-overview-card li a {
    color: var(--muted-strong);
}

.category-overview-card li a:hover {
    color: var(--accent);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    align-items: start;
}

.detail-primary {
    min-width: 0;
}

.player-card {
    overflow: hidden;
    padding: 0;
}

.video-box {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    color: var(--text);
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.82));
    border: 0;
    cursor: pointer;
    z-index: 4;
}

.player-cover.is-hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.play-circle {
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    color: #06201e;
    background: var(--accent);
    border-radius: 999px;
    box-shadow: 0 18px 40px rgba(45, 212, 191, 0.35);
}

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

.player-cover em {
    color: var(--accent);
    font-style: normal;
    font-weight: 800;
}

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

.detail-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.detail-copy h1 {
    font-size: clamp(30px, 4vw, 48px);
}

.detail-copy h2 {
    margin-top: 30px;
    color: var(--text);
    font-size: 24px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
    color: var(--muted-strong);
}

.detail-meta span {
    padding: 6px 12px;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid var(--border);
    border-radius: 999px;
}

.poster-panel,
.side-card {
    padding: 20px;
}

.poster-panel img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 14px;
}

.poster-panel h2 {
    font-size: 24px;
}

.side-card {
    margin-top: 18px;
}

.side-links {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.side-links a {
    display: grid;
    gap: 3px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.62);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 12px;
}

.side-links a:hover {
    color: var(--accent);
}

.side-links span {
    color: var(--muted);
    font-size: 13px;
}

.site-footer {
    margin-top: 70px;
    background: rgba(15, 23, 42, 0.96);
    border-top: 1px solid var(--border);
}

.footer-grid {
    width: min(100% - 32px, var(--max));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 34px;
    padding: 46px 0;
}

.footer-grid p {
    max-width: 440px;
    color: var(--muted);
}

.footer-grid h2 {
    margin-bottom: 16px;
    font-size: 18px;
}

.footer-links {
    display: grid;
    gap: 8px;
}

.footer-links a {
    color: var(--muted-strong);
}

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

.footer-bottom {
    padding: 18px;
    color: var(--muted);
    text-align: center;
    border-top: 1px solid var(--border);
}

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

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

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

    .detail-layout,
    .split-section,
    .search-panel {
        grid-template-columns: 1fr;
    }

    .detail-sidebar {
        display: grid;
        grid-template-columns: 0.85fr 1fr;
        gap: 18px;
    }

    .side-card {
        margin-top: 0;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .nav-shell {
        height: 62px;
    }

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

    .hero-slider {
        min-height: 82vh;
    }

    .hero-content {
        transform: translate(-50%, -42%);
    }

    .hero-content h1,
    .hero-content h2 {
        font-size: 42px;
    }

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

    .section-head,
    .detail-title-row {
        display: grid;
        align-items: start;
    }

    .movie-grid,
    .featured-grid,
    .category-grid,
    .category-overview-grid,
    .footer-grid,
    .detail-sidebar {
        grid-template-columns: 1fr;
    }

    .featured-grid .movie-card:first-child {
        grid-column: span 1;
    }

    .poster-link,
    .compact-card .poster-link {
        aspect-ratio: 16 / 11;
    }

    .search-panel,
    .page-hero,
    .detail-copy,
    .ranking-panel,
    .notice-panel {
        padding: 20px;
    }

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

    .ranking-item img {
        width: 58px;
        height: 42px;
    }
}

@media (max-width: 460px) {
    .page-container,
    .home-search-wrap,
    .nav-shell,
    .hero-content,
    .hero-dots,
    .footer-grid {
        width: min(100% - 24px, var(--max));
    }

    .hero-actions {
        display: grid;
    }

    .primary-button,
    .ghost-button,
    .section-more {
        width: 100%;
    }

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