* {
    box-sizing: border-box;
}

:root {
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --slate: #0f172a;
    --text: #1f2937;
    --muted: #64748b;
    --line: rgba(148, 163, 184, 0.28);
    --card: #ffffff;
    --soft: #eff6ff;
    --radius: 18px;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
}

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

.brand,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--blue);
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #1e40af);
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.32);
}

.brand strong,
.footer-logo {
    display: block;
    font-size: 20px;
    line-height: 1.15;
    font-weight: 800;
}

.brand small {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 12px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    color: #475569;
    font-size: 14px;
    font-weight: 650;
}

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

.nav-link:hover {
    color: var(--blue);
}

.mobile-nav {
    display: none;
    gap: 8px;
    width: min(1280px, calc(100% - 24px));
    margin: 0 auto;
    padding: 0 0 12px;
    overflow-x: auto;
}

.mobile-pill {
    flex: 0 0 auto;
    padding: 7px 12px;
    border-radius: 999px;
    color: #475569;
    background: #f1f5f9;
    font-size: 13px;
    white-space: nowrap;
}

.mobile-pill:hover {
    color: var(--blue);
    background: #dbeafe;
}

.hero {
    position: relative;
    overflow: hidden;
    background: #020617;
}

.hero-stage {
    position: relative;
    height: 72vh;
    min-height: 560px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.65s 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-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 82% 18%, rgba(37, 99, 235, 0.28), transparent 30%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.58) 48%, rgba(2, 6, 23, 0.28)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent 58%);
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100vw - 1280px) / 2));
    bottom: 110px;
    width: min(720px, calc(100% - 48px));
    color: #ffffff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    color: #bfdbfe;
    background: rgba(37, 99, 235, 0.2);
    border: 1px solid rgba(147, 197, 253, 0.35);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.hero h1 {
    margin: 18px 0 16px;
    font-size: clamp(38px, 7vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero p {
    margin: 0 0 22px;
    max-width: 680px;
    color: #e2e8f0;
    font-size: clamp(16px, 2vw, 21px);
    line-height: 1.75;
}

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

.hero-tags span,
.tag-row span,
.genre-cloud span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    color: #1e40af;
    background: #dbeafe;
    font-size: 12px;
    font-weight: 700;
}

.hero-tags span {
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.primary-button,
.ghost-button,
.category-entry,
.hero-search button,
.inline-filter button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.hero-search button {
    padding: 12px 24px;
    color: #ffffff;
    background: var(--blue);
    box-shadow: 0 16px 32px rgba(37, 99, 235, 0.32);
}

.primary-button:hover,
.hero-search button:hover {
    transform: translateY(-2px);
    background: var(--blue-dark);
}

.ghost-button {
    padding: 12px 20px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.ghost-button:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.22);
}

.hero-control {
    position: absolute;
    top: 50%;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 50%;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.38);
    cursor: pointer;
    font-size: 32px;
    line-height: 1;
    transform: translateY(-50%);
}

.hero-prev {
    left: 20px;
}

.hero-next {
    right: 20px;
}

.hero-bottom {
    width: min(1280px, calc(100% - 32px));
    margin: -72px auto 0;
    position: relative;
    z-index: 3;
    padding-bottom: 28px;
}

.hero-search {
    display: flex;
    gap: 10px;
    width: min(640px, 100%);
    padding: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
}

.hero-search input,
.inline-filter input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #0f172a;
}

.hero-search input {
    padding: 0 16px;
}

.hero-search button {
    padding: 10px 24px;
}

.hero-dots {
    display: flex;
    gap: 8px;
    margin: 18px 0;
}

.hero-dot {
    width: 32px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
    cursor: pointer;
}

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

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

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

.content-section + .content-section {
    margin-top: 70px;
}

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

.section-head h2 {
    margin: 0;
    color: #1e293b;
    font-size: clamp(24px, 3vw, 34px);
    letter-spacing: -0.03em;
}

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

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

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

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

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
}

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

.movie-card-wide .poster-wrap {
    aspect-ratio: 16 / 9;
}

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

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

.poster-badge,
.rank-badge,
.mini-rank {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.78);
    font-size: 12px;
    font-weight: 800;
}

.poster-badge {
    right: 10px;
    top: 10px;
    padding: 5px 9px;
}

.rank-badge {
    left: 10px;
    top: 10px;
    padding: 5px 10px;
    background: linear-gradient(135deg, #f97316, #dc2626);
}

.card-content {
    padding: 15px;
}

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

.movie-card h3 {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 17px;
    line-height: 1.35;
}

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

.movie-card p {
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #64748b;
    font-size: 14px;
    line-height: 1.65;
}

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

.category-panel,
.side-card,
.detail-card {
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow);
}

.category-panel {
    padding: 22px;
}

.category-title {
    display: inline-flex;
    margin-bottom: 10px;
    color: #0f172a;
    font-size: 22px;
    font-weight: 850;
}

.category-panel p {
    margin: 0 0 18px;
    color: #64748b;
    line-height: 1.7;
}

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

.mini-card {
    position: relative;
    overflow: hidden;
    display: block;
    border-radius: 14px;
    min-height: 88px;
    background: #0f172a;
}

