:root {
    --bg: #f8fbff;
    --bg-soft: #eef7ff;
    --text: #111827;
    --muted: #64748b;
    --line: #dbeafe;
    --card: #ffffff;
    --brand: #2563eb;
    --brand-2: #06b6d4;
    --brand-dark: #1d4ed8;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.10);
    --soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 45%, #ecfeff 100%);
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.86);
    border-bottom: 1px solid rgba(219, 234, 254, 0.9);
    backdrop-filter: blur(18px);
}

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

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    color: var(--brand-dark);
    letter-spacing: -0.02em;
}

.site-logo {
    font-size: 22px;
}

.site-logo-icon {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.24);
    font-size: 14px;
}

.desktop-nav,
.footer-links,
.hero-actions,
.filter-row,
.detail-meta,
.detail-tags,
.movie-tags,
.hero-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.desktop-nav {
    gap: 8px;
}

.nav-link,
.mobile-nav-link {
    color: #475569;
    font-weight: 700;
    border-radius: 999px;
    transition: 0.2s ease;
}

.nav-link {
    padding: 10px 16px;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--brand-dark);
    background: #dbeafe;
}

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

.mobile-nav-button span {
    display: block;
    height: 2px;
    margin: 6px 0;
    border-radius: 2px;
    background: var(--brand-dark);
}

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

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

.mobile-nav-link {
    padding: 12px 14px;
}

.hero-slider {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.55fr);
    align-items: center;
    gap: 44px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.55s ease;
    padding: 70px 0 84px;
}

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

.hero-bg {
    position: fixed;
    inset: 0;
    opacity: 0.42;
    filter: blur(10px) saturate(120%);
    transform: scale(1.04);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.74), rgba(37, 99, 235, 0.36));
}

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

.hero-content,
.hero-poster {
    position: relative;
    z-index: 2;
}

.hero-kicker,
.section-kicker {
    margin: 0 0 12px;
    color: var(--brand);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero-kicker {
    color: #7dd3fc;
}

.hero-content h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(42px, 6vw, 78px);
    line-height: 1.04;
    letter-spacing: -0.06em;
}

.hero-desc {
    width: min(680px, 100%);
    margin: 24px 0 0;
    color: #dbeafe;
    font-size: 19px;
}

.hero-meta {
    gap: 10px;
    margin-top: 24px;
}

.hero-meta span,
.detail-meta span,
.movie-tags span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.hero-meta span {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 8px 12px;
}

.hero-actions {
    gap: 14px;
    margin-top: 34px;
}

.primary-button,
.ghost-button,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 999px;
    font-weight: 900;
    transition: 0.2s ease;
}

.primary-button {
    padding: 0 24px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.35);
}

.ghost-button {
    padding: 0 22px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.12);
}

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

.hero-poster {
    justify-self: end;
    width: min(360px, 100%);
    padding: 12px;
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 24px;
}

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

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

.hero-dot.active {
    width: 64px;
    background: #fff;
}

.home-search {
    position: relative;
    z-index: 5;
    margin-top: -42px;
}

.search-panel {
    margin-bottom: 28px;
    padding: 18px;
    border: 1px solid rgba(219, 234, 254, 0.96);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--soft-shadow);
}

.search-field {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    padding: 0 18px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid #e0f2fe;
}

.search-field span {
    color: var(--brand);
    font-size: 24px;
    line-height: 1;
}

.search-field input {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
    font-weight: 700;
}

.filter-row {
    gap: 10px;
    margin-top: 14px;
}

.filter-chip {
    border: 0;
    border-radius: 999px;
    padding: 9px 14px;
    color: #475569;
    background: #eff6ff;
    font-weight: 800;
    transition: 0.2s ease;
}

.filter-chip:hover,
.filter-chip.active {
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.content-section,
.category-strip,
.category-overview-list,
.related-section {
    padding: 58px 0 0;
}

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

.section-head h2,
.page-hero h1,
.detail-panel h1 {
    margin: 0;
    color: #0f172a;
    letter-spacing: -0.04em;
}

.section-head h2 {
    font-size: clamp(26px, 3vw, 38px);
}

.section-head p {
    max-width: 680px;
    margin: 8px 0 0;
    color: var(--muted);
}

.compact-head {
    align-items: center;
}

.section-more {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 0 18px;
    color: var(--brand-dark);
    background: #dbeafe;
}

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

.category-card {
    position: relative;
    min-height: 184px;
    overflow: hidden;
    padding: 18px;
    border-radius: var(--radius);
    color: #fff;
    background: #0f172a;
    box-shadow: var(--soft-shadow);
}

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

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.22), rgba(15, 23, 42, 0.86));
}

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

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

.category-card p {
    margin: 8px 0 0;
    color: #dbeafe;
    font-size: 13px;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(219, 234, 254, 0.9);
    border-radius: 22px;
    background: var(--card);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.movie-cover {
    position: relative;
    display: block;
    overflow: hidden;
    background: #e0f2fe;
}

.movie-cover img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.movie-play-mark {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.32);
    font-size: 13px;
}

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

