:root {
    color-scheme: light;
    --bg: #f8fafc;
    --paper: #ffffff;
    --paper-soft: #f1f5f9;
    --text: #111827;
    --muted: #64748b;
    --line: rgba(148, 163, 184, 0.28);
    --dark: #111827;
    --dark-soft: #1f2937;
    --accent: #334155;
    --radius: 22px;
    --shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 55%, #f4f6f8 100%);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.84);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

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

.brand,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, #111827, #475569);
    font-weight: 800;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.2);
}

.brand-copy,
.footer-logo div {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-copy strong,
.footer-logo strong {
    font-size: 18px;
    letter-spacing: -0.03em;
}

.brand-copy em,
.footer-logo em {
    margin-top: 3px;
    font-style: normal;
    font-size: 12px;
    color: var(--muted);
}

.header-search {
    flex: 1 1 380px;
    max-width: 430px;
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 999px;
    overflow: hidden;
}

.header-search input,
.mobile-search input,
.search-page-form input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 11px 16px;
    color: var(--text);
}

.header-search button,
.mobile-search button,
.search-page-form button {
    border: 0;
    padding: 10px 18px;
    color: #ffffff;
    background: var(--dark);
    border-radius: 999px;
    cursor: pointer;
}

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

.nav-link,
.mobile-link {
    padding: 9px 14px;
    border-radius: 999px;
    font-size: 14px;
    color: #475569;
    transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: var(--text);
    background: #f1f5f9;
}

.menu-toggle {
    width: 42px;
    height: 42px;
    display: none;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
    cursor: pointer;
}

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

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

.mobile-search {
    display: flex;
    border: 1px solid var(--line);
    border-radius: 999px;
    overflow: hidden;
    background: #f8fafc;
}

.mobile-panel nav,
.mobile-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.mobile-chips a {
    padding: 7px 10px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 13px;
}

.hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 0;
}

.hero-stage {
    position: relative;
    min-height: 520px;
    overflow: hidden;
    border-radius: 32px;
    background: #111827;
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
    transform: scale(1.02);
}

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

.hero-slide img,
.detail-hero > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-shade,
.detail-hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.62), rgba(15, 23, 42, 0.16));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(650px, 100%);
    padding: 76px 56px;
    color: #ffffff;
}

.hero-label,
.page-hero span {
    display: inline-flex;
    align-items: center;
    width: max-content;
    margin-bottom: 18px;
    padding: 7px 14px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    font-size: 14px;
}

.hero h1,
.hero h2,
.page-hero h1,
.detail-hero h1,
.cta-box h2 {
    margin: 0;
    letter-spacing: -0.04em;
}

.hero h1 {
    font-size: clamp(38px, 5vw, 68px);
    line-height: 0.96;
}

.hero h2 {
    margin-top: 16px;
    font-size: clamp(24px, 3vw, 38px);
    line-height: 1.1;
}

.hero p,
.page-hero p,
.detail-hero p,
.cta-box p {
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
    line-height: 1.75;
}

.hero-tags,
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.hero-tags span,
.tag-cloud span {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.13);
    color: rgba(255, 255, 255, 0.88);
    font-size: 13px;
}

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

.primary-btn,
.ghost-btn,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 700;
    transition: 0.2s ease;
}

.primary-btn {
    color: #111827;
    background: #ffffff;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(255, 255, 255, 0.22);
}

.primary-btn.dark {
    color: #ffffff;
    background: var(--dark);
}

