:root {
    color-scheme: light;
    --primary: #0284c7;
    --primary-dark: #0369a1;
    --primary-soft: #e0f2fe;
    --secondary: #b45309;
    --accent: #dc2626;
    --neutral-50: #f8fafc;
    --neutral-100: #f1f5f9;
    --neutral-200: #e2e8f0;
    --neutral-300: #cbd5e1;
    --neutral-500: #64748b;
    --neutral-600: #475569;
    --neutral-700: #334155;
    --neutral-800: #1e293b;
    --neutral-900: #0f172a;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--neutral-900);
    background: var(--neutral-50);
}

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

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

button,
input {
    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.94);
    backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    gap: 18px;
}

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

.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 12px 30px rgba(2, 132, 199, 0.25);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.brand-name {
    color: var(--neutral-900);
    font-size: 19px;
}

.brand-subtitle {
    margin-top: 4px;
    color: var(--neutral-500);
    font-size: 12px;
    font-weight: 600;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link {
    padding: 10px 14px;
    border-radius: 12px;
    color: var(--neutral-600);
    font-size: 14px;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--primary-dark);
    background: var(--primary-soft);
}

.header-search-toggle,
.mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: var(--neutral-600);
    background: var(--neutral-100);
    cursor: pointer;
}

.mobile-toggle {
    display: none;
}

.header-search {
    display: none;
    padding: 0 0 16px;
}

.header-search.is-open {
    display: block;
}

.header-search input,
.search-band input,
.filter-panel input {
    width: 100%;
    border: 1px solid var(--neutral-200);
    border-radius: 16px;
    outline: none;
    padding: 14px 18px;
    color: var(--neutral-800);
    background: #ffffff;
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.06);
}

.header-search input:focus,
.search-band input:focus,
.filter-panel input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.16);
}

.mobile-nav {
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 12px 16px 18px;
    border-top: 1px solid var(--neutral-100);
}

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

.hero-carousel {
    position: relative;
    height: 62vh;
    min-height: 440px;
    max-height: 660px;
    overflow: hidden;
    background: var(--neutral-900);
}

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

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

.hero-slide > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.08));
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
}

.hero-copy {
    max-width: 720px;
    color: #ffffff;
    animation: slideUp 0.8s ease both;
}

.hero-kicker,
.section-kicker {
    margin: 0 0 12px;
    color: #bae6fd;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.hero-title-like {
    margin: 0 0 12px;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-copy h2 {
    margin: 0 0 16px;
    font-size: clamp(24px, 3vw, 42px);
    line-height: 1.12;
    font-weight: 850;
}

.hero-desc {
    max-width: 660px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
    line-height: 1.75;
}

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

.hero-tags span,
.detail-meta span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 12px;
    font-weight: 800;
}

.hero-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
}

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

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

.btn-primary {
    color: #ffffff;
    background: var(--primary);
    box-shadow: 0 16px 36px rgba(2, 132, 199, 0.28);
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(14px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(12px);
    cursor: pointer;
    transform: translateY(-50%);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 24px;
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 8px;
    transform: translateX(-50%);
}

.hero-dot {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.56);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 32px;
    background: #ffffff;
}

.search-band {
    padding: 26px 0;
    background: #ffffff;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
}

.search-band-inner {
    display: grid;
    grid-template-columns: 1fr minmax(260px, 520px);
    align-items: center;
    gap: 22px;
}

.search-band h2 {
    margin: 0 0 6px;
}

.search-band p {
    margin: 0;
    color: var(--neutral-500);
}

.page-sections {
    padding: 54px 0 76px;
}

.page-sections > section + section {
    margin-top: 64px;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 34px);
}

.section-heading .section-kicker {
    color: var(--primary);
}

.section-more {
    color: var(--primary-dark);
    background: var(--primary-soft);
}

.movie-row {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 6px 2px 16px;
    scroll-snap-type: x mandatory;
}

.movie-row .movie-card {
    width: 214px;
    flex: 0 0 214px;
    scroll-snap-align: start;
}

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

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

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

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

