:root {
    --bg-start: #3b0764;
    --bg-mid: #581c87;
    --bg-end: #4a044e;
    --text-main: #ffffff;
    --text-soft: rgba(255, 255, 255, 0.78);
    --text-muted: rgba(255, 255, 255, 0.58);
    --line: rgba(255, 255, 255, 0.14);
    --glass: rgba(255, 255, 255, 0.1);
    --glass-strong: rgba(255, 255, 255, 0.16);
    --purple: #9333ea;
    --purple-light: #d8b4fe;
    --pink: #d946ef;
    --shadow: 0 24px 70px rgba(26, 4, 44, 0.48);
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text-main);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at 18% 10%, rgba(217, 70, 239, 0.32), transparent 32rem),
        radial-gradient(circle at 86% 4%, rgba(147, 51, 234, 0.28), transparent 30rem),
        linear-gradient(135deg, var(--bg-start), var(--bg-mid) 48%, var(--bg-end));
    background-attachment: fixed;
}

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

img {
    max-width: 100%;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    min-height: 72px;
    padding: 0.85rem clamp(1rem, 4vw, 3rem);
    border-bottom: 1px solid var(--line);
    background: rgba(31, 6, 54, 0.76);
    backdrop-filter: blur(18px);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.18);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    flex: 0 0 auto;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, #9333ea, #d946ef);
    box-shadow: 0 14px 32px rgba(217, 70, 239, 0.32);
}

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

.brand-text small {
    margin-top: 0.2rem;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 500;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    width: 100%;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: 0.5rem;
}

.nav-links a,
.nav-links button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0.55rem 0.9rem;
    border: 1px solid transparent;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.82);
    background: transparent;
    font: inherit;
    transition: 0.25s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.12);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.55rem 0.9rem;
    font: inherit;
}

.global-search {
    position: relative;
    width: min(340px, 30vw);
    margin-left: auto;
}

.global-search input,
.local-search input,
.local-search select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: none;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1rem;
    font: inherit;
    transition: 0.25s ease;
}

.global-search input::placeholder,
.local-search input::placeholder {
    color: rgba(255, 255, 255, 0.48);
}

.global-search input:focus,
.local-search input:focus,
.local-search select:focus {
    border-color: rgba(216, 180, 254, 0.7);
    box-shadow: 0 0 0 4px rgba(147, 51, 234, 0.18);
}

.search-results {
    position: absolute;
    top: calc(100% + 0.7rem);
    right: 0;
    display: none;
    width: min(440px, 92vw);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 1.25rem;
    background: rgba(40, 10, 68, 0.96);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-results.is-open {
    display: block;
}

.search-results a,
.search-empty {
    display: block;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.search-results a:last-child {
    border-bottom: 0;
}

.search-results strong {
    display: block;
    font-size: 0.95rem;
}

.search-results span {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.page-main {
    width: min(1420px, calc(100% - 2rem));
    margin: 0 auto;
}

.hero {
    position: relative;
    min-height: clamp(620px, 86vh, 860px);
    margin: 1rem auto 3rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: clamp(1.5rem, 4vw, 3rem);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.58fr);
    align-items: end;
    gap: clamp(1.5rem, 5vw, 4rem);
    padding: clamp(1.25rem, 5vw, 5rem);
    background-image:
        linear-gradient(90deg, rgba(28, 5, 50, 0.96), rgba(45, 8, 74, 0.75) 42%, rgba(0, 0, 0, 0.2)),
        linear-gradient(0deg, rgba(28, 5, 50, 0.95), transparent 54%),
        var(--hero-image);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 0.9s ease;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    width: fit-content;
    margin-bottom: 1rem;
    border: 1px solid rgba(216, 180, 254, 0.32);
    border-radius: 999px;
    color: var(--purple-light);
    background: rgba(147, 51, 234, 0.2);
    padding: 0.42rem 0.78rem;
    font-size: 0.86rem;
}

.hero h1,
.hero h2 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(2.35rem, 7vw, 6rem);
    line-height: 0.98;
    letter-spacing: -0.07em;
}

.hero h1 span,
.hero h2 span {
    display: block;
    color: var(--purple-light);
}

.hero-desc {
    max-width: 720px;
    margin: 1.2rem 0 1.6rem;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(1rem, 1.8vw, 1.22rem);
    line-height: 1.85;
}

.hero-actions,
.card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    align-items: center;
}

