:root {
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.76);
    --panel-soft: rgba(30, 41, 59, 0.46);
    --line: rgba(148, 163, 184, 0.16);
    --text: #e2e8f0;
    --muted: #94a3b8;
    --weak: #64748b;
    --cyan: #22d3ee;
    --blue: #60a5fa;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.12), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.94);
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    backdrop-filter: blur(14px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: min(1180px, calc(100% - 2rem));
    height: 4.25rem;
    margin: 0 auto;
}

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

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 0.8rem;
    color: #020617;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    font-weight: 800;
    box-shadow: 0 10px 30px rgba(34, 211, 238, 0.3);
}

.brand-text {
    font-size: 1.18rem;
    font-weight: 800;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link,
.nav-drop-panel a,
.mobile-links a {
    color: #cbd5e1;
    border-radius: 0.75rem;
    transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 0.62rem 0.85rem;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-links a:hover {
    color: var(--cyan);
    background: rgba(30, 41, 59, 0.72);
}

.nav-dropdown {
    position: relative;
}

.nav-drop-button {
    border: 0;
    background: transparent;
    cursor: pointer;
}

.nav-drop-panel {
    position: absolute;
    top: calc(100% + 0.6rem);
    right: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(8rem, 1fr));
    gap: 0.35rem;
    width: 20rem;
    padding: 0.75rem;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid var(--line);
    border-radius: 1rem;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(0.4rem);
    transition: all 0.24s ease;
}

.nav-dropdown:hover .nav-drop-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-drop-panel a {
    padding: 0.6rem 0.75rem;
}

.nav-drop-panel a:hover {
    color: var(--cyan);
    background: rgba(30, 41, 59, 0.7);
}

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

.header-search input,
.mobile-panel input,
.quick-search input,
.search-main-form input,
.filter-panel input {
    width: 100%;
    color: #e2e8f0;
    background: rgba(30, 41, 59, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 0.85rem;
    outline: none;
    transition: border 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
}

.header-search input {
    width: 15.5rem;
    padding: 0.65rem 0.85rem;
}

.header-search input:focus,
.mobile-panel input:focus,
.quick-search input:focus,
.search-main-form input:focus,
.filter-panel input:focus {
    border-color: rgba(34, 211, 238, 0.75);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.14);
    background: rgba(15, 23, 42, 0.9);
}

.header-search button,
.mobile-panel button,
.quick-search button,
.search-main-form button,
.primary-button {
    border: 0;
    border-radius: 0.85rem;
    color: #06111f;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 16px 34px rgba(34, 211, 238, 0.22);
    transition: transform 0.24s ease, filter 0.24s ease;
}

.header-search button,
.mobile-panel button,
.quick-search button,
.search-main-form button {
    padding: 0.65rem 0.9rem;
}

.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.82rem 1.25rem;
}

.header-search button:hover,
.mobile-panel button:hover,
.quick-search button:hover,
.search-main-form button:hover,
.primary-button:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.menu-toggle {
    display: none;
    width: 2.7rem;
    height: 2.7rem;
    border: 0;
    border-radius: 0.85rem;
    background: rgba(30, 41, 59, 0.78);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 1.25rem;
    height: 2px;
    margin: 0.28rem auto;
    background: #cbd5e1;
    border-radius: 999px;
}

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

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

.mobile-panel form {
    margin-bottom: 0.8rem;
}

.mobile-panel input,
.quick-search input,
.search-main-form input,
.filter-panel input {
    padding: 0.85rem 1rem;
}

.mobile-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.mobile-links a {
    padding: 0.75rem 0.85rem;
    background: rgba(30, 41, 59, 0.45);
}

.hero {
    position: relative;
    height: 70vh;
    min-height: 34rem;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.hero-bg,
.hero-bg img,
.hero-shade {
    position: absolute;
    inset: 0;
}

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

.hero-shade-bottom {
    background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.82) 40%, transparent 100%);
}

.hero-shade-side {
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.55) 42%, rgba(2, 6, 23, 0.2) 100%);
}

.hero-content {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    width: min(1180px, calc(100% - 2rem));
    height: 100%;
    margin: 0 auto;
    padding-bottom: 5rem;
}

.hero-kicker {
    color: var(--cyan);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 46rem;
    margin: 0.85rem 0 1rem;
    color: #ffffff;
    font-size: clamp(2.35rem, 6vw, 5rem);
    line-height: 1.03;
    letter-spacing: -0.04em;
}

.hero p {
    max-width: 45rem;
    margin: 0 0 1.25rem;
    color: #cbd5e1;
    font-size: 1.1rem;
    line-height: 1.8;
}

