:root {
    color-scheme: dark;
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-850: #111827;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --cyan-500: #06b6d4;
    --cyan-400: #22d3ee;
    --yellow-400: #facc15;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-soft: #cbd5e1;
    --radius: 18px;
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background: linear-gradient(180deg, var(--slate-950) 0%, var(--slate-900) 48%, var(--slate-950) 100%);
    color: var(--text-main);
}

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

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

button,
input,
select {
    font: inherit;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    background: rgba(15, 23, 42, 0.82);
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    backdrop-filter: blur(14px);
    transition: background 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-scrolled {
    background: rgba(15, 23, 42, 0.96);
    box-shadow: 0 18px 48px rgba(2, 6, 23, 0.32);
}

.header-inner {
    height: 68px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan-400), #2563eb);
    color: white;
    box-shadow: 0 0 26px rgba(34, 211, 238, 0.35);
}

.brand-text {
    font-size: 20px;
    letter-spacing: -0.02em;
}

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

.main-nav a,
.mobile-panel a {
    color: var(--text-soft);
    transition: color 0.2s ease;
}

.main-nav a:hover,
.mobile-panel a:hover,
.site-footer a:hover {
    color: var(--cyan-400);
}

.header-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.search-page-form input,
.local-filter input,
.filter-row select {
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.94);
    color: var(--text-main);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    width: 210px;
    padding: 10px 16px;
    border-radius: 999px;
}

.header-search button,
.mobile-search button,
.search-page-form button,
.quick-panel button {
    border: 0;
    color: white;
    background: var(--cyan-500);
    border-radius: 999px;
    padding: 10px 18px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.search-page-form button:hover,
.quick-panel button:hover {
    background: #0891b2;
    transform: translateY(-1px);
}

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

.mobile-panel {
    display: none;
    padding: 16px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(15, 23, 42, 0.98);
}

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

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

.mobile-search input {
    flex: 1;
    min-width: 0;
    border-radius: 999px;
    padding: 11px 14px;
}

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

.hero {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    background: var(--slate-950);
}

.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);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 1) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.25) 100%);
}

.hero-copy {
    position: absolute;
    left: max(32px, calc((100vw - 1180px) / 2));
    right: 32px;
    bottom: 74px;
    max-width: 760px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--cyan-400);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1 {
    margin: 0;
    color: white;
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-copy h1,
.hero-copy h2 {
    font-size: clamp(42px, 7vw, 74px);
}

.hero-line {
    max-width: 680px;
    margin: 22px 0 0;
    color: var(--text-soft);
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.7;
}

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

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

.hero-meta span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.82);
    color: var(--text-soft);
    padding: 7px 12px;
    font-size: 14px;
}

.hero-meta span:last-child,
.detail-meta span:last-child,
.rating {
    color: var(--yellow-400);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 999px;
    padding: 0 22px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn.primary {
    background: var(--cyan-500);
    color: white;
}

.btn.ghost {
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    background: rgba(15, 23, 42, 0.38);
}

.btn.text {
    color: var(--cyan-400);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.55);
    color: white;
    font-size: 36px;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(2, 6, 23, 0.78);
    transform: translateY(-50%) scale(1.04);
}

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

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

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

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

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

.quick-search {
    margin-top: -34px;
    position: relative;
    z-index: 2;
}

.quick-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 560px);
    align-items: center;
    gap: 24px;
    padding: 24px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.88);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.quick-panel h2,
.section-head h2,
.rank-panel h2,
.side-card h2,
.info-panel h2,
.detail-card h2,
.category-overview h2 {
    margin: 0;
    color: white;
}

.quick-panel p {
    margin: 8px 0 0;
    color: var(--text-muted);
}

.quick-panel form,
.search-page-form {
    display: flex;
    gap: 10px;
}

.quick-panel input,
.search-page-form input {
    flex: 1;
    min-width: 0;
    padding: 14px 18px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.62);
    color: white;
    outline: none;
}