.mini-card img {
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    opacity: 0.82;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.mini-card:hover img {
    opacity: 0.62;
}

.mini-card span:not(.mini-rank) {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 8px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.mini-rank {
    left: 8px;
    top: 8px;
    padding: 4px 8px;
    background: rgba(37, 99, 235, 0.86);
}

.category-entry {
    padding: 9px 16px;
    color: #ffffff;
    background: var(--blue);
}

.category-entry:hover {
    background: var(--blue-dark);
}

.page-hero {
    color: #ffffff;
    background:
        radial-gradient(circle at 80% 20%, rgba(96, 165, 250, 0.4), transparent 32%),
        linear-gradient(135deg, #0f172a, #1e3a8a 58%, #172554);
}

.compact-hero {
    padding: 82px max(24px, calc((100vw - 1280px) / 2));
}

.compact-hero h1 {
    margin: 18px 0 12px;
    font-size: clamp(34px, 6vw, 58px);
    line-height: 1.08;
}

.compact-hero p {
    margin: 0;
    max-width: 780px;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.8;
}

.inline-filter {
    display: flex;
    align-items: center;
    width: min(580px, 100%);
    min-height: 50px;
    margin-top: 26px;
    padding: 0 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
}

.empty-state {
    margin: 26px 0 0;
    padding: 28px;
    border-radius: var(--radius);
    color: #475569;
    background: #ffffff;
    text-align: center;
    box-shadow: var(--shadow);
}

.detail-shell {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 68px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    color: #64748b;
    font-size: 14px;
}

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

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 0.9fr);
    gap: 28px;
}

.detail-main {
    min-width: 0;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #020617;
    box-shadow: 0 24px 58px rgba(15, 23, 42, 0.25);
    aspect-ratio: 16 / 9;
}

.movie-player {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #020617;
}

.player-start {
    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.62), rgba(2, 6, 23, 0.18));
    cursor: pointer;
}

.player-start span {
    width: 78px;
    height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #ffffff;
    background: var(--blue);
    box-shadow: 0 20px 36px rgba(37, 99, 235, 0.38);
    font-size: 30px;
}

.player-start strong {
    font-size: 20px;
}

.player-start[hidden],
.player-shell.is-playing .player-start {
    display: none;
}

.detail-card {
    margin-top: 24px;
    padding: 28px;
}

.detail-title-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 132px;
    gap: 22px;
    align-items: start;
}

.detail-card h1 {
    margin: 0 0 12px;
    color: #0f172a;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.detail-lead {
    margin: 0;
    color: #475569;
    font-size: 18px;
    line-height: 1.8;
}

.detail-cover {
    width: 132px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 18px;
    box-shadow: 0 15px 32px rgba(15, 23, 42, 0.16);
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0 16px;
}

.detail-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    color: #334155;
    background: #f1f5f9;
    font-size: 13px;
    font-weight: 750;
}

.detail-tags {
    margin-bottom: 26px;
}

.story-section {
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.story-section + .story-section {
    margin-top: 24px;
}

.story-section h2,
.side-card h2 {
    margin: 0 0 14px;
    color: #0f172a;
    font-size: 24px;
}

.story-section p {
    margin: 0;
    color: #334155;
    font-size: 16px;
    line-height: 1.9;
    white-space: pre-line;
}

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

.side-card {
    padding: 22px;
}

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

.side-card .mini-card {
    min-height: 120px;
}

.site-footer {
    color: #cbd5e1;
    background: linear-gradient(135deg, #0f172a, #111827);
}

.footer-inner {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 40px 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;
}

.footer-inner p {
    max-width: 560px;
    margin: 12px 0 0;
    color: #94a3b8;
    line-height: 1.7;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-weight: 750;
}

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

.footer-bottom {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    color: #94a3b8;
    font-size: 13px;
}

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

    .mobile-nav {
        display: flex;
    }

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

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

@media (max-width: 900px) {
    .hero-stage {
        height: 72vh;
        min-height: 600px;
    }

    .hero-content {
        bottom: 150px;
    }

    .hero-strip {
        display: none;
    }

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

    .detail-grid {
        display: block;
    }

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

    .footer-inner {
        display: block;
    }

    .footer-links {
        margin-top: 24px;
    }
}

@media (max-width: 620px) {
    .header-inner,
    .main-container,
    .detail-shell,
    .footer-inner,
    .footer-bottom,
    .hero-bottom {
        width: calc(100% - 24px);
    }

    .brand small {
        display: none;
    }

    .hero-stage {
        min-height: 560px;
    }

    .hero-content {
        left: 18px;
        bottom: 130px;
        width: calc(100% - 36px);
    }

    .hero-control {
        display: none;
    }

    .hero-search {
        border-radius: 22px;
    }

    .hero-search button {
        padding: 10px 16px;
    }

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

    .card-content {
        padding: 12px;
    }

    .movie-card h3 {
        font-size: 15px;
    }

    .movie-card p {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }

    .compact-hero {
        padding: 56px 18px;
    }

    .detail-title-row {
        display: block;
    }

    .detail-cover {
        margin-top: 18px;
        width: 120px;
    }

    .detail-card {
        padding: 20px;
    }

    .player-shell {
        border-radius: 18px;
    }
}