.hero-tags,
.tag-row,
.detail-tags,
.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.hero-tags span,
.tag-row span,
.detail-tags span,
.chip-row a {
    color: #67e8f9;
    background: rgba(34, 211, 238, 0.12);
    border: 1px solid rgba(34, 211, 238, 0.22);
    border-radius: 999px;
    padding: 0.32rem 0.7rem;
    font-size: 0.86rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem;
    margin-top: 1.4rem;
}

.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.78rem 1.1rem;
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 0.85rem;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.56);
    transition: background 0.24s ease, transform 0.24s ease, border 0.24s ease;
}

.ghost-button:hover {
    transform: translateY(-2px);
    border-color: rgba(34, 211, 238, 0.44);
    background: rgba(30, 41, 59, 0.8);
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 1.6rem;
    display: flex;
    gap: 0.55rem;
    transform: translateX(-50%);
}

.hero-dot {
    width: 2rem;
    height: 0.28rem;
    border: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.35);
    cursor: pointer;
}

.hero-dot.is-active {
    background: var(--cyan);
}

.page-wrap,
.quick-search {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
}

.page-top {
    padding-top: 3rem;
}

.home-sections {
    display: grid;
    gap: 4rem;
    padding: 4rem 0;
}

.block-panel {
    border: 1px solid var(--line);
    border-radius: 1.35rem;
    background: var(--panel-soft);
    box-shadow: var(--shadow);
}

.quick-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(17rem, 28rem);
    gap: 1rem;
    align-items: center;
    margin-top: -2.5rem;
    padding: 1.25rem;
    position: relative;
    z-index: 3;
}

.quick-search h2 {
    margin: 0 0 0.35rem;
    font-size: 1.45rem;
}

.quick-search p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.quick-search .chip-row {
    grid-column: 1 / -1;
}

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

.section-head h2,
.page-hero h1,
.detail-info h1,
.text-panel h2 {
    margin: 0;
    color: #ffffff;
}

.section-head h2 {
    font-size: clamp(1.55rem, 3vw, 2.25rem);
}

.section-link {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    color: var(--cyan);
    font-weight: 700;
}

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

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

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

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

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

.movie-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 1.1rem;
    background: rgba(15, 23, 42, 0.78);
    box-shadow: 0 14px 44px rgba(0, 0, 0, 0.22);
    transition: transform 0.26s ease, border 0.26s ease, box-shadow 0.26s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.32);
    box-shadow: 0 22px 58px rgba(0, 0, 0, 0.34);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #0f172a;
}

.movie-card-large .poster-wrap {
    aspect-ratio: 16 / 9;
}

.poster-wrap img,
.wide-cover img,
.ranking-cover img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.36s ease;
}

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

.play-dot {
    position: absolute;
    right: 0.7rem;
    bottom: 0.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 999px;
    color: #06111f;
    background: rgba(34, 211, 238, 0.92);
    box-shadow: 0 12px 28px rgba(34, 211, 238, 0.24);
}

.card-body,
.wide-content {
    padding: 0.95rem;
}

.card-meta {
    color: var(--weak);
    font-size: 0.78rem;
    line-height: 1.4;
}

.movie-card h3,
.ranking-card h2 {
    margin: 0.35rem 0;
    color: #ffffff;
    line-height: 1.3;
}

.movie-card h3 {
    font-size: 1rem;
}

.movie-card p,
.ranking-card p,
.page-hero p,
.text-panel p,
.detail-info p,
.site-footer p {
    color: var(--muted);
    line-height: 1.75;
}

.movie-card p {
    margin: 0.45rem 0 0;
    font-size: 0.9rem;
}

.movie-card-wide {
    display: grid;
    grid-template-columns: 9rem 1fr;
    align-items: stretch;
}

.wide-cover {
    display: block;
    min-height: 100%;
    background: #0f172a;
}

.compact-rank {
    display: grid;
    gap: 0.7rem;
}

.rank-row {
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.8rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 0.9rem;
    background: rgba(15, 23, 42, 0.62);
    transition: background 0.24s ease, transform 0.24s ease;
}

.rank-row:hover {
    transform: translateX(4px);
    background: rgba(30, 41, 59, 0.78);
}

.rank-row span,
.rank-number {
    color: var(--cyan);
    font-weight: 900;
}

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

.rank-row em {
    color: var(--weak);
    font-style: normal;
    font-size: 0.85rem;
}

.page-hero {
    padding: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 2rem;
    border: 1px solid var(--line);
    border-radius: 1.5rem;
    background:
        linear-gradient(135deg, rgba(34, 211, 238, 0.13), rgba(96, 165, 250, 0.04)),
        rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

.page-hero h1 {
    margin-top: 0.6rem;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.08;
}

.page-hero p {
    max-width: 48rem;
    margin: 1rem 0 0;
}

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

.category-card {
    min-height: 11rem;
    padding: 1.3rem;
    border: 1px solid var(--line);
    border-radius: 1.2rem;
    background:
        linear-gradient(135deg, rgba(34, 211, 238, 0.1), rgba(96, 165, 250, 0.04)),
        rgba(15, 23, 42, 0.74);
    transition: transform 0.24s ease, border 0.24s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 211, 238, 0.32);
}

