:root {
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --cyan: #06b6d4;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --soft: #f8fafc;
    --panel: #ffffff;
    --shadow: 0 18px 50px rgba(17, 24, 39, 0.12);
    --radius: 20px;
}

* {
    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, #ffffff 0%, #f3f7ff 48%, #ffffff 100%);
    line-height: 1.6;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    backdrop-filter: blur(14px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--blue);
    white-space: nowrap;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

.brand-text {
    font-size: 20px;
    letter-spacing: -0.02em;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.nav-link {
    padding: 9px 13px;
    border-radius: 999px;
    color: #374151;
    font-size: 14px;
    font-weight: 650;
    transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--blue);
    background: #eff6ff;
}

.header-search,
.mobile-search {
    display: flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    overflow: hidden;
    background: #ffffff;
}

.header-search input,
.mobile-search input {
    width: 230px;
    border: 0;
    outline: 0;
    padding: 10px 14px;
    background: transparent;
}

.header-search button,
.mobile-search button {
    border: 0;
    padding: 10px 16px;
    color: #ffffff;
    background: var(--blue);
    font-weight: 700;
    cursor: pointer;
}

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

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--blue);
    border-radius: 99px;
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.mobile-panel.is-open {
    display: block;
}

.mobile-search input {
    width: 100%;
}

.mobile-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}

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

.hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: radial-gradient(circle at top left, rgba(6, 182, 212, 0.28), transparent 32%),
                linear-gradient(135deg, #0f172a 0%, #1d4ed8 55%, #06b6d4 100%);
}

.hero-shell {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    min-height: 560px;
    margin: 0 auto;
    display: grid;
    align-items: center;
    padding: 54px 0;
}

.hero-slider {
    position: relative;
    min-height: 460px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.72fr);
    gap: 36px;
    align-items: center;
    opacity: 0;
    transform: translateY(18px);
    pointer-events: none;
    transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    margin-bottom: 18px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    font-size: 14px;
}

.hero h1 {
    margin: 0;
    max-width: 780px;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.06;
    letter-spacing: -0.055em;
}

.hero p {
    max-width: 680px;
    margin: 20px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 18px;
    border-radius: 999px;
    font-weight: 800;
    transition: 0.2s ease;
}

.btn-primary {
    color: var(--blue);
    background: #ffffff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 30px rgba(255, 255, 255, 0.22);
}

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

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.2);
}

.hero-art {
    position: relative;
    overflow: hidden;
    min-height: 430px;
    border-radius: 30px;
    box-shadow: 0 34px 80px rgba(2, 6, 23, 0.38);
}

.hero-art img {
    width: 100%;
    height: 430px;
    object-fit: cover;
    transform: scale(1.03);
}

.hero-art::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.86), transparent 55%);
}

.hero-card-caption {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 22px;
    z-index: 2;
}

.hero-card-caption strong {
    display: block;
    font-size: 24px;
    line-height: 1.25;
}

.hero-card-caption span {
    color: rgba(255, 255, 255, 0.76);
}

.hero-dots {
    position: absolute;
    left: 0;
    bottom: 18px;
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 28px;
    height: 7px;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.32);
    cursor: pointer;
}

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

.section {
    padding: 56px 0;
}

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

.section-title {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.2;
    letter-spacing: -0.04em;
}

.section-desc {
    max-width: 720px;
    margin: 10px 0 0;
    color: var(--muted);
}

