* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: rgba(15, 23, 42, 0.96);
    --line: rgba(51, 65, 85, 0.72);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --cyan: #22d3ee;
    --blue: #3b82f6;
    --rose: #fb7185;
    --shadow: 0 22px 70px rgba(2, 6, 23, 0.52);
    --radius: 22px;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 42px rgba(2, 6, 23, 0.42);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #020617;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 0 30px rgba(34, 211, 238, 0.36);
    transform: translateZ(0);
    transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
    transform: rotate(10deg) scale(1.04);
}

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

.brand-text strong {
    font-size: 20px;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, var(--cyan), #60a5fa);
    -webkit-background-clip: text;
    color: transparent;
}

.brand-text small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link,
.mobile-nav-link {
    color: var(--soft);
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
    padding: 9px 15px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--cyan);
    background: rgba(34, 211, 238, 0.1);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.8);
}

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

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

.mobile-nav-link {
    padding: 12px 14px;
}

.main-wrap {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 96px 0 72px;
}

.hero {
    position: relative;
    min-height: 650px;
    display: grid;
    align-items: stretch;
    border: 1px solid rgba(34, 211, 238, 0.16);
    border-radius: 30px;
    overflow: hidden;
    background: rgba(2, 6, 23, 0.76);
    box-shadow: var(--shadow);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.74) 42%, rgba(2, 6, 23, 0.22) 100%);
    z-index: 2;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(300px, 0.76fr);
    gap: 26px;
    align-items: center;
    padding: 76px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.55s ease;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
    transform: scale(1.04);
}

.hero-content,
.hero-poster {
    position: relative;
    z-index: 3;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 7px 13px;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 999px;
    color: var(--cyan);
    background: rgba(34, 211, 238, 0.1);
    box-shadow: 0 0 28px rgba(34, 211, 238, 0.08);
}

.hero h1 {
    margin: 22px 0 18px;
    max-width: 760px;
    font-size: clamp(40px, 7vw, 78px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero p {
    max-width: 720px;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.78;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0;
}

.hero-tags span,
.tag-row span,
.detail-tags span,
.filter-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border: 1px solid rgba(51, 65, 85, 0.8);
    border-radius: 999px;
    color: var(--soft);
    background: rgba(15, 23, 42, 0.7);
    font-size: 12px;
}

.hero-actions,
.section-actions,
.form-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid rgba(34, 211, 238, 0.24);
    border-radius: 999px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.72);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    background: rgba(30, 41, 59, 0.92);
}

.btn-primary {
    color: #020617;
    border-color: transparent;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 35px rgba(34, 211, 238, 0.24);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #67e8f9, #60a5fa);
}

.hero-poster {
    justify-self: end;
    width: min(360px, 100%);
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.75);
    box-shadow: 0 28px 80px rgba(2, 6, 23, 0.8);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.hero-control {
    position: absolute;
    z-index: 5;
    right: 34px;
    bottom: 32px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-arrow,
.hero-dot {
    border: 1px solid rgba(148, 163, 184, 0.32);
    color: var(--text);
    background: rgba(15, 23, 42, 0.68);
    backdrop-filter: blur(12px);
}

.hero-arrow {
    width: 42px;
    height: 42px;
    border-radius: 14px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 999px;
}

.hero-dot.active {
    width: 30px;
    border-color: transparent;
    background: var(--cyan);
}

.hero-search {
    position: absolute;
    left: 76px;
    bottom: 32px;
    z-index: 5;
    width: min(560px, calc(100% - 220px));
}

.search-box {
    display: flex;
    gap: 10px;
    padding: 8px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(18px);
}

.search-box input {
    width: 100%;
    min-height: 44px;
    border: 0;
    outline: 0;
    padding: 0 16px;
    color: var(--text);
    background: transparent;
}

.search-box button {
    border: 0;
}

.section {
    margin-top: 52px;
}

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

.section-kicker {
    color: var(--cyan);
    font-size: 14px;
}

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

.section-desc,
.page-desc {
    margin-top: 8px;
    color: var(--muted);
    line-height: 1.7;
}

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

.movie-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(51, 65, 85, 0.62);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.78), rgba(15, 23, 42, 0.9));
    box-shadow: 0 14px 36px rgba(2, 6, 23, 0.28);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.38);
    box-shadow: 0 24px 58px rgba(2, 6, 23, 0.46);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: rgba(2, 6, 23, 0.72);
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.32s ease;
}

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

.poster-shade {
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.92));
}

.poster-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #e0f2fe;
    background: rgba(2, 6, 23, 0.66);
    backdrop-filter: blur(12px);
    font-size: 12px;
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #020617;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.88);
    transition: opacity 0.24s ease, transform 0.24s ease;
}

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

.movie-card-body {
    padding: 15px;
}

