* {
    box-sizing: border-box;
}

:root {
    --bg: #f8fafc;
    --bg-soft: #eff6ff;
    --text: #111827;
    --muted: #64748b;
    --line: #e5e7eb;
    --blue: #2563eb;
    --cyan: #06b6d4;
    --dark: #0f172a;
    --card: #ffffff;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

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

.container.narrow {
    width: min(860px, calc(100% - 32px));
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.32);
}

.brand-copy {
    display: grid;
    gap: 1px;
}

.brand-title {
    font-size: 20px;
    color: #0f172a;
}

.brand-subtitle {
    font-size: 12px;
    color: var(--muted);
    font-weight: 500;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    font-weight: 650;
    color: #334155;
}

.main-nav a {
    transition: color 0.2s ease;
}

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

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

.mobile-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #1e293b;
    border-radius: 999px;
}

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

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

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

.hero-grid {
    min-height: 620px;
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
    align-items: center;
    gap: 48px;
    color: #ffffff;
    padding: 64px 0;
}

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

.hero-label,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.22);
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.section-kicker {
    color: var(--blue);
    background: #eff6ff;
    border-color: #dbeafe;
}

.hero-copy h1 {
    margin: 22px 0 16px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 0.95;
    letter-spacing: -0.05em;
}

.hero-copy p {
    margin: 0;
    font-size: clamp(18px, 2vw, 22px);
    color: #dbeafe;
    max-width: 680px;
}

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

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

.hero-tags span,
.detail-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 750;
}

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

.detail-tags span,
.tag-row span {
    color: #1d4ed8;
    background: #eff6ff;
}

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

.primary-btn,
.ghost-btn,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    padding: 12px 18px;
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.28);
}

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

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

.text-link {
    color: var(--blue);
    font-size: 14px;
}

.hero-search {
    margin-top: 26px;
    display: flex;
    gap: 10px;
    max-width: 560px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 18px;
    backdrop-filter: blur(10px);
}

.hero-search input,
.search-panel input,
.inline-filter input,
.search-panel select {
    width: 100%;
    border: 1px solid var(--line);
    outline: none;
    border-radius: 14px;
    padding: 12px 14px;
    color: #0f172a;
    background: #ffffff;
}

.hero-search button {
    border: 0;
    border-radius: 12px;
    color: #ffffff;
    background: #0f172a;
    padding: 0 18px;
    cursor: pointer;
    font-weight: 800;
}

.hero-poster {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    min-height: 460px;
    box-shadow: 0 30px 70px rgba(2, 6, 23, 0.45);
    transform: rotate(1deg);
}

.hero-poster img {
    width: 100%;
    height: 520px;
    object-fit: cover;
}

.hero-poster span {
    position: absolute;
    left: 18px;
    bottom: 18px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.72);
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 800;
}

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

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

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

.category-strip,
.content-section,
.category-overview {
    padding: 56px 0 0;
}

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

.section-heading h2,
.page-hero h1,
.detail-content h1 {
    margin: 10px 0 0;
    color: #0f172a;
    line-height: 1.1;
}

.section-heading h2 {
    font-size: clamp(26px, 3vw, 36px);
}

.compact-heading {
    align-items: center;
}

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

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 220px;
    padding: 22px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover,
.movie-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 26px 55px rgba(15, 23, 42, 0.16);
}

.category-count {
    display: inline-flex;
    color: #1d4ed8;
    background: #eff6ff;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 800;
}

.category-stack {
    position: absolute;
    right: 18px;
    top: 18px;
    display: flex;
    width: 160px;
    height: 96px;
}

.category-stack img {
    width: 58px;
    height: 86px;
    object-fit: cover;
    border-radius: 12px;
    border: 3px solid #ffffff;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
    margin-left: -18px;
}

.category-card h3 {
    margin: 82px 0 8px;
    font-size: 24px;
}

.category-card p {
    margin: 0;
    color: var(--muted);
}

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

.movie-card {
    overflow: hidden;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.10);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

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

.poster-type,
.rank-badge {
    position: absolute;
    top: 10px;
    border-radius: 999px;
    padding: 5px 9px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.poster-type {
    right: 10px;
    background: rgba(15, 23, 42, 0.74);
}

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

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

.movie-title,
.compact-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #0f172a;
    font-weight: 850;
    line-height: 1.35;
}

.movie-title:hover,
.compact-title:hover {
    color: var(--blue);
}

.movie-meta,
.movie-line,
.compact-info p {
    color: var(--muted);
    font-size: 13px;
}

