:root {
    --primary-50: #e6f1ff;
    --primary-100: #b3d9ff;
    --primary-600: #0059c0;
    --primary-700: #00438d;
    --accent-50: #fff3e6;
    --accent-500: #ff6b00;
    --neutral-50: #f8f9fa;
    --neutral-100: #e9ecef;
    --neutral-200: #dee2e6;
    --neutral-300: #ced4da;
    --neutral-500: #6c757d;
    --neutral-600: #495057;
    --neutral-700: #343a40;
    --neutral-800: #212529;
    --neutral-900: #0d1117;
    --white: #ffffff;
    --soft-shadow: 0 2px 15px -3px rgba(0, 0, 0, 0.07), 0 10px 20px -2px rgba(0, 0, 0, 0.04);
    --soft-shadow-lg: 0 10px 40px -10px rgba(0, 0, 0, 0.10), 0 20px 25px -5px rgba(0, 0, 0, 0.04);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100%;
    background: var(--neutral-50);
    color: var(--neutral-900);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.5;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--neutral-200);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(16px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    color: var(--primary-600);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand-mark {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    box-shadow: 0 8px 20px rgba(0, 89, 192, 0.25);
}

.brand-mark svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
}

.desktop-nav a {
    color: var(--neutral-700);
    font-size: 15px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active {
    color: var(--primary-600);
}

.nav-search {
    display: flex;
    align-items: center;
    border: 1px solid var(--neutral-300);
    border-radius: 12px;
    overflow: hidden;
    background: var(--white);
}

.nav-search input,
.mobile-nav input {
    width: 210px;
    border: 0;
    outline: 0;
    padding: 10px 12px;
    color: var(--neutral-700);
    background: transparent;
}

.nav-search button,
.mobile-nav button {
    border: 0;
    padding: 10px 13px;
    color: var(--white);
    background: var(--primary-600);
    transition: background 0.2s ease;
}

.nav-search button:hover,
.mobile-nav button:hover {
    background: var(--primary-700);
}

.nav-toggle {
    width: 42px;
    height: 42px;
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    border: 0;
    border-radius: 10px;
    background: var(--neutral-100);
}

.nav-toggle span {
    width: 20px;
    height: 2px;
    margin: 0 auto;
    border-radius: 2px;
    background: var(--neutral-700);
}

.mobile-nav {
    display: none;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 16px 0 20px;
    border-top: 1px solid var(--neutral-200);
}

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

.mobile-nav a {
    display: block;
    color: var(--neutral-700);
    font-weight: 600;
    padding: 8px 0;
}

.mobile-nav form {
    display: flex;
    border: 1px solid var(--neutral-300);
    border-radius: 12px;
    overflow: hidden;
    background: var(--white);
}

.mobile-nav input {
    width: 100%;
}

.page-wrap {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.hero-slider {
    position: relative;
    height: 580px;
    overflow: hidden;
    background: var(--neutral-900);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.hero-slide.is-active {
    opacity: 1;
    z-index: 1;
}

.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.88), rgba(0, 0, 0, 0.70), rgba(0, 0, 0, 0.18));
}

.hero-content {
    position: absolute;
    top: 50%;
    left: max(24px, calc((100vw - 1280px) / 2 + 16px));
    width: min(620px, calc(100% - 48px));
    color: var(--white);
    transform: translateY(-50%);
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    margin-bottom: 18px;
    border-radius: 999px;
    color: var(--white);
    background: var(--accent-500);
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(255, 107, 0, 0.28);
}

.hero-content h1 {
    margin: 0 0 18px;
    font-size: clamp(34px, 6vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero-content p {
    margin: 0 0 28px;
    color: rgba(255, 255, 255, 0.78);
    font-size: clamp(16px, 2vw, 20px);
}

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

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

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

.btn.primary {
    color: var(--white);
    background: var(--primary-600);
    box-shadow: 0 10px 25px rgba(0, 89, 192, 0.26);
}

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

.btn.ghost {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.btn.wide {
    width: 100%;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.50);
    font-size: 36px;
    line-height: 1;
    transform: translateY(-50%);
    backdrop-filter: blur(8px);
    transition: background 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
    left: 20px;
}

.hero-next {
    right: 20px;
}

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

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

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

.home-sections,
.section-space {
    padding: 52px 0;
}

.home-sections {
    display: grid;
    gap: 68px;
}

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

.section-heading > div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-line {
    width: 4px;
    height: 34px;
    border-radius: 999px;
    background: var(--accent-500);
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 30px);
    line-height: 1.2;
}

.section-more {
    color: var(--primary-600);
    font-size: 14px;
    font-weight: 800;
}

.soft-panel {
    padding: 30px;
    border-radius: 28px;
    background: linear-gradient(135deg, var(--primary-50), var(--accent-50));
    box-shadow: var(--soft-shadow);
}

.ranking-panel,
.detail-card,
.side-card,
.poster-card,
.category-overview-card,
.filter-panel {
    background: var(--white);
    border-radius: 18px;
    box-shadow: var(--soft-shadow);
}

.ranking-panel {
    padding: 30px;
}

.movie-grid {
    display: grid;
    gap: 24px;
}

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

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

.movie-card,
.featured-card {
    position: relative;
    display: block;
    overflow: hidden;
    color: inherit;
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--soft-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover,
.featured-card:hover,
.category-tile:hover,
.category-overview-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--soft-shadow-lg);
}

