:root {
    --page-bg: #faf5ff;
    --text: #111827;
    --muted: #6b7280;
    --soft: rgba(255, 255, 255, 0.76);
    --line: rgba(148, 163, 184, 0.26);
    --purple: #9333ea;
    --pink: #db2777;
    --blue: #2563eb;
    --indigo: #4f46e5;
    --shadow: 0 24px 80px rgba(79, 70, 229, 0.16);
    --shadow-strong: 0 35px 100px rgba(17, 24, 39, 0.24);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(168, 85, 247, 0.22), transparent 34rem),
        radial-gradient(circle at 90% 12%, rgba(236, 72, 153, 0.18), transparent 26rem),
        linear-gradient(135deg, #faf5ff 0%, #fdf2f8 48%, #eff6ff 100%);
    min-height: 100vh;
}

body.menu-open {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

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

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

.brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 22px;
    font-weight: 900;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--purple), var(--pink), var(--blue));
    box-shadow: 0 16px 38px rgba(147, 51, 234, 0.35);
}

.brand-text {
    display: grid;
    line-height: 1.1;
}

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

.brand-text em {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.desktop-nav,
.mobile-nav {
    align-items: center;
    gap: 8px;
}

.desktop-nav {
    display: flex;
}

.nav-link {
    padding: 10px 14px;
    color: #374151;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: linear-gradient(135deg, var(--purple), var(--pink));
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 10px 26px rgba(79, 70, 229, 0.12);
}

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

.mobile-nav {
    display: none;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto 18px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow);
}

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

.page-main {
    padding-top: 32px;
}

.panel {
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 28px;
    background: var(--soft);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero-carousel {
    position: relative;
    min-height: 680px;
    margin: 30px auto 34px;
    overflow: hidden;
    border-radius: 36px;
    box-shadow: var(--shadow-strong);
    isolation: isolate;
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    transform: scale(1.04);
    filter: saturate(1.12);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(17, 24, 39, 0.9) 0%, rgba(17, 24, 39, 0.68) 42%, rgba(17, 24, 39, 0.18) 100%),
        radial-gradient(circle at 16% 22%, rgba(236, 72, 153, 0.34), transparent 26rem),
        radial-gradient(circle at 78% 72%, rgba(37, 99, 235, 0.34), transparent 22rem);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 680px;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) 380px;
    align-items: center;
    gap: 48px;
    padding: 64px;
    color: #fff;
}

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

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

.hero-copy .eyebrow {
    color: #f0abfc;
}

.hero-copy h1 {
    margin: 0 0 14px;
    font-size: clamp(38px, 5.4vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.045em;
}

.hero-copy h2 {
    margin: 0 0 18px;
    font-size: clamp(26px, 3.2vw, 46px);
    line-height: 1.15;
}

.hero-copy p {
    margin: 0;
    max-width: 660px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
    line-height: 1.9;
}

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

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

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

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

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

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

.primary-btn,
.search-form button {
    color: #fff;
    background: linear-gradient(135deg, var(--purple), var(--pink), var(--blue));
    box-shadow: 0 18px 40px rgba(147, 51, 234, 0.32);
}

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

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

.outline-btn {
    color: var(--purple);
    background: #fff;
    border: 1px solid rgba(147, 51, 234, 0.2);
}

.hero-poster {
    position: relative;
    display: block;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
    transform: rotate(2deg);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 24px;
}

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

.hero-controls button {
    border: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(12px);
}

.hero-controls > button {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    font-size: 28px;
    line-height: 1;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 999px;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
    width: 30px;
    background: #fff;
}

.quick-search {
    display: grid;
    grid-template-columns: 1fr minmax(360px, 0.8fr);
    align-items: center;
    gap: 24px;
    padding: 28px;
    margin-bottom: 44px;
}

.quick-search h2,
.section-head h2,
.page-hero h1,
.category-overview-head h2,
.detail-copy h1,
.player-section h2,
.prose-block h2,
.detail-sidebar h2 {
    margin: 0;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.quick-search h2,
.section-head h2,
.category-overview-head h2,
.player-section h2,
.prose-block h2,
.detail-sidebar h2 {
    font-size: clamp(24px, 3vw, 36px);
}

.search-form,
.local-filter {
    display: flex;
    gap: 12px;
}

.search-form input,
.local-filter input,
.local-filter select {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid rgba(147, 51, 234, 0.18);
    border-radius: 999px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.82);
    outline: none;
}

.local-filter select {
    width: 170px;
}

.wide-filter {
    max-width: 780px;
    margin-top: 24px;
}

.section-block {
    margin: 52px 0;
}

.section-head,
.category-overview-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.section-head a,
.category-overview-head a {
    color: var(--purple);
    font-weight: 800;
}

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

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

.category-tile {
    min-height: 210px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    padding: 22px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.76);
    border-radius: 26px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.52)),
        radial-gradient(circle at top right, rgba(236, 72, 153, 0.18), transparent 16rem);
    box-shadow: var(--shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile:hover,
.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 28px 70px rgba(79, 70, 229, 0.22);
}

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

.category-tile strong {
    color: #4b5563;
    font-size: 14px;
    line-height: 1.7;
}

.category-tile em {
    display: grid;
    gap: 6px;
    font-style: normal;
}

.category-tile em a {
    color: var(--purple);
    font-size: 13px;
    font-weight: 700;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.74);
    box-shadow: 0 18px 46px rgba(79, 70, 229, 0.12);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.poster {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.22), rgba(37, 99, 235, 0.18));
}

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

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

