:root {
    --bg: #f8fafc;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --card: #ffffff;
    --brand: #2563eb;
    --brand-2: #06b6d4;
    --brand-3: #0f172a;
    --orange: #f97316;
    --radius: 22px;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 22%, #ffffff 100%);
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #f8fafc;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 58, 138, 0.96), rgba(15, 23, 42, 0.96));
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.22);
    backdrop-filter: blur(12px);
}

.header-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--brand-2), var(--brand));
    box-shadow: 0 12px 26px rgba(6, 182, 212, 0.28);
}

.brand strong {
    display: block;
    font-size: 22px;
    letter-spacing: -0.03em;
    white-space: nowrap;
}

.brand em {
    display: block;
    color: #67e8f9;
    font-size: 12px;
    font-style: normal;
    margin-top: -2px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    color: #dbeafe;
    font-weight: 600;
}

.desktop-nav a {
    transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover {
    color: #67e8f9;
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 5px auto;
    background: currentColor;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
    color: #dbeafe;
}

.mobile-nav.is-open {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.mobile-nav a {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
}

.hero-slider {
    position: relative;
    min-height: 650px;
    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-bg,
.detail-bg {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    transform: scale(1.04);
}

.hero-bg::after,
.detail-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.75), rgba(30, 58, 138, 0.45)), linear-gradient(0deg, rgba(2, 6, 23, 0.75), transparent 45%);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 650px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 360px;
    align-items: center;
    gap: 54px;
    color: #fff;
    padding: 70px 0 96px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    color: #cffafe;
    background: rgba(6, 182, 212, 0.18);
    border: 1px solid rgba(103, 232, 249, 0.28);
    font-size: 13px;
    font-weight: 700;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 20px 0 18px;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 1.05;
    letter-spacing: -0.055em;
}

.hero-copy p,
.page-hero p,
.detail-copy .lead-text {
    max-width: 760px;
    color: #dbeafe;
    font-size: 18px;
}

.hero-tags,
.tag-cloud,
.score-row,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

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

