:root {
    color-scheme: dark;
    --bg: #070412;
    --bg-soft: #11091f;
    --panel: rgba(255, 255, 255, 0.08);
    --panel-strong: rgba(255, 255, 255, 0.14);
    --text: #ffffff;
    --muted: #c6b8dc;
    --muted-soft: #9282ad;
    --purple: #8b5cf6;
    --pink: #ec4899;
    --amber: #f59e0b;
    --cyan: #22d3ee;
    --border: rgba(255, 255, 255, 0.14);
    --shadow: 0 24px 70px rgba(12, 5, 28, 0.45);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(139, 92, 246, 0.32), transparent 34rem),
        radial-gradient(circle at top right, rgba(236, 72, 153, 0.24), transparent 34rem),
        linear-gradient(135deg, #090315 0%, #111827 48%, #2b0d37 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(90deg, rgba(49, 20, 99, 0.92), rgba(88, 28, 135, 0.9), rgba(157, 23, 77, 0.9));
    backdrop-filter: blur(18px);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.24);
}

.nav-shell {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: min(1280px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 1.2rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.logo-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--purple), var(--pink));
    box-shadow: 0 12px 32px rgba(236, 72, 153, 0.32);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex: 1;
    overflow: auto;
    scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
    display: none;
}

.main-nav a,
.mobile-panel a {
    padding: 0.65rem 0.8rem;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.95rem;
    transition: 0.25s ease;
}

.main-nav a:hover,
.mobile-panel a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.top-search {
    display: flex;
    width: min(300px, 28vw);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

.top-search input {
    width: 100%;
    min-width: 0;
    padding: 0.72rem 0.95rem;
    color: #fff;
    border: 0;
    outline: 0;
    background: transparent;
}

.top-search input::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

.top-search button,
.primary-button,
.ghost-button,
.hero-arrow,
.play-button,
.filter-button {
    cursor: pointer;
    border: 0;
}

.top-search button {
    padding: 0 1rem;
    color: #fff;
    background: linear-gradient(135deg, var(--purple), var(--pink));
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.1);
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 99px;
    background: #fff;
}

.mobile-panel {
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto 1rem;
}

.mobile-panel.is-open {
    display: grid;
}

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

.hero-section {
    position: relative;
    margin-top: 26px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 34px;
    background: linear-gradient(135deg, rgba(88, 28, 135, 0.52), rgba(15, 23, 42, 0.72));
    box-shadow: var(--shadow);
}

.hero-track {
    position: relative;
    min-height: 610px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.78fr);
    gap: 2rem;
    align-items: center;
    padding: clamp(2rem, 5vw, 4.5rem);
    opacity: 0;
    visibility: hidden;
    transform: scale(1.02);
    transition: opacity 0.8s ease, transform 0.8s ease, visibility 0.8s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(8px) saturate(1.15);
    transform: scale(1.08);
    opacity: 0.4;
}

.hero-bg::after {
    position: absolute;
    inset: 0;
    content: "";
    background:
        linear-gradient(90deg, rgba(7, 4, 18, 0.96) 0%, rgba(29, 13, 55, 0.76) 46%, rgba(7, 4, 18, 0.3) 100%),
        linear-gradient(0deg, rgba(7, 4, 18, 0.9), transparent 55%);
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    width: max-content;
    padding: 0.45rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    color: #ffe4f3;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(14px);
}

.hero-title {
    max-width: 740px;
    margin: 1rem 0 0.8rem;
    font-size: clamp(2.2rem, 6vw, 5.4rem);
    line-height: 0.98;
    font-weight: 950;
    letter-spacing: -0.06em;
}

.hero-title span,
.gradient-text {
    background: linear-gradient(90deg, #fff, #f9a8d4 42%, #c4b5fd 80%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-movie-title {
    margin: 0 0 1rem;
    font-size: clamp(1.7rem, 3vw, 3.1rem);
    line-height: 1.08;
}

.hero-copy {
    max-width: 680px;
    color: #e8ddff;
    font-size: 1.05rem;
    line-height: 1.85;
}

.hero-tags,
.tag-line,
.detail-tags,
.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.hero-tags span,
.tag-line span,
.detail-tags span,
.category-pills a {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0.34rem 0.65rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    color: #f3e8ff;
    background: rgba(255, 255, 255, 0.09);
}

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

.primary-button,
.ghost-button,
.filter-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 44px;
    padding: 0.78rem 1.15rem;
    border-radius: 999px;
    font-weight: 750;
    transition: 0.25s ease;
}