.movie-card {
    min-width: 0;
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 18px;
    background: var(--neutral-200);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

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

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

.score-badge,
.type-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    padding: 5px 9px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(12px);
}

.score-badge {
    top: 10px;
    left: 10px;
}

.type-badge {
    right: 10px;
    bottom: 10px;
    background: rgba(2, 132, 199, 0.82);
}

.poster-mask {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: end;
    padding: 16px;
    color: #ffffff;
    font-size: 13px;
    line-height: 1.55;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.82));
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-mask {
    opacity: 1;
    transform: translateY(0);
}

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

.movie-card h3 {
    margin: 0 0 7px;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 850;
}

.movie-card h3 a:hover {
    color: var(--primary);
}

.movie-meta,
.movie-desc {
    margin: 0;
    color: var(--neutral-500);
    font-size: 13px;
    line-height: 1.55;
}

.movie-desc {
    display: -webkit-box;
    min-height: 40px;
    margin-top: 7px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row {
    margin-top: 10px;
}

.tag-row span {
    color: var(--neutral-700);
    background: #ffffff;
    box-shadow: 0 0 0 1px var(--neutral-200) inset;
}

.movie-card-small h3 {
    font-size: 15px;
}

.movie-card-small .movie-desc {
    display: none;
}

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

.category-tile,
.category-overview-card,
.content-panel,
.filter-panel,
.rank-item {
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.07);
}

.category-tile {
    padding: 22px;
}

.category-tile span {
    color: var(--primary);
    font-weight: 900;
}

.category-tile strong {
    display: block;
    margin: 10px 0;
    font-size: 22px;
}

.category-tile p,
.category-overview-copy p,
.content-panel p {
    color: var(--neutral-600);
    line-height: 1.85;
}

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.category-samples a {
    border-radius: 999px;
    padding: 6px 10px;
    color: var(--neutral-700);
    font-size: 12px;
    background: var(--neutral-100);
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 86px 0;
    color: #ffffff;
    background: radial-gradient(circle at 20% 20%, rgba(2, 132, 199, 0.75), transparent 30%), linear-gradient(135deg, #0f172a, #1e293b 55%, #111827);
}

.page-hero::after {
    content: "";
    position: absolute;
    right: -140px;
    bottom: -160px;
    width: 420px;
    height: 420px;
    border-radius: 999px;
    background: rgba(220, 38, 38, 0.2);
    filter: blur(10px);
}

.page-hero .container {
    position: relative;
    z-index: 2;
}

.page-hero p {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 17px;
    line-height: 1.8;
}

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

.rank-hero {
    background: radial-gradient(circle at 70% 10%, rgba(180, 83, 9, 0.72), transparent 26%), linear-gradient(135deg, #111827, #0f172a);
}

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

.category-overview-copy h2 {
    margin: 0 0 12px;
    font-size: 28px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 18px;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-chip {
    border: 0;
    border-radius: 999px;
    padding: 10px 14px;
    color: var(--neutral-700);
    background: var(--neutral-100);
    cursor: pointer;
    font-weight: 800;
}

.filter-chip.is-active,
.filter-chip:hover {
    color: #ffffff;
    background: var(--primary);
}

.rank-list,
.mini-rank-list {
    display: grid;
    gap: 14px;
}

.rank-item {
    display: grid;
    grid-template-columns: 54px 82px 1fr;
    gap: 16px;
    align-items: center;
    padding: 14px;
}

.rank-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--secondary));
    font-weight: 900;
}

.rank-thumb {
    display: block;
    width: 82px;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 12px;
    background: var(--neutral-200);
}

.rank-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-copy h2 {
    margin: 0 0 7px;
    font-size: 18px;
}

.rank-copy p {
    margin: 0 0 10px;
    color: var(--neutral-600);
    line-height: 1.65;
}

.rank-meta span {
    color: var(--neutral-600);
    font-size: 12px;
    font-weight: 800;
}

