:root {
    color-scheme: dark;
    --site-bg: #0f1419;
    --site-bg-soft: #1f2933;
    --site-card: rgba(31, 41, 51, 0.78);
    --site-card-strong: rgba(31, 41, 51, 0.95);
    --site-border: rgba(98, 116, 134, 0.32);
    --site-text: #ffffff;
    --site-muted: #cbd5e1;
    --site-dim: #94a3b8;
    --site-purple: #9333ea;
    --site-purple-light: #c084fc;
    --site-accent: #f59e0b;
    --site-radius: 1.25rem;
    --site-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 12%, rgba(147, 51, 234, 0.24), transparent 30rem),
        radial-gradient(circle at 88% 6%, rgba(245, 158, 11, 0.13), transparent 28rem),
        linear-gradient(180deg, #111827 0%, #0f1419 38%, #0b1016 100%);
    color: var(--site-text);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(62, 76, 89, 0.95);
    background: rgba(15, 20, 25, 0.88);
    backdrop-filter: blur(18px);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.26);
}

.header-row {
    display: flex;
    min-height: 5rem;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-width: max-content;
}

.brand-mark {
    display: inline-flex;
    width: 2.75rem;
    height: 2.75rem;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    background: linear-gradient(135deg, #9333ea, #581c87);
    box-shadow: 0 0 24px rgba(147, 51, 234, 0.38);
    font-weight: 900;
    font-size: 1.25rem;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-title {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.brand-subtitle {
    margin-top: 0.28rem;
    color: #94a3b8;
    font-size: 0.76rem;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.nav-link {
    color: #cbd5e1;
    font-weight: 650;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #ffffff;
    transform: translateY(-1px);
}

.header-search,
.mobile-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-search input,
.mobile-search input,
.movie-filter {
    width: 15rem;
    border: 1px solid rgba(98, 116, 134, 0.38);
    border-radius: 0.95rem;
    background: rgba(31, 41, 51, 0.86);
    color: #ffffff;
    outline: none;
    padding: 0.75rem 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.movie-filter:focus {
    border-color: rgba(147, 51, 234, 0.9);
    box-shadow: 0 0 0 4px rgba(147, 51, 234, 0.18);
}

.header-search button,
.mobile-search button,
.hero-button,
.section-button,
.player-overlay,
.category-link-button {
    border: 0;
    cursor: pointer;
    border-radius: 0.95rem;
    background: linear-gradient(135deg, #9333ea, #7e22ce);
    color: #ffffff;
    font-weight: 800;
    padding: 0.78rem 1.05rem;
    box-shadow: 0 14px 32px rgba(147, 51, 234, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.hero-button:hover,
.section-button:hover,
.category-link-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 42px rgba(147, 51, 234, 0.42);
}

.mobile-menu-button {
    display: none;
    width: 2.75rem;
    height: 2.75rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.34rem;
    border: 1px solid rgba(98, 116, 134, 0.35);
    border-radius: 0.85rem;
    background: rgba(31, 41, 51, 0.8);
}

.mobile-menu-button span {
    display: block;
    width: 1.25rem;
    height: 2px;
    background: #ffffff;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    padding: 0 0 1rem;
}

.mobile-nav.is-open {
    display: grid;
    gap: 0.75rem;
}

.mobile-nav-link {
    display: block;
    border: 1px solid rgba(98, 116, 134, 0.28);
    border-radius: 0.95rem;
    background: rgba(31, 41, 51, 0.72);
    color: #cbd5e1;
    padding: 0.85rem 1rem;
    font-weight: 700;
}

.mobile-nav-link.is-active {
    color: #ffffff;
    background: rgba(147, 51, 234, 0.24);
}

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

.hero-slider {
    position: relative;
    overflow: hidden;
    min-height: 34rem;
    background: #0b1016;
    box-shadow: var(--site-shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.54;
    transform: scale(1.02);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(15, 20, 25, 0.97) 0%, rgba(15, 20, 25, 0.76) 45%, rgba(15, 20, 25, 0.26) 100%),
        linear-gradient(0deg, rgba(15, 20, 25, 0.88) 0%, transparent 42%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(16rem, 0.65fr);
    gap: 2rem;
    align-items: center;
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    gap: 0.45rem;
    border: 1px solid rgba(192, 132, 252, 0.42);
    border-radius: 999px;
    background: rgba(147, 51, 234, 0.17);
    color: #e9d5ff;
    padding: 0.42rem 0.75rem;
    font-size: 0.88rem;
    font-weight: 800;
}

.hero-title {
    max-width: 58rem;
    margin: 1.2rem 0 1rem;
    font-size: clamp(2.35rem, 6vw, 5rem);
    font-weight: 950;
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero-text {
    max-width: 48rem;
    color: #d7dee8;
    font-size: clamp(1rem, 2vw, 1.22rem);
    line-height: 1.85;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 1.8rem;
}

.hero-button.secondary {
    border: 1px solid rgba(192, 132, 252, 0.36);
    background: rgba(31, 41, 51, 0.72);
    box-shadow: none;
}

.hero-info-card {
    border: 1px solid rgba(192, 132, 252, 0.2);
    border-radius: 1.5rem;
    background: rgba(31, 41, 51, 0.62);
    padding: 1.2rem;
    backdrop-filter: blur(14px);
}

.hero-info-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 1.1rem;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.38);
}

.hero-info-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 1rem;
}

.hero-info-meta span,
.movie-tag,
.info-pill {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(192, 132, 252, 0.2);
    border-radius: 999px;
    background: rgba(147, 51, 234, 0.17);
    color: #e9d5ff;
    padding: 0.35rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 750;
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: inline-flex;
    width: 3rem;
    height: 3rem;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    background: rgba(31, 41, 51, 0.72);
    color: #ffffff;
    cursor: pointer;
    transform: translateY(-50%);
    backdrop-filter: blur(12px);
}

.hero-control:hover {
    background: rgba(147, 51, 234, 0.85);
}

.hero-control.prev {
    left: 1rem;
}

.hero-control.next {
    right: 1rem;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 1.5rem;
    z-index: 6;
    display: flex;
    gap: 0.45rem;
    transform: translateX(-50%);
}

.hero-dot {
    width: 2rem;
    height: 0.28rem;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.45);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 3.25rem;
    background: #c084fc;
}

.content-section {
    padding: 4.25rem 0;
}

.content-section.soft {
    background: rgba(31, 41, 51, 0.38);
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
}

.section-kicker {
    display: block;
    color: #c084fc;
    font-size: 0.85rem;
    font-weight: 900;
    letter-spacing: 0.15em;
}

.section-title {
    margin: 0.25rem 0 0;
    color: #ffffff;
    font-size: clamp(1.7rem, 3vw, 2.5rem);
    font-weight: 900;
}

.section-desc {
    max-width: 44rem;
    margin: 0.75rem 0 0;
    color: #cbd5e1;
    line-height: 1.75;
}

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 13rem;
    border: 1px solid rgba(98, 116, 134, 0.32);
    border-radius: 1.3rem;
    background:
        linear-gradient(135deg, rgba(147, 51, 234, 0.2), rgba(31, 41, 51, 0.82)),
        rgba(31, 41, 51, 0.76);
    padding: 1.1rem;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
    border-color: rgba(192, 132, 252, 0.5);
    transform: translateY(-4px);
}

.category-tile h3 {
    margin: 0;
    font-size: 1.18rem;
    font-weight: 900;
}

.category-tile p {
    color: #cbd5e1;
    line-height: 1.65;
}

.category-mini-row {
    display: flex;
    gap: 0.38rem;
    margin-top: 1rem;
}

.category-mini-row img {
    width: 3rem;
    height: 4rem;
    object-fit: cover;
    border-radius: 0.55rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

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

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

.movie-card {
    min-width: 0;
    border: 1px solid rgba(98, 116, 134, 0.28);
    border-radius: 1.2rem;
    background: var(--site-card);
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.22);
    overflow: hidden;
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    border-color: rgba(192, 132, 252, 0.55);
    box-shadow: 0 20px 70px rgba(147, 51, 234, 0.16);
    transform: translateY(-5px);
}

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

.movie-card-link {
    display: flex;
    height: 100%;
    flex-direction: column;
}

.movie-poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.35), rgba(15, 20, 25, 0.88));
}

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

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

.poster-year,
.rank-badge {
    position: absolute;
    top: 0.65rem;
    left: 0.65rem;
    border-radius: 999px;
    background: rgba(15, 20, 25, 0.78);
    color: #ffffff;
    padding: 0.28rem 0.6rem;
    font-size: 0.78rem;
    font-weight: 850;
    backdrop-filter: blur(8px);
}

.rank-badge {
    right: 0.65rem;
    left: auto;
    background: rgba(245, 158, 11, 0.92);
    color: #111827;
}

.poster-play {
    position: absolute;
    right: 0.65rem;
    bottom: 0.65rem;
    border-radius: 999px;
    background: rgba(147, 51, 234, 0.9);
    color: #ffffff;
    padding: 0.35rem 0.72rem;
    font-size: 0.78rem;
    font-weight: 900;
}

.movie-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.55rem;
    padding: 0.9rem;
}