.ghost-btn {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-dots {
    position: absolute;
    left: 56px;
    bottom: 38px;
    z-index: 4;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 28px;
    height: 4px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
}

.hero-dot.active {
    background: #ffffff;
}

.hero-side {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(14px);
}

.hero-side-head,
.rank-panel-head,
.section-head,
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.hero-side-head a,
.rank-panel-head a,
.section-more,
.text-link {
    color: #475569;
    font-size: 14px;
}

.hero-side-list,
.rank-list {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

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

.soft-section {
    background: linear-gradient(180deg, #f8fafc, #ffffff);
}

.section-head {
    margin-bottom: 28px;
}

.section-head h2,
.rank-panel h2,
.info-card h2,
.detail-side h2,
.footer-links h2,
.category-strip h2 {
    margin: 0;
    font-size: 26px;
    letter-spacing: -0.03em;
}

.section-head p {
    margin: 8px 0 0;
    color: var(--muted);
}

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

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

.movie-card,
.compact-card,
.category-card,
.info-card,
.player-card,
.rank-panel,
.category-tile,
.search-filters,
.cta-box {
    background: var(--paper);
    border: 1px solid var(--line);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
}

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover,
.category-card:hover,
.category-tile:hover {
    transform: translateY(-4px);
    border-color: rgba(51, 65, 85, 0.28);
    box-shadow: var(--shadow);
}

.card-media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #e2e8f0;
}

.card-media img,
.compact-media img,
.category-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.movie-card:hover .card-media img,
.compact-card:hover img,
.category-card:hover img {
    transform: scale(1.06);
}

.card-category,
.rank-badge {
    position: absolute;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.68);
    backdrop-filter: blur(10px);
    font-size: 12px;
    font-weight: 700;
}

.card-category {
    right: 12px;
    top: 12px;
    padding: 6px 10px;
}

.rank-badge {
    left: 12px;
    top: 12px;
    min-width: 32px;
    height: 32px;
}

.card-body {
    padding: 16px;
}

.card-title,
.compact-title {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    color: #1f2937;
    font-weight: 800;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.card-title {
    min-height: 43px;
    -webkit-line-clamp: 2;
}

.card-title:hover,
.compact-title:hover {
    color: #475569;
}

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

.card-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #94a3b8;
    font-size: 12px;
}

.wide-card {
    display: grid;
    grid-template-columns: 45% 1fr;
    min-height: 260px;
}

.wide-card .card-media {
    aspect-ratio: auto;
    height: 100%;
}

.wide-card .card-title {
    font-size: 22px;
}

.wide-card .card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 28px;
}

.compact-card {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    transition: 0.2s ease;
}

.compact-media {
    position: relative;
    height: 62px;
    overflow: hidden;
    border-radius: 12px;
    background: #e2e8f0;
}

.compact-title {
    -webkit-line-clamp: 1;
    font-size: 14px;
}

.compact-card span {
    display: block;
    margin-top: 5px;
    color: #94a3b8;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-rail {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    padding-bottom: 14px;
    scroll-snap-type: x mandatory;
}

.rail-item {
    width: 310px;
    flex: 0 0 310px;
    scroll-snap-align: start;
}

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

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

.category-tile {
    display: block;
    min-height: 150px;
    padding: 24px;
    border-radius: 24px;
    transition: 0.25s ease;
}

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

.category-tile p {
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.75;
}

.rank-panel {
    padding: 22px;
    border-radius: 24px;
}

.tall-panel {
    max-height: 1050px;
    overflow: auto;
    position: sticky;
    top: 92px;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, #111827, #334155);
}

.page-hero {
    padding: 70px 0;
}

.small-hero {
    padding: 56px 0;
}

.rankings-hero {
    background: radial-gradient(circle at top left, #475569, #111827 62%);
}

.page-hero h1 {
    font-size: clamp(34px, 5vw, 56px);
}

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

.category-card {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 22px;
    overflow: hidden;
    padding: 16px;
    border-radius: 24px;
    transition: 0.25s ease;
}

.category-card-media {
    height: 180px;
    overflow: hidden;
    border-radius: 18px;
    background: #e2e8f0;
}

.category-card h2 {
    margin: 4px 0 8px;
    font-size: 24px;
}

.category-card p {
    color: var(--muted);
    line-height: 1.75;
}

.category-mini-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0;
}

.category-mini-links a,
.category-strip a,
.filter-chip,
.search-chip {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 13px;
    transition: 0.2s ease;
}

.category-mini-links a:hover,
.category-strip a:hover,
.filter-chip:hover,
.search-chip:hover {
    color: #ffffff;
    background: var(--dark);
}

.toolbar {
    margin-bottom: 24px;
}

