:root {
    --stellar-dark: #0a0e27;
    --stellar-deep: #141b3d;
    --stellar-mid: #1e2847;
    --stellar-light: #2a3857;
    --stellar-glow: #4a90e2;
    --text-main: #ffffff;
    --text-soft: #d7dce8;
    --text-muted: #9aa4ba;
    --glass: rgba(20, 27, 61, 0.72);
    --shadow-glow: 0 16px 48px rgba(74, 144, 226, 0.28);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--text-main);
    background: radial-gradient(circle at top left, rgba(74, 144, 226, 0.18), transparent 34rem), var(--stellar-dark);
    line-height: 1.6;
}

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;
    background: rgba(10, 14, 39, 0.95);
    border-bottom: 1px solid rgba(42, 56, 87, 0.55);
    backdrop-filter: blur(14px);
}

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

.brand,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, #4a90e2, #7ab8ff);
    box-shadow: 0 0 24px rgba(74, 144, 226, 0.58);
    font-size: 14px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-left: auto;
}

.nav-link {
    color: #cbd3e3;
    font-size: 15px;
    font-weight: 650;
    transition: color 0.25s ease, background 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #7ab8ff;
}

.header-search,
.mobile-search,
.big-search {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-search input,
.mobile-search input,
.big-search input,
.filter-panel input,
.filter-panel select {
    color: #fff;
    background: rgba(30, 40, 71, 0.92);
    border: 1px solid rgba(74, 144, 226, 0.24);
    border-radius: 12px;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.header-search input {
    width: 220px;
    padding: 10px 12px;
}

.header-search input:focus,
.mobile-search input:focus,
.big-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--stellar-glow);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.16);
}

.header-search button,
.mobile-search button,
.big-search button {
    border: 0;
    color: #fff;
    background: var(--stellar-glow);
    border-radius: 12px;
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 700;
}

.mobile-menu-button {
    display: none;
    margin-left: auto;
    color: #fff;
    background: rgba(30, 40, 71, 0.88);
    border: 1px solid rgba(42, 56, 87, 0.72);
    border-radius: 12px;
    padding: 8px 12px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

.mobile-panel.open {
    display: block;
}

.mobile-nav {
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
}

.mobile-nav .nav-link {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(30, 40, 71, 0.76);
}

.mobile-search input {
    flex: 1;
    padding: 10px 12px;
}

.hero-wrap {
    position: relative;
    height: min(720px, 74vh);
    min-height: 520px;
    overflow: hidden;
    background: #050816;
}

.hero-track,
.hero-slide,
.hero-bg,
.hero-gradient {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.85s ease;
}

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

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
}

.hero-gradient {
    background: linear-gradient(90deg, rgba(10, 14, 39, 0.96) 0%, rgba(10, 14, 39, 0.72) 42%, rgba(10, 14, 39, 0.18) 100%), linear-gradient(0deg, var(--stellar-dark) 0%, transparent 45%);
}

.hero-content {
    position: absolute;
    left: max(32px, calc((100vw - 1180px) / 2));
    bottom: 92px;
    width: min(680px, calc(100% - 64px));
    z-index: 2;
}

.hero-kicker,
.detail-meta,
.hero-tags,
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-kicker span,
.detail-meta span,
.hero-tags span,
.tag-cloud span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 12px;
    color: #fff;
    background: rgba(74, 144, 226, 0.24);
    border: 1px solid rgba(122, 184, 255, 0.25);
    font-size: 13px;
    font-weight: 700;
}

.hero-content h1,
.hero-content h2 {
    margin: 18px 0 16px;
    font-size: clamp(44px, 7vw, 78px);
    line-height: 0.98;
    letter-spacing: -0.05em;
    text-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.hero-content p {
    max-width: 620px;
    color: var(--text-soft);
    font-size: 18px;
    margin: 0 0 22px;
}

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

.primary-button,
.ghost-button,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 14px;
    padding: 0 22px;
    font-weight: 800;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-button {
    color: #fff;
    background: linear-gradient(135deg, #4a90e2, #71b7ff);
    box-shadow: var(--shadow-glow);
}

.primary-button.small {
    min-height: 40px;
    padding: 0 16px;
    font-size: 14px;
}

.primary-button.full {
    width: 100%;
    margin-top: 18px;
}

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

.primary-button:hover,
.ghost-button:hover,
.section-more:hover {
    transform: translateY(-2px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
    font-size: 38px;
    line-height: 1;
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dots button {
    width: 32px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
}

.hero-dots button.active {
    background: #fff;
}

.quick-search-band,
.content-section,
.page-shell,
.detail-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.quick-search-band {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 28px;
    align-items: center;
    margin-top: 42px;
    padding: 28px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(20, 27, 61, 0.92), rgba(30, 40, 71, 0.82));
    border: 1px solid rgba(74, 144, 226, 0.22);
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.22);
}

.quick-search-band h2 {
    margin: 0 0 8px;
    font-size: clamp(26px, 4vw, 40px);
}

.quick-search-band p {
    margin: 0;
    color: var(--text-muted);
}

.big-search input {
    flex: 1;
    min-width: 0;
    padding: 14px 16px;
}

.big-search button {
    padding: 14px 20px;
}

.content-section {
    padding: 64px 0 0;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: -0.03em;
}

.section-heading p {
    max-width: 760px;
    margin: 8px 0 0;
    color: var(--text-muted);
}

.section-more {
    min-height: 40px;
    color: #b7d8ff;
    background: rgba(74, 144, 226, 0.14);
    border: 1px solid rgba(74, 144, 226, 0.28);
    white-space: nowrap;
}

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

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 18px;
    background: var(--stellar-mid);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.2);
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.88));
}

