:root {
    color-scheme: light;
    --bg: #f7fbff;
    --bg-soft: #eef6ff;
    --text: #111827;
    --muted: #64748b;
    --border: rgba(15, 23, 42, 0.10);
    --brand: #2563eb;
    --brand-dark: #1d4ed8;
    --accent: #f97316;
    --panel: #ffffff;
    --panel-dark: #0f172a;
    --shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 32rem),
        linear-gradient(180deg, #ffffff 0%, var(--bg) 42%, #ffffff 100%);
    color: var(--text);
    min-height: 100vh;
}

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

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.88);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
}

.nav-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

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

.brand-text {
    font-size: 1.12rem;
}

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

.desktop-nav a,
.mobile-nav a {
    padding: 10px 16px;
    border-radius: 999px;
    color: #334155;
    font-weight: 600;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-nav a:hover {
    color: var(--brand);
    background: rgba(37, 99, 235, 0.08);
}

.menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: #eff6ff;
    border: 1px solid rgba(37, 99, 235, 0.18);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.menu-button span {
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: var(--brand);
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 10px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.mobile-nav.is-open {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.hero {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 0;
    border-radius: 34px;
    min-height: 620px;
    overflow: hidden;
    background: #0f172a;
    box-shadow: var(--shadow);
}

.hero-track,
.hero-slide,
.hero-backdrop {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 420px);
    align-items: center;
    gap: 48px;
    padding: clamp(28px, 5vw, 72px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    transform: scale(1.02);
}

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

.hero-backdrop {
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.94) 0%, rgba(15, 23, 42, 0.70) 46%, rgba(15, 23, 42, 0.36) 100%),
        var(--hero-image) center / cover no-repeat;
    filter: saturate(1.1);
}

.hero-copy,
.hero-cover {
    position: relative;
    z-index: 2;
}

.eyebrow {
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--brand);
}

.hero .eyebrow,
.section-shell--dark .eyebrow {
    color: #93c5fd;
}

.hero h1 {
    margin: 0;
    font-size: clamp(2.2rem, 5vw, 5rem);
    line-height: 1.03;
    color: #ffffff;
    letter-spacing: -0.05em;
    max-width: 780px;
}

.hero h2 {
    margin: 18px 0 0;
    font-size: clamp(1.35rem, 2vw, 2.1rem);
    color: #bfdbfe;
}

.hero p:not(.eyebrow) {
    max-width: 680px;
    color: #dbeafe;
    font-size: 1.08rem;
    line-height: 1.9;
}

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

.primary-button,
.ghost-button,
.section-more,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button {
    min-height: 48px;
    padding: 0 24px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    box-shadow: 0 16px 36px rgba(37, 99, 235, 0.28);
}

.primary-button--small {
    min-height: 42px;
    padding-inline: 18px;
    font-size: 0.92rem;
}

.ghost-button {
    min-height: 48px;
    padding: 0 24px;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.08);
}

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

.hero-cover {
    display: block;
    border-radius: 28px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
    transform: rotate(2deg);
}

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

.hero-dots {
    position: absolute;
    z-index: 4;
    left: clamp(28px, 5vw, 72px);
    bottom: 36px;
    display: flex;
    gap: 10px;
}

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

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

.section-shell,
.page-main,
.detail-main {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

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

.section-shell--dark {
    margin-top: 72px;
    padding: 42px;
    border-radius: 34px;
    color: #ffffff;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.34), transparent 24rem),
        linear-gradient(135deg, #0f172a, #111827 58%, #1e293b);
    box-shadow: var(--shadow);
}

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

.section-heading h2,
.category-overview-head h2,
.content-card h2,
.player-section h2 {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    letter-spacing: -0.04em;
}

.section-heading p,
.category-overview-head p {
    margin-top: 8px;
    color: var(--muted);
}

.section-shell--dark .section-heading p,
.section-shell--dark .section-more {
    color: #dbeafe;
}

.section-more,
.text-link {
    color: var(--brand);
    background: rgba(37, 99, 235, 0.08);
    padding: 10px 16px;
}

.search-panel {
    margin: 0 0 28px;
    padding: 12px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid var(--border);
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.07);
}

.search-panel label {
    display: grid;
    gap: 8px;
}

.search-panel span {
    padding-left: 10px;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--muted);
}

