* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: #111827;
    background: #f8fafc;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.82);
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    backdrop-filter: blur(18px);
}

.header-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 14px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #06b6d4, #7c3aed);
    box-shadow: 0 16px 36px rgba(37, 99, 235, 0.28);
}

.brand-text {
    font-size: 20px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

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

.nav-link:hover,
.nav-link.active {
    color: #0f172a;
    background: #e0f2fe;
}

.nav-link.muted {
    color: #64748b;
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    background: #eff6ff;
    border-radius: 14px;
    padding: 10px;
}

.mobile-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #0f172a;
    border-radius: 999px;
}

.hero-carousel {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    background: radial-gradient(circle at top left, #dbeafe 0, transparent 32%), linear-gradient(135deg, #0f172a, #1e3a8a 50%, #0891b2);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.65fr);
    align-items: center;
    gap: 54px;
    max-width: 1240px;
    margin: 0 auto;
    padding: 96px 22px 92px;
    opacity: 0;
    transform: translateX(34px);
    pointer-events: none;
    transition: opacity 0.65s ease, transform 0.65s ease;
}

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.68), rgba(15, 23, 42, 0.2)), var(--hero-image);
    background-size: cover;
    background-position: center;
    filter: saturate(1.06);
    transform: scale(1.04);
    z-index: -2;
}

.hero-backdrop::after,
.page-hero-layer::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 22% 20%, rgba(56, 189, 248, 0.26), transparent 34%), radial-gradient(circle at 78% 28%, rgba(168, 85, 247, 0.22), transparent 30%);
}

.hero-copy {
    color: #ffffff;
    max-width: 760px;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #0891b2;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy .eyebrow,
.light .section-kicker,
.page-hero .section-kicker,
.rank-hero .section-kicker {
    color: #67e8f9;
}

.hero-copy h1 {
    margin: 18px 0 18px;
    font-size: clamp(44px, 7vw, 86px);
    line-height: 0.96;
    letter-spacing: -0.06em;
}

.hero-copy p {
    max-width: 680px;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
}

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

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

.hero-tags span,
.detail-tags span,
.tag-row span {
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.hero-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 7px 11px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 19px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn.primary {
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    box-shadow: 0 18px 45px rgba(37, 99, 235, 0.34);
}

.btn.ghost {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
}

.btn.soft {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.92);
}

.btn.small {
    min-height: 38px;
    padding: 0 14px;
    color: #0f172a;
    background: #e0f2fe;
}

.hero-poster {
    position: relative;
    display: block;
    justify-self: end;
    width: min(370px, 100%);
    aspect-ratio: 2 / 3;
    padding: 12px;
    border-radius: 34px;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(16px);
}

.hero-poster span,
.poster-frame,
.related-poster,
.detail-poster,
.category-cover {
    display: block;
    background-size: cover;
    background-position: center;
    background-color: #dbeafe;
}

.hero-poster span {
    width: 100%;
    height: 100%;
    border-radius: 24px;
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    padding: 0;
}

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

.section-wrap {
    max-width: 1240px;
    margin: 0 auto;
    padding: 72px 22px;
}

.quick-search-wrap {
    padding-bottom: 36px;
}

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

.section-head.center {
    text-align: center;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.section-head.between {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
}

.section-head h2,
.page-hero h1,
.detail-content h1 {
    margin: 8px 0 0;
    color: #0f172a;
    font-size: clamp(30px, 4vw, 52px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.section-head p,
.page-hero p {
    margin: 12px 0 0;
    color: #64748b;
    font-size: 17px;
}

.section-link {
    color: #2563eb;
    font-weight: 900;
}

.light h2,
.light .section-link,
.hot-panel .section-head h2 {
    color: #ffffff;
}

.light-link {
    color: #cffafe;
}

.filter-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.07);
}

.search-box {
    flex: 1;
    min-width: 240px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    min-height: 48px;
    border-radius: 18px;
    background: #f1f5f9;
    color: #64748b;
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #0f172a;
}

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

.filter-chip {
    min-height: 40px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    color: #475569;
    background: #e2e8f0;
    font-weight: 800;
}

.filter-chip.active,
.filter-chip:hover {
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
}

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

.category-tile {
    position: relative;
    min-height: 184px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 18px;
    overflow: hidden;
    border-radius: 26px;
    color: #ffffff;
    background-image: linear-gradient(180deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.88)), var(--tile-image);
    background-size: cover;
    background-position: center;
    box-shadow: 0 22px 52px rgba(15, 23, 42, 0.14);
}

.category-tile span {
    font-size: 21px;
    font-weight: 950;
}

.category-tile strong {
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 13px;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 28px 72px rgba(15, 23, 42, 0.14);
}

.poster-link {
    display: block;
}

.poster-frame {
    position: relative;
    min-height: 320px;
    overflow: hidden;
}

.movie-card-compact {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    min-height: 188px;
}

.movie-card-compact .poster-frame {
    min-height: 100%;
    height: 100%;
}

.poster-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(15, 23, 42, 0.55));
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #ef4444);
    font-weight: 950;
    box-shadow: 0 10px 26px rgba(239, 68, 68, 0.35);
}

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

