:root {
    --blue: #2563eb;
    --blue-dark: #1e40af;
    --blue-soft: #dbeafe;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --bg: #f8fafc;
    --card: #ffffff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 20px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.65;
}

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

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);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
}

.nav-shell {
    max-width: 1280px;
    height: 72px;
    margin: 0 auto;
    padding: 0 24px;
    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;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--blue), #60a5fa);
    border-radius: 14px;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.35);
}

.brand-text {
    display: grid;
    line-height: 1.15;
}

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

.brand-text em {
    font-size: 12px;
    color: var(--muted);
    font-style: normal;
    font-weight: 500;
}

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

.desktop-nav a,
.mobile-nav a {
    border-radius: 999px;
    padding: 10px 14px;
    color: #374151;
    font-weight: 650;
    transition: background 0.2s ease, color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: var(--blue);
    background: var(--blue-soft);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: var(--ink);
    background: #f1f5f9;
}

.mobile-nav {
    display: none;
    padding: 10px 24px 18px;
    border-top: 1px solid var(--line);
    background: #fff;
}

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

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 72% 24%, rgba(59, 130, 246, 0.45), transparent 32%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(15, 23, 42, 0.86) 44%, rgba(15, 23, 42, 0.35) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.72), transparent 45%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 760px;
    padding: 150px 24px 110px;
    margin: 0 auto;
    margin-left: max(24px, calc((100vw - 1280px) / 2 + 24px));
    color: #fff;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: #bfdbfe;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.hero-content p {
    max-width: 660px;
    margin: 24px 0 0;
    color: #dbeafe;
    font-size: 19px;
}

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

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 12px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.14);
    color: #eff6ff;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border-radius: 999px;
    padding: 0 22px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    color: #fff;
    background: linear-gradient(135deg, var(--blue), #3b82f6);
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.36);
}

.ghost-btn {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(12px);
}

.primary-btn:hover,
.ghost-btn:hover,
.movie-card:hover {
    transform: translateY(-3px);
}

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

.hero-dot {
    width: 38px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
}

.hero-dot.is-active {
    background: #fff;
}

.section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 72px 24px;
}

.section-tight {
    padding-top: 54px;
    padding-bottom: 54px;
}

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

.section-head.left {
    margin-left: 0;
    text-align: left;
}

.section-head.compact {
    margin-bottom: 20px;
}

.section-kicker {
    color: var(--blue);
}

.section-head h2 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -0.035em;
}

.section-head p {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 16px;
}

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

.category-card {
    min-height: 174px;
    padding: 22px;
    border-radius: var(--radius);
    background: linear-gradient(145deg, #fff, #eff6ff);
    border: 1px solid rgba(37, 99, 235, 0.12);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card strong {
    display: block;
    font-size: 20px;
    font-weight: 900;
}

.category-card p {
    min-height: 52px;
    margin: 8px 0 14px;
    color: var(--muted);
    font-size: 14px;
}

.category-card div {
    display: grid;
    gap: 4px;
    color: var(--blue-dark);
    font-size: 12px;
    font-weight: 700;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: start;
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    box-shadow: var(--shadow);
}

.featured-card {
    grid-column: span 2;
}

.poster-link {
    position: relative;
    display: block;
    height: 260px;
    overflow: hidden;
    background: #0f172a;
}

.featured-card .poster-link {
    height: 360px;
}

.poster-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    border-radius: 999px;
    padding: 5px 10px;
    color: #fff;
    background: var(--blue);
    font-size: 12px;
    font-weight: 800;
}

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), transparent 48%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.movie-card:hover .poster-shade {
    opacity: 1;
}

.card-body {
    padding: 16px;
}

.card-body h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 900;
}

.card-body h3 a:hover {
    color: var(--blue);
}