.search-panel input {
    width: 100%;
    min-height: 48px;
    border: 0;
    outline: 0;
    border-radius: 16px;
    padding: 0 16px;
    background: var(--bg-soft);
    color: var(--text);
}

.search-panel button {
    align-self: end;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 16px;
    border: 0;
    cursor: pointer;
    color: #ffffff;
    font-weight: 800;
    background: var(--brand);
}

.empty-tip {
    margin: -8px 0 24px;
    color: var(--muted);
    font-weight: 700;
}

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

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

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

.movie-card {
    min-width: 0;
    border-radius: 24px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.section-shell--dark .movie-card {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.16);
    border-color: rgba(37, 99, 235, 0.26);
}

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #0f172a;
}

.movie-card--large .movie-poster {
    aspect-ratio: 16 / 11;
}

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

.movie-card:hover .movie-poster img {
    transform: scale(1.08);
    filter: saturate(1.1);
}

.poster-year,
.poster-type,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 800;
    background: rgba(15, 23, 42, 0.76);
    backdrop-filter: blur(8px);
}

.poster-year {
    left: 10px;
    top: 10px;
    padding: 6px 10px;
}

.poster-type {
    right: 10px;
    bottom: 10px;
    padding: 6px 10px;
    background: rgba(249, 115, 22, 0.9);
}

.rank-badge {
    left: 10px;
    bottom: 10px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent), #ef4444);
}

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

.movie-meta {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.5;
}

.movie-card h3 {
    margin: 0 0 10px;
    font-size: 1.05rem;
    line-height: 1.4;
}

.section-shell--dark .movie-card h3,
.section-shell--dark .movie-card .movie-desc {
    color: #ffffff;
}

.movie-desc {
    margin: 0;
    color: #475569;
    line-height: 1.72;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mini-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.mini-tags span,
.detail-tags span {
    border-radius: 999px;
    padding: 6px 10px;
    color: #1d4ed8;
    font-size: 0.76rem;
    font-weight: 800;
    background: #dbeafe;
}

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

.category-tile {
    position: relative;
    min-height: 220px;
    border-radius: 26px;
    overflow: hidden;
    isolation: isolate;
    color: #ffffff;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
}

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

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.88));
}

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

.category-tile span {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 20px;
    display: grid;
    gap: 8px;
}

.category-tile strong {
    font-size: 1.3rem;
}

.category-tile em,
.compact-card em {
    font-style: normal;
    color: #cbd5e1;
    line-height: 1.6;
}

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

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

.compact-card {
    position: relative;
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding: 12px;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid var(--border);
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.compact-card:hover {
    transform: translateY(-3px);
    border-color: rgba(37, 99, 235, 0.28);
}

.compact-card img {
    width: 82px;
    height: 104px;
    border-radius: 14px;
    object-fit: cover;
}

.compact-card span {
    min-width: 0;
    display: grid;
    gap: 8px;
}

.compact-card strong {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.compact-rank {
    position: absolute;
    left: 8px;
    top: 8px;
    z-index: 2;
    width: 28px;
    height: 28px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 900;
    background: var(--accent);
}

.page-main {
    padding: 36px 0 80px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    border-radius: 34px;
    padding: clamp(34px, 6vw, 72px);
    margin-bottom: 34px;
    color: #ffffff;
    background:
        radial-gradient(circle at 80% 20%, rgba(249, 115, 22, 0.34), transparent 22rem),
        linear-gradient(135deg, #0f172a, #1e3a8a 65%, #111827);
    box-shadow: var(--shadow);
}

.page-hero h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 4rem);
    letter-spacing: -0.05em;
}

.page-hero p:not(.eyebrow) {
    max-width: 760px;
    color: #dbeafe;
    line-height: 1.9;
}

.category-overview-list {
    display: grid;
    gap: 24px;
}

.category-overview-card,
.content-card,
.player-section {
    padding: clamp(22px, 4vw, 34px);
    border-radius: 30px;
    background: #ffffff;
    border: 1px solid var(--border);
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.07);
}