.play-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(74, 144, 226, 0.92);
    border-radius: 999px;
    transform: translate(-50%, -50%) scale(0.84);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.poster-link:hover .play-badge {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.card-meta {
    position: absolute;
    top: 10px;
    z-index: 2;
    padding: 4px 8px;
    border-radius: 8px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    background: rgba(10, 14, 39, 0.72);
    backdrop-filter: blur(8px);
}

.top-left {
    left: 10px;
}

.top-right {
    right: 10px;
}

.card-copy {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 14px;
    z-index: 2;
}

.card-copy strong,
.card-copy em {
    display: block;
}

.card-copy strong {
    display: -webkit-box;
    margin-bottom: 4px;
    overflow: hidden;
    color: #fff;
    font-size: 16px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-copy em {
    overflow: hidden;
    color: #cbd3e3;
    font-style: normal;
    font-size: 13px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

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

.category-tile {
    position: relative;
    min-height: 180px;
    overflow: hidden;
    border-radius: 20px;
    background: var(--stellar-mid);
    border: 1px solid rgba(74, 144, 226, 0.2);
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.58;
    transition: transform 0.5s ease, opacity 0.3s ease;
}

.category-tile:hover img {
    transform: scale(1.08);
    opacity: 0.78;
}

.category-tile span {
    position: absolute;
    inset: auto 18px 18px 18px;
    z-index: 2;
}

.category-tile strong,
.category-tile em {
    display: block;
}

.category-tile strong {
    color: #fff;
    font-size: 20px;
}

.category-tile em {
    display: -webkit-box;
    overflow: hidden;
    color: #d7dce8;
    font-style: normal;
    font-size: 13px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.split-section {
    display: grid;
    grid-template-columns: 1fr 0.82fr;
    gap: 32px;
}

.ranking-list,
.compact-list,
.ranking-page-list {
    display: grid;
    gap: 14px;
}

.ranking-row,
.compact-card,
.ranking-page-row {
    display: grid;
    grid-template-columns: auto 78px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 16px;
    background: rgba(20, 27, 61, 0.74);
    border: 1px solid rgba(42, 56, 87, 0.55);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

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

.ranking-row:hover,
.compact-card:hover,
.ranking-page-row:hover {
    transform: translateY(-2px);
    border-color: rgba(74, 144, 226, 0.55);
}

.ranking-row img,
.compact-card img,
.ranking-page-row img {
    width: 78px;
    height: 96px;
    object-fit: cover;
    border-radius: 12px;
}

.compact-card img {
    width: 72px;
    height: 90px;
}

.rank-index {
    color: #7ab8ff;
    font-size: 18px;
    font-weight: 900;
}

.rank-index.large {
    font-size: 24px;
}

.ranking-copy strong,
.ranking-copy em,
.ranking-copy small,
.compact-card strong,
.compact-card em {
    display: block;
}

.ranking-copy strong,
.compact-card strong {
    color: #fff;
    font-weight: 800;
}

.ranking-copy em,
.compact-card em,
.ranking-copy small {
    color: var(--text-muted);
    font-style: normal;
}

.ranking-copy small {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.page-shell {
    padding-top: 44px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    padding: clamp(34px, 7vw, 72px);
    background: radial-gradient(circle at 84% 12%, rgba(74, 144, 226, 0.32), transparent 28rem), linear-gradient(135deg, rgba(20, 27, 61, 0.96), rgba(10, 14, 39, 0.92));
    border: 1px solid rgba(74, 144, 226, 0.22);
}

.page-hero h1 {
    max-width: 760px;
    margin: 8px 0 16px;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1;
    letter-spacing: -0.045em;
}

.page-hero p {
    max-width: 760px;
    color: var(--text-soft);
    margin: 0;
    font-size: 18px;
}

.eyebrow {
    color: #7ab8ff;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.filter-panel {
    margin-top: 28px;
    padding: 20px;
    border-radius: 20px;
    background: rgba(20, 27, 61, 0.86);
    border: 1px solid rgba(42, 56, 87, 0.7);
}

.filter-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr 0.8fr;
    gap: 14px;
}

.filter-grid label,
.filter-grid span {
    display: grid;
    gap: 8px;
}

.filter-grid span {
    color: #cbd3e3;
    font-size: 13px;
    font-weight: 800;
}

.filter-grid input,
.filter-grid select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
}

.empty-state {
    display: none;
    margin-top: 20px;
    padding: 26px;
    border-radius: 18px;
    color: var(--text-muted);
    text-align: center;
    background: rgba(20, 27, 61, 0.8);
    border: 1px solid rgba(42, 56, 87, 0.62);
}

.empty-state.show {
    display: block;
}

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

.category-panel {
    display: grid;
    gap: 20px;
    padding: 24px;
    border-radius: 24px;
    background: rgba(20, 27, 61, 0.82);
    border: 1px solid rgba(74, 144, 226, 0.2);
}

.category-panel h2 {
    margin: 0 0 8px;
    font-size: 28px;
}

.category-panel p {
    color: var(--text-muted);
    margin: 0 0 18px;
}

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

.detail-shell {
    padding-top: 32px;
}

.detail-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000;
    box-shadow: var(--shadow-glow);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    cursor: pointer;
    color: #fff;
    background: radial-gradient(circle, rgba(74, 144, 226, 0.2), rgba(0, 0, 0, 0.28));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay span {
    width: 86px;
    height: 86px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(74, 144, 226, 0.94);
    box-shadow: var(--shadow-glow);
    font-size: 34px;
}

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

.detail-card,
.side-card {
    margin-top: 22px;
    padding: 26px;
    border-radius: 24px;
    background: rgba(20, 27, 61, 0.84);
    border: 1px solid rgba(42, 56, 87, 0.72);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #9fb3d2;
    margin-bottom: 12px;
}

.breadcrumb a {
    color: #9bd0ff;
}

.detail-card h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.lead-text {
    color: #e1e7f4;
    font-size: 18px;
}

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

.detail-section h2,
.side-card h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.detail-section p {
    color: #d5ddeb;
    margin: 0;
    white-space: pre-line;
}

.tag-cloud {
    margin-top: 28px;
}

.poster-card img {
    width: 100%;
    border-radius: 18px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.side-card {
    position: sticky;
    top: 92px;
}

.related-section {
    padding-bottom: 72px;
}

.site-footer {
    margin-top: 72px;
    background: rgba(20, 27, 61, 0.88);
    border-top: 1px solid rgba(42, 56, 87, 0.72);
}

.footer-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 0.6fr 0.8fr;
    gap: 28px;
    padding: 40px 0;
}

.footer-shell p {
    color: var(--text-muted);
    max-width: 480px;
}

.footer-links {
    display: grid;
    gap: 10px;
    align-content: start;
}

.footer-links a {
    color: #cbd3e3;
}

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 16px 0 28px;
    color: #8490a8;
    font-size: 14px;
}

[data-filter-item].hidden {
    display: none;
}

@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-top,
    .split-section {
        grid-template-columns: 1fr;
    }

    .side-card {
        position: static;
    }
}

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

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

    .hero-wrap {
        height: 620px;
        min-height: 620px;
    }

    .hero-content {
        left: 24px;
        bottom: 72px;
        width: calc(100% - 48px);
    }

    .hero-content h1,
    .hero-content h2 {
        font-size: clamp(38px, 12vw, 62px);
    }

    .hero-arrow {
        display: none;
    }

    .quick-search-band,
    .filter-grid,
    .footer-shell {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 620px) {
    .nav-shell,
    .mobile-panel,
    .quick-search-band,
    .content-section,
    .page-shell,
    .detail-shell,
    .footer-shell,
    .footer-bottom {
        width: min(100% - 22px, 1180px);
    }

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

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

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

    .big-search {
        display: grid;
    }

    .ranking-page-row {
        grid-template-columns: auto 68px 1fr;
        gap: 10px;
    }

    .ranking-page-row img,
    .ranking-row img {
        width: 68px;
        height: 86px;
    }

    .detail-card,
    .side-card {
        padding: 18px;
    }
}
