:root {
    color-scheme: dark;
    --bg: #030712;
    --bg-soft: #08111f;
    --panel: rgba(17, 24, 39, 0.72);
    --panel-solid: #111827;
    --line: rgba(148, 163, 184, 0.18);
    --text: #ffffff;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --blue: #2563eb;
    --blue-light: #60a5fa;
    --cyan: #22d3ee;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 20% 5%, rgba(37, 99, 235, 0.24), transparent 30%),
        radial-gradient(circle at 90% 0%, rgba(34, 211, 238, 0.16), transparent 28%),
        linear-gradient(180deg, #030712 0%, #111827 46%, #030712 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

img {
    display: block;
    width: 100%;
    height: auto;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

.site-header.is-scrolled,
.site-header.is-open {
    background: rgba(3, 7, 18, 0.88);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px);
}

.nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}

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

.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: white;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    border-radius: 14px;
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.35);
}

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

.brand-text strong {
    font-size: 21px;
    letter-spacing: 0.03em;
}

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

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

.nav-link {
    padding: 10px 15px;
    color: var(--soft);
    border-radius: 12px;
    transition: background 0.25s ease, color 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: white;
    background: rgba(37, 99, 235, 0.92);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 9px;
    border: 0;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.82);
}

.mobile-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: white;
    border-radius: 99px;
}

.mobile-nav {
    display: none;
    padding: 10px 16px 18px;
    background: rgba(3, 7, 18, 0.94);
    border-top: 1px solid var(--line);
}

.mobile-nav a {
    display: block;
    padding: 13px 12px;
    color: var(--soft);
    border-radius: 12px;
}

.mobile-nav a:hover {
    background: rgba(37, 99, 235, 0.82);
    color: white;
}

.hero {
    position: relative;
    min-height: 78vh;
    overflow: hidden;
    background: #030712;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.8s ease, transform 1.2s ease;
    pointer-events: none;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    min-height: 78vh;
    object-fit: cover;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(3, 7, 18, 0.92) 0%, rgba(3, 7, 18, 0.62) 45%, rgba(3, 7, 18, 0.14) 100%),
        linear-gradient(0deg, #030712 0%, rgba(3, 7, 18, 0.12) 48%, rgba(3, 7, 18, 0.48) 100%);
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 80px;
    transform: translateX(-50%);
    max-width: 1180px;
}

.eyebrow {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    padding: 8px 14px;
    color: white;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(34, 211, 238, 0.85));
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.hero h1 {
    max-width: 780px;
    margin: 22px 0 16px;
    font-size: clamp(42px, 8vw, 78px);
    line-height: 1;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 660px;
    margin: 0 0 22px;
    color: #dbeafe;
    font-size: clamp(17px, 2.2vw, 22px);
    line-height: 1.7;
}