.btn-primary,
.btn-ghost,
.btn-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary {
    color: #ffffff;
    background: linear-gradient(90deg, #9333ea, #d946ef);
    padding: 0.9rem 1.35rem;
    box-shadow: 0 18px 34px rgba(217, 70, 239, 0.28);
}

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

.btn-ghost {
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    padding: 0.86rem 1.25rem;
}

.btn-small {
    color: #ffffff;
    background: rgba(147, 51, 234, 0.78);
    padding: 0.52rem 0.82rem;
    font-size: 0.84rem;
}

.hero-panel {
    align-self: center;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 2rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(18px);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}

.hero-poster {
    overflow: hidden;
    border-radius: 1.4rem;
    background: rgba(255, 255, 255, 0.1);
    aspect-ratio: 2 / 3;
}

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

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin: 0 0 1rem;
}

.pill,
.tag {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.84);
    background: rgba(255, 255, 255, 0.11);
    padding: 0.35rem 0.62rem;
    font-size: 0.82rem;
}

.hero-controls {
    position: absolute;
    left: clamp(1.25rem, 5vw, 5rem);
    right: clamp(1.25rem, 5vw, 5rem);
    bottom: clamp(1rem, 3vw, 2rem);
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
}

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

.hero-dot {
    width: 2rem;
    height: 0.36rem;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
    cursor: pointer;
    transition: 0.25s ease;
}

.hero-dot.is-active {
    width: 3.4rem;
    background: #ffffff;
}

.hero-arrows {
    display: flex;
    gap: 0.7rem;
    pointer-events: auto;
}

.hero-arrow {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
    transition: 0.25s ease;
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, 0.22);
}

.section {
    margin: 3rem 0;
}

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

.section-title {
    margin: 0;
    font-size: clamp(1.55rem, 3vw, 2.3rem);
    letter-spacing: -0.04em;
}

.section-desc {
    margin: 0.35rem 0 0;
    color: var(--text-muted);
    line-height: 1.75;
}

.grid {
    display: grid;
    gap: 1rem;
}

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

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

.dusk-card,
.movie-card,
.category-card,
.rank-card,
.detail-panel,
.player-card {
    border: 1px solid var(--line);
    border-radius: 1.3rem;
    background: linear-gradient(135deg, rgba(112, 26, 117, 0.34), rgba(107, 33, 168, 0.28));
    backdrop-filter: blur(14px);
    box-shadow: 0 14px 46px rgba(0, 0, 0, 0.18);
}

.movie-card {
    overflow: hidden;
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(216, 180, 254, 0.42);
    box-shadow: 0 24px 70px rgba(217, 70, 239, 0.24);
}

.poster-link {
    display: block;
}

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

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

.poster img.is-missing {
    opacity: 0;
}

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

.poster-badge {
    position: absolute;
    left: 0.65rem;
    top: 0.65rem;
    z-index: 2;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(147, 51, 234, 0.86);
    padding: 0.28rem 0.56rem;
    font-size: 0.76rem;
    font-weight: 700;
}

.rating-badge {
    position: absolute;
    right: 0.65rem;
    bottom: 0.65rem;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.58);
    padding: 0.28rem 0.56rem;
    font-size: 0.78rem;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.movie-info {
    padding: 0.9rem;
}

.movie-title {
    display: -webkit-box;
    min-height: 2.7em;
    margin: 0;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 0.98rem;
    line-height: 1.35;
}

.movie-text {
    display: -webkit-box;
    min-height: 3.2em;
    margin: 0.55rem 0 0;
    overflow: hidden;
    color: var(--text-muted);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 0.84rem;
    line-height: 1.65;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.78rem;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.movie-meta span {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    padding: 0.25rem 0.48rem;
}

.category-card {
    position: relative;
    overflow: hidden;
    padding: 1.25rem;
    min-height: 220px;
    transition: 0.28s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(216, 180, 254, 0.42);
}

.category-card h3 {
    margin: 0;
    font-size: 1.2rem;
}

.category-card p {
    margin: 0.7rem 0 1rem;
    color: var(--text-soft);
    line-height: 1.75;
}

.category-samples {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.35rem;
    margin-top: 1rem;
}

.category-samples img {
    width: 100%;
    border-radius: 0.7rem;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.08);
}

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

.rank-card {
    display: grid;
    grid-template-columns: 52px 76px minmax(0, 1fr) auto;
    gap: 0.9rem;
    align-items: center;
    padding: 0.75rem;
}

