:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: #111827;
    --panel-strong: #172033;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --dim: #94a3b8;
    --brand: #38bdf8;
    --brand-deep: #0284c7;
    --pink: #f472b6;
    --amber: #f59e0b;
    --radius: 18px;
    --shadow: 0 24px 60px rgba(2, 6, 23, 0.45);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.16), transparent 34rem),
        radial-gradient(circle at top right, rgba(244, 114, 182, 0.12), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
    color: var(--text);
    min-height: 100vh;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.86);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 40px rgba(2, 6, 23, 0.28);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand), var(--pink));
    color: #fff;
    box-shadow: 0 10px 24px rgba(56, 189, 248, 0.25);
}

.brand-name {
    font-size: 1.15rem;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
}

.nav-link {
    color: var(--muted);
    padding: 9px 12px;
    border-radius: 12px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
    font-weight: 650;
    font-size: 0.95rem;
}

.nav-link:hover,
.nav-link-active {
    color: #fff;
    background: rgba(56, 189, 248, 0.13);
    transform: translateY(-1px);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.7);
    cursor: pointer;
    padding: 10px;
}

.menu-button span {
    display: block;
    height: 2px;
    background: #fff;
    margin: 5px 0;
    border-radius: 99px;
}

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

.mobile-nav.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.hero {
    position: relative;
    min-height: 660px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.hero-track,
.hero-slide {
    min-height: 660px;
}

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

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

.hero-bg,
.detail-backdrop img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(12px) saturate(1.2);
    transform: scale(1.08);
    opacity: 0.42;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.76) 48%, rgba(2, 6, 23, 0.7)),
        radial-gradient(circle at 80% 34%, rgba(56, 189, 248, 0.2), transparent 26rem);
}

.hero-content {
    position: relative;
    width: min(1240px, calc(100% - 32px));
    min-height: 660px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 380px;
    align-items: center;
    gap: 56px;
    padding: 64px 0 84px;
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--brand);
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(2.4rem, 7vw, 5.4rem);
    line-height: 1.04;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.hero-desc {
    max-width: 720px;
    margin: 22px 0 0;
    color: var(--muted);
    font-size: clamp(1rem, 2vw, 1.22rem);
    line-height: 1.8;
}

.hero-meta,
.detail-meta,
.movie-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
    color: var(--dim);
}

.hero-meta span,
.detail-meta span,
.movie-meta span {
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.66);
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.86rem;
}

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

.primary-btn,
.ghost-btn,
.section-link,
.text-link,
.search-box button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    min-height: 46px;
    padding: 0 22px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-deep));
    box-shadow: 0 14px 30px rgba(56, 189, 248, 0.28);
}

.ghost-btn,
.section-link,
.text-link {
    min-height: 44px;
    padding: 0 18px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--line);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-link:hover,
.text-link:hover,
.search-box button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 38px rgba(2, 6, 23, 0.28);
}

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

.hero-tags span,
.tag-row span {
    color: #bae6fd;
    background: rgba(14, 165, 233, 0.12);
    border: 1px solid rgba(125, 211, 252, 0.22);
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.82rem;
}

.hero-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.16);
    transform: rotate(2deg);
}

.hero-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

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

.hero-dot.is-active {
    width: 36px;
    background: var(--brand);
}

.search-panel,
.content-section,
.overview-grid,
.rank-layout,
.detail-content,
.player-section {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.search-panel {
    margin-top: 34px;
    margin-bottom: 8px;
}

.search-inner {
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 22px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 18px 42px rgba(2, 6, 23, 0.18);
}

.search-inner label {
    display: block;
    color: var(--muted);
    font-weight: 800;
    margin-bottom: 12px;
}

.search-box {
    display: flex;
    gap: 12px;
}

.search-box input {
    flex: 1;
    min-width: 0;
    color: var(--text);
    background: rgba(2, 6, 23, 0.72);
    border: 1px solid var(--line);
    border-radius: 16px;
    outline: none;
    padding: 14px 16px;
}

.search-box input:focus {
    border-color: rgba(56, 189, 248, 0.66);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.1);
}

.search-box button {
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, #334155, #0f172a);
    padding: 0 18px;
    cursor: pointer;
}

.content-section {
    padding: 54px 0 12px;
}

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

.section-head h2,
.rank-aside h2,
.detail-article h2,
.detail-side h2,
.category-overview-card h2 {
    margin: 0 0 8px;
    font-size: clamp(1.55rem, 3vw, 2.15rem);
    font-weight: 950;
    letter-spacing: -0.03em;
}

.section-head p,
.page-hero p,
.category-overview-card p,
.footer-inner p {
    margin: 0;
    color: var(--dim);
    line-height: 1.7;
}

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid var(--line);
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.18);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(56, 189, 248, 0.38);
    box-shadow: 0 28px 60px rgba(2, 6, 23, 0.34);
}

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

.poster-link img,
.detail-poster img,
.category-tile img,
.hot-item img,
.video-frame video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.poster-link img,
.category-tile img,
.hot-item img {
    transition: transform 0.45s ease;
}

.movie-card:hover .poster-link img,
.category-tile:hover img,
.hot-item:hover img {
    transform: scale(1.08);
}

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

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    min-width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: linear-gradient(135deg, #f97316, #f43f5e);
    color: #fff;
    font-size: 0.9rem;
}

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

.movie-meta {
    margin-top: 0;
    gap: 6px;
}

.movie-meta span {
    font-size: 0.72rem;
    padding: 3px 7px;
}

.movie-card h3 {
    margin: 12px 0 8px;
    color: var(--text);
    font-size: 1rem;
    line-height: 1.35;
    font-weight: 900;
}

