:root {
    --bg: #f7f9ff;
    --surface: #ffffff;
    --surface-soft: #eef4ff;
    --text: #172033;
    --muted: #68758c;
    --primary: #2563eb;
    --primary-dark: #1e3a8a;
    --accent: #7c3aed;
    --gold: #f59e0b;
    --line: #dbe6ff;
    --shadow: 0 20px 60px rgba(37, 99, 235, 0.15);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(96, 165, 250, 0.26), transparent 34rem),
        linear-gradient(180deg, #f8fbff 0%, #edf3ff 48%, #ffffff 100%);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
    line-height: 1.65;
}

body.menu-open {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(239, 246, 255, 0.96), rgba(238, 242, 255, 0.96), rgba(250, 245, 255, 0.96));
    border-bottom: 1px solid rgba(37, 99, 235, 0.18);
    box-shadow: 0 10px 35px rgba(30, 64, 175, 0.10);
    backdrop-filter: blur(18px);
}

.header-main {
    width: min(1220px, calc(100% - 32px));
    height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.brand-mark {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    font-weight: 900;
    font-size: 22px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 14px 35px rgba(37, 99, 235, 0.32);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-name {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.04em;
    background: linear-gradient(90deg, #1e3a8a, #6d28d9);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-tagline {
    margin-top: 4px;
    color: #35548a;
    font-size: 12px;
    font-weight: 700;
}

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

.nav-link,
.quick-chip {
    border-radius: 999px;
    transition: transform 180ms ease, color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.nav-link {
    padding: 10px 16px;
    color: #17366d;
    font-weight: 750;
}

.nav-link:hover {
    color: #ffffff;
    background: linear-gradient(90deg, var(--primary), #4f46e5);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
    transform: translateY(-1px);
}

.mobile-menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: rgba(37, 99, 235, 0.10);
    padding: 10px;
}

.mobile-menu-button span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--primary-dark);
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
}

.quick-nav {
    width: 100%;
    border-top: 1px solid rgba(37, 99, 235, 0.10);
    overflow-x: auto;
    white-space: nowrap;
    padding: 9px max(16px, calc((100vw - 1220px) / 2));
    display: flex;
    gap: 10px;
}

.quick-chip {
    display: inline-flex;
    padding: 7px 14px;
    color: #285796;
    background: rgba(255, 255, 255, 0.70);
    font-size: 14px;
    font-weight: 700;
}

.quick-chip:hover {
    color: #ffffff;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
}

.hero-slider {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    color: #ffffff;
    background: #071329;
}

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    filter: blur(20px) saturate(1.15);
    transform: scale(1.08);
    opacity: 0.58;
}

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 22%, rgba(124, 58, 237, 0.42), transparent 28rem),
        linear-gradient(90deg, rgba(7, 19, 41, 0.96), rgba(20, 47, 94, 0.82) 52%, rgba(15, 23, 42, 0.76));
}

.hero-content {
    position: relative;
    z-index: 1;
    width: min(1220px, calc(100% - 32px));
    min-height: 680px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 420px;
    align-items: center;
    gap: 70px;
    padding: 68px 0 92px;
}

.hero-text h1 {
    max-width: 820px;
    margin: 16px 0 18px;
    font-size: clamp(42px, 7vw, 86px);
    line-height: 0.95;
    letter-spacing: -0.07em;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: max-content;
    gap: 8px;
    color: #dbeafe;
    background: rgba(59, 130, 246, 0.20);
    border: 1px solid rgba(147, 197, 253, 0.34);
    border-radius: 999px;
    padding: 8px 13px;
    font-size: 13px;
    font-weight: 850;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.section-kicker {
    color: var(--primary);
    background: #eaf2ff;
    border-color: #c8dcff;
}

.hero-lead {
    max-width: 760px;
    color: #dbeafe;
    font-size: clamp(17px, 2.2vw, 22px);
}

.hero-tags {
    margin: 24px 0;
}

.hero-actions,
.filter-selects,
.category-stats,
.hero-stat-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.primary-button,
.glass-button,
.outline-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border-radius: 14px;
    padding: 12px 22px;
    border: 0;
    font-weight: 850;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.primary-button {
    color: #ffffff;
    background: linear-gradient(90deg, #3b82f6, #4f46e5, #7c3aed);
    box-shadow: 0 18px 45px rgba(37, 99, 235, 0.34);
}

.primary-button:hover,
.glass-button:hover,
.outline-button:hover {
    transform: translateY(-2px);
}

.glass-button {
    color: #eaf2ff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(14px);
}

.outline-button {
    color: var(--primary-dark);
    background: #ffffff;
    border: 1px solid #bdd4ff;
}

.hero-poster {
    position: relative;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.48);
    transform: rotate(2deg);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: inherit;
}

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

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

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

.section-shell {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 76px 0;
}

.section-heading {
    margin-bottom: 34px;
}

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

.section-heading h2,
.search-cta h2,
.page-hero h1 {
    margin: 12px 0 8px;
    color: var(--text);
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.section-heading p,
.search-cta p,
.page-hero p {
    margin: 0;
    color: var(--muted);
    font-size: 17px;
}

.search-cta {
    margin-top: -48px;
    position: relative;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 26px;
    padding: 30px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    border: 1px solid rgba(96, 165, 250, 0.18);
    backdrop-filter: blur(18px);
}

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

.category-card,
.category-overview-card,
.movie-card,
.filter-panel,
.side-card,
.detail-section,
.detail-info-card {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(37, 99, 235, 0.12);
    box-shadow: 0 18px 50px rgba(30, 64, 175, 0.10);
}

.category-card {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 18px;
    padding: 18px;
    border-radius: 24px;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.category-card:hover,
.category-overview-card:hover,
.movie-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 26px 65px rgba(37, 99, 235, 0.18);
}

.category-covers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    min-height: 120px;
}

.category-covers img,
.category-image-strip img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.category-card h3,
.category-overview-body h2 {
    margin: 0 0 8px;
    font-size: 21px;
}

.category-card p,
.category-overview-body p,
.card-desc {
    color: var(--muted);
}

.category-card span,
.category-stats span {
    color: var(--primary);
    font-weight: 850;
}

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

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

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

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #dce8ff;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 320ms ease;
}

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

