:root {
    --sky: #0ea5e9;
    --sky-dark: #0369a1;
    --blue: #2563eb;
    --ink: #0f172a;
    --muted: #64748b;
    --soft: #f0f9ff;
    --line: #e2e8f0;
    --card: #ffffff;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.10);
    --radius: 22px;
}

* {
    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(--ink);
    background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 42%, #f8fafc 100%);
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
    backdrop-filter: blur(18px);
}

.header-inner {
    max-width: 1240px;
    margin: 0 auto;
    min-height: 72px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.brand-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--sky), var(--blue));
    box-shadow: 0 12px 28px rgba(14, 165, 233, 0.28);
}

.brand-text,
.footer-brand span:last-child {
    font-size: 22px;
    background: linear-gradient(90deg, var(--sky-dark), var(--blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    color: #334155;
    font-weight: 700;
}

.nav-link {
    position: relative;
    padding: 24px 0;
    transition: color 0.2s ease;
}

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

.nav-link.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 14px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--sky), var(--blue));
}

.mobile-menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #f1f5f9;
    cursor: pointer;
}

.mobile-menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #334155;
    border-radius: 999px;
}

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

.mobile-nav a {
    display: block;
    padding: 10px 0;
    font-weight: 700;
    color: #334155;
}

.mobile-category-title {
    margin-top: 10px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
}

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

.hero-carousel {
    position: relative;
    height: 70vh;
    min-height: 560px;
    overflow: hidden;
    background: #020617;
}

.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 {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 70% 15%, rgba(14, 165, 233, 0.35), transparent 35%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.58) 48%, rgba(2, 6, 23, 0.24)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.05) 55%);
}

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

.hero-content h1 {
    max-width: 760px;
    margin: 14px 0 18px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 680px;
    margin: 0 0 30px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
    line-height: 1.8;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #e0f2fe;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.primary-button,
.ghost-button,
.text-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    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: linear-gradient(135deg, var(--sky), var(--blue));
    box-shadow: 0 16px 34px rgba(14, 165, 233, 0.35);
}

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

.ghost-button {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.38);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.text-button {
    min-height: auto;
    padding: 0;
    color: var(--sky-dark);
}

.hero-dots {
    position: absolute;
    right: max(20px, calc((100vw - 1240px) / 2 + 20px));
    bottom: 54px;
    display: flex;
    gap: 10px;
}

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

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

.stats-strip {
    max-width: 1180px;
    margin: -42px auto 26px;
    padding: 22px;
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
}

.stats-strip div {
    padding: 16px;
    border-radius: 18px;
    background: linear-gradient(180deg, #f8fafc, #eff6ff);
    text-align: center;
}

.stats-strip strong {
    display: block;
    color: var(--sky-dark);
    font-size: 34px;
}

.stats-strip span {
    color: var(--muted);
    font-weight: 700;
}

.content-section {
    max-width: 1240px;
    margin: 0 auto;
    padding: 56px 20px;
}

.soft-section {
    max-width: none;
    padding-left: max(20px, calc((100vw - 1240px) / 2 + 20px));
    padding-right: max(20px, calc((100vw - 1240px) / 2 + 20px));
    background: linear-gradient(90deg, #f0f9ff, #eff6ff);
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(28px, 3vw, 38px);
    letter-spacing: -0.03em;
}

.section-heading p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

.section-link {
    color: var(--sky-dark);
    font-weight: 800;
    white-space: nowrap;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background:
        radial-gradient(circle at 30% 20%, rgba(14, 165, 233, 0.50), transparent 35%),
        linear-gradient(135deg, #0f172a, #075985);
}

.detail-poster.poster-wrap {
    aspect-ratio: 3 / 4;
}

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

.poster-wrap:hover img,
.movie-card:hover .poster-wrap img {
    transform: scale(1.08);
}

.image-missing {
    opacity: 0;
}

.poster-play {
    position: absolute;
    inset: auto 14px 14px auto;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(14, 165, 233, 0.92);
    box-shadow: 0 10px 24px rgba(14, 165, 233, 0.32);
}

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

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

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

.movie-title:hover {
    color: var(--sky-dark);
}

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

.movie-meta span {
    padding: 5px 8px;
    border-radius: 999px;
    background: #f1f5f9;
}

.movie-card p {
    min-height: 50px;
    margin: 0 0 14px;
    color: #475569;
    font-size: 14px;
    line-height: 1.7;
}

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

.tag-row span {
    padding: 5px 9px;
    border-radius: 999px;
    color: #0369a1;
    background: #e0f2fe;
    font-size: 12px;
    font-weight: 800;
}

.large-tags span {
    font-size: 13px;
    padding: 7px 12px;
}

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

.category-card {
    min-height: 230px;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    color: #ffffff;
    background: #0f172a;
    box-shadow: var(--shadow);
}

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

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

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.18));
}

.category-card div {
    position: absolute;
    inset: auto 18px 18px;
    z-index: 1;
}

.category-card strong {
    display: block;
    margin-bottom: 8px;
    font-size: 22px;
}