.movie-card-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.3;
}

.movie-card-meta {
    margin: 0;
    color: #94a3b8;
    font-size: 0.8rem;
    line-height: 1.45;
}

.movie-card-line {
    margin: 0;
    color: #cbd5e1;
    font-size: 0.86rem;
    line-height: 1.55;
}

.movie-card-horizontal .movie-card-link {
    display: grid;
    grid-template-columns: 9rem minmax(0, 1fr);
}

.movie-card-horizontal .movie-poster {
    aspect-ratio: auto;
    min-height: 12rem;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.4rem;
}

.filter-bar .movie-filter {
    width: min(100%, 28rem);
}

.no-results {
    display: none;
    border: 1px solid rgba(98, 116, 134, 0.28);
    border-radius: 1rem;
    background: rgba(31, 41, 51, 0.65);
    color: #cbd5e1;
    padding: 1rem;
}

.no-results.is-visible {
    display: block;
}

.page-hero {
    border-bottom: 1px solid rgba(98, 116, 134, 0.25);
    background:
        radial-gradient(circle at 18% 0%, rgba(147, 51, 234, 0.26), transparent 28rem),
        rgba(15, 20, 25, 0.4);
    padding: 4rem 0 3rem;
}

.page-hero h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 950;
    letter-spacing: -0.05em;
}

