:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --accent: #f97316;
    --ink: #0f172a;
    --muted: #64748b;
    --soft: #f8fafc;
    --card: #ffffff;
    --line: #e2e8f0;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
    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, #f8fafc 0%, #eef2ff 45%, #f8fafc 100%);
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 55%, #1e3a8a 100%);
    color: #ffffff;
    box-shadow: 0 14px 30px rgba(30, 64, 175, 0.25);
}

.nav-shell {
    max-width: 1280px;
    min-height: 72px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
    font-size: 22px;
}

.brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
    font-size: 13px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    font-weight: 600;
    margin-left: auto;
}

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

.desktop-nav a:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.header-search {
    width: 270px;
    position: relative;
}

.header-search input,
.local-search-inline input,
.category-toolbar input {
    width: 100%;
    border: 0;
    outline: 0;
    border-radius: 999px;
    padding: 12px 18px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.23);
    backdrop-filter: blur(8px);
}

.header-search input::placeholder,
.local-search-inline input::placeholder,
.category-toolbar input::placeholder {
    color: rgba(255, 255, 255, 0.78);
}

.search-results,
.inline-results {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    display: none;
    max-height: 420px;
    overflow-y: auto;
    background: #ffffff;
    color: #111827;
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 10px;
}

.search-results.is-open,
.inline-results.is-open {
    display: grid;
    gap: 8px;
}

.search-result-link {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 10px;
    align-items: center;
    padding: 8px;
    border-radius: 12px;
    transition: background 0.2s ease;
}

.search-result-link:hover {
    background: #eff6ff;
}

.search-result-link img {
    width: 42px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    background: #dbeafe;
}

.search-result-link strong {
    display: block;
    font-size: 14px;
}

.search-result-link span {
    display: block;
    color: #64748b;
    font-size: 12px;
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.16);
    padding: 10px;
}

.mobile-menu-button span {
    display: block;
    width: 100%;
    height: 2px;
    margin: 5px 0;
    background: #ffffff;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    padding: 0 24px 18px;
    max-width: 1280px;
    margin: 0 auto;
}

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

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

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

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

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

.hero-bg,
.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08);
}

.hero-shade,
.detail-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 75% 30%, rgba(59, 130, 246, 0.2), transparent 28%), linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.72) 48%, rgba(15, 23, 42, 0.25));
}

.hero-content {
    position: relative;
    max-width: 1280px;
    min-height: 620px;
    margin: 0 auto;
    padding: 88px 24px 72px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 48px;
    align-items: center;
    color: #ffffff;
}

.hero-copy {
    max-width: 720px;
}

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

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(42px, 6vw, 78px);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p,
.detail-copy p {
    max-width: 760px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
}

.hero-actions,
.detail-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 26px;
    flex-wrap: wrap;
}

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

.primary-button,
.small-button {
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #ef4444);
    box-shadow: 0 16px 34px rgba(239, 68, 68, 0.28);
}

.ghost-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.13);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

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

.hero-poster,
.detail-poster {
    position: relative;
    display: block;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 35px 75px rgba(0, 0, 0, 0.42);
    transform: rotate(2deg);
}

.hero-poster img,
.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.hero-poster span,
.detail-poster span {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: rgba(37, 99, 235, 0.92);
    box-shadow: 0 16px 35px rgba(37, 99, 235, 0.32);
}

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

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

.hero-dots button.is-active {
    width: 36px;
    background: #ffffff;
}

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

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

.hero-tags span,
.detail-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.section {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
    padding: 64px 0;
}

.section-lift {
    margin-top: -48px;
    position: relative;
    z-index: 5;
}

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

.section-head h2,
.panel-card h2,
.content-card h2,
.category-overview-card h2,
.ranking-info h2 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.12;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.section-head a {
    color: #2563eb;
    font-weight: 800;
}

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

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

.movie-card,
.panel-card,
.content-card,
.category-overview-card,
.ranking-row {
    background: var(--card);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 24px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.movie-card {
    overflow: hidden;
    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;
    background: #dbeafe;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.36s ease;
}

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

.card-badge,
.card-play {
    position: absolute;
    z-index: 2;
}

.card-badge {
    top: 12px;
    left: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.72);
    font-size: 12px;
    font-weight: 800;
}

.card-play {
    right: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: rgba(37, 99, 235, 0.92);
    box-shadow: 0 12px 25px rgba(37, 99, 235, 0.25);
}

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

.card-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.card-meta span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: #f1f5f9;
}

.movie-card h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.28;
    font-weight: 900;
}

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

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

.category-tile,
.category-overview-link {
    position: relative;
    min-height: 210px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    border-radius: 26px;
    padding: 22px;
    color: #ffffff;
    background: #1e3a8a;
    box-shadow: var(--shadow);
}

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

.category-tile:hover img {
    transform: scale(1.06);
}

.category-tile::after,
.category-overview-link::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.78));
}

.category-tile span,
.category-tile p,
.category-overview-link > div {
    position: relative;
    z-index: 2;
}

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

.category-tile p {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
}

.split-section {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 24px;
}

.panel-card {
    padding: 28px;
}

.rank-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 22px;
}

.rank-item {
    display: grid;
    grid-template-columns: auto 54px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: #f8fafc;
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
    background: #eff6ff;
    transform: translateX(2px);
}

.rank-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #ef4444);
    font-weight: 900;
}

.rank-number.large {
    width: 48px;
    height: 48px;
    font-size: 20px;
}

.rank-item img {
    width: 54px;
    height: 72px;
    border-radius: 10px;
    object-fit: cover;
}

.rank-item strong,
.rank-item em {
    display: block;
}