.section {
    padding: 72px 0 0;
}

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

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

.section-head a,
.category-overview-head a {
    color: var(--cyan-400);
    font-weight: 700;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.13);
    border-radius: 16px;
    background: rgba(30, 41, 59, 0.9);
    box-shadow: 0 16px 44px rgba(2, 6, 23, 0.2);
    transform: translateZ(0);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px) scale(1.015);
    border-color: rgba(34, 211, 238, 0.35);
    box-shadow: 0 24px 60px rgba(2, 6, 23, 0.45);
}

.card-cover {
    position: relative;
    display: block;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: #020617;
}

.movie-card.landscape .card-cover {
    aspect-ratio: 16 / 10;
}

.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.card-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.84), transparent 58%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .card-shade {
    opacity: 1;
}

.play-float {
    position: absolute;
    left: 50%;
    top: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 999px;
    background: rgba(6, 182, 212, 0.9);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.75);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.duration,
.rating {
    position: absolute;
    top: 10px;
    border-radius: 8px;
    background: rgba(2, 6, 23, 0.72);
    padding: 5px 8px;
    font-size: 12px;
    font-weight: 700;
}

.duration {
    right: 10px;
    color: white;
}

.rating {
    left: 10px;
}

.card-body {
    padding: 16px;
}

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

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

.card-body p {
    display: -webkit-box;
    min-height: 46px;
    margin: 0 0 14px;
    overflow: hidden;
    color: var(--text-muted);
    line-height: 1.6;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    gap: 8px;
    color: var(--text-muted);
    font-size: 13px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.tag-row span {
    border-radius: 999px;
    background: rgba(51, 65, 85, 0.84);
    color: var(--text-soft);
    padding: 5px 9px;
    font-size: 12px;
}

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

.split-layout.reverse {
    grid-template-columns: 360px minmax(0, 1fr);
}

.rank-panel,
.side-card,
.info-panel,
.detail-card,
.category-overview {
    border: 1px solid rgba(148, 163, 184, 0.13);
    border-radius: var(--radius);
    background: rgba(30, 41, 59, 0.88);
    box-shadow: var(--shadow);
}

.rank-panel,
.side-card,
.info-panel,
.detail-card {
    padding: 24px;
}

.rank-panel {
    position: sticky;
    top: 92px;
}

.rank-panel ol {
    display: grid;
    gap: 12px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.rank-item a {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 48px;
    align-items: center;
    gap: 10px;
    color: var(--text-soft);
}

.rank-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: rgba(6, 182, 212, 0.16);
    color: var(--cyan-400);
    font-weight: 900;
}

.rank-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-score {
    color: var(--yellow-400);
    text-align: right;
}

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

.category-tile a {
    display: block;
    height: 100%;
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.13);
    border-radius: var(--radius);
    background: rgba(30, 41, 59, 0.88);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-tile a:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.36);
}

.category-covers {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
    margin-bottom: 16px;
}

.category-covers img {
    aspect-ratio: 3 / 4;
    width: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.category-tile h2 {
    margin: 0 0 8px;
}

.category-tile p,
.category-overview p,
.info-panel p,
.detail-card p,
.page-hero p {
    color: var(--text-muted);
    line-height: 1.8;
}

.category-tile span {
    display: inline-flex;
    margin-top: 10px;
    color: var(--cyan-400);
    font-weight: 800;
}

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

.page-hero {
    padding: 50px 0 22px;
}

.page-hero h1 {
    max-width: 900px;
    font-size: clamp(36px, 5vw, 58px);
}

.page-hero p {
    max-width: 780px;
    margin: 18px 0 0;
    font-size: 18px;
}

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

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

.local-filter,
.filter-row {
    margin-top: 24px;
}

.local-filter input {
    width: min(100%, 620px);
    border-radius: 999px;
    padding: 14px 18px;
}

.search-page-form {
    max-width: 780px;
    margin-top: 28px;
}

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

.filter-row select {
    min-width: 160px;
    border-radius: 999px;
    padding: 12px 14px;
}

.stacked {
    display: grid;
    gap: 28px;
}

.category-overview {
    padding: 26px;
}

.category-overview-head {
    align-items: center;
}

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

.player-box {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius);
    background: #000;
    box-shadow: var(--shadow);
}