.hero-tags span,
.tag-cloud span {
    display: inline-flex;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #e0f2fe;
    border: 1px solid rgba(255, 255, 255, 0.16);
    font-size: 13px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

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

.btn:hover {
    transform: translateY(-2px);
}

.btn.primary {
    color: #fff;
    background: linear-gradient(135deg, var(--brand-2), var(--brand));
    box-shadow: 0 16px 28px rgba(37, 99, 235, 0.28);
}

.btn.ghost {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.btn.soft {
    color: #bae6fd;
    background: rgba(14, 165, 233, 0.13);
    border: 1px solid rgba(125, 211, 252, 0.22);
}

.hero-poster {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
    aspect-ratio: 3 / 4;
    background: rgba(255, 255, 255, 0.08);
}

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

.hero-poster:hover img {
    transform: scale(1.06);
}

.hero-poster span,
.play-float {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--orange), #ef4444);
    box-shadow: 0 15px 35px rgba(239, 68, 68, 0.35);
}

.hero-poster span {
    left: 50%;
    top: 50%;
    width: 72px;
    height: 72px;
    transform: translate(-50%, -50%);
    font-size: 28px;
}

.hero-controls {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 28px;
    display: flex;
    align-items: center;
    gap: 18px;
    transform: translateX(-50%);
}

.hero-controls button {
    border: 0;
    cursor: pointer;
}

.hero-controls > button {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    font-size: 30px;
}

.hero-dots {
    display: flex;
    align-items: center;
    gap: 9px;
}

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

.hero-dot.is-active {
    width: 30px;
    background: #67e8f9;
}

.search-section {
    position: relative;
    z-index: 5;
    margin-top: -38px;
}

.filter-panel {
    padding: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.filter-panel input {
    width: 100%;
    min-height: 52px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    outline: none;
    color: var(--ink);
    background: #fff;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

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

.filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.filter-actions button {
    border: 0;
    border-radius: 999px;
    padding: 9px 14px;
    color: #334155;
    background: #e2e8f0;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

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

.section-block {
    padding: 66px 0 0;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

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

.section-more,
.text-link {
    color: var(--brand);
    font-weight: 800;
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: var(--card);
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

.poster-wrap img,
.horizontal-cover img,
.detail-poster img,
.video-overlay img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.poster-wrap img {
    transition: transform 0.5s ease;
}

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

.play-float {
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.7);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-float {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.rank-mark {
    position: absolute;
    left: 12px;
    top: 12px;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--orange), #ef4444);
}

.card-body {
    padding: 16px;
}

.card-title {
    display: -webkit-box;
    min-height: 52px;
    overflow: hidden;
    margin-bottom: 8px;
    color: #0f172a;
    font-size: 17px;
    font-weight: 900;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-body p {
    display: -webkit-box;
    min-height: 46px;
    overflow: hidden;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    color: #64748b;
    font-size: 13px;
}

.card-meta span {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: #f1f5f9;
}

.category-grid,
.category-overview-grid {
    display: grid;
    gap: 20px;
}

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

.category-tile {
    min-height: 148px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 24px;
    color: #fff;
    background: linear-gradient(135deg, #0f172a, #1e3a8a 55%, #0891b2);
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:nth-child(2n) {
    background: linear-gradient(135deg, #1e293b, #7c3aed 55%, #2563eb);
}

.category-tile:nth-child(3n) {
    background: linear-gradient(135deg, #111827, #ea580c 55%, #ef4444);
}

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

.category-tile span {
    font-size: 22px;
    font-weight: 900;
}

.category-tile strong {
    color: #dbeafe;
    font-size: 14px;
}

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

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

.wide-list {
    margin-top: 20px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.horizontal-card {
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr);
    gap: 16px;
    padding: 14px;
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.horizontal-cover {
    overflow: hidden;
    border-radius: 16px;
    aspect-ratio: 4 / 3;
    background: #0f172a;
}

.horizontal-title {
    display: block;
    margin-bottom: 8px;
    font-size: 18px;
    font-weight: 900;
}

.horizontal-card p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.rank-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 28px;
    margin-bottom: 8px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--orange), #ef4444);
    font-weight: 900;
}

.side-panel,
.content-card,
.category-overview-card {
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.side-panel {
    position: sticky;
    top: 100px;
    padding: 26px;
}

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

.side-panel p,
.content-card p,
.category-overview-card p {
    color: var(--muted);
}

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

.mini-links a {
    padding: 12px 14px;
    border-radius: 14px;
    color: var(--brand);
    background: #eff6ff;
    font-weight: 800;
}

.page-main {
    min-height: 65vh;
}

.page-hero {
    position: relative;
    overflow: hidden;
    margin-top: 32px;
    padding: 60px;
    border-radius: 32px;
    color: #fff;
    background: linear-gradient(135deg, #0f172a, #1e3a8a 58%, #0891b2);
    box-shadow: var(--shadow);
}

.page-hero p {
    color: #dbeafe;
}

.category-hero .filter-panel {
    margin-top: 26px;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 20px;
    padding: 18px;
}

.category-collage {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.category-collage img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 14px;
}

.category-overview-card h2 {
    margin: 4px 0 8px;
    font-size: 26px;
}

.detail-main {
    background: #f8fafc;
}

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

.detail-layout {
    position: relative;
    z-index: 2;
    min-height: 560px;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    align-items: center;
    gap: 42px;
    padding: 58px 0;
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #bae6fd;
    font-size: 14px;
}

.score-row {
    margin: 22px 0 28px;
}

.score-row span {
    padding: 8px 12px;
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.12);
}

.player-section {
    margin-top: -70px;
    position: relative;
    z-index: 3;
}

.video-box {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.video-box video {
    width: 100%;
    height: 100%;
    background: #000;
}

.video-overlay {
    position: absolute;
    inset: 0;
    padding: 0;
    border: 0;
    color: #fff;
    background: #000;
    cursor: pointer;
}

.video-overlay::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.65), rgba(2, 6, 23, 0.25));
}

.video-overlay.is-hidden {
    display: none;
}

.video-overlay span {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    width: 88px;
    height: 88px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand-2), var(--brand));
    box-shadow: 0 18px 45px rgba(37, 99, 235, 0.4);
    transform: translate(-50%, -50%);
    font-size: 34px;
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 22px;
    padding-top: 42px;
}

.content-card {
    padding: 26px;
}

.meta-card {
    grid-column: 1 / -1;
}

.meta-card dl {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 12px 18px;
    margin: 0;
}

.meta-card dt {
    color: #0f172a;
    font-weight: 900;
}

.meta-card dd {
    margin: 0;
    color: var(--muted);
}

.tag-cloud span {
    color: var(--brand);
    background: #eff6ff;
    border-color: #dbeafe;
}

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

.site-footer {
    margin-top: 90px;
    color: #cbd5e1;
    background: linear-gradient(180deg, #0f172a, #020617);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 42px;
    padding: 54px 0;
}

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

.footer-grid h3 {
    margin: 0 0 14px;
    color: #fff;
}

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

.footer-links a {
    color: #cbd5e1;
}

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

.footer-bottom {
    padding: 20px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    color: #64748b;
    text-align: center;
}

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

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

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

    .hero-content {
        grid-template-columns: minmax(0, 1fr) 300px;
    }

    .split-layout,
    .wide-list {
        grid-template-columns: 1fr;
    }

    .side-panel {
        position: static;
    }
}

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

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

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

    .brand em {
        display: none;
    }

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

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

    .hero-poster {
        max-width: 260px;
    }

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

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

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

    .page-hero {
        padding: 34px 24px;
    }

    .category-collage img {
        height: 150px;
    }
}

@media (max-width: 560px) {
    .container {
        width: min(100% - 24px, 1200px);
    }

    .header-inner {
        min-height: 66px;
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 36px;
    }

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

    .btn {
        width: 100%;
    }

    .movie-grid,
    .compact-grid,
    .feature-grid,
    .category-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .horizontal-card {
        grid-template-columns: 110px minmax(0, 1fr);
    }

    .horizontal-title {
        font-size: 16px;
    }

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

    .mobile-nav.is-open {
        grid-template-columns: 1fr;
    }
}