.movie-meta {
    margin: 7px 0;
}

.movie-line {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 42px;
    overflow: hidden;
    margin: 0 0 12px;
}

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

.compact-card {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.compact-poster {
    position: relative;
    flex: 0 0 78px;
    height: 78px;
    overflow: hidden;
    border-radius: 14px;
}

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

.compact-info {
    min-width: 0;
}

.compact-info p {
    margin: 6px 0 0;
}

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

.page-hero {
    padding: 70px 0 44px;
}

.soft-hero {
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
}

.soft-hero .section-kicker {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.28);
}

.page-hero h1 {
    font-size: clamp(38px, 5vw, 58px);
    color: #ffffff;
}

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

.inline-filter,
.search-panel {
    margin-top: 24px;
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 180px;
    gap: 12px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: #475569;
    margin-bottom: 18px;
    font-size: 14px;
}

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

.detail-main {
    padding: 36px 0 70px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
}

.player-card,
.prose-card,
.detail-poster-card {
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow);
}

.player-card {
    overflow: hidden;
    background: #020617;
}

.player-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.movie-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #020617;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 10px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.16), rgba(15, 23, 42, 0.72));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-icon {
    width: 82px;
    height: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.38);
    font-size: 30px;
}

.detail-content,
.prose-card {
    padding: 28px;
}

.flat-card {
    margin-top: 24px;
}

.detail-content h1 {
    font-size: clamp(32px, 4vw, 48px);
}

.detail-line {
    color: #475569;
    font-size: 18px;
}

.detail-content h2,
.prose-card h2 {
    margin-top: 28px;
    margin-bottom: 10px;
    font-size: 22px;
}

.detail-content p,
.prose-card p {
    color: #334155;
    margin: 0 0 12px;
}

.detail-aside {
    position: relative;
}

.detail-poster-card {
    position: sticky;
    top: 92px;
    padding: 18px;
}

.detail-poster-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 18px;
}

.detail-poster-card h2 {
    margin: 16px 0;
    font-size: 22px;
}

.detail-poster-card dl {
    display: grid;
    gap: 10px;
    margin: 0 0 18px;
}

.detail-poster-card dl div {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.detail-poster-card dt {
    color: #64748b;
}

.detail-poster-card dd {
    margin: 0;
    font-weight: 750;
}

.full-btn {
    width: 100%;
}

.related-section {
    padding-top: 36px;
}

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

.site-footer {
    margin-top: 72px;
    color: #cbd5e1;
    background: linear-gradient(135deg, #111827, #1e293b 50%, #0f172a);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 34px;
    padding: 48px 0 28px;
}

.footer-brand {
    color: #ffffff;
    font-size: 20px;
}

.footer-text {
    max-width: 520px;
    color: #94a3b8;
}

.site-footer h3 {
    color: #ffffff;
    margin: 0 0 12px;
}

.site-footer a {
    display: block;
    color: #94a3b8;
    margin: 8px 0;
}

.site-footer a:hover {
    color: #ffffff;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 0 28px;
    border-top: 1px solid rgba(148, 163, 184, 0.25);
    color: #94a3b8;
}

.footer-bottom button {
    border: 0;
    color: #ffffff;
    background: transparent;
    cursor: pointer;
}

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

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

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

    .hero-poster {
        max-width: 360px;
        min-height: auto;
    }

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

    .detail-poster-card {
        position: static;
    }
}

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

    .mobile-toggle {
        display: block;
    }

    .main-nav {
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px;
        background: #ffffff;
        box-shadow: 0 18px 30px rgba(15, 23, 42, 0.10);
    }

    .main-nav.is-open {
        display: flex;
    }

    .main-nav a {
        padding: 12px 14px;
        border-radius: 12px;
    }

    .main-nav a:hover {
        background: #eff6ff;
    }

    .hero-slider,
    .hero-grid {
        min-height: 720px;
    }

    .hero-grid {
        padding: 42px 0 84px;
    }

    .hero-poster {
        display: none;
    }

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

    .hero-search button {
        min-height: 44px;
    }

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

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

    .category-card {
        min-height: 230px;
    }

    .category-stack {
        width: 140px;
    }

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

    .detail-content,
    .prose-card {
        padding: 20px;
    }
}

@media (max-width: 420px) {
    .movie-grid,
    .rank-grid,
    .related-grid,
    .category-grid,
    .category-grid.wide {
        grid-template-columns: 1fr;
    }

    .brand-subtitle {
        display: none;
    }
}