.category-list {
    align-items: stretch;
}

.ranking-grid .movie-card:nth-child(-n + 3) {
    border-color: rgba(249, 115, 22, 0.36);
}

.detail-main {
    padding: 30px 0 80px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-weight: 700;
    margin: 0 0 20px;
}

.breadcrumb a {
    color: var(--brand);
}

.detail-hero {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: clamp(24px, 5vw, 56px);
    align-items: center;
    padding: clamp(24px, 5vw, 54px);
    border-radius: 34px;
    color: #ffffff;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.44), transparent 24rem),
        linear-gradient(135deg, #0f172a, #111827 60%, #1e293b);
    box-shadow: var(--shadow);
}

.detail-poster {
    border-radius: 28px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.38);
}

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

.detail-copy h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 4.2rem);
    letter-spacing: -0.05em;
    line-height: 1.08;
}

.detail-lead {
    color: #dbeafe;
    line-height: 1.9;
    font-size: 1.08rem;
}

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

.detail-meta div {
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.10);
}

.detail-meta dt {
    font-size: 0.78rem;
    color: #93c5fd;
    font-weight: 800;
}

.detail-meta dd {
    margin: 6px 0 0;
    color: #ffffff;
    line-height: 1.5;
}

.detail-tags span {
    color: #ffffff;
    background: rgba(37, 99, 235, 0.45);
}

.player-section,
.content-card {
    margin-top: 28px;
}

.player-card {
    position: relative;
    margin-top: 20px;
    border-radius: 26px;
    overflow: hidden;
    background: #020617;
    aspect-ratio: 16 / 9;
}

.movie-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #020617;
}

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

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

.play-circle {
    width: 84px;
    height: 84px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 6px;
    font-size: 2rem;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    box-shadow: 0 18px 48px rgba(37, 99, 235, 0.34);
}

.play-layer strong {
    font-size: 1.2rem;
}

.player-message {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    z-index: 4;
    margin: 0;
    padding: 12px 14px;
    border-radius: 14px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.82);
}

.content-card p {
    color: #334155;
    line-height: 2;
    font-size: 1.02rem;
}

.section-heading--inner {
    margin-bottom: 18px;
}

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

.footer-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 44px 0;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
    gap: 44px;
}

.footer-brand {
    color: #ffffff;
    font-size: 1.15rem;
}

.footer-shell p {
    max-width: 580px;
    line-height: 1.9;
}

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

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

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

.footer-links a:hover {
    color: #ffffff;
    background: rgba(37, 99, 235, 0.46);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 18px;
    text-align: center;
    color: #94a3b8;
}

[hidden] {
    display: none !important;
}

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

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

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

    .menu-button {
        display: inline-flex;
    }

    .hero {
        min-height: 720px;
        border-radius: 28px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: center;
        gap: 28px;
    }

    .hero-cover {
        max-width: 260px;
        justify-self: start;
    }

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

    .section-shell--dark {
        padding: 28px;
    }

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

    .detail-poster {
        width: min(320px, 100%);
    }

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

@media (max-width: 620px) {
    .nav-shell {
        height: 64px;
    }

    .brand-text {
        font-size: 1rem;
    }

    .hero,
    .section-shell,
    .page-main,
    .detail-main {
        width: min(100% - 20px, 1180px);
    }

    .hero {
        min-height: 680px;
        margin-top: 14px;
        border-radius: 24px;
    }

    .hero-slide {
        padding: 24px;
    }

    .hero-actions,
    .section-heading,
    .category-overview-head {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-dots {
        left: 24px;
        bottom: 24px;
    }

    .search-panel {
        grid-template-columns: 1fr;
    }

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

    .movie-card--large .movie-poster {
        aspect-ratio: 3 / 4;
    }

    .detail-hero,
    .page-hero,
    .category-overview-card,
    .content-card,
    .player-section {
        border-radius: 24px;
    }

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

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