.primary-button {
    color: #fff;
    background: linear-gradient(135deg, var(--purple), var(--pink));
    box-shadow: 0 16px 42px rgba(236, 72, 153, 0.32);
}

.primary-button:hover,
.filter-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 46px rgba(139, 92, 246, 0.34);
}

.ghost-button,
.filter-button {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.1);
}

.hero-search {
    display: flex;
    max-width: 650px;
    margin-top: 1.7rem;
    padding: 0.35rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(18px);
}

.hero-search input {
    flex: 1;
    min-width: 0;
    padding: 0 1rem;
    color: #fff;
    border: 0;
    outline: 0;
    background: transparent;
}

.hero-search input::placeholder {
    color: rgba(255, 255, 255, 0.58);
}

.hero-poster-wrap {
    position: relative;
    align-self: stretch;
    min-height: 420px;
}

.hero-poster-card {
    position: relative;
    height: 100%;
    min-height: 480px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
}

.hero-poster-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.01);
    transition: 0.45s ease;
}

.hero-poster-card:hover img {
    transform: scale(1.07);
}

.hero-poster-info {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    left: 1rem;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 22px;
    background: rgba(12, 5, 28, 0.72);
    backdrop-filter: blur(18px);
}

.hero-poster-info strong {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 1.25rem;
}

.hero-poster-info p {
    margin: 0;
    color: var(--muted);
}

.hero-controls {
    position: absolute;
    right: clamp(1rem, 3vw, 2rem);
    bottom: clamp(1rem, 3vw, 2rem);
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.hero-arrow {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
    transition: 0.25s ease;
}

.hero-arrow:hover {
    background: linear-gradient(135deg, var(--purple), var(--pink));
}

.hero-dots {
    display: flex;
    gap: 0.45rem;
}

.hero-dot {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.38);
    cursor: pointer;
    transition: 0.25s ease;
}

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

.section-block {
    margin: 3rem 0;
}

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

.section-head h2,
.listing-head h1,
.detail-title,
.search-title {
    margin: 0.6rem 0 0;
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.1;
}

.section-head p,
.listing-head p,
.search-lead,
.detail-intro,
.category-card p,
.footer-inner p {
    color: var(--muted);
    line-height: 1.75;
}

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

.category-card {
    position: relative;
    min-height: 180px;
    padding: 1.25rem;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at top right, rgba(236, 72, 153, 0.28), transparent 11rem),
        linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
    transition: 0.25s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(236, 72, 153, 0.42);
}

.category-card h2,
.category-card h3 {
    margin: 0;
    font-size: 1.35rem;
}

.category-card p {
    margin: 0.65rem 0 1rem;
}

.category-card span {
    display: inline-flex;
    color: #fff;
    font-weight: 800;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.075);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
    transition: 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(216, 180, 254, 0.48);
    background: rgba(255, 255, 255, 0.11);
}

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

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
}

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

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

.poster-glow {
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent);
}

.year-badge,
.rank-mark,
.detail-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 800;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.96), rgba(236, 72, 153, 0.94));
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.year-badge {
    top: 0.65rem;
    right: 0.65rem;
}

.rank-mark {
    left: 0.65rem;
    bottom: 0.65rem;
}

.movie-card-body {
    padding: 0.9rem;
}

.movie-card-title {
    display: -webkit-box;
    min-height: 2.8em;
    overflow: hidden;
    color: #fff;
    font-weight: 850;
    line-height: 1.4;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-card-title:hover {
    color: #f0abfc;
}

.movie-card-body p {
    display: -webkit-box;
    min-height: 3.9em;
    margin: 0.55rem 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.55;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    color: var(--muted-soft);
    font-size: 0.82rem;
}

.movie-meta a {
    color: #d8b4fe;
}

.tag-line {
    margin-top: 0.75rem;
}

.tag-line span {
    min-height: 24px;
    padding: 0.22rem 0.5rem;
    font-size: 0.78rem;
}

.ranking-list {
    display: grid;
    gap: 0.75rem;
}

.rank-row {
    display: grid;
    grid-template-columns: 56px 84px minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: 0.8rem;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.075);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 15px;
    font-weight: 950;
    background: linear-gradient(135deg, var(--amber), var(--pink));
}

