:root {
    --bg: #0f172a;
    --bg-soft: #111827;
    --panel: rgba(30, 41, 59, 0.72);
    --panel-strong: rgba(15, 23, 42, 0.92);
    --line: rgba(148, 163, 184, 0.16);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --amber: #f59e0b;
    --orange: #f97316;
    --sky: #0ea5e9;
    --radius: 18px;
    --shadow: 0 20px 50px rgba(2, 6, 23, 0.36);
}

* {
    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;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(14, 165, 233, 0.18), transparent 28rem),
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.14), transparent 30rem),
        var(--bg);
    min-height: 100vh;
}

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;
    border-bottom: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(12px);
}

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

.nav-shell {
    display: flex;
    min-height: 72px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-mark {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 999px;
    color: white;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 0 26px rgba(245, 158, 11, 0.42);
}

.brand-text {
    font-size: 1.25rem;
    background: linear-gradient(135deg, #fcd34d, #fb923c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
}

.nav-link {
    padding: 10px 12px;
    border-radius: 999px;
    color: var(--muted-strong);
    font-size: 0.94rem;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: white;
    background: rgba(14, 165, 233, 0.16);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    cursor: pointer;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.72);
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: white;
}

.mobile-menu {
    display: none;
    width: min(1180px, 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-menu.is-open {
    display: grid;
    gap: 4px;
}

.mobile-link {
    padding: 11px 12px;
    border-radius: 12px;
    color: var(--muted-strong);
}

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

.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-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-slide::after {
    position: absolute;
    inset: 0;
    content: "";
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.68), rgba(15, 23, 42, 0.1)),
        linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.35) 48%, rgba(15, 23, 42, 0.12) 100%);
}

.hero-inner {
    position: relative;
    z-index: 2;
    display: flex;
    height: 100%;
    align-items: end;
    padding: 0 0 72px;
}

.hero-content {
    max-width: 720px;
}

.eyebrow,
.hero-meta,
.meta-line,
.row-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.eyebrow span,
.tag-pill,
.hero-meta span,
.meta-line span,
.row-meta span,
.quality-badge,
.poster-category {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    line-height: 1;
    white-space: nowrap;
}

.eyebrow span {
    padding: 8px 13px;
    color: white;
    background: rgba(14, 165, 233, 0.86);
    backdrop-filter: blur(8px);
}

.hero-score {
    color: #fcd34d;
    font-weight: 800;
}

.hero h1 {
    margin: 18px 0 16px;
    font-size: clamp(2.6rem, 6vw, 5.8rem);
    line-height: 0.96;
    letter-spacing: -0.05em;
    text-shadow: 0 8px 26px rgba(0, 0, 0, 0.42);
}

.hero p {
    max-width: 640px;
    margin: 0 0 28px;
    color: #e2e8f0;
    font-size: 1.1rem;
    line-height: 1.8;
}

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

.btn,
.text-link,
.hero-search button,
.play-button {
    display: inline-flex;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary,
.hero-search button,
.play-button {
    color: white;
    background: linear-gradient(135deg, var(--sky), #0284c7);
    box-shadow: 0 16px 34px rgba(14, 165, 233, 0.28);
}

.btn-primary:hover,
.hero-search button:hover,
.play-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 42px rgba(14, 165, 233, 0.38);
}

.btn-ghost {
    color: white;
    border: 1px solid rgba(226, 232, 240, 0.2);
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(8px);
}

.btn-ghost:hover {
    border-color: rgba(245, 158, 11, 0.55);
    color: #fcd34d;
}

.btn {
    min-height: 46px;
    padding: 0 22px;
}

.hero-search {
    display: flex;
    width: min(480px, 100%);
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.18);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
}

.hero-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: white;
    background: transparent;
    padding: 0 18px;
}

.hero-search button {
    min-width: 96px;
    border-radius: 999px;
}

.hero-dots {
    position: absolute;
    right: clamp(18px, 4vw, 56px);
    bottom: 38px;
    z-index: 4;
    display: flex;
    gap: 10px;
}

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

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

.page-main {
    padding: 48px 0 72px;
}

.section {
    padding: 42px 0;
}

