* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: #111c31;
    --text: #e5edf7;
    --muted: #94a3b8;
    --subtle: #64748b;
    --line: rgba(148, 163, 184, 0.18);
    --cyan: #22d3ee;
    --cyan-strong: #06b6d4;
    --emerald: #34d399;
    --violet: #8b5cf6;
    --danger: #fb7185;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
    --radius-lg: 28px;
    --radius-md: 20px;
    --radius-sm: 14px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.14), transparent 32rem),
        radial-gradient(circle at 85% 15%, rgba(139, 92, 246, 0.12), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #07111f 45%, #020617 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

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

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.brand-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--cyan), var(--violet));
    color: #020617;
    font-weight: 900;
    box-shadow: 0 12px 30px rgba(34, 211, 238, 0.25);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-copy strong,
.footer-logo {
    color: #ffffff;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-copy small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

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

.main-nav a {
    color: #cbd5e1;
    font-size: 15px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
    color: var(--cyan);
}

.header-search {
    display: flex;
    align-items: center;
    width: 290px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.75);
    overflow: hidden;
}

.header-search input {
    min-width: 0;
    flex: 1;
    padding: 10px 14px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
}

.header-search button {
    border: 0;
    padding: 10px 14px;
    color: #04111c;
    background: var(--cyan);
    cursor: pointer;
}

.nav-toggle {
    display: none;
    margin-left: auto;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 14px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.78);
}

main {
    overflow: hidden;
}

.hero-carousel {
    position: relative;
    min-height: 680px;
    isolation: isolate;
}

.hero-slides {
    position: relative;
    min-height: 680px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.52fr);
    align-items: center;
    width: min(1420px, calc(100% - 32px));
    margin: 0 auto;
    gap: 56px;
    opacity: 0;
    transform: translateY(18px) scale(0.985);
    pointer-events: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-bg {
    position: absolute;
    inset: 0 calc(50% - 50vw);
    z-index: -2;
    overflow: hidden;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(18px) brightness(0.42) saturate(1.25);
    transform: scale(1.08);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.78) 45%, rgba(2, 6, 23, 0.42) 100%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.4) 0%, #020617 100%);
}

.hero-content {
    padding: 126px 0 110px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--cyan);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    color: #ffffff;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-content h1 {
    max-width: 840px;
    font-size: clamp(44px, 6vw, 86px);
    line-height: 0.95;
}

.hero-content p {
    max-width: 760px;
    margin: 26px 0 0;
    color: #cbd5e1;
    font-size: 18px;
}

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

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

.hero-tags span,
.tag-row span,
.year-pills span {
    border: 1px solid rgba(34, 211, 238, 0.26);
    border-radius: 999px;
    padding: 5px 11px;
    color: #d9faff;
    background: rgba(34, 211, 238, 0.1);
    font-size: 12px;
}

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

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

.primary-btn {
    color: #04111c;
    background: linear-gradient(135deg, var(--cyan), var(--emerald));
    box-shadow: 0 16px 36px rgba(34, 211, 238, 0.22);
}

.ghost-btn {
    border: 1px solid rgba(226, 232, 240, 0.22);
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.55);
}

.primary-btn:hover,
.ghost-btn:hover,
.movie-card:hover {
    transform: translateY(-3px);
}

.hero-poster {
    position: relative;
    display: block;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.18);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.55);
    box-shadow: var(--shadow);
}

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

.hero-poster span {
    position: absolute;
    right: 18px;
    bottom: 18px;
    border-radius: 999px;
    padding: 8px 14px;
    color: #04111c;
    background: var(--cyan);
    font-weight: 800;
}

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

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

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

.home-search-panel,
.content-section,
.page-hero,
.detail-hero,
.player-section {
    width: min(1420px, calc(100% - 32px));
    margin: 0 auto;
}

.home-search-panel {
    position: relative;
    z-index: 4;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;
    margin-top: -42px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 18px;
    background: rgba(15, 23, 42, 0.88);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.big-search {
    display: flex;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.6);
}