.movie-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 12px;
}

.movie-card h3 {
    margin: 8px 0 7px;
    font-size: 18px;
    line-height: 1.32;
}

.movie-card h3 a:hover {
    color: var(--cyan);
}

.movie-card p {
    min-height: 44px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
}

.tag-row,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

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

.category-card,
.panel {
    border: 1px solid rgba(51, 65, 85, 0.7);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 16px 42px rgba(2, 6, 23, 0.3);
}

.category-card {
    padding: 22px;
    transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.category-card h3 {
    margin: 0 0 8px;
    font-size: 24px;
}

.category-card p {
    color: var(--muted);
    line-height: 1.7;
}

.category-count {
    display: inline-flex;
    margin-top: 18px;
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--cyan);
    background: rgba(34, 211, 238, 0.1);
}

.rank-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 20px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: auto 56px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid rgba(51, 65, 85, 0.58);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.74);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    border-color: rgba(34, 211, 238, 0.34);
}

.rank-number {
    width: 34px;
    color: var(--cyan);
    font-weight: 800;
    text-align: center;
}

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

.rank-info {
    min-width: 0;
}

.rank-info strong,
.rank-info small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-info small {
    margin-top: 4px;
    color: var(--muted);
}

.rank-item em {
    color: var(--rose);
    font-style: normal;
    font-weight: 700;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--muted);
}

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

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
    gap: 24px;
    align-items: start;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.22);
    border-radius: 28px;
    background: #000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    gap: 16px;
    border: 0;
    color: var(--text);
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.78));
    cursor: pointer;
}

.player-overlay[hidden] {
    display: none;
}

.play-button-large {
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #020617;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 0 60px rgba(34, 211, 238, 0.38);
    font-size: 34px;
}

.player-overlay strong {
    max-width: min(720px, 86%);
    font-size: clamp(24px, 4vw, 40px);
    text-align: center;
}

.detail-card {
    padding: 24px;
}

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

.detail-lead {
    color: #dbeafe;
    font-size: 17px;
    line-height: 1.8;
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 18px 0;
}

.detail-meta span {
    padding: 11px 12px;
    border-radius: 14px;
    color: var(--soft);
    background: rgba(2, 6, 23, 0.36);
}

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

.article-block {
    padding: 26px;
}

.article-block h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.article-block p {
    color: var(--soft);
    font-size: 16px;
    line-height: 1.95;
}

.article-block + .article-block {
    margin-top: 18px;
}

.side-panel {
    position: sticky;
    top: 92px;
    align-self: start;
    padding: 18px;
}

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

.filter-panel {
    padding: 18px;
    margin-bottom: 22px;
}

.filter-panel input,
.filter-panel select {
    min-height: 44px;
    border: 1px solid rgba(51, 65, 85, 0.8);
    border-radius: 14px;
    padding: 0 12px;
    color: var(--text);
    background: rgba(2, 6, 23, 0.52);
    outline: 0;
}

.filter-panel input {
    flex: 1 1 260px;
}

.result-count {
    color: var(--muted);
    margin-top: 12px;
}

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

.footer-grid {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 30px;
}

.footer-brand {
    margin-bottom: 10px;
    color: var(--cyan);
    font-size: 22px;
    font-weight: 800;
}

.site-footer p,
.site-footer a {
    color: var(--muted);
}

.site-footer h3 {
    margin: 0 0 12px;
}

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

.footer-links a {
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.76);
}

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

.footer-bottom {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    color: var(--muted);
    border-top: 1px solid rgba(51, 65, 85, 0.5);
}

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

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

    .hero-poster {
        display: none;
    }

    .hero-search {
        width: calc(100% - 152px);
    }

    .side-panel {
        position: static;
    }
}

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

    .mobile-menu-button {
        display: inline-grid;
        place-items: center;
    }

    .main-wrap {
        width: min(100% - 24px, 1240px);
        padding-top: 88px;
    }

    .hero {
        min-height: 660px;
        border-radius: 24px;
    }

    .hero-slide {
        padding: 32px 22px 120px;
    }

    .hero p {
        font-size: 15px;
    }

    .hero-search {
        left: 18px;
        bottom: 22px;
        width: calc(100% - 36px);
    }

    .hero-control {
        right: 18px;
        bottom: 86px;
    }

    .search-box {
        border-radius: 18px;
        flex-direction: column;
    }

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

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

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

@media (max-width: 520px) {
    .movie-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .movie-card-body {
        padding: 12px;
    }

    .movie-card p,
    .tag-row {
        display: none;
    }

    .movie-card h3 {
        font-size: 15px;
    }

    .rank-item {
        grid-template-columns: 44px minmax(0, 1fr) auto;
    }

    .rank-number {
        display: none;
    }
}