.rank-item em {
    color: #64748b;
    font-size: 13px;
    font-style: normal;
}

.cta-panel {
    color: #ffffff;
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.24), transparent 24%), linear-gradient(135deg, #2563eb, #4f46e5);
}

.cta-panel h2,
.cta-panel .section-kicker {
    color: #ffffff;
}

.cta-panel p {
    color: rgba(255, 255, 255, 0.82);
}

.local-search-inline {
    position: relative;
    margin-top: 22px;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #1d4ed8);
}

.page-hero {
    min-height: 360px;
    display: grid;
    place-items: center;
    padding: 80px 24px;
    text-align: center;
}

.page-hero > div {
    position: relative;
    z-index: 2;
    max-width: 880px;
}

.category-hero {
    grid-template-columns: minmax(0, 1fr);
    text-align: left;
    place-items: center start;
}

.category-hero img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.34;
}

.category-toolbar {
    width: min(520px, 100%);
    margin-top: 24px;
}

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

.detail-shell {
    position: relative;
    max-width: 1280px;
    min-height: 560px;
    margin: 0 auto;
    padding: 76px 24px 56px;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
}

.detail-poster {
    transform: none;
}

.detail-copy h1 {
    font-size: clamp(38px, 5vw, 66px);
}

.breadcrumb {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 700;
}

.detail-meta span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
}

.detail-section {
    padding-bottom: 24px;
}

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.32);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 10px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.18), rgba(2, 6, 23, 0.48));
}

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

.player-overlay span {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f97316, #ef4444);
    box-shadow: 0 22px 40px rgba(239, 68, 68, 0.32);
    font-size: 30px;
}

.player-overlay strong {
    display: block;
    font-size: 18px;
}

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    align-items: start;
}

.content-card {
    padding: 28px;
}

.prose-card p {
    margin: 16px 0 0;
    color: #475569;
    font-size: 17px;
}

.info-card dl {
    display: grid;
    gap: 14px;
    margin: 18px 0 0;
}

.info-card div {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.info-card dt {
    color: #64748b;
    font-weight: 800;
}

.info-card dd {
    margin: 0;
    color: #0f172a;
    font-weight: 700;
}

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

.ranking-section {
    display: grid;
    gap: 16px;
}

.ranking-row {
    display: grid;
    grid-template-columns: 58px 96px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 16px;
}

.ranking-poster img {
    width: 96px;
    height: 128px;
    border-radius: 16px;
    object-fit: cover;
}

.ranking-info p {
    margin: 10px 0 0;
    color: #64748b;
}

.site-footer {
    color: #cbd5e1;
    background: #0f172a;
    margin-top: 42px;
}

.footer-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 54px 24px;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1fr;
    gap: 42px;
}

.footer-shell p {
    max-width: 420px;
    color: #94a3b8;
}

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

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

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

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    padding: 20px 24px;
    text-align: center;
    color: #94a3b8;
}

.tone-orange { background: linear-gradient(135deg, #fb923c, #ef4444); }
.tone-blue { background: linear-gradient(135deg, #38bdf8, #2563eb); }
.tone-pink { background: linear-gradient(135deg, #f472b6, #db2777); }
.tone-purple { background: linear-gradient(135deg, #a78bfa, #7c3aed); }
.tone-red { background: linear-gradient(135deg, #f43f5e, #b91c1c); }
.tone-rose { background: linear-gradient(135deg, #fb7185, #f97316); }
.tone-indigo { background: linear-gradient(135deg, #818cf8, #3730a3); }
.tone-green { background: linear-gradient(135deg, #34d399, #059669); }
.tone-cyan { background: linear-gradient(135deg, #22d3ee, #0891b2); }
.tone-amber { background: linear-gradient(135deg, #fbbf24, #d97706); }
.tone-slate { background: linear-gradient(135deg, #64748b, #0f172a); }
.tone-teal { background: linear-gradient(135deg, #2dd4bf, #0f766e); }

.category-overview-card {
    overflow: hidden;
}

.category-overview-link {
    min-height: 280px;
}

.category-preview-stack {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    opacity: 0.34;
}

.category-preview-stack img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

    .mobile-menu-button {
        display: block;
        margin-left: auto;
    }

    .header-search {
        width: min(320px, 42vw);
        margin-left: auto;
    }

    .hero-content,
    .detail-shell,
    .detail-content-grid,
    .split-section,
    .footer-shell {
        grid-template-columns: 1fr;
    }

    .hero-poster,
    .detail-poster {
        max-width: 280px;
        justify-self: start;
    }

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

@media (max-width: 780px) {
    .nav-shell {
        padding: 0 16px;
        gap: 12px;
    }

    .brand {
        font-size: 18px;
    }

    .header-search {
        display: none;
    }

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

    .hero-content {
        padding: 64px 20px 84px;
        gap: 28px;
    }

    .section {
        width: min(100% - 32px, 1280px);
        padding: 44px 0;
    }

    .section-head {
        align-items: start;
        flex-direction: column;
    }

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

    .ranking-row {
        grid-template-columns: 44px 76px 1fr;
    }

    .ranking-row .small-button {
        grid-column: 2 / -1;
        justify-self: start;
    }

    .ranking-poster img {
        width: 76px;
        height: 104px;
    }

    .detail-shell {
        padding: 48px 20px;
    }
}

@media (max-width: 520px) {
    .movie-grid,
    .full-grid,
    .category-grid,
    .category-overview-grid,
    .rank-list {
        grid-template-columns: 1fr;
    }

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

    .hero-poster,
    .detail-poster {
        max-width: 210px;
    }

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

    .footer-shell {
        padding: 42px 20px;
    }
}