.rank-row img {
    width: 84px;
    aspect-ratio: 2 / 3;
    border-radius: 14px;
    object-fit: cover;
}

.rank-row h3 {
    margin: 0 0 0.35rem;
    font-size: 1.1rem;
}

.rank-row p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.listing-head,
.search-panel,
.detail-hero,
.player-panel,
.detail-content,
.related-panel {
    margin-top: 2rem;
    padding: clamp(1.2rem, 3vw, 2rem);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.075);
    box-shadow: var(--shadow);
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(130px, 170px));
    gap: 0.8rem;
    margin: 1.2rem 0 1.6rem;
}

.filter-bar input,
.filter-bar select,
.search-box input {
    width: 100%;
    min-height: 46px;
    padding: 0 1rem;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    outline: 0;
    background: rgba(255, 255, 255, 0.1);
}

.filter-bar input::placeholder,
.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.52);
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
    gap: clamp(1.2rem, 4vw, 2.6rem);
    align-items: center;
}

.detail-poster {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
}

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

.detail-badge {
    top: 1rem;
    left: 1rem;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.breadcrumb a {
    color: #d8b4fe;
}

.detail-title {
    margin-top: 1rem;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin: 1rem 0;
    color: #f3e8ff;
}

.detail-meta span,
.detail-meta a {
    display: inline-flex;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
}

.detail-intro {
    max-width: 860px;
    font-size: 1.05rem;
}

.player-panel h2,
.detail-content h2,
.related-panel h2 {
    margin: 0 0 1rem;
    font-size: clamp(1.4rem, 3vw, 2rem);
}

.cinema-player {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
}

.cinema-player video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.28);
}

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.52) saturate(1.08);
}

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

.play-button {
    position: relative;
    z-index: 3;
    display: inline-grid;
    place-items: center;
    width: clamp(74px, 12vw, 104px);
    height: clamp(74px, 12vw, 104px);
    border-radius: 50%;
    color: #fff;
    font-size: 1.8rem;
    background: linear-gradient(135deg, var(--purple), var(--pink));
    box-shadow: 0 18px 44px rgba(236, 72, 153, 0.38);
    transition: 0.25s ease;
}

.play-button:hover {
    transform: scale(1.06);
}

.detail-content p {
    color: #e8ddff;
    font-size: 1.03rem;
    line-height: 1.9;
}

.search-box {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.search-results-note {
    margin: 1rem 0;
    color: var(--muted);
}

.site-footer {
    margin-top: 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.18);
}

.footer-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.7fr);
    gap: 2rem;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 2.5rem 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-content: start;
}

.footer-links a {
    padding: 0.45rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
}

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

    .top-search {
        margin-left: auto;
    }

    .menu-toggle {
        display: block;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .hero-track {
        min-height: 820px;
    }

    .hero-poster-wrap {
        min-height: 360px;
    }

    .hero-poster-card {
        min-height: 360px;
    }

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

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

@media (max-width: 820px) {
    .top-search {
        display: none;
    }

    .hero-track {
        min-height: 850px;
    }

    .hero-slide {
        padding: 1.4rem;
    }

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

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

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

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

    .filter-bar {
        grid-template-columns: 1fr;
    }

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

    .rank-row {
        grid-template-columns: 44px 70px minmax(0, 1fr);
    }

    .rank-row .primary-button {
        grid-column: 1 / -1;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 540px) {
    main,
    .nav-shell,
    .mobile-panel,
    .footer-inner {
        width: min(100% - 22px, 1280px);
    }

    .hero-track {
        min-height: 900px;
    }

    .category-grid,
    .movie-grid {
        grid-template-columns: 1fr;
    }

    .hero-controls {
        left: 1rem;
        right: auto;
    }

    .search-box {
        flex-direction: column;
    }
}