.hero-tags,
.tag-row,
.detail-tag-row,
.detail-tags-main {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.tag-row span,
.detail-tag-row span,
.detail-tags-main span {
    display: inline-flex;
    padding: 6px 10px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(96, 165, 250, 0.28);
    border-radius: 999px;
    font-size: 12px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.primary-btn,
.ghost-btn,
.text-link,
.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 14px;
    font-weight: 700;
    transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.primary-btn {
    color: white;
    background: linear-gradient(135deg, var(--blue), #1d4ed8);
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.32);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-link:hover,
.text-link:hover {
    transform: translateY(-2px);
}

.ghost-btn {
    color: white;
    background: rgba(15, 23, 42, 0.62);
    border: 1px solid rgba(203, 213, 225, 0.24);
    backdrop-filter: blur(12px);
}

.full {
    width: 100%;
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    color: white;
    border: 0;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.68);
    backdrop-filter: blur(12px);
    font-size: 42px;
    line-height: 1;
}

.hero-control.prev {
    left: 28px;
}

.hero-control.next {
    right: 28px;
}

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

.hero-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
    width: 28px;
    background: white;
}

.quick-entry {
    margin-top: -38px;
    position: relative;
    z-index: 10;
}

.quick-grid {
    display: grid;
    grid-template-columns: minmax(260px, 380px) 1fr;
    gap: 18px;
    padding: 18px;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.quick-search,
.search-box,
.select-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quick-search span,
.search-box span,
.select-box span {
    color: var(--muted);
    font-size: 13px;
}

input,
select {
    width: 100%;
    min-height: 46px;
    color: white;
    background: rgba(3, 7, 18, 0.78);
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: none;
    padding: 0 14px;
}

input:focus,
select:focus {
    border-color: rgba(96, 165, 250, 0.8);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18);
}

.category-chips {
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    gap: 10px;
}

.category-chips a {
    padding: 10px 14px;
    color: #dbeafe;
    background: rgba(37, 99, 235, 0.14);
    border: 1px solid rgba(96, 165, 250, 0.25);
    border-radius: 999px;
}

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

.alt-section {
    background: rgba(15, 23, 42, 0.32);
    border-block: 1px solid rgba(148, 163, 184, 0.08);
}

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

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

.section-head p {
    max-width: 660px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.section-link,
.text-link {
    color: #bfdbfe;
    background: rgba(37, 99, 235, 0.14);
    border: 1px solid rgba(96, 165, 250, 0.24);
}

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

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

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

.movie-card:hover {
    transform: translateY(-7px);
    border-color: rgba(96, 165, 250, 0.48);
    box-shadow: 0 26px 62px rgba(0, 0, 0, 0.34);
}

.movie-card figure {
    position: relative;
    aspect-ratio: 16 / 10;
    margin: 0;
    overflow: hidden;
    background: #0f172a;
}

.movie-card figure::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(3, 7, 18, 0.74), transparent 62%);
    opacity: 0.8;
}

.movie-card img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.play-badge {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 2;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: white;
    background: rgba(37, 99, 235, 0.94);
    border-radius: 50%;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.32);
}

.card-body {
    padding: 17px;
}

.card-meta {
    display: flex;
    gap: 8px;
    color: var(--blue-light);
    font-size: 12px;
    margin-bottom: 8px;
}