.player-box video,
.player-cover,
.player-cover img,
.player-dark {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.player-box video {
    object-fit: contain;
    z-index: 1;
}

.player-cover {
    z-index: 2;
    border: 0;
    padding: 0;
    cursor: pointer;
    background: #000;
    color: white;
}

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

.player-cover img {
    object-fit: cover;
}

.player-dark {
    background: radial-gradient(circle at center, rgba(6, 182, 212, 0.12), rgba(0, 0, 0, 0.72));
}

.player-play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 82px;
    height: 82px;
    border-radius: 999px;
    background: rgba(6, 182, 212, 0.92);
    font-size: 32px;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 34px rgba(34, 211, 238, 0.38);
}

.detail-card {
    margin-top: 26px;
}

.detail-card h1 {
    margin: 0 0 16px;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.18;
}

.detail-meta {
    margin-bottom: 18px;
}

.detail-card .lead {
    color: var(--cyan-400);
    font-size: 19px;
    font-weight: 700;
}

.detail-card h2 {
    margin-top: 28px;
    margin-bottom: 10px;
    font-size: 24px;
}

.detail-sidebar {
    align-self: start;
    position: sticky;
    top: 92px;
}

.related-list {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.related-item {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.related-cover {
    overflow: hidden;
    aspect-ratio: 16 / 10;
    border-radius: 12px;
    background: #020617;
}

.related-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.related-item:hover img {
    transform: scale(1.08);
}

.related-copy strong {
    display: -webkit-box;
    overflow: hidden;
    color: white;
    line-height: 1.4;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.related-copy em {
    display: block;
    margin-top: 6px;
    color: var(--text-muted);
    font-style: normal;
    font-size: 13px;
}

.sitemap-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sitemap-list a {
    display: block;
    overflow: hidden;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.78);
    color: var(--text-soft);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sitemap-list a:hover {
    color: var(--cyan-400);
    background: rgba(51, 65, 85, 0.86);
}

.site-footer {
    margin-top: 90px;
    padding: 48px 0 26px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(15, 23, 42, 0.82);
    color: var(--text-muted);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.25fr 0.8fr 0.8fr 1fr;
    gap: 32px;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: white;
    font-size: 17px;
}

.site-footer p {
    margin: 12px 0 0;
    line-height: 1.8;
}

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 32px auto 0;
    padding-top: 22px;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    text-align: center;
    color: #64748b;
}

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

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

    .menu-toggle {
        display: block;
    }

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

    .split-layout,
    .split-layout.reverse,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .rank-panel,
    .detail-sidebar {
        position: static;
    }

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

@media (max-width: 760px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

    .header-inner {
        height: 62px;
    }

    .brand-text {
        max-width: 210px;
        overflow: hidden;
        font-size: 16px;
        text-overflow: ellipsis;
    }

    .hero {
        min-height: 76vh;
    }

    .hero-copy {
        left: 18px;
        right: 18px;
        bottom: 76px;
    }

    .hero-copy h1,
    .hero-copy h2 {
        font-size: 38px;
    }

    .hero-arrow {
        display: none;
    }

    .quick-panel,
    .quick-panel form,
    .search-page-form {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

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

    .card-body {
        padding: 12px;
    }

    .card-body h2 {
        font-size: 15px;
    }

    .card-body p,
    .tag-row {
        display: none;
    }

    .section-head,
    .category-overview-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .related-item {
        grid-template-columns: 94px minmax(0, 1fr);
    }

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

@media (max-width: 430px) {
    .movie-grid,
    .small-grid,
    .category-grid,
    .sitemap-list {
        grid-template-columns: 1fr;
    }
}