.rank-number {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, #9333ea, #d946ef);
    font-weight: 900;
}

.rank-thumb {
    overflow: hidden;
    border-radius: 0.8rem;
    aspect-ratio: 2 / 3;
    background: rgba(255, 255, 255, 0.08);
}

.rank-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-card h3 {
    margin: 0 0 0.35rem;
    font-size: 1rem;
}

.rank-card p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.86rem;
}

.page-hero {
    padding: clamp(2rem, 6vw, 5rem) 0 1rem;
}

.page-hero h1 {
    max-width: 980px;
    margin: 0;
    font-size: clamp(2.2rem, 6vw, 4.8rem);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.page-hero p {
    max-width: 860px;
    margin: 1rem 0 0;
    color: var(--text-soft);
    font-size: 1.08rem;
    line-height: 1.8;
}

.local-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px 190px;
    gap: 0.8rem;
    margin: 1.2rem 0 1.4rem;
}

.local-search select {
    appearance: none;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.38fr) minmax(320px, 0.62fr);
    gap: 1.2rem;
    align-items: start;
    margin: 1.5rem 0 3rem;
}

.player-card {
    overflow: hidden;
}

.video-shell {
    position: relative;
    background: #05020a;
    aspect-ratio: 16 / 9;
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
    gap: 0.7rem;
    border: 0;
    color: #ffffff;
    background:
        linear-gradient(180deg, rgba(15, 2, 25, 0.15), rgba(15, 2, 25, 0.72)),
        rgba(0, 0, 0, 0.18);
    cursor: pointer;
}

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

.play-core {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: linear-gradient(135deg, #9333ea, #d946ef);
    box-shadow: 0 18px 48px rgba(217, 70, 239, 0.42);
    font-size: 2rem;
}

.play-overlay strong {
    display: block;
    font-size: 1.15rem;
}

.player-body,
.detail-panel {
    padding: clamp(1rem, 2.4vw, 1.6rem);
}

.detail-panel h1 {
    margin: 0 0 1rem;
    font-size: clamp(2rem, 4.6vw, 4rem);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.detail-panel h2 {
    margin: 1.5rem 0 0.75rem;
    font-size: 1.25rem;
}

.detail-panel p {
    color: var(--text-soft);
    line-height: 1.9;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 1.2rem 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.breadcrumb a:hover {
    color: #ffffff;
}

.detail-side {
    display: grid;
    gap: 1rem;
}

.detail-cover {
    overflow: hidden;
    border-radius: 1.3rem;
    background: rgba(255, 255, 255, 0.08);
    aspect-ratio: 2 / 3;
}

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

.meta-list {
    display: grid;
    gap: 0.65rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.meta-list li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 0.6rem;
    color: var(--text-soft);
}

.meta-list strong {
    color: #ffffff;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.site-footer {
    margin-top: 4rem;
    padding: 2rem clamp(1rem, 4vw, 3rem);
    border-top: 1px solid var(--line);
    color: var(--text-muted);
    background: rgba(20, 3, 34, 0.34);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: min(1420px, 100%);
    margin: 0 auto;
}

.hidden-card {
    display: none !important;
}

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

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

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

    .detail-side {
        grid-template-columns: 220px minmax(0, 1fr);
    }
}

@media (max-width: 920px) {
    .site-header {
        flex-wrap: wrap;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .site-nav {
        display: none;
        order: 3;
        flex-basis: 100%;
        flex-direction: column;
        align-items: stretch;
    }

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

    .nav-links {
        flex-wrap: wrap;
        margin-left: 0;
    }

    .global-search {
        width: 100%;
        margin-left: 0;
    }

    .hero {
        min-height: 760px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: end;
    }

    .hero-panel {
        display: none;
    }

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

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

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

@media (max-width: 640px) {
    .page-main {
        width: min(100% - 1rem, 1420px);
    }

    .brand-text small {
        display: none;
    }

    .hero {
        min-height: 690px;
        border-radius: 1.4rem;
    }

    .hero h1,
    .hero h2 {
        font-size: clamp(2.15rem, 14vw, 4rem);
    }

    .hero-controls {
        align-items: flex-end;
    }

    .hero-arrows {
        display: none;
    }

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

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

    .rank-card {
        grid-template-columns: 42px 58px minmax(0, 1fr);
    }

    .rank-card .btn-small {
        display: none;
    }

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

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}