.section.alt {
    background: rgba(15, 23, 42, 0.34);
}

.section-heading,
.page-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.page-heading {
    align-items: start;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(14, 165, 233, 0.12), transparent 42%),
        rgba(30, 41, 59, 0.52);
    box-shadow: var(--shadow);
}

.section-heading h2,
.page-heading h1 {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.section-heading p,
.page-heading p {
    max-width: 720px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

.section-more,
.text-link {
    color: #38bdf8;
    font-weight: 800;
}

.section-more:hover,
.text-link:hover {
    color: #fcd34d;
}

.feature-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 20px;
}

.side-stack {
    display: grid;
    gap: 16px;
}

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

.movie-card,
.feature-card,
.movie-row,
.category-card,
.detail-panel,
.player-panel,
.filter-panel {
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.movie-card,
.feature-card,
.category-card {
    overflow: hidden;
    border-radius: var(--radius);
}

.card-hover {
    transition: transform 0.28s ease, border-color 0.28s ease, background 0.28s ease, box-shadow 0.28s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.42);
    background: rgba(30, 41, 59, 0.92);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.poster-wrap,
.feature-image,
.row-poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.86);
}

.poster-wrap {
    aspect-ratio: 3 / 4;
}

.feature-image {
    aspect-ratio: 16 / 9;
}

.row-poster {
    width: 150px;
    min-width: 150px;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
}

.poster-wrap img,
.feature-image img,
.row-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.movie-card:hover img,
.feature-card:hover img,
.movie-row:hover img,
.category-card:hover img {
    transform: scale(1.06);
}

.quality-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 8px;
    color: white;
    font-size: 0.75rem;
    font-weight: 900;
    background: rgba(0, 0, 0, 0.68);
    backdrop-filter: blur(8px);
}

.poster-category {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 7px 10px;
    color: white;
    font-size: 0.78rem;
    background: rgba(245, 158, 11, 0.92);
}

.movie-card-body,
.feature-body {
    padding: 16px;
}

.movie-card h3,
.feature-card h3,
.row-content h2,
.detail-panel h2,
.category-card h2 {
    margin: 0;
    color: white;
}

.movie-card h3,
.feature-card h3 {
    font-size: 1.02rem;
    line-height: 1.35;
}

.movie-card h3 a:hover,
.feature-card h3 a:hover,
.row-content h2 a:hover {
    color: #fcd34d;
}

.movie-card p,
.feature-card p,
.row-content p,
.detail-panel p,
.category-card p {
    color: var(--muted);
    line-height: 1.72;
}

