:root {
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: #111c32;
    --line: #1e293b;
    --text: #ffffff;
    --muted: #94a3b8;
    --muted-2: #cbd5e1;
    --blue: #2563eb;
    --blue-2: #38bdf8;
    --cyan: #22d3ee;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 36rem), var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    min-height: 100vh;
}

body.nav-open {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(2, 6, 23, 0.9);
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.brand-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.35);
    font-size: 13px;
}

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

.desktop-nav a,
.mobile-panel a {
    color: var(--muted-2);
    transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-panel a:hover,
.mobile-panel a.active {
    color: var(--text);
}

.nav-search,
.mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select {
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.82);
    color: var(--text);
    border-radius: 12px;
    padding: 11px 14px;
    outline: none;
    min-width: 0;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input:focus,
.mobile-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: rgba(56, 189, 248, 0.75);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.16);
}

.nav-search button,
.mobile-search button,
.btn,
.filter-bar button {
    border: 0;
    border-radius: 12px;
    padding: 11px 16px;
    color: #fff;
    background: linear-gradient(135deg, var(--blue), #1d4ed8);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search button:hover,
.mobile-search button:hover,
.btn:hover,
.filter-bar button:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28);
}

.nav-toggle {
    display: none;
    margin-left: auto;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.8);
    color: #fff;
    cursor: pointer;
}

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

.mobile-panel nav {
    display: grid;
    gap: 12px;
    margin: 12px 0;
}

.hero {
    position: relative;
    height: 600px;
    min-height: 72vh;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.03);
    transition: transform 6s ease;
}

.hero-slide.active .hero-bg {
    transform: scale(1.08);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.72) 46%, rgba(2, 6, 23, 0.12) 100%), linear-gradient(0deg, var(--bg), transparent 35%);
}

.hero-inner {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.hero-copy {
    max-width: 680px;
    padding-top: 24px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.86);
    color: #fff;
    padding: 7px 13px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 16px 35px rgba(37, 99, 235, 0.25);
}

.hero h1,
.page-hero h1,
.detail-title h1 {
    margin: 20px 0 12px;
    font-size: clamp(38px, 7vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero-lead {
    color: var(--muted-2);
    font-size: clamp(18px, 2vw, 22px);
    margin: 0 0 10px;
}

.hero-summary {
    color: var(--muted);
    max-width: 620px;
    margin: 0 0 30px;
}

.hero-actions,
.section-actions,
.detail-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
}

.btn.secondary {
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.hero-dots {
    position: absolute;
    z-index: 3;
    left: calc((100% - min(1180px, calc(100% - 32px))) / 2);
    bottom: 54px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-dot {
    width: 18px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
    width: 42px;
    background: var(--blue);
}

.hero-arrow {
    position: absolute;
    z-index: 3;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 26px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.68);
}

.hero-arrow.prev {
    left: 24px;
}

.hero-arrow.next {
    right: 24px;
}

.main-shell,
.page-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.main-shell {
    padding: 56px 0 72px;
}

.page-shell {
    padding: 44px 0 72px;
}

.section {
    margin-top: 56px;
}

.section:first-child {
    margin-top: 0;
}

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

.section-kicker {
    color: var(--blue-2);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.section h2,
.page-hero h2,
.detail-section h2 {
    margin: 4px 0 0;
    font-size: clamp(26px, 4vw, 36px);
    line-height: 1.15;
}

.section p,
.page-hero p {
    color: var(--muted);
    margin: 8px 0 0;
}

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

.category-tile {
    min-height: 150px;
    border-radius: var(--radius);
    padding: 22px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(15, 23, 42, 0.9)), var(--panel);
    border: 1px solid rgba(148, 163, 184, 0.13);
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
}

.category-tile::after {
    content: "";
    position: absolute;
    right: -40px;
    top: -40px;
    width: 140px;
    height: 140px;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.14);
}

.category-tile strong {
    display: block;
    font-size: 22px;
    margin-bottom: 10px;
}

.category-tile span {
    position: relative;
    z-index: 1;
    color: var(--muted-2);
    font-size: 14px;
}

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

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

.poster-link {
    display: block;
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 16px;
    background: var(--panel);
    border: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.poster-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, filter 0.35s ease;
}

.poster-link:hover img {
    transform: scale(1.09);
    filter: brightness(0.76);
}

.poster-mask {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.68));
    transition: opacity 0.25s ease;
}

.poster-link:hover .poster-mask {
    opacity: 1;
}

.play-dot {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--blue);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.34);
}