.big-search input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    padding: 16px 20px;
    color: var(--text);
    background: transparent;
}

.big-search button {
    border: 0;
    padding: 0 24px;
    color: #03131e;
    background: var(--cyan);
    font-weight: 800;
    cursor: pointer;
}

.home-stats {
    display: flex;
    gap: 14px;
    color: var(--muted);
    font-size: 14px;
}

.home-stats span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.08);
}

.home-stats strong {
    color: #ffffff;
}

.content-section {
    padding: 72px 0 0;
}

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

.section-heading h2 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(26px, 3vw, 42px);
    line-height: 1.1;
}

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

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.68));
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    border-color: rgba(34, 211, 238, 0.52);
    box-shadow: 0 28px 70px rgba(8, 145, 178, 0.16);
}

.movie-cover {
    position: relative;
    display: block;
    overflow: hidden;
}

.movie-cover img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.cover-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 48%, rgba(2, 6, 23, 0.86) 100%);
}

.play-chip,
.rank-badge {
    position: absolute;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.play-chip {
    right: 12px;
    bottom: 12px;
    padding: 6px 11px;
    color: #04111c;
    background: var(--cyan);
}

.rank-badge {
    left: 12px;
    top: 12px;
    padding: 6px 10px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--danger), var(--violet));
}

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

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--subtle);
    font-size: 12px;
}

.movie-card h3 {
    margin: 8px 0 8px;
    color: #ffffff;
    font-size: 18px;
    line-height: 1.3;
}

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

.movie-card-compact .movie-card-body {
    padding: 12px;
}

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

.movie-card-compact p {
    min-height: 42px;
    font-size: 13px;
}

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

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

.hot-list-item {
    display: grid;
    grid-template-columns: auto 72px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.72);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.hot-list-item:hover {
    transform: translateX(4px);
    border-color: rgba(34, 211, 238, 0.45);
}

.hot-list-item img {
    width: 72px;
    height: 88px;
    border-radius: 12px;
    object-fit: cover;
}

.list-index {
    width: 38px;
    color: var(--cyan);
    font-size: 18px;
    font-weight: 900;
}

.hot-list-copy {
    min-width: 0;
}

.hot-list-copy strong,
.hot-list-copy em {
    display: block;
}

.hot-list-copy strong {
    overflow: hidden;
    color: #ffffff;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.hot-list-copy em {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.hot-score {
    color: var(--emerald);
    font-weight: 900;
}

.rank-side-card,
.sidebar-card,
.article-panel,
.category-overview-card a,
.search-box-page {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.76);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

.rank-side-card,
.sidebar-card,
.article-panel {
    padding: 24px;
}

.rank-side-card span {
    color: var(--cyan);
    font-weight: 800;
}

.rank-side-card h2,
.sidebar-card h2,
.article-panel h2 {
    margin: 8px 0 12px;
    color: #ffffff;
}

.rank-side-card p,
.sidebar-card p,
.article-panel p {
    color: var(--muted);
}

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

.category-card,
.category-overview-card a {
    display: block;
    min-height: 198px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 20px;
    background:
        linear-gradient(135deg, rgba(34, 211, 238, 0.1), rgba(139, 92, 246, 0.08)),
        rgba(15, 23, 42, 0.72);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover,
.category-overview-card a:hover {
    transform: translateY(-3px);
    border-color: rgba(34, 211, 238, 0.5);
}

.category-card span,
.category-count {
    color: var(--cyan);
    font-weight: 900;
}

.category-card h3,
.category-overview-card h2 {
    margin: 14px 0 10px;
    color: #ffffff;
}

.category-card p,
.category-overview-card p {
    color: var(--muted);
    font-size: 14px;
}

.category-card em,
.category-overview-card em {
    display: block;
    margin-top: 12px;
    color: var(--subtle);
    font-size: 13px;
    font-style: normal;
}

.page-hero,
.detail-hero {
    padding: 86px 0 38px;
}

.slim-hero,
.category-hero,
.ranking-hero {
    border-bottom: 1px solid var(--line);
}

.page-hero h1 {
    max-width: 900px;
    font-size: clamp(38px, 5vw, 68px);
    line-height: 1;
}

.page-hero p {
    max-width: 860px;
    color: var(--muted);
    font-size: 18px;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 180px;
    gap: 12px;
    margin-bottom: 22px;
}

.filter-bar input,
.filter-bar select,
.search-box-page input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 13px 14px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.85);
    outline: none;
}