.card-body p {
    height: 52px;
    margin: 8px 0 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.tag-row {
    margin-top: 12px;
}

.tag-row span {
    color: #475569;
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.text-link {
    display: inline-flex;
    margin-top: 14px;
    color: var(--blue);
    font-size: 14px;
    font-weight: 900;
}

.rank-box {
    position: sticky;
    top: 96px;
    border-radius: var(--radius);
    padding: 20px;
    background: #fff;
    box-shadow: var(--shadow);
}

.rank-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.rank-title h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 900;
}

.rank-title a {
    color: var(--blue);
    font-weight: 800;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 34px 58px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-height: 74px;
    padding: 8px;
    border-radius: 16px;
    background: #f8fafc;
}

.rank-item:hover {
    background: #eff6ff;
}

.rank-num {
    color: var(--blue);
    font-weight: 900;
}

.rank-item img {
    width: 58px;
    height: 58px;
    border-radius: 12px;
    object-fit: cover;
}

.rank-item strong,
.rank-item em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-item strong {
    font-size: 14px;
    font-weight: 900;
}

.rank-item em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 180px 180px;
    gap: 14px;
    margin: 0 0 26px;
    padding: 18px;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.06);
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: #475569;
    font-size: 13px;
    font-weight: 800;
}

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

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.page-hero {
    min-height: 360px;
    display: grid;
    place-items: center;
    padding: 96px 24px 70px;
    color: #fff;
    background:
        radial-gradient(circle at 70% 22%, rgba(96, 165, 250, 0.45), transparent 32%),
        linear-gradient(135deg, #020617, #1e3a8a 58%, #2563eb);
}

.page-hero > div {
    width: min(1180px, 100%);
}

.page-hero p {
    max-width: 760px;
    margin: 18px 0 0;
    color: #dbeafe;
    font-size: 18px;
}

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

.category-overview-block {
    max-width: 1280px;
    margin: 0 auto;
    padding: 36px 24px;
}

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

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

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(10px);
    transform: scale(1.08);
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 80% 20%, rgba(37, 99, 235, 0.38), transparent 36%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(15, 23, 42, 0.72));
}

.detail-shell {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    padding: 42px 24px 72px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 30px;
    color: #bfdbfe;
    font-size: 14px;
    font-weight: 700;
}

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

.detail-grid {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
}

.detail-cover {
    width: 310px;
    height: 440px;
    border-radius: 28px;
    object-fit: cover;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

.detail-info .lead {
    max-width: 820px;
    margin: 22px 0 0;
    color: #dbeafe;
    font-size: 20px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.detail-meta span {
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.12);
    color: #eff6ff;
    font-weight: 700;
}

.detail-tags span {
    color: #eff6ff;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

.detail-section {
    padding-top: 52px;
    padding-bottom: 52px;
}

.player-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: var(--shadow);
}

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

.play-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.14), rgba(2, 6, 23, 0.38));
}

.play-layer span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    padding-left: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue), #60a5fa);
    box-shadow: 0 18px 48px rgba(37, 99, 235, 0.42);
    font-size: 36px;
}

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

.content-panel {
    padding: 30px;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.06);
}

.content-panel h2 {
    margin: 0 0 12px;
    font-size: 26px;
    font-weight: 900;
}

.content-panel h2:not(:first-child) {
    margin-top: 28px;
}

.content-panel p {
    margin: 0;
    color: #475569;
    font-size: 17px;
}

.site-footer {
    color: #cbd5e1;
    background: #0f172a;
}

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 54px 24px 34px;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) 1fr 1fr;
    gap: 34px;
}

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

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

.site-footer h2 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 16px;
    font-weight: 900;
}

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

.footer-links a:hover {
    color: #fff;
}

.copyright {
    max-width: 1280px;
    margin: 0 auto;
    padding: 18px 24px 28px;
    color: #94a3b8;
    border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.movie-card.is-hidden {
    display: none;
}

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

    .split-section {
        grid-template-columns: 1fr;
    }

    .rank-box {
        position: static;
    }
}

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

    .menu-toggle {
        display: inline-grid;
        place-items: center;
    }

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

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

    .hero-content {
        margin-left: 0;
        padding-top: 118px;
    }

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

    .featured-card {
        grid-column: span 1;
    }

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

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

    .detail-cover {
        width: min(100%, 330px);
        height: auto;
        aspect-ratio: 31 / 44;
    }

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

@media (max-width: 560px) {
    .nav-shell {
        height: 64px;
        padding: 0 16px;
    }

    .brand-text strong {
        font-size: 18px;
    }

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

    .hero-content {
        padding: 104px 18px 88px;
    }

    .hero-content p,
    .page-hero p,
    .detail-info .lead {
        font-size: 16px;
    }

    .section,
    .detail-shell,
    .category-overview-block {
        padding-left: 16px;
        padding-right: 16px;
    }

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

    .poster-link,
    .featured-card .poster-link {
        height: 360px;
    }

    .rank-item {
        grid-template-columns: 30px 54px minmax(0, 1fr);
    }

    .content-panel {
        padding: 22px;
    }
}