.movie-title {
    display: -webkit-box;
    min-height: 44px;
    overflow: hidden;
    color: #0f172a;
    font-weight: 900;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-title:hover,
.ranking-card h2 a:hover,
.category-overview-card h2 a:hover {
    color: var(--brand-dark);
}

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

.movie-line {
    display: -webkit-box;
    min-height: 42px;
    overflow: hidden;
    margin: 0;
    color: #64748b;
    font-size: 13px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-tags,
.detail-tags {
    gap: 7px;
    margin-top: 12px;
}

.movie-tags span,
.detail-tags span {
    color: #2563eb;
    background: #eff6ff;
    padding: 5px 9px;
}

.page-main {
    padding-bottom: 70px;
}

.page-hero {
    margin-bottom: 34px;
    padding: 68px 0;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.page-hero h1 {
    color: #fff;
    font-size: clamp(36px, 5vw, 62px);
}

.page-hero p:not(.section-kicker) {
    max-width: 720px;
    margin: 16px 0 0;
    color: #e0f2fe;
    font-size: 18px;
}

.page-hero .section-kicker {
    color: #cffafe;
}

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

.category-overview-card,
.ranking-card,
.detail-panel,
.side-card {
    border: 1px solid rgba(219, 234, 254, 0.95);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--soft-shadow);
}

.category-overview-card {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 22px;
    padding: 16px;
}

.category-overview-cover img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 18px;
}

.category-overview-card h2,
.ranking-card h2 {
    margin: 4px 0 8px;
    font-size: 24px;
    line-height: 1.2;
}

.category-overview-card p,
.ranking-card p {
    margin: 0;
    color: var(--muted);
}

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.category-samples a {
    border-radius: 999px;
    padding: 7px 11px;
    color: var(--brand-dark);
    background: #eff6ff;
    font-size: 13px;
    font-weight: 800;
}

.ranking-list {
    display: grid;
    gap: 16px;
}

.ranking-card {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 18px;
    padding: 14px;
}

.ranking-cover {
    position: relative;
}

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

.rank-number {
    position: absolute;
    left: -8px;
    top: -8px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    font-weight: 900;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.28);
}

.detail-main {
    padding-bottom: 70px;
}

.player-section {
    background: #020617;
}

.player-container {
    position: relative;
    width: min(1180px, 100%);
    margin: 0 auto;
    background: #000;
}

.movie-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.play-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background: rgba(2, 6, 23, 0.28);
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-cover span {
    display: grid;
    place-items: center;
    width: clamp(74px, 8vw, 108px);
    height: clamp(74px, 8vw, 108px);
    padding-left: 6px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 22px 45px rgba(6, 182, 212, 0.32);
    font-size: clamp(26px, 3vw, 40px);
}

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

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

.detail-panel {
    padding: clamp(22px, 4vw, 34px);
}

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

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

.detail-panel h1 {
    font-size: clamp(32px, 5vw, 54px);
    line-height: 1.12;
}

.detail-meta {
    gap: 10px;
    margin-top: 18px;
}

.detail-meta span {
    color: #0f172a;
    background: #e0f2fe;
    padding: 8px 12px;
}

.detail-block {
    margin-top: 28px;
}

.detail-block h2,
.side-card h2 {
    margin: 0 0 10px;
    color: #0f172a;
    font-size: 22px;
}

.detail-block p,
.side-card p {
    margin: 0;
    color: #334155;
}

.detail-block p {
    font-size: 17px;
}

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

.side-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--soft-shadow);
}

.side-card {
    padding: 20px;
}

.side-card p + p {
    margin-top: 8px;
}

.empty-state {
    display: none;
    margin: 26px 0 0;
    padding: 18px;
    border-radius: 18px;
    color: #475569;
    background: #fff;
    text-align: center;
    font-weight: 800;
}

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

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

.site-footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0;
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

.footer-logo {
    color: #fff;
    font-size: 20px;
}

.site-footer p {
    max-width: 620px;
    margin: 10px 0 0;
    color: #94a3b8;
}

.footer-links {
    gap: 12px;
    align-content: start;
    justify-content: flex-end;
}

.footer-links a {
    color: #bfdbfe;
    font-weight: 800;
}

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

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

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

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

    .hero-slider {
        min-height: 760px;
    }

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

    .hero-poster {
        justify-self: start;
        width: min(260px, 70vw);
    }

    .section-head,
    .site-footer-inner,
    .detail-layout {
        display: block;
    }

    .section-more {
        margin-top: 16px;
    }

    .detail-side {
        margin-top: 20px;
    }

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

    .category-overview-card,
    .ranking-card {
        grid-template-columns: 100px minmax(0, 1fr);
    }
}

@media (max-width: 540px) {
    .container,
    .site-header-inner,
    .mobile-nav,
    .site-footer-inner {
        width: min(100% - 22px, 1180px);
    }

    .site-logo {
        font-size: 18px;
    }

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

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

    .hero-desc {
        font-size: 16px;
    }

    .page-hero {
        padding: 48px 0;
    }

    .movie-grid,
    .library-grid,
    .category-grid {
        gap: 12px;
    }

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

    .movie-line {
        display: none;
    }

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

    .category-overview-cover img,
    .ranking-cover img {
        aspect-ratio: 16 / 9;
    }
}