.category-card span {
    display: inline-flex;
    margin-bottom: 8px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    font-weight: 800;
}

.category-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.65;
    font-size: 13px;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    background: #020617;
    color: #ffffff;
}

.compact-hero {
    padding: 86px 20px 78px;
    text-align: center;
    background:
        radial-gradient(circle at 75% 20%, rgba(14, 165, 233, 0.42), transparent 34%),
        linear-gradient(135deg, #020617, #0f172a 55%, #075985);
}

.compact-hero > div {
    max-width: 880px;
    margin: 0 auto;
}

.compact-hero h1 {
    margin: 12px 0;
    font-size: clamp(38px, 6vw, 68px);
    letter-spacing: -0.04em;
}

.compact-hero p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 18px;
    line-height: 1.8;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 22px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

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

.category-covers img {
    width: 100%;
    height: 96px;
    object-fit: cover;
    border-radius: 14px;
    background: linear-gradient(135deg, #0f172a, #075985);
}

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

.category-overview-card p {
    color: var(--muted);
    line-height: 1.8;
}

.category-meta {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.category-meta span {
    padding: 6px 10px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 13px;
    font-weight: 800;
}

.filter-panel {
    max-width: 1240px;
    margin: 36px auto 0;
    padding: 0 20px;
}

.filter-grid {
    display: grid;
    grid-template-columns: 1.6fr 0.7fr 0.8fr auto;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
}

.filter-grid label span {
    display: block;
    margin-bottom: 8px;
    color: #334155;
    font-size: 13px;
    font-weight: 900;
}

.filter-grid input,
.filter-grid select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0 14px;
    outline: none;
    background: #ffffff;
}

.filter-grid input:focus,
.filter-grid select:focus {
    border-color: var(--sky);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.filter-grid button {
    align-self: end;
    min-height: 46px;
    border: 0;
    border-radius: 14px;
    padding: 0 18px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--sky), var(--blue));
    cursor: pointer;
    font-weight: 900;
}

.filter-count {
    margin-top: 12px;
    color: var(--muted);
    font-weight: 700;
}

.movie-card[hidden] {
    display: none;
}

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

.detail-backdrop {
    position: absolute;
    inset: 0;
}

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
    filter: blur(2px);
}

.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.70)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.08));
}

.detail-hero-content {
    position: relative;
    max-width: 1240px;
    margin: 0 auto;
    padding: 56px 20px 72px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 34px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
    font-weight: 800;
}

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

.detail-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 44px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.36);
}

.detail-grid h1 {
    margin: 14px 0 18px;
    font-size: clamp(38px, 5vw, 68px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.detail-grid p {
    max-width: 760px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
    line-height: 1.85;
}

.detail-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 28px;
    align-items: start;
}

.player-card,
.info-card {
    margin-bottom: 24px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

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

.video-shell video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #000000;
}

.play-action {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.74), rgba(2, 6, 23, 0.36));
    cursor: pointer;
}

.play-action span {
    width: 76px;
    height: 76px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--sky), var(--blue));
    box-shadow: 0 20px 44px rgba(14, 165, 233, 0.35);
    font-size: 30px;
}

.play-action strong {
    font-size: 18px;
}

.player-card.is-playing .play-action {
    display: none;
}

.player-status {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

.info-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.info-card p {
    margin: 0;
    color: #334155;
    line-height: 2;
}

.sticky-card {
    position: sticky;
    top: 96px;
}

.meta-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.meta-list li {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
}

.meta-list li:last-child {
    border-bottom: 0;
}

.meta-list strong {
    color: #334155;
}

.meta-list span {
    color: var(--muted);
    text-align: right;
}

.site-footer {
    margin-top: 40px;
    padding: 48px 20px 24px;
    border-top: 1px solid var(--line);
    background: #ffffff;
}

.footer-grid {
    max-width: 1240px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 36px;
}

.site-footer p {
    max-width: 440px;
    color: var(--muted);
    line-height: 1.8;
}

.site-footer h3 {
    margin: 0 0 14px;
}

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

.site-footer a:hover {
    color: var(--sky-dark);
}

.footer-bottom {
    max-width: 1240px;
    margin: 32px auto 0;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
}

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

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

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

    .detail-sidebar {
        order: -1;
    }

    .sticky-card {
        position: static;
    }
}

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

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

    .site-header.nav-open .mobile-nav {
        display: block;
    }

    .hero-carousel {
        height: 76vh;
        min-height: 520px;
    }

    .hero-content {
        padding-bottom: 82px;
    }

    .hero-dots {
        left: 20px;
        right: auto;
        bottom: 36px;
    }

    .stats-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin: 18px 20px 0;
    }

    .section-heading {
        display: block;
    }

    .section-link {
        display: inline-block;
        margin-top: 12px;
    }

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

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

    .category-overview-grid,
    .category-overview-card,
    .detail-grid,
    .footer-grid,
    .filter-grid {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        max-width: 300px;
    }
}

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

    .hero-content h1,
    .compact-hero h1,
    .detail-grid h1 {
        font-size: 36px;
    }

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

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

    .player-card,
    .info-card {
        padding: 18px;
    }
}