.movie-card p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    min-height: 4.4em;
    overflow: hidden;
    margin: 0;
    color: var(--dim);
    line-height: 1.48;
    font-size: 0.88rem;
}

.movie-card-compact p {
    -webkit-line-clamp: 2;
    min-height: 2.8em;
}

.tag-row {
    margin-top: 12px;
}

.tag-row span {
    font-size: 0.72rem;
    padding: 4px 8px;
}

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

.category-tile {
    position: relative;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid var(--line);
    padding: 18px;
    box-shadow: 0 20px 48px rgba(2, 6, 23, 0.22);
}

.category-tile img,
.category-shade {
    position: absolute;
    inset: 0;
}

.category-shade {
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.92));
}

.category-tile strong,
.category-tile em {
    position: relative;
    z-index: 1;
}

.category-tile strong {
    font-size: 1.2rem;
    font-weight: 950;
}

.category-tile em {
    color: var(--muted);
    font-style: normal;
    font-size: 0.88rem;
    line-height: 1.5;
    margin-top: 8px;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.page-hero {
    width: min(1240px, calc(100% - 32px));
    margin: 34px auto 0;
    border: 1px solid var(--line);
    border-radius: 30px;
    padding: clamp(34px, 7vw, 70px);
    background:
        radial-gradient(circle at 80% 20%, rgba(56, 189, 248, 0.18), transparent 26rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.76));
    box-shadow: var(--shadow);
}

.compact-hero h1 {
    font-size: clamp(2.2rem, 5vw, 4rem);
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 22px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
    padding: 18px;
}

.category-poster-stack {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    overflow: hidden;
    border-radius: 16px;
}

.category-poster-stack img {
    width: 100%;
    height: 142px;
    object-fit: cover;
}

.rank-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    padding: 42px 0;
}

.rank-aside {
    position: sticky;
    top: 92px;
    align-self: start;
    max-height: calc(100vh - 120px);
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 18px;
    background: rgba(15, 23, 42, 0.82);
}

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

.hot-item {
    display: grid;
    grid-template-columns: auto 52px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 8px;
    background: rgba(2, 6, 23, 0.42);
}

.hot-number {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: rgba(56, 189, 248, 0.16);
    color: var(--brand);
    font-weight: 900;
    font-size: 0.82rem;
}

.hot-item img {
    width: 52px;
    height: 72px;
    border-radius: 10px;
}

.hot-item strong,
.hot-item em {
    display: block;
}

.hot-item strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.92rem;
}

.hot-item em {
    color: var(--dim);
    font-size: 0.78rem;
    font-style: normal;
    margin-top: 4px;
}

.detail-hero {
    min-height: 560px;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
}

.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.78) 52%, rgba(2, 6, 23, 0.9));
}

.detail-wrap {
    position: relative;
    z-index: 1;
    width: min(1240px, calc(100% - 32px));
    min-height: 560px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 44px;
    align-items: center;
    padding: 46px 0;
}

.detail-poster {
    display: block;
    aspect-ratio: 2 / 3;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: var(--shadow);
}

.breadcrumb {
    display: flex;
    gap: 10px;
    color: var(--dim);
    margin-bottom: 16px;
}

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

.detail-line {
    max-width: 800px;
    color: var(--muted);
    line-height: 1.8;
    font-size: 1.1rem;
}

.detail-tags {
    margin-bottom: 26px;
}

.player-section {
    padding: 42px 0 0;
}

.video-frame {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.13);
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.video-frame video {
    display: block;
    background: #000;
}

.play-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 16px;
    color: #fff;
    border: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.74));
    cursor: pointer;
    z-index: 2;
}

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

.play-icon {
    width: 86px;
    height: 86px;
    display: block;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand), var(--pink));
    box-shadow: 0 20px 42px rgba(56, 189, 248, 0.34);
    position: relative;
}

.play-icon::after {
    content: "";
    position: absolute;
    left: 35px;
    top: 25px;
    border-left: 24px solid #fff;
    border-top: 17px solid transparent;
    border-bottom: 17px solid transparent;
}

.play-cover strong {
    font-size: clamp(1.1rem, 3vw, 2rem);
    text-shadow: 0 8px 18px rgba(0, 0, 0, 0.4);
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
    padding: 34px 0 0;
}

.detail-article,
.detail-side {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.78);
    padding: clamp(22px, 4vw, 34px);
}

.detail-article p {
    color: var(--muted);
    line-height: 2;
    font-size: 1.02rem;
}

.detail-side dl {
    display: grid;
    gap: 14px;
    margin: 0;
}

.detail-side dt {
    color: var(--dim);
    font-size: 0.86rem;
}

.detail-side dd {
    margin: -8px 0 0;
    color: var(--text);
    line-height: 1.65;
}

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

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

.footer-links {
    display: flex;
    gap: 16px;
    color: var(--muted);
}

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

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

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

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

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

    .rank-aside {
        position: relative;
        top: auto;
        max-height: none;
    }
}

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

    .menu-button {
        display: block;
    }

    .hero,
    .hero-track,
    .hero-slide {
        min-height: 720px;
    }

    .hero-content,
    .detail-wrap {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .hero-poster,
    .detail-poster {
        width: min(310px, 76vw);
        margin: 0 auto;
        transform: none;
    }

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

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

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

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

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

    .search-box {
        flex-direction: column;
    }

    .hero h1,
    .detail-info h1 {
        font-size: clamp(2.1rem, 13vw, 3.2rem);
    }

    .detail-hero,
    .detail-wrap {
        min-height: auto;
    }

    .detail-wrap {
        padding: 32px 0;
    }

    .mobile-nav.is-open {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 460px) {
    .movie-card-body {
        padding: 10px;
    }

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

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

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