.poster-glow {
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    background: linear-gradient(to top, rgba(17, 24, 39, 0.52), transparent);
}

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    min-width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    color: #fff;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--pink), var(--purple));
    box-shadow: 0 12px 28px rgba(219, 39, 119, 0.28);
}

.card-body {
    padding: 15px;
}

.meta-row {
    margin-bottom: 9px;
}

.meta-row span {
    color: #6d28d9;
    background: #f3e8ff;
}

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

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

.tag-row span {
    color: #be185d;
    background: #fce7f3;
}

.large-tags span {
    font-size: 13px;
}

.rank-card-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.movie-card.compact {
    display: grid;
    grid-template-columns: 96px 1fr;
    min-height: 138px;
}

.movie-card.compact .poster {
    aspect-ratio: auto;
    height: 100%;
}

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

.movie-card.compact p {
    min-height: auto;
    -webkit-line-clamp: 2;
}

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

.side-panel,
.detail-sidebar {
    align-self: start;
    padding: 24px;
    position: sticky;
    top: 100px;
}

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

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

.text-rank-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 12px;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.68);
    transition: transform 0.2s ease, background 0.2s ease;
}

.text-rank-item:hover {
    transform: translateX(4px);
    background: #fff;
}

.text-rank-item span {
    grid-row: span 2;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 900;
    border-radius: 10px;
    background: var(--indigo);
}

.text-rank-item strong {
    font-size: 15px;
}

.text-rank-item em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

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

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

.page-hero {
    padding: 34px;
}

.page-hero h1 {
    max-width: 920px;
    font-size: clamp(34px, 4vw, 58px);
}

.page-hero p {
    max-width: 780px;
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.85;
}

.category-overview-list {
    display: grid;
    gap: 24px;
    margin: 34px 0 56px;
}

.category-overview {
    padding: 26px;
}

.category-overview-head p {
    max-width: 720px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

.category-hero .local-filter {
    margin-top: 24px;
}

.detail-hero {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    padding: 28px;
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 24px 70px rgba(79, 70, 229, 0.24);
}

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

.detail-copy h1 {
    font-size: clamp(34px, 4.8vw, 62px);
}

.lead-text {
    max-width: 780px;
    margin: 18px 0 18px;
    color: #374151;
    font-size: 18px;
    line-height: 1.9;
}

.detail-meta {
    margin: 16px 0;
}

.detail-meta span {
    color: #4338ca;
    background: #e0e7ff;
}

.detail-copy .primary-btn {
    margin-top: 24px;
}

.detail-layout {
    margin: 30px 0 56px;
}

.detail-content {
    display: grid;
    gap: 28px;
}

.player-section,
.prose-block {
    padding: 24px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    margin-top: 18px;
    aspect-ratio: 16 / 9;
    border-radius: 24px;
    background: #050816;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #fff;
    border: 0;
    background:
        linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.26)),
        rgba(17, 24, 39, 0.32);
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    padding-left: 5px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--pink), var(--purple), var(--blue));
    box-shadow: 0 18px 46px rgba(147, 51, 234, 0.4);
    font-size: 30px;
}

.player-cover strong {
    max-width: 80%;
    font-size: 24px;
    text-align: center;
}

.player-cover em {
    color: rgba(255, 255, 255, 0.78);
    font-style: normal;
}

.prose-block p {
    margin: 14px 0 24px;
    color: #374151;
    font-size: 16px;
    line-height: 2;
}

.related-block {
    margin-top: 0;
}

.site-footer {
    margin-top: 68px;
    padding: 46px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.48);
}

.footer-inner {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    gap: 18px;
}

.footer-inner strong {
    font-size: 20px;
}

.footer-inner p {
    max-width: 780px;
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    color: #4b5563;
    background: rgba(255, 255, 255, 0.68);
}

.copyright {
    font-size: 13px;
}

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

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

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

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

    .menu-toggle {
        display: block;
    }

    body.menu-open .mobile-nav {
        display: grid;
    }

    .hero-carousel,
    .hero-content {
        min-height: auto;
    }

    .hero-slide {
        position: relative;
        display: none;
    }

    .hero-slide.active {
        display: block;
    }

    .hero-content {
        grid-template-columns: 1fr;
        padding: 34px 24px 92px;
    }

    .hero-poster {
        width: min(320px, 100%);
        margin: 0 auto;
    }

    .quick-search,
    .split-layout,
    .detail-layout,
    .detail-hero {
        grid-template-columns: 1fr;
    }

    .side-panel,
    .detail-sidebar {
        position: static;
    }

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

    .rank-card-list,
    .text-rank-list.columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    main,
    .header-inner,
    .mobile-nav,
    .footer-inner {
        width: min(100% - 24px, 1200px);
    }

    .brand-text em {
        display: none;
    }

    .hero-carousel {
        margin-top: 18px;
        border-radius: 26px;
    }

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

    .hero-copy h2 {
        font-size: 28px;
    }

    .hero-copy p,
    .lead-text,
    .page-hero p {
        font-size: 15px;
    }

    .quick-search,
    .page-hero,
    .category-overview,
    .detail-hero,
    .player-section,
    .prose-block,
    .detail-sidebar {
        padding: 20px;
        border-radius: 22px;
    }

    .search-form,
    .local-filter,
    .section-head,
    .category-overview-head {
        flex-direction: column;
        align-items: stretch;
    }

    .local-filter select {
        width: 100%;
    }

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

    .movie-card.compact {
        grid-template-columns: 82px 1fr;
    }

    .card-body {
        padding: 12px;
    }

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

    .movie-card p {
        font-size: 13px;
    }

    .detail-poster {
        max-width: 280px;
        margin: 0 auto;
    }
}

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