:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --border: #e5e7eb;
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --red: #dc2626;
    --yellow: #f59e0b;
    --green: #16a34a;
    --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    --radius: 20px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: var(--bg);
    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(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(229, 231, 235, 0.75);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(18px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1280px;
    height: 68px;
    margin: 0 auto;
    padding: 0 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), #0f172a);
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.35);
}

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

.nav-link {
    position: relative;
    font-size: 15px;
    font-weight: 700;
    color: #374151;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--blue);
}

.nav-link.active::after {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -10px;
    height: 3px;
    content: "";
    background: var(--blue);
    border-radius: 999px;
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    padding: 9px;
    background: #f3f4f6;
    border: 0;
    border-radius: 12px;
}

.mobile-menu-button span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #111827;
    border-radius: 2px;
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--border);
    background: #ffffff;
}

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

.mobile-nav-inner {
    display: grid;
    gap: 6px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 12px 24px 18px;
}

.mobile-link {
    padding: 12px 0;
    color: #374151;
    font-weight: 700;
}

.mobile-link.active {
    color: var(--blue);
}

.hero-carousel {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #1e3a8a);
}

.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,
.page-hero > img,
.detail-hero > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.5), rgba(15, 23, 42, 0.15));
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 72px;
    width: min(1280px, 100%);
    padding: 0 24px;
    color: #ffffff;
    transform: translateX(-50%);
}

.hero-content h1 {
    max-width: 850px;
    margin: 14px 0 16px;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

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

.hero-labels,
.hero-meta,
.hero-tags,
.tag-row,
.movie-meta-line,
.detail-meta-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-labels span {
    padding: 6px 13px;
    font-size: 14px;
    font-weight: 800;
    color: #ffffff;
    background: var(--red);
    border-radius: 999px;
}

.hero-labels span + span {
    background: var(--blue);
}

.hero-meta {
    margin-bottom: 16px;
    color: #d1d5db;
    font-weight: 700;
}

.hero-tags span,
.tag-row span {
    padding: 5px 10px;
    color: #1d4ed8;
    background: #dbeafe;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.hero-content .hero-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
}

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

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

.primary-button {
    color: #ffffff;
    background: var(--blue);
    box-shadow: 0 16px 32px rgba(37, 99, 235, 0.35);
}

.primary-button:hover {
    background: var(--blue-dark);
    transform: translateY(-2px);
}

.secondary-button {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.16);
}

.secondary-button:hover {
    background: rgba(255, 255, 255, 0.24);
    transform: translateY(-2px);
}

.text-button {
    min-height: 40px;
    padding: 0;
    color: var(--blue);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 46px;
    height: 46px;
    color: #ffffff;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.48);
    border: 0;
    border-radius: 999px;
    transform: translateY(-50%);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.68);
    transform: translateY(-50%) scale(1.05);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

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

.content-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 64px 24px;
}

.intro-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding-top: 48px;
    padding-bottom: 48px;
}

.intro-strip h2 {
    margin: 6px 0 10px;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.15;
}

.intro-strip p,
.section-heading p,
.page-hero p,
.category-overview-card p,
.detail-hero-content p,
.detail-text-card p,
.horizontal-card p,
.movie-card p {
    color: var(--muted);
}

.eyebrow {
    display: inline-flex;
    color: var(--blue);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

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

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

.section-heading p {
    max-width: 680px;
    margin: 8px 0 0;
}

.section-more {
    flex: 0 0 auto;
    color: var(--blue);
    font-weight: 800;
}

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

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

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

.movie-card {
    overflow: hidden;
    background: var(--panel);
    border: 1px solid rgba(229, 231, 235, 0.78);
    border-radius: var(--radius);
    box-shadow: var(--soft-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-6px);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #e5e7eb;
}

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

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

.score-badge,
.type-badge,
.rank-number,
.score-chip {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    border-radius: 999px;
}

.score-badge {
    top: 12px;
    right: 12px;
    min-width: 46px;
    height: 28px;
    color: #111827;
    background: #fbbf24;
}

.type-badge {
    left: 12px;
    bottom: 12px;
    min-height: 27px;
    padding: 0 10px;
    color: #ffffff;
    background: rgba(17, 24, 39, 0.78);
    backdrop-filter: blur(12px);
    font-size: 12px;
}

.rank-number {
    top: 12px;
    left: 12px;
    min-width: 36px;
    height: 36px;
    color: #ffffff;
    background: var(--red);
}

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

.movie-meta-line {
    gap: 8px;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.movie-card h3,
.horizontal-card h3 {
    margin: 0 0 9px;
    font-size: 18px;
    line-height: 1.32;
}

.movie-card h3 a:hover,
.horizontal-card h3 a:hover,
.category-overview-card h2 a:hover {
    color: var(--blue);
}

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

.tag-row {
    gap: 6px;
}

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

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

.compact-card p {
    min-height: auto;
    -webkit-line-clamp: 1;
}

.gradient-panel {
    max-width: none;
    margin: 0 24px;
    padding-right: max(24px, calc((100vw - 1280px) / 2 + 24px));
    padding-left: max(24px, calc((100vw - 1280px) / 2 + 24px));
    background: linear-gradient(135deg, #eff6ff, #f8fafc);
    border-radius: 28px;
}

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

.category-tile {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    padding: 24px;
    color: #ffffff;
    background: #0f172a;
    border-radius: var(--radius);
    box-shadow: var(--soft-shadow);
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.44;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-tile::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(to top, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.18));
}

.category-tile span,
.category-tile p {
    position: relative;
    z-index: 2;
}

.category-tile span {
    display: block;
    margin-top: 72px;
    font-size: 22px;
    font-weight: 900;
}

.category-tile p {
    margin: 8px 0 0;
    color: #d1d5db;
    font-size: 14px;
}

.category-tile:hover img {
    opacity: 0.62;
    transform: scale(1.08);
}

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

.horizontal-card {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 18px;
    padding: 14px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--soft-shadow);
}

.horizontal-poster {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 15px;
    background: #e5e7eb;
}

.horizontal-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.score-chip {
    position: static;
    width: fit-content;
    min-height: 26px;
    padding: 0 10px;
    color: #111827;
    background: #fbbf24;
    font-size: 13px;
}

.poster-row {
    display: grid;
    grid-auto-columns: minmax(180px, 1fr);
    grid-auto-flow: column;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
}

.poster-row .movie-card {
    scroll-snap-align: start;
}

.page-hero,
.detail-hero {
    position: relative;
    min-height: 360px;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #1e3a8a);
}

.page-hero > div,
.detail-hero-content {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    padding: 86px 24px;
}

.page-hero h1,
.detail-hero h1 {
    max-width: 850px;
    margin: 8px 0 14px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
}

.page-hero p,
.detail-hero-content p {
    max-width: 760px;
    color: #e5e7eb;
    font-size: 18px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: #dbeafe;
    font-size: 14px;
    font-weight: 700;
}

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

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

.category-overview-card {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 24px;
    align-items: center;
    padding: 20px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--soft-shadow);
}