.search-box-page {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 16px;
    margin-bottom: 24px;
}

.search-box-page button {
    border: 0;
    border-radius: 14px;
    padding: 0 22px;
    color: #04111c;
    background: var(--cyan);
    font-weight: 900;
    cursor: pointer;
}

.search-result-info {
    margin-bottom: 18px;
    color: var(--muted);
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 26px;
    color: var(--muted);
}

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

.breadcrumbs em {
    color: #ffffff;
    font-style: normal;
}

.detail-grid {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
}

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

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

.detail-copy h1 {
    font-size: clamp(34px, 5vw, 68px);
    line-height: 1.02;
}

.detail-one-line {
    max-width: 860px;
    color: #cbd5e1;
    font-size: 19px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0;
}

.detail-meta span {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 7px 12px;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.68);
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: var(--radius-lg);
    background: #000000;
    box-shadow: var(--shadow);
}

.movie-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle at center, rgba(34, 211, 238, 0.24), rgba(2, 6, 23, 0.72));
    cursor: pointer;
}

.play-overlay span {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #04111c;
    background: var(--cyan);
    font-size: 34px;
    box-shadow: 0 20px 50px rgba(34, 211, 238, 0.35);
}

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

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

.article-panel p {
    margin-bottom: 24px;
    color: #cbd5e1;
    font-size: 17px;
}

.detail-side dl {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    margin: 0;
}

.detail-side dt {
    color: var(--subtle);
}

.detail-side dd {
    margin: 0;
    color: #e2e8f0;
}

.small-list .hot-list-item {
    grid-template-columns: auto 58px minmax(0, 1fr);
}

.small-list .hot-score {
    display: none;
}

.small-list .hot-list-item img {
    width: 58px;
    height: 74px;
}

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

.footer-grid {
    width: min(1420px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.25fr 0.8fr 1fr 1fr;
    gap: 28px;
    padding: 52px 0;
}

.site-footer h2 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: 18px;
}

.site-footer p,
.site-footer a {
    color: var(--muted);
}

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

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

.is-hidden-by-filter {
    display: none;
}

@media (max-width: 1180px) {
    .main-nav {
        gap: 12px;
    }

    .header-search {
        width: 220px;
    }

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

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

    .split-section,
    .category-layout,
    .detail-content,
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .header-inner {
        height: auto;
        min-height: 66px;
        flex-wrap: wrap;
        padding: 12px 0;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .main-nav {
        order: 4;
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        border: 1px solid var(--line);
        border-radius: 18px;
        padding: 8px;
        background: rgba(15, 23, 42, 0.96);
    }

    .main-nav.is-open {
        display: flex;
    }

    .main-nav a {
        padding: 10px 12px;
    }

    .header-search {
        order: 3;
        width: 100%;
    }

    .hero-carousel,
    .hero-slides {
        min-height: 760px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .hero-content {
        padding: 92px 0 0;
    }

    .hero-poster {
        width: min(320px, 74vw);
        margin: 0 auto 88px;
    }

    .home-search-panel,
    .big-search,
    .home-stats,
    .filter-bar,
    .search-box-page,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .home-stats {
        display: grid;
    }

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

@media (max-width: 560px) {
    .brand-copy strong {
        font-size: 18px;
    }

    .hero-content h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 38px;
    }

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

    .hot-list-item {
        grid-template-columns: auto 58px minmax(0, 1fr);
    }

    .hot-score {
        display: none;
    }
}