.detail-hero {
    padding: 34px 0 58px;
    color: #ffffff;
    background: radial-gradient(circle at 20% 0, rgba(2, 132, 199, 0.36), transparent 28%), linear-gradient(135deg, #020617, #111827 68%, #0f172a);
}

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

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.9fr);
    gap: 30px;
    align-items: center;
}

.player-card {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
}

.player-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 18px;
    background: #000000;
}

.movie-player {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
    z-index: 1;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.54));
    cursor: pointer;
}

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

.play-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 78px;
    height: 78px;
    border-radius: 999px;
    padding-left: 5px;
    color: #ffffff;
    background: var(--primary);
    box-shadow: 0 20px 48px rgba(2, 132, 199, 0.44);
    font-size: 32px;
}

.play-text {
    font-size: 16px;
    font-weight: 900;
}

.detail-copy h1 {
    margin: 0 0 16px;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.15;
}

.detail-one-line {
    color: rgba(255, 255, 255, 0.82);
    font-size: 17px;
    line-height: 1.8;
}

.detail-meta span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.13);
}

.detail-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

.detail-sections {
    padding-top: 42px;
}

.content-panel {
    padding: 26px;
}

.content-panel h2 {
    margin: 0 0 12px;
    font-size: 26px;
}

.detail-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.detail-navigation a {
    display: flex;
    align-items: center;
    min-height: 58px;
    border-radius: 16px;
    padding: 0 18px;
    color: var(--primary-dark);
    background: var(--primary-soft);
    font-weight: 850;
}

.detail-navigation a:last-child {
    justify-content: flex-end;
    text-align: right;
}

.empty-state {
    display: none;
    margin: 24px 0 0;
    border-radius: 16px;
    padding: 18px;
    color: var(--neutral-600);
    background: #ffffff;
}

.empty-state.is-visible {
    display: block;
}

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

.site-footer {
    color: var(--neutral-300);
    background: var(--neutral-900);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 34px;
    padding: 46px 0;
}

.footer-brand {
    margin-bottom: 16px;
    color: #ffffff;
    font-size: 20px;
}

.site-footer p {
    max-width: 460px;
    color: var(--neutral-400);
    line-height: 1.8;
}

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

.site-footer a:not(.footer-brand) {
    display: block;
    margin: 9px 0;
    color: var(--neutral-300);
    font-size: 14px;
}

.site-footer a:hover {
    color: #ffffff;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 18px 0 24px;
    color: var(--neutral-400);
    font-size: 14px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1100px) {
    .movie-grid,
    .category-movie-grid,
    .home-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

    .detail-layout,
    .category-overview-card {
        grid-template-columns: 1fr;
    }
}

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

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

    .brand-name {
        font-size: 16px;
    }

    .hero-carousel {
        min-height: 560px;
    }

    .hero-overlay {
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.88));
    }

    .hero-content {
        align-items: end;
        padding-bottom: 72px;
    }

    .hero-arrow {
        display: none;
    }

    .search-band-inner,
    .filter-panel,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .movie-grid,
    .home-grid,
    .compact-grid,
    .tiny-grid,
    .category-movie-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .category-grid,
    .detail-navigation {
        grid-template-columns: 1fr;
    }

    .rank-item {
        grid-template-columns: 44px 68px 1fr;
        gap: 12px;
    }

    .rank-thumb {
        width: 68px;
    }

    .detail-hero {
        padding-top: 24px;
    }

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

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

    .header-inner {
        height: 62px;
    }

    .hero-copy h1,
    .page-hero h1,
    .hero-title-like {
        font-size: 34px;
    }

    .hero-copy h2 {
        font-size: 24px;
    }

    .hero-desc,
    .page-hero p,
    .detail-one-line {
        font-size: 15px;
    }

    .movie-grid,
    .home-grid,
    .compact-grid,
    .tiny-grid,
    .category-movie-grid {
        gap: 14px;
    }

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

    .movie-meta,
    .movie-desc {
        font-size: 12px;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .page-sections {
        padding-top: 36px;
    }
}
