:root {
    --stellar-dark: #0a0e27;
    --stellar-deep: #141b3d;
    --stellar-mid: #1e2847;
    --stellar-light: #2a3857;
    --stellar-glow: #4a90e2;
    --stellar-soft: rgba(74, 144, 226, 0.18);
    --text-main: #ffffff;
    --text-muted: #a7b0c5;
    --text-soft: #d1d5db;
    --line: rgba(255, 255, 255, 0.12);
    --card: rgba(20, 27, 61, 0.78);
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 18% 0%, rgba(74, 144, 226, 0.22), transparent 32rem),
        radial-gradient(circle at 90% 12%, rgba(143, 96, 255, 0.16), transparent 28rem),
        var(--stellar-dark);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    border-bottom: 1px solid var(--line);
    background: rgba(10, 14, 39, 0.88);
    backdrop-filter: blur(18px);
}

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

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.site-logo__mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--stellar-glow), #8b5cf6);
    box-shadow: 0 0 28px rgba(74, 144, 226, 0.42);
}

.site-logo__text {
    font-size: 20px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    border-radius: 999px;
    padding: 10px 16px;
    color: var(--text-soft);
    transition: 0.24s ease;
}

.nav-link:hover,
.nav-link.is-active {
    background: rgba(74, 144, 226, 0.16);
    color: #ffffff;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

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

.mobile-nav {
    display: none;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 10px;
    background: rgba(20, 27, 61, 0.96);
}

.mobile-nav.is-open {
    display: grid;
    gap: 6px;
}

.hero {
    position: relative;
    min-height: 760px;
    overflow: hidden;
    isolation: isolate;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.8s ease, transform 1.2s ease;
    background-size: cover;
    background-position: center;
}

hero-slide:first-child {
    opacity: 1;
}

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(10, 14, 39, 0.98), rgba(10, 14, 39, 0.72) 42%, rgba(10, 14, 39, 0.25)),
        linear-gradient(0deg, var(--stellar-dark) 0%, transparent 36%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.72fr);
    gap: 42px;
    align-items: end;
    width: min(1240px, calc(100% - 32px));
    min-height: 760px;
    margin: 0 auto;
    padding: 96px 0 72px;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(74, 144, 226, 0.36);
    border-radius: 999px;
    padding: 8px 13px;
    background: rgba(74, 144, 226, 0.12);
    color: #cfe5ff;
    font-weight: 700;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
    margin: 18px 0 18px;
    font-size: clamp(36px, 6vw, 78px);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.hero-desc,
.page-desc,
.detail-intro {
    color: var(--text-soft);
    font-size: 18px;
    line-height: 1.85;
}

.hero-meta,
.detail-meta,
.card-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.hero-meta span,
.detail-meta span,
.card-meta-line span,
.tag-chip {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 7px 12px;
    background: rgba(255, 255, 255, 0.07);
    color: #eef4ff;
}

.hero-actions,
.section-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 26px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 22px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-weight: 800;
    transition: 0.24s ease;
}

.btn-primary {
    border-color: rgba(74, 144, 226, 0.6);
    background: linear-gradient(135deg, var(--stellar-glow), #6d5dfc);
    box-shadow: 0 18px 48px rgba(74, 144, 226, 0.34);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.hero-panel {
    border: 1px solid var(--line);
    border-radius: 30px;
    padding: 22px;
    background: rgba(20, 27, 61, 0.74);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin-bottom: 18px;
}

.hero-search input,
.filter-field input,
.filter-field select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 0 14px;
    background: rgba(10, 14, 39, 0.74);
    color: #ffffff;
    outline: none;
}

.hero-search input:focus,
.filter-field input:focus,
.filter-field select:focus {
    border-color: rgba(74, 144, 226, 0.82);
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.13);
}

.hero-side-list {
    display: grid;
    gap: 12px;
}

.hero-mini {
    display: grid;
    grid-template-columns: 84px 1fr;
    gap: 14px;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.06);
    transition: 0.24s ease;
}

.hero-mini:hover {
    border-color: rgba(74, 144, 226, 0.45);
    transform: translateX(4px);
}

.hero-mini__poster {
    display: block;
    aspect-ratio: 16 / 10;
    border-radius: 14px;
    background-size: cover;
    background-position: center;
    background-color: var(--stellar-mid);
}

.hero-mini strong {
    display: block;
    margin-bottom: 6px;
}

.hero-mini span {
    display: block;
    color: var(--text-muted);
    font-size: 13px;
}

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

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

.hero-dot.is-active {
    width: 34px;
    background: var(--stellar-glow);
}

.section,
.page-hero,
.detail-layout,
.player-wrap {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.section {
    padding: 56px 0;
}

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

.section-title {
    margin: 0;
    font-size: clamp(26px, 4vw, 42px);
    letter-spacing: -0.02em;
}

.section-subtitle {
    margin: 10px 0 0;
    color: var(--text-muted);
    line-height: 1.75;
}

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

.movie-card {
    min-width: 0;
}

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

.movie-card__link {
    display: flex;
    height: 100%;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--card);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.18);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card__link:hover {
    transform: translateY(-6px);
    border-color: rgba(74, 144, 226, 0.52);
    box-shadow: 0 24px 66px rgba(0, 0, 0, 0.3), 0 0 24px rgba(74, 144, 226, 0.14);
}