.poster-overlay {
    position: absolute;
    inset-inline: 14px;
    bottom: 14px;
    display: grid;
    place-items: center;
    min-height: 38px;
    color: #ffffff;
    background: rgba(37, 99, 235, 0.86);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 850;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 180ms ease, transform 180ms ease;
}

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

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: grid;
    place-items: center;
    min-width: 38px;
    height: 38px;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    font-weight: 900;
    box-shadow: 0 12px 30px rgba(239, 68, 68, 0.34);
}

.card-body {
    padding: 16px;
}

.card-body h3 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.3;
}

.card-body h3 a:hover,
.text-link:hover,
.footer-links a:hover {
    color: var(--primary);
}

.card-meta {
    margin: 0 0 10px;
    color: #426195;
    font-size: 13px;
    font-weight: 750;
}

.card-desc {
    margin: 0 0 14px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    font-size: 14px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    border-radius: 999px;
    padding: 4px 9px;
    color: #1d4ed8;
    background: #eaf2ff;
    font-size: 12px;
    font-weight: 800;
}

.tinted-section {
    width: 100%;
    max-width: none;
    padding-inline: max(16px, calc((100vw - 1220px) / 2));
    background: linear-gradient(180deg, rgba(219, 234, 254, 0.44), rgba(255, 255, 255, 0));
}

.text-link {
    color: var(--primary-dark);
    font-weight: 850;
}

.page-main,
.detail-main {
    min-height: 60vh;
}

.page-hero {
    width: min(1220px, calc(100% - 32px));
    margin: 34px auto 0;
    padding: 64px;
    border-radius: 34px;
    background:
        radial-gradient(circle at 85% 15%, rgba(124, 58, 237, 0.28), transparent 22rem),
        linear-gradient(135deg, #eaf2ff, #ffffff 55%, #f3e8ff);
    border: 1px solid rgba(96, 165, 250, 0.20);
    box-shadow: var(--shadow);
}

.compact-hero h1 {
    max-width: 900px;
}

.hero-stat-row {
    margin-top: 22px;
}

.hero-stat-row span {
    display: inline-flex;
    border-radius: 999px;
    padding: 7px 13px;
    color: var(--primary-dark);
    background: rgba(255, 255, 255, 0.82);
    font-weight: 850;
}

.category-overview-card {
    overflow: hidden;
    border-radius: 26px;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.category-image-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    height: 190px;
    padding: 10px;
}

.category-overview-body {
    padding: 20px;
}

.category-stats {
    justify-content: space-between;
    margin-top: 16px;
}

.category-stats a {
    color: var(--primary);
    font-weight: 850;
}

.filter-panel {
    margin-bottom: 28px;
    padding: 22px;
    border-radius: 24px;
}

.search-field label,
.filter-selects label {
    display: grid;
    gap: 8px;
    color: #34517f;
    font-weight: 850;
}

.search-field input,
.filter-selects select {
    width: 100%;
    min-height: 48px;
    border: 1px solid #bdd4ff;
    border-radius: 14px;
    color: var(--text);
    background: #ffffff;
    padding: 0 14px;
    outline: none;
    transition: border 160ms ease, box-shadow 160ms ease;
}

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

.filter-selects {
    margin-top: 16px;
}

.filter-selects label {
    min-width: 180px;
}

.filter-count {
    margin: 14px 0 0;
    color: var(--muted);
    font-weight: 750;
}

.breadcrumb {
    width: min(1220px, calc(100% - 32px));
    margin: 28px auto 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    color: #526987;
    font-size: 14px;
}

.breadcrumb a {
    color: var(--primary);
    font-weight: 800;
}

.detail-hero,
.detail-layout {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) 410px;
    gap: 24px;
    align-items: stretch;
}