.section-more {
    color: var(--blue);
    font-weight: 800;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(229, 231, 235, 0.95);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 10px 26px rgba(17, 24, 39, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

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

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

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

.poster-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(17, 24, 39, 0.72);
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

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

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

.movie-meta span {
    display: inline-flex;
    align-items: center;
}

.movie-meta span + span::before {
    content: "·";
    margin-right: 8px;
    color: #cbd5e1;
}

.movie-card h2,
.rank-content h2 {
    margin: 8px 0 8px;
    font-size: 18px;
    line-height: 1.32;
}

.movie-card h2 a:hover,
.rank-content h2 a:hover {
    color: var(--blue);
}

.movie-card p,
.rank-content p {
    margin: 0;
    color: #4b5563;
    font-size: 14px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 14px;
}

.tag-list span {
    padding: 4px 8px;
    border-radius: 999px;
    color: var(--blue);
    background: #eff6ff;
    font-size: 12px;
    font-weight: 700;
}

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

.category-card {
    min-height: 180px;
    padding: 24px;
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: 24px;
    background: linear-gradient(135deg, #ffffff, #eff6ff);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.08);
    transition: 0.22s ease;
}

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

.category-card strong {
    display: block;
    color: var(--blue);
    font-size: 22px;
}

.category-card p {
    margin: 12px 0 0;
    color: #4b5563;
}

.page-hero {
    padding: 58px 0 34px;
    background: linear-gradient(135deg, #eff6ff, #ffffff);
    border-bottom: 1px solid var(--line);
}

.page-hero h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.page-hero p {
    max-width: 760px;
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 18px;
}

.filter-panel {
    margin: 28px 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(17, 24, 39, 0.06);
}

.filter-row {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, minmax(130px, 0.5fr));
    gap: 14px;
}

.filter-row label {
    display: grid;
    gap: 6px;
    color: #4b5563;
    font-size: 13px;
    font-weight: 800;
}

.filter-row input,
.filter-row select {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0 12px;
    outline: 0;
    background: #f8fafc;
}

.filter-row input:focus,
.filter-row select:focus {
    border-color: var(--blue);
    background: #ffffff;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 74px 96px minmax(0, 1fr) 72px;
    gap: 18px;
    align-items: center;
    padding: 14px;
}

.rank-number {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 18px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    font-weight: 900;
    font-size: 18px;
}

.rank-poster {
    overflow: hidden;
    width: 96px;
    aspect-ratio: 3 / 4;
    border-radius: 16px;
    background: #e5e7eb;
}

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

.rank-score {
    color: #f97316;
    font-size: 22px;
    font-weight: 900;
    text-align: center;
}

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

.compact-card {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    transition: 0.2s ease;
}

.compact-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 24px rgba(17, 24, 39, 0.08);
}

.compact-card img {
    width: 58px;
    height: 78px;
    border-radius: 12px;
    object-fit: cover;
}

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

.compact-card em {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) 340px;
    gap: 28px;
    align-items: start;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 24px 0;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--blue);
    font-weight: 700;
}

.player-stage {
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: 0 26px 64px rgba(2, 6, 23, 0.25);
}

.video-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000000;
}

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

.play-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.68), rgba(2, 6, 23, 0.18));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    border-radius: 50%;
    color: var(--blue);
    background: #ffffff;
    font-size: 28px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.28);
}

.detail-card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(17, 24, 39, 0.06);
}

.detail-title {
    margin: 20px 0 12px;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.12;
    letter-spacing: -0.045em;
}

.detail-lead {
    color: #374151;
    font-size: 18px;
}

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

.detail-info span {
    padding: 12px 14px;
    border-radius: 16px;
    color: #374151;
    background: #f8fafc;
}

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

.prose-block h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.prose-block p {
    margin: 0;
    color: #374151;
    font-size: 16px;
}

.side-poster {
    overflow: hidden;
    border-radius: 26px;
    background: #e5e7eb;
    box-shadow: var(--shadow);
}

.side-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.side-box {
    margin-top: 18px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #ffffff;
}

.side-box h2 {
    margin: 0 0 14px;
    font-size: 20px;
}

.site-footer {
    margin-top: 60px;
    color: #d1d5db;
    background: #111827;
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 46px 0;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 36px;
}

.footer-brand {
    color: #ffffff;
    font-size: 24px;
    font-weight: 900;
}

.site-footer p {
    max-width: 420px;
    color: #9ca3af;
}

.site-footer h2 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: 18px;
}

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

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0;
    border-top: 1px solid #1f2937;
    color: #9ca3af;
    text-align: center;
}

.empty-state {
    display: none;
    padding: 30px;
    border: 1px dashed #cbd5e1;
    border-radius: 22px;
    color: var(--muted);
    background: #ffffff;
    text-align: center;
}

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

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

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

    .hero-art {
        display: none;
    }

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

    .side-poster {
        max-width: 360px;
    }
}

@media (max-width: 760px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

    .menu-toggle {
        display: inline-block;
        margin-left: auto;
    }

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

    .hero-shell {
        min-height: 500px;
        padding: 40px 0;
    }

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

    .hero-slide {
        align-content: center;
    }

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

    .hero-dots {
        bottom: 0;
    }

    .section {
        padding: 40px 0;
    }

    .section-header {
        display: block;
    }

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

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

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

    .rank-row {
        grid-template-columns: 48px 76px minmax(0, 1fr);
    }

    .rank-number {
        width: 42px;
        height: 42px;
        border-radius: 14px;
        font-size: 14px;
    }

    .rank-poster {
        width: 76px;
    }

    .rank-score {
        display: none;
    }

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

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

@media (max-width: 480px) {
    .movie-grid,
    .category-grid,
    .compact-grid {
        grid-template-columns: 1fr;
    }

    .header-inner,
    .container,
    .hero-shell,
    .footer-grid,
    .footer-bottom,
    .mobile-panel {
        width: min(100% - 24px, 1180px);
    }
}