.card-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}

.card-meta span,
.detail-meta span {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 999px;
    background: #f1f5f9;
}

.movie-card h3 {
    margin: 12px 0 8px;
    color: #0f172a;
    font-size: 20px;
    line-height: 1.22;
}

.movie-card p {
    min-height: 66px;
    margin: 0 0 14px;
    color: #64748b;
    font-size: 14px;
}

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

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

.movie-card-compact p {
    min-height: auto;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.tag-row span,
.detail-tags span {
    padding: 5px 9px;
    color: #334155;
    background: #f1f5f9;
}

.hot-panel {
    max-width: none;
    margin-top: 30px;
    padding-left: max(22px, calc((100vw - 1240px) / 2 + 22px));
    padding-right: max(22px, calc((100vw - 1240px) / 2 + 22px));
    background: linear-gradient(135deg, #0f172a, #1e3a8a 55%, #0891b2);
}

.page-hero {
    position: relative;
    max-width: 1240px;
    margin: 34px auto 0;
    min-height: 320px;
    overflow: hidden;
    border-radius: 34px;
    padding: 72px 42px;
    background: #0f172a;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.18);
}

.page-hero.slim {
    color: #0f172a;
    background: linear-gradient(135deg, #e0f2fe, #f8fafc);
}

.category-hero,
.rank-hero {
    color: #ffffff;
    background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.42)), var(--hero-image);
    background-size: cover;
    background-position: center;
}

.page-hero-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.page-hero > div:not(.page-hero-layer) {
    position: relative;
    max-width: 720px;
    z-index: 2;
}

.category-hero h1,
.category-hero p,
.rank-hero h1,
.rank-hero p {
    color: #ffffff;
}

.compact-actions {
    margin-top: 24px;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 22px;
    padding: 18px;
    border-radius: 30px;
    background: #ffffff;
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.08);
}

.category-cover-link {
    display: block;
}

.category-cover {
    height: 100%;
    min-height: 220px;
    border-radius: 22px;
    background-image: var(--tile-image);
}

.category-overview-card h2 {
    margin: 6px 0;
    font-size: 28px;
    line-height: 1.1;
}

.category-overview-card p {
    color: #64748b;
}

.mini-link-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
}

.mini-link-list a {
    padding: 6px 10px;
    border-radius: 999px;
    color: #2563eb;
    background: #eff6ff;
    font-size: 13px;
    font-weight: 800;
}

.detail-shell {
    max-width: 1240px;
    margin: 0 auto;
    padding: 34px 22px 76px;
}

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

.breadcrumb a {
    color: #2563eb;
}

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

.detail-main,
.detail-side {
    min-width: 0;
}