.page-hero p {
    max-width: 52rem;
    margin: 1rem 0 0;
    color: #cbd5e1;
    font-size: 1.05rem;
    line-height: 1.8;
}

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

.category-card-large {
    border: 1px solid rgba(98, 116, 134, 0.32);
    border-radius: 1.3rem;
    background: rgba(31, 41, 51, 0.72);
    padding: 1.2rem;
}

.category-card-large h2 {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 900;
}

.category-card-large p {
    color: #cbd5e1;
    line-height: 1.7;
}

.mini-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.55rem;
    margin: 1rem 0;
}

.mini-movie {
    overflow: hidden;
    border-radius: 0.9rem;
    background: rgba(15, 20, 25, 0.42);
}

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

.mini-movie span {
    display: block;
    overflow: hidden;
    padding: 0.45rem;
    color: #e2e8f0;
    font-size: 0.78rem;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 21rem;
    gap: 1.5rem;
    align-items: start;
}

.detail-card,
.player-card,
.related-card {
    border: 1px solid rgba(98, 116, 134, 0.3);
    border-radius: 1.35rem;
    background: rgba(31, 41, 51, 0.72);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

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

.movie-video {
    width: 100%;
    height: 100%;
    display: block;
    background: #020617;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    width: 100%;
    height: 100%;
    border-radius: 0;
    background:
        linear-gradient(180deg, rgba(15, 20, 25, 0.24), rgba(15, 20, 25, 0.86)),
        rgba(15, 20, 25, 0.48);
    font-size: 1.05rem;
}

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

.play-circle {
    display: inline-flex;
    width: 4.4rem;
    height: 4.4rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 2rem;
}

.detail-body {
    padding: 1.2rem;
}

.detail-body h2,
.related-card h2 {
    margin: 0 0 0.85rem;
    font-size: 1.35rem;
    font-weight: 900;
}

.detail-body p {
    color: #d7dee8;
    line-height: 1.9;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.detail-poster {
    overflow: hidden;
    border-radius: 1.35rem;
}

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

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.breadcrumbs a {
    color: #d8b4fe;
}

.related-card {
    padding: 1rem;
}

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

.site-footer {
    border-top: 1px solid rgba(98, 116, 134, 0.25);
    background: rgba(15, 20, 25, 0.86);
    color: #94a3b8;
    padding: 2rem 0;
}

.site-footer .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-footer nav {
    display: flex;
    gap: 1rem;
}

.site-footer a {
    color: #cbd5e1;
}

@media (max-width: 1180px) {
    .desktop-nav {
        gap: 0.8rem;
    }

    .header-search input {
        width: 12rem;
    }

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

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

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

    .mobile-menu-button {
        display: inline-flex;
    }

    .hero-content {
        grid-template-columns: 1fr;
        padding-top: 4rem;
        padding-bottom: 4rem;
    }

    .hero-info-card {
        max-width: 22rem;
    }

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

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

    .detail-poster {
        max-width: 22rem;
    }
}

@media (max-width: 680px) {
    .header-row {
        min-height: 4rem;
    }

    .brand-title {
        font-size: 1.02rem;
    }

    .brand-subtitle {
        display: none;
    }

    .brand-mark {
        width: 2.25rem;
        height: 2.25rem;
        border-radius: 0.75rem;
    }

    .hero-slider {
        min-height: 38rem;
    }

    .hero-content {
        padding-top: 3rem;
        padding-bottom: 4.8rem;
    }

    .hero-control {
        display: none;
    }

    .hero-actions,
    .section-head,
    .site-footer .container {
        align-items: stretch;
        flex-direction: column;
    }

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

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

    .movie-card-horizontal .movie-card-link {
        grid-template-columns: 7rem minmax(0, 1fr);
    }

    .movie-card-horizontal .movie-poster {
        min-height: 10rem;
    }

    .content-section {
        padding: 3rem 0;
    }
}

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

    .movie-card-horizontal .movie-card-link {
        grid-template-columns: 1fr;
    }

    .movie-card-horizontal .movie-poster {
        aspect-ratio: 3 / 4;
    }
}