.movie-thumb {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, var(--neutral-800), var(--primary-700));
}

.movie-thumb img,
.featured-card img,
.poster-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease, opacity 0.2s ease;
}

.movie-card:hover .movie-thumb img,
.featured-card:hover img {
    transform: scale(1.07);
}

.movie-thumb img.image-missing,
.featured-card img.image-missing,
.hero-slide img.image-missing,
.poster-card img.image-missing,
.player-cover img.image-missing {
    opacity: 0;
}

.thumb-label,
.thumb-year,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 9px;
    border-radius: 8px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.68);
    font-size: 12px;
    font-weight: 700;
    backdrop-filter: blur(8px);
}

.thumb-label {
    top: 12px;
    left: 12px;
}

.thumb-year {
    right: 12px;
    bottom: 12px;
}

.rank-badge {
    top: 12px;
    right: 12px;
    color: var(--white);
    background: var(--accent-500);
}

.movie-body {
    padding: 16px;
}

.movie-body h3,
.featured-content h3 {
    margin: 0 0 10px;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 18px;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.movie-card:hover h3,
.featured-card:hover h3 {
    color: var(--primary-600);
}

.movie-body p,
.featured-content p {
    margin: 0 0 14px;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: var(--neutral-600);
    font-size: 14px;
}

.card-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    color: var(--neutral-500);
    font-size: 13px;
}

.card-meta-row.light {
    color: rgba(255, 255, 255, 0.74);
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag,
.pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.tag {
    color: var(--neutral-600);
    background: var(--neutral-100);
}

.pill.primary {
    color: var(--primary-700);
    background: var(--primary-100);
}

.pill.accent {
    color: var(--white);
    background: var(--accent-500);
}

.movie-card-list {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 0;
}

.movie-thumb-list {
    aspect-ratio: auto;
    height: 100%;
    min-height: 170px;
}

.movie-body-list {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
}

.list-stack,
.ranking-list,
.large-list,
.side-ranking {
    display: grid;
    gap: 16px;
}

.featured-card {
    min-height: 360px;
    background: var(--neutral-900);
}

.featured-card img,
.featured-shade {
    position: absolute;
    inset: 0;
}

.featured-shade {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.04));
}

.featured-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 24px;
    color: var(--white);
}

.featured-content p {
    color: rgba(255, 255, 255, 0.75);
}

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

.category-tile {
    display: block;
    min-height: 154px;
    padding: 24px;
    border: 1px solid var(--neutral-200);
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--soft-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile span {
    display: block;
    margin-bottom: 12px;
    color: var(--primary-600);
    font-size: 20px;
    font-weight: 800;
}

.category-tile p,
.category-overview-card p {
    margin: 0;
    color: var(--neutral-600);
    font-size: 14px;
}

.page-hero {
    color: var(--white);
    background: linear-gradient(120deg, var(--primary-600), var(--primary-700) 55%, var(--accent-500));
}

.small-hero,
.category-hero {
    padding: 58px 0;
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(32px, 5vw, 48px);
    line-height: 1.1;
}

.page-hero p {
    max-width: 820px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 17px;
}

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

.detail-wrap .breadcrumb {
    padding-top: 30px;
    color: var(--neutral-500);
}

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

.category-overview-card {
    padding: 24px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-overview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.category-overview-head h2 {
    margin: 0;
    font-size: 21px;
}

.category-overview-head span {
    color: var(--primary-600);
    font-size: 13px;
    font-weight: 800;
}

.mini-links {
    display: grid;
    gap: 8px;
    margin-top: 18px;
}

.mini-links a {
    color: var(--neutral-700);
    font-size: 14px;
}

.mini-links a:hover {
    color: var(--primary-600);
}

.filter-panel {
    padding: 20px;
    margin-bottom: 28px;
}

.filter-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 160px 160px;
    gap: 12px;
}

.filter-row input,
.filter-row select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--neutral-300);
    border-radius: 12px;
    outline: 0;
    padding: 0 14px;
    color: var(--neutral-700);
    background: var(--white);
}