.movie-card h3 {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 8px;
    overflow: hidden;
    color: white;
    font-size: 18px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-card p {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 14px;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-card-compact {
    display: grid;
    grid-template-columns: 128px 1fr;
}

.movie-card-compact figure {
    height: 100%;
    aspect-ratio: auto;
}

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

.movie-card-compact h3 {
    min-height: auto;
    font-size: 16px;
}

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

.category-panel,
.category-card {
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
}

.category-title,
.category-card h2 {
    display: inline-block;
    margin: 0 0 12px;
    font-size: 23px;
    font-weight: 800;
}

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

.mini-list {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.mini-list a {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--soft);
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    padding-bottom: 10px;
}

.mini-list span {
    color: var(--muted);
}

.page-main {
    padding-top: 76px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 82px 0 56px;
    background:
        radial-gradient(circle at 18% 20%, rgba(37, 99, 235, 0.34), transparent 28%),
        radial-gradient(circle at 78% 10%, rgba(34, 211, 238, 0.2), transparent 24%),
        linear-gradient(135deg, #030712, #111827);
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.page-hero h1 {
    margin: 18px 0 12px;
    font-size: clamp(38px, 6vw, 62px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.page-hero p {
    max-width: 760px;
    color: var(--soft);
    font-size: 18px;
    line-height: 1.8;
}

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

.crumbs a {
    color: #bfdbfe;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(180px, 260px);
    gap: 16px;
    margin-bottom: 24px;
    padding: 18px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--line);
    border-radius: 22px;
}

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

.category-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 22px;
    align-items: center;
}

.category-cover {
    overflow: hidden;
    border-radius: 18px;
}

.category-cover img {
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.rank-shell {
    max-width: 920px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 58px 90px 1fr 24px;
    align-items: center;
    gap: 16px;
    padding: 14px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--line);
    border-radius: 18px;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.rank-row:hover {
    transform: translateX(4px);
    border-color: rgba(96, 165, 250, 0.5);
}

.rank-num {
    color: var(--blue-light);
    font-size: 24px;
    font-weight: 900;
}

.rank-row img {
    aspect-ratio: 16 / 10;
    border-radius: 12px;
    object-fit: cover;
}

.rank-info {
    display: grid;
    gap: 5px;
}

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

.rank-info em {
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

.rank-arrow {
    color: var(--muted);
    font-size: 30px;
}

.detail-main {
    background:
        radial-gradient(circle at 18% 4%, rgba(37, 99, 235, 0.18), transparent 26%),
        linear-gradient(180deg, #030712 0%, #111827 46%, #030712 100%);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 30px;
    padding-top: 38px;
}

.detail-content,
.detail-side {
    min-width: 0;
}

.detail-crumbs {
    margin: 0 0 20px;
}

.player-box {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: black;
    border: 1px solid rgba(96, 165, 250, 0.24);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.main-player {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: black;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: white;
    background: linear-gradient(0deg, rgba(3, 7, 18, 0.76), rgba(3, 7, 18, 0.32));
    border: 0;
    text-align: center;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover span {
    display: grid;
    width: 74px;
    height: 74px;
    place-items: center;
    padding-left: 4px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    border-radius: 50%;
    box-shadow: 0 20px 42px rgba(37, 99, 235, 0.42);
    font-size: 32px;
}

.player-cover strong {
    max-width: 80%;
    font-size: 24px;
}

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

.detail-title-block {
    padding: 24px 0 12px;
}

.detail-title-block h1 {
    margin: 16px 0 12px;
    font-size: clamp(32px, 5vw, 50px);
    letter-spacing: -0.05em;
}

.detail-title-block p {
    color: #bfdbfe;
    font-size: 18px;
    line-height: 1.8;
}

.detail-section {
    margin-top: 24px;
    padding: 24px;
    background: rgba(15, 23, 42, 0.68);
    border: 1px solid var(--line);
    border-radius: 22px;
}

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

.detail-section p {
    color: var(--soft);
    line-height: 1.9;
}

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

.info-list div {
    padding: 14px;
    background: rgba(3, 7, 18, 0.55);
    border-radius: 14px;
}

.info-list dt {
    color: var(--muted);
    font-size: 12px;
}

.info-list dd {
    margin: 6px 0 0;
    color: white;
}

.poster-card {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 16px;
    padding: 16px;
    background: rgba(15, 23, 42, 0.74);
    border: 1px solid var(--line);
    border-radius: 24px;
}

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

.site-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(3, 7, 18, 0.88);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 34px;
    padding: 52px 0;
}

.footer-brand {
    margin-bottom: 16px;
}

.site-footer p {
    max-width: 420px;
    color: var(--muted);
    line-height: 1.8;
}

.site-footer h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

.site-footer ul {
    display: grid;
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
}

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

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

.footer-bottom {
    padding: 18px;
    color: var(--muted);
    text-align: center;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

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

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

    .mobile-toggle {
        display: block;
    }

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

    .hero-control {
        display: none;
    }

    .quick-grid,
    .filter-bar,
    .detail-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .detail-side {
        order: -1;
    }

    .poster-card {
        position: static;
        grid-template-columns: 160px 1fr;
        align-items: center;
    }
}

@media (max-width: 640px) {
    .shell {
        width: min(100% - 22px, 1180px);
    }

    .brand-text em {
        display: none;
    }

    .hero,
    .hero-slide img {
        min-height: 650px;
    }

    .hero-content {
        bottom: 74px;
    }

    .hero h1 {
        font-size: 40px;
    }

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

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

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

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

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

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

    .rank-row {
        grid-template-columns: 42px 72px 1fr;
    }

    .rank-arrow {
        display: none;
    }

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