.player-panel {
    position: relative;
    min-height: 520px;
    overflow: hidden;
    border-radius: 30px;
    background: #071329;
    box-shadow: 0 28px 80px rgba(7, 19, 41, 0.26);
}

.movie-player {
    width: 100%;
    height: 100%;
    min-height: 520px;
    background: #071329;
    object-fit: cover;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    align-content: center;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(7, 19, 41, 0.16), rgba(7, 19, 41, 0.58));
    border: 0;
    font-size: 18px;
    font-weight: 900;
}

.play-icon {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #3b82f6, #7c3aed);
    box-shadow: 0 18px 50px rgba(37, 99, 235, 0.45);
    padding-left: 4px;
    font-size: 30px;
}

.player-status {
    position: absolute;
    left: 18px;
    bottom: 12px;
    z-index: 4;
    margin: 0;
    color: #dbeafe;
    font-size: 13px;
    font-weight: 800;
}

.detail-info-card {
    border-radius: 30px;
    overflow: hidden;
}

.detail-cover {
    width: 100%;
    aspect-ratio: 16 / 11;
    object-fit: cover;
}

.detail-info-text {
    padding: 24px;
}

.detail-info-text h1 {
    margin: 14px 0 12px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.detail-one-line {
    color: var(--muted);
    font-size: 16px;
}

.movie-meta-list {
    display: grid;
    gap: 10px;
    margin: 18px 0;
}

.movie-meta-list div {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 12px;
}

.movie-meta-list dt {
    color: #7890ad;
    font-weight: 850;
}

.movie-meta-list dd {
    margin: 0;
    color: #203a63;
    font-weight: 800;
}

.movie-meta-list a {
    color: var(--primary);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 24px;
    margin-top: 24px;
}

.detail-content {
    display: grid;
    gap: 18px;
}

.detail-section,
.side-card {
    border-radius: 26px;
    padding: 28px;
}

.detail-section h2,
.side-card h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.detail-section p,
.side-card p {
    margin: 0;
    color: #3f536f;
    font-size: 16px;
}

.related-section {
    padding-top: 58px;
}

.site-footer {
    margin-top: 80px;
    color: #dbeafe;
    background: linear-gradient(135deg, #0f172a, #172554 60%, #111827);
}

.footer-grid {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 54px 0;
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 34px;
}

.footer-brand {
    margin-bottom: 12px;
    color: #ffffff;
    font-size: 26px;
    font-weight: 900;
}

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

.footer-grid p {
    margin: 0;
    color: #bfdbfe;
}

.footer-links {
    display: grid;
    gap: 8px;
}

.footer-bottom {
    border-top: 1px solid rgba(191, 219, 254, 0.16);
    padding: 18px;
    text-align: center;
    color: #bfdbfe;
    font-size: 14px;
}

.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 60;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 18px 38px rgba(37, 99, 235, 0.28);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease;
}

.back-to-top.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.hidden-by-filter {
    display: none !important;
}

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

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

    .hero-content,
    .detail-hero,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        max-width: 360px;
        transform: none;
    }
}

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

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

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

    .quick-nav {
        display: none;
    }

    .header-main {
        height: 68px;
    }

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

    .hero-slider,
    .hero-content {
        min-height: 620px;
    }

    .hero-content {
        gap: 26px;
        padding-top: 44px;
    }

    .hero-poster {
        display: none;
    }

    .section-shell,
    .page-hero {
        width: min(100% - 24px, 1220px);
    }

    .page-hero {
        padding: 36px 24px;
        border-radius: 26px;
    }

    .search-cta,
    .section-heading.between {
        align-items: stretch;
        flex-direction: column;
    }

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

    .filter-selects label {
        min-width: 100%;
    }

    .player-panel,
    .movie-player {
        min-height: 320px;
    }
}

@media (max-width: 560px) {
    .brand-tagline {
        display: none;
    }

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

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

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

    .hero-slider,
    .hero-content {
        min-height: 560px;
    }

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

    .hero-actions a,
    .hero-actions button,
    .primary-button,
    .glass-button,
    .outline-button {
        width: 100%;
    }

    .section-shell {
        padding: 48px 0;
    }

    .detail-section,
    .side-card,
    .detail-info-text {
        padding: 20px;
    }
}