.category-card span {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 800;
}

.category-card p {
    margin: 0.75rem 0 0;
    color: var(--muted);
    line-height: 1.75;
}

.filter-panel {
    margin-bottom: 1.4rem;
    padding: 1rem;
}

.category-grid {
    padding-bottom: 4rem;
}

.ranking-list {
    display: grid;
    gap: 1rem;
    padding-bottom: 4rem;
}

.ranking-card {
    display: grid;
    grid-template-columns: 3.2rem 7rem minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 1.2rem;
    background: rgba(15, 23, 42, 0.72);
}

.rank-number {
    font-size: 1.35rem;
    text-align: center;
}

.ranking-cover {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 0.85rem;
    background: #0f172a;
}

.ranking-card h2 {
    font-size: 1.25rem;
}

.ranking-card p {
    margin: 0.35rem 0 0.75rem;
}

.search-page {
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.search-main-form input {
    flex: 1;
}

.empty-state {
    grid-column: 1 / -1;
    padding: 5rem 1rem;
    color: var(--muted);
    text-align: center;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    margin-bottom: 1rem;
    color: var(--muted);
}

.breadcrumbs a {
    color: var(--cyan);
}

.detail-hero {
    display: grid;
    grid-template-columns: 16rem minmax(0, 1fr);
    gap: 1.5rem;
    align-items: end;
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    border: 1px solid var(--line);
    border-radius: 1.5rem;
    background:
        linear-gradient(135deg, rgba(34, 211, 238, 0.1), rgba(2, 6, 23, 0.2)),
        rgba(15, 23, 42, 0.74);
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: 1rem;
    background: #0f172a;
}

.detail-info h1 {
    margin: 0.7rem 0 0.9rem;
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1.05;
}

.detail-info p {
    max-width: 52rem;
    margin: 0 0 1.1rem;
    font-size: 1.05rem;
}

.player-panel {
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.video-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 1rem;
    background: #000000;
}

.video-shell video {
    width: 100%;
    height: 100%;
    background: #000000;
}

.play-mask {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    border: 0;
    color: #ffffff;
    background:
        radial-gradient(circle at center, rgba(34, 211, 238, 0.26), transparent 16rem),
        linear-gradient(180deg, rgba(2, 6, 23, 0.28), rgba(2, 6, 23, 0.78));
    cursor: pointer;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.play-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4.4rem;
    height: 4.4rem;
    border-radius: 999px;
    color: #06111f;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    font-size: 1.8rem;
    box-shadow: 0 22px 50px rgba(34, 211, 238, 0.28);
}

.detail-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem;
    margin-bottom: 3rem;
}

.text-panel {
    padding: 1.25rem;
}

.text-panel h2 {
    margin-bottom: 0.8rem;
    font-size: 1.35rem;
}

.text-panel p {
    margin: 0;
}

.related-section {
    padding-bottom: 4rem;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.8);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 3rem 0 2rem;
}

.footer-brand {
    margin-bottom: 0.8rem;
}

.site-footer h3 {
    margin: 0 0 0.8rem;
    color: #ffffff;
}

.site-footer a {
    display: block;
    margin: 0.45rem 0;
    color: var(--muted);
    transition: color 0.22s ease;
}

.site-footer a:hover {
    color: var(--cyan);
}

.footer-bottom {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 1rem 0 2rem;
    color: var(--weak);
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

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

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

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

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

    .menu-toggle {
        display: block;
    }

    .hero {
        height: 68vh;
        min-height: 32rem;
    }

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

    .large-grid,
    .wide-grid,
    .detail-content,
    .footer-grid,
    .category-overview {
        grid-template-columns: 1fr;
    }

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

    .detail-hero {
        grid-template-columns: 9rem minmax(0, 1fr);
        align-items: center;
    }

    .ranking-card {
        grid-template-columns: 2.5rem 5.6rem minmax(0, 1fr);
    }
}

@media (max-width: 620px) {
    .hero-content {
        padding-bottom: 4.4rem;
    }

    .hero p {
        font-size: 0.98rem;
    }

    .hero-actions {
        gap: 0.55rem;
    }

    .primary-button,
    .ghost-button {
        width: 100%;
    }

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

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

    .wide-cover {
        aspect-ratio: 16 / 9;
    }

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

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

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

    .ranking-card {
        grid-template-columns: 1fr;
    }

    .rank-number {
        text-align: left;
    }

    .ranking-cover {
        width: 9rem;
    }
}