.movie-card__poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    background-color: var(--stellar-mid);
    background-size: cover;
    background-position: center;
}

.movie-card__poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(10, 14, 39, 0.88), transparent 44%);
    opacity: 0.88;
}

.movie-card__play {
    position: absolute;
    z-index: 2;
    right: 12px;
    bottom: 12px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: rgba(74, 144, 226, 0.9);
    box-shadow: 0 0 20px rgba(74, 144, 226, 0.38);
}

.movie-card__rank {
    position: absolute;
    z-index: 2;
    left: 12px;
    top: 12px;
    min-width: 32px;
    height: 32px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.62);
    color: #ffffff;
    text-align: center;
    line-height: 32px;
    font-weight: 900;
}

.movie-card__body {
    display: grid;
    gap: 7px;
    padding: 14px;
}

.movie-card__title {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 17px;
}

.movie-card__meta,
.movie-card__genre,
.movie-card__desc,
.movie-card__tags {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.55;
}

.movie-card__desc {
    display: -webkit-box;
    min-height: 40px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: var(--text-soft);
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 188px;
    border: 1px solid var(--line);
    border-radius: 26px;
    padding: 24px;
    background:
        radial-gradient(circle at 90% 10%, rgba(74, 144, 226, 0.32), transparent 34%),
        linear-gradient(135deg, rgba(30, 40, 71, 0.96), rgba(20, 27, 61, 0.78));
    box-shadow: 0 18px 56px rgba(0, 0, 0, 0.22);
    transition: 0.24s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(74, 144, 226, 0.52);
}

.category-card strong {
    display: block;
    margin-bottom: 12px;
    font-size: 24px;
}

.category-card p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.7;
}

.rank-layout {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 22px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.06);
    transition: 0.22s ease;
}

.rank-item:hover {
    transform: translateX(5px);
    border-color: rgba(74, 144, 226, 0.5);
}

.rank-item span {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: rgba(74, 144, 226, 0.18);
    font-weight: 900;
}

.rank-item strong {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-item em {
    color: var(--text-muted);
    font-style: normal;
    white-space: nowrap;
}

.page-hero {
    padding: 78px 0 38px;
}

.page-hero__box {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 32px;
    padding: clamp(28px, 6vw, 58px);
    background:
        radial-gradient(circle at 88% 14%, rgba(74, 144, 226, 0.28), transparent 30%),
        linear-gradient(135deg, rgba(30, 40, 71, 0.9), rgba(10, 14, 39, 0.96));
    box-shadow: var(--shadow);
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1.3fr) repeat(3, minmax(150px, 0.6fr));
    gap: 12px;
    margin-bottom: 22px;
}

.filter-field {
    display: grid;
    gap: 8px;
    color: var(--text-muted);
    font-size: 13px;
}

.empty-state {
    display: none;
    border: 1px dashed rgba(255, 255, 255, 0.18);
    border-radius: 22px;
    padding: 28px;
    text-align: center;
    color: var(--text-muted);
}

.empty-state.is-visible {
    display: block;
}

.player-hero {
    padding: 38px 0 0;
}

.player-shell {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 32px;
    background: #000000;
    box-shadow: var(--shadow);
}

.video-box {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.video-box video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at center, rgba(74, 144, 226, 0.25), transparent 26%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.64), rgba(0, 0, 0, 0.28));
    cursor: pointer;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.play-button {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--stellar-glow), #8b5cf6);
    color: #ffffff;
    font-size: 30px;
    box-shadow: 0 0 42px rgba(74, 144, 226, 0.48);
    cursor: pointer;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 340px;
    gap: 28px;
    padding: 38px 0 68px;
}

.detail-main,
.detail-side,
.panel {
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 24px;
    background: rgba(20, 27, 61, 0.78);
    box-shadow: 0 18px 56px rgba(0, 0, 0, 0.18);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    color: var(--text-muted);
    font-size: 14px;
}

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

.detail-title h1 {
    font-size: clamp(30px, 5vw, 54px);
}

.detail-section {
    margin-top: 30px;
}

.detail-section h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

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

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.side-poster {
    display: block;
    aspect-ratio: 2 / 3;
    border-radius: 22px;
    background-size: cover;
    background-position: center;
    background-color: var(--stellar-mid);
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.28);
}

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

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(6, 8, 22, 0.72);
}

.footer-inner {
    display: grid;
    gap: 16px;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0;
    color: var(--text-muted);
}

.site-logo--footer {
    color: #ffffff;
}

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

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

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

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

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

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

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

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

    .hero-content {
        grid-template-columns: 1fr;
        padding: 72px 0 72px;
    }

    .hero-panel {
        order: 2;
    }

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

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

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

@media (max-width: 620px) {
    .header-inner {
        min-height: 64px;
    }

    .site-logo__text {
        font-size: 18px;
    }

    .hero h1,
    .page-hero h1 {
        font-size: 34px;
    }

    .hero-search,
    .filter-panel,
    .rank-item {
        grid-template-columns: 1fr;
    }

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

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

    .movie-card__body {
        padding: 12px;
    }

    .movie-card__desc,
    .movie-card__tags {
        display: none;
    }

    .detail-main,
    .detail-side,
    .panel {
        padding: 18px;
        border-radius: 22px;
    }
}