.player-card,
.detail-content,
.side-card,
.text-card {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.08);
}

.player-card {
    padding: 12px;
}

.video-box {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 22px;
    background: #020617;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.62));
}

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

.play-circle {
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 5px;
    border-radius: 50%;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
    font-size: 34px;
}

.detail-content {
    margin-top: 22px;
    padding: 30px;
}

.detail-title-row {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 20px;
}

.detail-content h1 {
    font-size: clamp(32px, 4vw, 56px);
}

.detail-meta {
    margin: 20px 0 14px;
}

.detail-tags {
    margin-bottom: 22px;
}

.text-card {
    padding: 24px;
    margin-top: 18px;
    box-shadow: none;
    background: linear-gradient(135deg, #f8fafc, #ffffff);
}

.text-card.highlight {
    background: linear-gradient(135deg, #f0f9ff, #ecfeff);
}

.text-card.blue {
    background: linear-gradient(135deg, #eff6ff, #f8fafc);
}

.text-card h2,
.side-card h2 {
    margin: 0 0 12px;
    font-size: 22px;
    line-height: 1.2;
}

.text-card p {
    margin: 0 0 12px;
    color: #475569;
}

.text-card p:last-child {
    margin-bottom: 0;
}

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

.side-card {
    padding: 18px;
    margin-bottom: 18px;
}

.poster-side {
    display: grid;
    gap: 14px;
}

.detail-poster {
    height: 440px;
    border-radius: 22px;
}

.poster-side strong {
    display: block;
    font-size: 20px;
}

.poster-side em,
.related-info em {
    display: block;
    color: #64748b;
    font-style: normal;
    font-size: 13px;
}

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

.related-card {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 8px;
    border-radius: 18px;
    background: #f8fafc;
    transition: background 0.2s ease, transform 0.2s ease;
}

.related-card:hover {
    background: #e0f2fe;
    transform: translateY(-2px);
}

.related-poster {
    height: 92px;
    border-radius: 14px;
}

.related-info strong {
    display: block;
    color: #0f172a;
    line-height: 1.35;
}

.site-footer {
    margin-top: 40px;
    color: #cbd5e1;
    background: #0f172a;
}

.footer-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 42px 22px;
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 32px;
}

.footer-brand {
    color: #ffffff;
    font-size: 22px;
}

.footer-inner p {
    max-width: 560px;
    margin: 12px 0 0;
    color: #94a3b8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.footer-links a {
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.is-filtered-out {
    display: none !important;
}

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

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

    .detail-side {
        position: static;
    }
}

@media (max-width: 820px) {
    .header-inner {
        flex-wrap: wrap;
    }

    .mobile-toggle {
        display: block;
    }

    .main-nav {
        display: none;
        width: 100%;
        justify-content: flex-start;
        padding-top: 10px;
    }

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

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

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 28px;
        padding-top: 76px;
    }

    .hero-poster {
        justify-self: start;
        width: 220px;
    }

    .filter-panel,
    .section-head.between,
    .footer-inner,
    .detail-title-row {
        flex-direction: column;
        display: flex;
        align-items: stretch;
    }

    .footer-links {
        justify-content: flex-start;
    }

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

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

@media (max-width: 560px) {
    .brand-text {
        font-size: 17px;
    }

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

    .hero-copy h1 {
        font-size: 42px;
    }

    .hero-copy p {
        font-size: 15px;
    }

    .section-wrap,
    .detail-shell {
        padding-left: 16px;
        padding-right: 16px;
    }

    .page-hero {
        margin-left: 16px;
        margin-right: 16px;
        padding: 42px 24px;
    }

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

    .movie-card-compact {
        grid-template-columns: 116px minmax(0, 1fr);
    }

    .poster-frame {
        min-height: 280px;
    }

    .movie-card-compact .poster-frame {
        min-height: 100%;
    }

    .detail-content {
        padding: 22px;
    }

    .detail-poster {
        height: 360px;
    }
}