.category-cover-stack {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.category-cover-stack img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 14px;
}

.category-overview-card h2 {
    margin: 0 0 8px;
    font-size: 26px;
}

.filter-panel {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 14px;
    margin-bottom: 28px;
    padding: 18px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: var(--soft-shadow);
}

.filter-panel label {
    display: grid;
    gap: 7px;
    color: #374151;
    font-size: 13px;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 44px;
    padding: 0 13px;
    color: #111827;
    background: #f9fafb;
    border: 1px solid var(--border);
    border-radius: 13px;
    outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

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

.detail-main-info {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 32px;
    align-items: end;
}

.detail-poster {
    width: 250px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.28);
    border-radius: 24px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    max-width: 720px;
    margin: 22px 0;
}

.detail-meta-grid span {
    padding: 12px 14px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    backdrop-filter: blur(16px);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.8fr);
    gap: 26px;
    align-items: start;
}

.player-card,
.detail-text-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--soft-shadow);
}

.player-card {
    overflow: hidden;
}

.video-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.movie-video {
    width: 100%;
    height: 100%;
    background: #020617;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: #ffffff;
    cursor: pointer;
    background: radial-gradient(circle at center, rgba(37, 99, 235, 0.22), rgba(2, 6, 23, 0.58));
    border: 0;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-pulse {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 84px;
    height: 84px;
    background: var(--blue);
    border-radius: 999px;
    box-shadow: 0 0 0 18px rgba(37, 99, 235, 0.22);
}

.play-triangle {
    width: 0;
    height: 0;
    margin-left: 6px;
    border-top: 16px solid transparent;
    border-bottom: 16px solid transparent;
    border-left: 24px solid #ffffff;
}

.play-overlay strong {
    font-size: 20px;
    letter-spacing: 0.08em;
}

.detail-text-card {
    padding: 26px;
}

.detail-text-card h2 {
    margin: 0 0 10px;
    font-size: 24px;
}

.detail-text-card h2:not(:first-child) {
    margin-top: 28px;
}

.detail-text-card p {
    margin: 0;
}

.info-list {
    display: grid;
    gap: 12px;
    margin: 0;
}

.info-list div {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.info-list dt {
    color: #374151;
    font-weight: 900;
}

.info-list dd {
    margin: 0;
    color: var(--muted);
}

.site-footer {
    color: #d1d5db;
    background: #111827;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 52px 24px 26px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 34px;
}

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

.footer-grid p {
    margin: 0;
    color: #9ca3af;
    font-size: 14px;
}

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

.footer-grid a {
    color: #9ca3af;
    font-size: 14px;
}

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

.footer-bottom {
    margin-top: 34px;
    padding-top: 22px;
    color: #9ca3af;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
}

.movie-card.is-filtered-out {
    display: none;
}

@media (max-width: 1100px) {
    .four-col {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

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

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

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

    .mobile-menu-button {
        display: block;
    }

    .header-inner {
        height: 62px;
        padding: 0 16px;
    }

    .brand {
        font-size: 19px;
    }

    .brand-mark {
        width: 34px;
        height: 34px;
    }

    .hero-carousel {
        height: 560px;
    }

    .hero-content {
        bottom: 64px;
        padding: 0 18px;
    }

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

    .hero-content p {
        font-size: 16px;
    }

    .hero-arrow {
        display: none;
    }

    .content-section {
        padding: 42px 16px;
    }

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

    .four-col,
    .six-col,
    .category-grid,
    .footer-grid,
    .filter-panel,
    .detail-main-info,
    .detail-meta-grid {
        grid-template-columns: 1fr;
    }

    .movie-grid {
        gap: 18px;
    }

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

    .category-cover-stack {
        grid-template-columns: repeat(4, 1fr);
    }

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

    .page-hero > div,
    .detail-hero-content {
        padding: 62px 16px;
    }

    .detail-poster {
        width: 180px;
    }

    .detail-hero {
        min-height: auto;
    }

    .gradient-panel {
        margin: 0;
        border-radius: 0;
    }
}

@media (max-width: 480px) {
    .movie-card {
        border-radius: 16px;
    }

    .poster-row {
        grid-auto-columns: minmax(155px, 1fr);
    }

    .category-cover-stack {
        grid-template-columns: repeat(2, 1fr);
    }
}