.filter-row input:focus,
.filter-row select:focus {
    border-color: var(--primary-600);
    box-shadow: 0 0 0 3px rgba(0, 89, 192, 0.12);
}

.empty-state {
    display: none;
    margin-top: 18px;
    color: var(--neutral-600);
    font-weight: 700;
}

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

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

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 0.86fr);
    gap: 30px;
    align-items: start;
}

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

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

.player-video {
    object-fit: contain;
    background: #000000;
}

.player-cover {
    z-index: 3;
    border: 0;
    padding: 0;
    color: var(--white);
    background: #000000;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(0, 89, 192, 0.18), rgba(0, 0, 0, 0.68));
}

.player-cover.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-circle {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 4;
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--primary-600);
    box-shadow: 0 18px 40px rgba(0, 89, 192, 0.42);
    transform: translate(-50%, -50%);
}

.play-circle svg {
    width: 42px;
    height: 42px;
    margin-left: 4px;
    fill: currentColor;
}

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

.detail-card h1 {
    margin: 0 0 16px;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.15;
}

.detail-card h2 {
    margin: 28px 0 12px;
    font-size: 22px;
}

.detail-card p {
    margin: 0;
    color: var(--neutral-700);
    line-height: 1.85;
}

.detail-lead {
    color: var(--neutral-900) !important;
    font-size: 18px;
    font-weight: 700;
}

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

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

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

.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    color: var(--neutral-700);
    background: var(--neutral-100);
    font-size: 13px;
    font-weight: 700;
}

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

.poster-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--neutral-800), var(--primary-700));
}

.poster-card h2,
.side-card h2 {
    margin: 18px 0 10px;
    font-size: 22px;
}

.poster-card p {
    margin: 0 0 18px;
    color: var(--neutral-600);
}

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

.side-ranking .movie-card-list {
    grid-template-columns: 94px 1fr;
}

.side-ranking .movie-thumb-list {
    min-height: 88px;
}

.side-ranking .movie-body-list {
    padding: 12px;
}

.side-ranking .movie-body h3 {
    font-size: 14px;
}

.side-ranking .movie-body p,
.side-ranking .card-tags {
    display: none;
}

.site-footer {
    margin-top: 70px;
    color: var(--neutral-300);
    background: var(--neutral-800);
}

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

.footer-logo {
    margin-bottom: 14px;
    color: var(--white);
    font-size: 24px;
    font-weight: 900;
}

.footer-brand p {
    max-width: 520px;
    margin: 0;
    color: var(--neutral-300);
}

.site-footer h2 {
    margin: 0 0 16px;
    color: var(--white);
    font-size: 17px;
}

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

.site-footer a {
    color: var(--neutral-300);
    font-size: 14px;
}

.site-footer a:hover {
    color: var(--white);
}

.footer-bottom {
    padding: 20px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    color: var(--neutral-500);
    text-align: center;
    font-size: 14px;
}

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

    .nav-toggle {
        display: flex;
    }

    .header-inner {
        justify-content: space-between;
    }

    .nav-search {
        margin-left: auto;
    }

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

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

    .detail-side {
        display: grid;
        grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
        gap: 22px;
    }

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

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

    .hero-slider {
        height: 520px;
    }

    .hero-arrow {
        display: none;
    }

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

    .movie-card-list {
        grid-template-columns: 180px 1fr;
    }

    .filter-row {
        grid-template-columns: 1fr 1fr;
    }

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

@media (max-width: 560px) {
    .header-inner,
    .page-wrap,
    .mobile-nav,
    .footer-inner {
        width: min(100% - 24px, 1280px);
    }

    .brand {
        font-size: 19px;
    }

    .hero-slider {
        height: 480px;
    }

    .hero-content {
        left: 16px;
        width: calc(100% - 32px);
    }

    .hero-content p {
        display: -webkit-box;
        overflow: hidden;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
    }

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

    .movie-grid.three-col,
    .movie-grid.four-col,
    .category-grid,
    .category-overview-grid,
    .detail-side {
        grid-template-columns: 1fr;
    }

    .soft-panel,
    .ranking-panel,
    .detail-card {
        padding: 20px;
        border-radius: 18px;
    }

    .movie-card-list {
        grid-template-columns: 1fr;
    }

    .movie-thumb-list {
        aspect-ratio: 16 / 10;
        min-height: 0;
    }

    .filter-row {
        grid-template-columns: 1fr;
    }

    .play-circle {
        width: 68px;
        height: 68px;
    }
}