.chip-scroll {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.select-wrap select {
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #ffffff;
    color: #475569;
}

.search-page-form {
    display: flex;
    width: min(700px, 100%);
    margin-top: 28px;
    padding: 4px;
    border-radius: 999px;
    background: #ffffff;
}

.search-page-form input {
    padding: 13px 18px;
}

.search-filters {
    display: grid;
    gap: 18px;
    margin-bottom: 24px;
    padding: 22px;
    border-radius: 24px;
}

.search-filters strong {
    display: block;
    margin-bottom: 10px;
}

.search-filters div div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.search-chip {
    border: 0;
    cursor: pointer;
}

.search-chip.active {
    color: #ffffff;
    background: var(--dark);
}

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

.detail-hero {
    min-height: 430px;
}

.detail-hero-content {
    position: relative;
    z-index: 2;
    padding: 82px 0 70px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 26px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #ffffff;
}

.breadcrumb em {
    font-style: normal;
}

.detail-hero h1 {
    max-width: 800px;
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.05;
}

.detail-hero p {
    max-width: 760px;
}

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

.detail-main {
    display: grid;
    gap: 22px;
}

.player-card,
.info-card {
    border-radius: 24px;
    overflow: hidden;
}

.player-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.movie-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
    cursor: pointer;
}

.play-layer {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.35), rgba(0, 0, 0, 0.74));
    cursor: pointer;
}

.play-layer.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-icon {
    width: 74px;
    height: 74px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 5px;
    border-radius: 50%;
    color: #111827;
    background: #ffffff;
    font-size: 30px;
    box-shadow: 0 20px 46px rgba(0, 0, 0, 0.32);
}

.play-layer strong {
    font-size: 16px;
}

.info-card {
    padding: 28px;
}

.info-card h2 {
    margin-bottom: 18px;
}

.info-card p {
    margin: 0 0 14px;
    color: #475569;
    line-height: 1.85;
}

.info-card strong {
    color: #111827;
}

.review-card {
    background: linear-gradient(135deg, #ffffff, #f8fafc);
}

.tag-cloud span {
    color: #475569;
    background: #f1f5f9;
}

.detail-side {
    position: sticky;
    top: 92px;
}

.detail-side h2 {
    margin-bottom: 16px;
}

.category-strip {
    display: grid;
    gap: 16px;
}

.category-strip div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cta-section {
    padding: 20px 0 90px;
}

.cta-box {
    padding: 46px;
    border-radius: 30px;
    text-align: center;
    background: linear-gradient(135deg, #ffffff, #f1f5f9);
}

.cta-box h2 {
    font-size: clamp(28px, 4vw, 44px);
}

.cta-box p {
    color: var(--muted);
    margin-bottom: 28px;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, #f8fafc, #eef2f7);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 54px 0;
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) 1fr 1fr;
    gap: 36px;
}

.footer-brand p {
    max-width: 520px;
    margin: 18px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

.footer-links div {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.footer-links a {
    color: #475569;
    font-size: 14px;
}

.footer-links a:hover {
    color: #111827;
}

.footer-bottom {
    padding: 18px 0;
    border-top: 1px solid var(--line);
    color: #64748b;
    text-align: center;
    font-size: 13px;
}

[hidden] {
    display: none !important;
}

@media (max-width: 1080px) {
    .hero,
    .split-layout,
    .rankings-layout,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .hero-side,
    .detail-side,
    .tall-panel {
        position: static;
    }

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

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

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

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    .hero {
        margin-top: 16px;
    }

    .hero-stage {
        min-height: 560px;
        border-radius: 24px;
    }

    .hero-content {
        padding: 54px 26px 80px;
    }

    .hero-dots {
        left: 26px;
        bottom: 28px;
    }

    .cards-grid,
    .large-grid,
    .category-grid,
    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }

    .wide-card,
    .category-card {
        grid-template-columns: 1fr;
    }

    .wide-card .card-media,
    .category-card-media {
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .toolbar {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .container,
    .header-inner,
    .mobile-panel,
    .footer-inner,
    .hero {
        width: min(100% - 24px, 1180px);
    }

    .brand-copy strong {
        font-size: 16px;
    }

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

    .cards-grid,
    .large-grid,
    .category-grid,
    .footer-inner {
        grid-template-columns: 1fr;
    }

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

    .hero h2 {
        font-size: 25px;
    }

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

    .page-hero,
    .small-hero {
        padding: 44px 0;
    }

    .detail-hero-content {
        padding: 58px 0 54px;
    }

    .rail-item {
        width: 280px;
        flex-basis: 280px;
    }

    .info-card,
    .rank-panel,
    .cta-box {
        padding: 22px;
    }

    .search-page-form {
        border-radius: 24px;
        flex-direction: column;
    }

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