.badge {
    position: absolute;
    top: 10px;
    z-index: 2;
    border-radius: 999px;
    padding: 4px 8px;
    background: rgba(37, 99, 235, 0.92);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    max-width: calc(100% - 20px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.badge-left {
    left: 10px;
}

.badge-right {
    right: 10px;
    background: rgba(2, 6, 23, 0.7);
}

.card-body {
    display: block;
    padding: 12px 2px 0;
}

.card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 46px;
    color: #fff;
    font-weight: 700;
    transition: color 0.2s ease;
}

.poster-link:hover .card-title {
    color: var(--blue-2);
}

.card-meta,
.card-desc {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.card-meta {
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-desc {
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.rank-link {
    display: grid;
    grid-template-columns: 48px 76px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.86);
    border: 1px solid rgba(148, 163, 184, 0.12);
    transition: transform 0.2s ease, border 0.2s ease, background 0.2s ease;
}

.rank-link:hover {
    transform: translateY(-2px);
    border-color: rgba(56, 189, 248, 0.32);
    background: rgba(17, 28, 50, 0.96);
}

.rank-number {
    color: var(--blue-2);
    font-size: 24px;
    font-weight: 900;
    text-align: center;
}

.rank-link img {
    width: 76px;
    height: 106px;
    object-fit: cover;
    border-radius: 12px;
}

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

.rank-copy strong {
    font-size: 18px;
}

.rank-copy em {
    color: var(--muted-2);
    font-style: normal;
    font-size: 13px;
    margin: 3px 0;
}

.rank-copy span {
    color: var(--muted);
    font-size: 13px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.page-hero {
    padding: 46px;
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.22), rgba(15, 23, 42, 0.92)), var(--panel);
    border: 1px solid rgba(148, 163, 184, 0.13);
    box-shadow: var(--shadow);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 22px;
}

.breadcrumb a:hover {
    color: var(--blue-2);
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(120px, 180px)) auto;
    gap: 12px;
    align-items: center;
    padding: 18px;
    margin: 28px 0;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.result-empty {
    display: none;
    padding: 34px;
    text-align: center;
    color: var(--muted);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.result-empty.visible {
    display: block;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 34px;
    align-items: end;
    margin-bottom: 34px;
}

.detail-title h1 {
    margin-top: 14px;
}

.detail-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--muted-2);
}

.detail-meta span {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.13);
}

.detail-cover img {
    width: 100%;
    border-radius: 24px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    box-shadow: var(--shadow);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.player-card {
    position: relative;
    border-radius: 26px;
    overflow: hidden;
    background: #000;
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: var(--shadow);
    margin-bottom: 34px;
}

.player-card video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    cursor: pointer;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.14), rgba(2, 6, 23, 0.62));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 3;
}

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

.player-button {
    width: 86px;
    height: 86px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.92);
    color: var(--blue);
    font-size: 34px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.46);
    transform: translateZ(0);
}

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

.detail-panel,
.side-panel {
    padding: 26px;
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.detail-panel p {
    color: var(--muted-2);
    margin: 12px 0 0;
}

.detail-section + .detail-section {
    margin-top: 28px;
    padding-top: 28px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.tag {
    display: inline-flex;
    border-radius: 999px;
    padding: 6px 10px;
    color: var(--muted-2);
    background: rgba(37, 99, 235, 0.16);
    border: 1px solid rgba(56, 189, 248, 0.14);
    font-size: 13px;
}

.side-panel h2 {
    margin: 0 0 16px;
    font-size: 22px;
}

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

.related-link {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 8px;
    border-radius: 14px;
    transition: background 0.2s ease;
}

.related-link:hover {
    background: rgba(148, 163, 184, 0.08);
}

.related-link img {
    width: 58px;
    height: 82px;
    border-radius: 10px;
    object-fit: cover;
}

.related-link strong,
.related-link span {
    display: block;
}

.related-link strong {
    line-height: 1.35;
}

.related-link span {
    color: var(--muted);
    font-size: 13px;
    margin-top: 3px;
}

.site-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(2, 6, 23, 0.96);
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0 30px;
    display: grid;
    grid-template-columns: 1.3fr 0.8fr 1.1fr;
    gap: 28px;
}

.site-footer p {
    color: var(--muted);
    margin: 14px 0 0;
}

.site-footer h2 {
    margin: 0 0 12px;
    font-size: 17px;
}

.footer-links {
    display: grid;
    gap: 8px;
}

.footer-links.two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.footer-links a {
    color: var(--muted);
}

.footer-links a:hover {
    color: var(--blue-2);
}

.copyright {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    color: var(--muted);
    border-top: 1px solid rgba(148, 163, 184, 0.08);
    font-size: 14px;
}

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

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

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

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

    .detail-cover {
        max-width: 320px;
    }
}

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

    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

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

    .hero {
        height: 560px;
        min-height: 68vh;
    }

    .hero-arrow {
        display: none;
    }

    .hero-dots {
        left: 16px;
        bottom: 24px;
    }

    .section-head {
        display: block;
    }

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

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

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

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

    .filter-bar input {
        grid-column: 1 / -1;
    }

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

@media (max-width: 560px) {
    .nav-shell {
        min-height: 64px;
    }

    .brand,
    .footer-brand {
        font-size: 18px;
    }

    .hero {
        height: 620px;
    }

    .hero-inner {
        align-items: end;
        padding-bottom: 84px;
    }

    .hero h1,
    .page-hero h1,
    .detail-title h1 {
        font-size: 36px;
    }

    .hero-actions,
    .detail-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .btn {
        text-align: center;
    }

    .main-shell,
    .page-shell,
    .nav-shell,
    .mobile-panel,
    .footer-grid,
    .copyright {
        width: min(100% - 24px, 1180px);
    }

    .page-hero {
        padding: 28px;
        border-radius: 22px;
    }

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

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

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

    .rank-link {
        grid-template-columns: 42px 62px minmax(0, 1fr);
        gap: 10px;
    }

    .rank-link img {
        width: 62px;
        height: 88px;
    }

    .detail-panel,
    .side-panel {
        padding: 20px;
    }

    .player-button {
        width: 70px;
        height: 70px;
        font-size: 28px;
    }
}