.movie-card p {
    display: -webkit-box;
    min-height: 3.4em;
    overflow: hidden;
    margin: 10px 0 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.meta-line,
.row-meta {
    color: var(--muted);
    font-size: 0.84rem;
}

.meta-line span,
.row-meta span {
    padding: 5px 9px;
    background: rgba(15, 23, 42, 0.64);
}

.scroller {
    overflow-x: auto;
    padding: 2px 2px 14px;
    scrollbar-width: none;
}

.scroller::-webkit-scrollbar {
    display: none;
}

.scroller-track {
    display: flex;
    gap: 18px;
}

.scroller .movie-card {
    width: 220px;
    min-width: 220px;
}

.ranking-list {
    display: grid;
    gap: 16px;
}

.movie-row {
    position: relative;
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
}

.rank-badge {
    display: grid;
    min-width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 14px;
    color: white;
    font-size: 1.1rem;
    font-weight: 900;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    box-shadow: 0 16px 32px rgba(249, 115, 22, 0.2);
}

.row-content {
    min-width: 0;
    flex: 1;
}

.row-content h2 {
    margin-top: 7px;
    font-size: 1.1rem;
}

.row-content p {
    display: -webkit-box;
    overflow: hidden;
    margin: 7px 0 10px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag-pill {
    padding: 7px 10px;
    color: #e0f2fe;
    font-size: 0.8rem;
    background: rgba(14, 165, 233, 0.14);
    border: 1px solid rgba(14, 165, 233, 0.22);
}

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

.category-card {
    position: relative;
    min-height: 210px;
    padding: 22px;
    isolation: isolate;
}

.category-card::before {
    position: absolute;
    inset: 0;
    z-index: -1;
    content: "";
    background:
        radial-gradient(circle at 20% 10%, rgba(14, 165, 233, 0.25), transparent 32%),
        radial-gradient(circle at 90% 20%, rgba(245, 158, 11, 0.18), transparent 30%);
}

.category-card h2 {
    font-size: 1.35rem;
}

.category-card p {
    margin: 12px 0 22px;
}

.category-meta {
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: 0.9rem;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 170px 170px;
    gap: 14px;
    margin: 28px 0;
    padding: 18px;
    border-radius: 22px;
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-weight: 700;
}

.filter-panel input,
.filter-panel select {
    min-height: 46px;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: none;
    color: var(--text);
    background: rgba(15, 23, 42, 0.8);
    padding: 0 14px;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(14, 165, 233, 0.72);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.empty-state {
    display: none;
    padding: 28px;
    border: 1px dashed rgba(148, 163, 184, 0.32);
    border-radius: 20px;
    color: var(--muted);
    text-align: center;
}

.empty-state.is-visible {
    display: block;
}

.is-hidden {
    display: none !important;
}

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

.breadcrumb a:hover {
    color: #fcd34d;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.74fr);
    gap: 24px;
    align-items: start;
}

.player-panel {
    overflow: hidden;
    border-radius: 26px;
}

.player-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.player-wrap video,
.player-poster-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.player-wrap video {
    z-index: 1;
    object-fit: cover;
}

.player-poster-layer {
    z-index: 2;
    display: grid;
    cursor: pointer;
    place-items: center;
    background: rgba(2, 6, 23, 0.26);
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.play-button {
    min-width: 132px;
    min-height: 52px;
    padding: 0 22px;
    font-size: 1rem;
}

.player-info,
.detail-panel {
    padding: 22px;
}

.player-info h1 {
    margin: 0 0 12px;
    font-size: clamp(1.9rem, 4vw, 3.5rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.player-info p {
    margin: 0;
    color: var(--muted-strong);
    line-height: 1.8;
}

.detail-panel {
    border-radius: 22px;
}

.detail-panel + .detail-panel {
    margin-top: 18px;
}

.detail-panel h2 {
    margin-bottom: 12px;
    font-size: 1.3rem;
}

.detail-panel p {
    margin: 0;
}

.detail-cover {
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.76);
}

.detail-cover img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.detail-facts {
    display: grid;
    gap: 10px;
    padding: 18px;
    color: var(--muted);
}

.detail-facts span {
    color: white;
    font-weight: 800;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    gap: 18px;
}

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

    .nav-toggle {
        display: block;
    }

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

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

@media (max-width: 700px) {
    .nav-shell,
    .footer-shell,
    .page-shell,
    .hero-inner {
        width: min(100% - 24px, 1180px);
    }

    .hero {
        height: auto;
        min-height: 620px;
    }

    .hero-inner {
        padding: 120px 0 78px;
    }

    .hero-actions {
        display: grid;
        width: 100%;
    }

    .hero-search {
        order: -1;
    }

    .hero-dots {
        left: 18px;
        right: auto;
        bottom: 24px;
    }

    .section-heading,
    .page-heading {
        display: grid;
    }

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

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

    .row-poster {
        width: 110px;
        min-width: 110px;
    }

    .movie-row {
        align-items: flex-start;
    }

    .rank-badge {
        position: absolute;
        top: 8px;
        left: 8px;
        z-index: 3;
        min-width: 34px;
        height: 34px;
        font-size: 0.9rem;
    }

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

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

.footer-shell {
    padding: 42px 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 24px;
}

.footer-brand {
    margin-bottom: 14px;
    color: white;
    font-size: 1.15rem;
}

.site-footer p,
.footer-bottom {
    color: var(--muted);
    line-height: 1.7;
}

.site-footer h2 {
    margin: 0 0 14px;
    font-size: 1rem;
    color: white;
}

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

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

.footer-links a:hover {
    color: #fcd34d;
}

.footer-bottom {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    text-align: center;
}

.no-scroll {
    overflow: hidden;
}

.mini-posters {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 18px;
}

.mini-posters img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 12px;
}
