:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.86);
    --bg-card-strong: #111827;
    --text: #f8fafc;
    --muted: #cbd5e1;
    --muted-2: #94a3b8;
    --line: rgba(148, 163, 184, 0.18);
    --amber: #f59e0b;
    --amber-2: #d97706;
    --blue: #2563eb;
    --pink: #ec4899;
    --radius: 18px;
    --shadow: 0 22px 60px rgba(0, 0, 0, 0.36);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.26), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0b1c4d 42%, #020617 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

body.no-scroll {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(20px);
}

.header-inner {
    height: 72px;
    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,
.footer-brand span {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: #111827;
    border-radius: 50%;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.35);
}

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

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    color: var(--muted);
}

.nav-link {
    position: relative;
    font-weight: 600;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fbbf24;
}

.nav-link.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -10px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, #f59e0b, #f97316);
}

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

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 999px;
    background: var(--text);
}

.mobile-nav {
    display: none;
    padding: 8px 16px 18px;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.96);
}

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

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

.mobile-link:hover {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.08);
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    background-size: cover;
    background-position: center;
    transition: opacity 0.9s ease, visibility 0.9s ease, transform 5s ease;
    transform: scale(1.02);
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.72) 47%, rgba(15, 23, 42, 0.2) 100%),
        linear-gradient(0deg, #020617 0%, transparent 44%);
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: center;
    gap: 56px;
}

.hero-copy {
    max-width: 760px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    margin-bottom: 18px;
    color: #fbbf24;
    font-weight: 800;
    letter-spacing: 0.08em;
    border: 1px solid rgba(251, 191, 36, 0.28);
    border-radius: 999px;
    background: rgba(251, 191, 36, 0.08);
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(2.4rem, 6vw, 5.6rem);
    line-height: 1.05;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.hero-copy p,
.page-hero p,
.detail-copy p {
    max-width: 760px;
    margin: 0 0 24px;
    color: var(--muted);
    font-size: 1.08rem;
}

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

.hero-tags span,
.detail-tags a,
.tag-row span,
.meta-line span {
    color: #e2e8f0;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.7);
    border-radius: 999px;
}

.hero-tags span,
.detail-tags a {
    padding: 7px 12px;
}

.tag-row span,
.meta-line span {
    padding: 3px 8px;
    font-size: 0.78rem;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    box-shadow: 0 18px 40px rgba(245, 158, 11, 0.26);
}

.btn-ghost {
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(15, 23, 42, 0.54);
}

.hero-card {
    position: relative;
    border-radius: 26px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transform: rotate(2deg);
    transition: transform 0.25s ease;
}

.hero-card:hover {
    transform: rotate(0deg) scale(1.03);
}

.hero-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: linear-gradient(135deg, #0f172a, #1e293b);
}

.hero-card span,
.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    transform: translate(-50%, -50%);
    color: #111827;
    border-radius: 50%;
    background: rgba(251, 191, 36, 0.96);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35);
}

.hero-card span {
    width: 68px;
    height: 68px;
    font-size: 1.4rem;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 48px;
    height: 48px;
    transform: translateY(-50%);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    cursor: pointer;
    font-size: 2rem;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.72);
    transform: translateY(-50%) scale(1.05);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 11px;
    height: 11px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.34);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 34px;
    background: #fbbf24;
}

.search-entrance,
.section-block,
.page-main {
    position: relative;
    z-index: 2;
}

.search-entrance {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 440px);
    gap: 24px;
    align-items: center;
    margin-top: -46px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.82);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-entrance h2 {
    margin: 0 0 8px;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.search-entrance p {
    margin: 0;
    color: var(--muted-2);
}

.home-search {
    display: flex;
    gap: 10px;
}

.home-search input,
.filter-panel input,
.filter-panel select {
    min-height: 48px;
    width: 100%;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: none;
    background: rgba(2, 6, 23, 0.66);
}

.home-search input,
.filter-panel input {
    padding: 0 16px;
}

.filter-panel select {
    padding: 0 14px;
}

.home-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(251, 191, 36, 0.55);
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.08);
}

.home-search button {
    min-width: 98px;
    color: #111827;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    cursor: pointer;
    font-weight: 900;
}

.section-block {
    padding: 64px 0 0;
}

.section-title {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 26px;
}

.title-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: #fbbf24;
    border-radius: 12px;
    background: rgba(251, 191, 36, 0.08);
}

.section-title h2 {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.6rem);
    line-height: 1.15;
}

.section-title p {
    margin: 6px 0 0;
    color: var(--muted-2);
}

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

.category-chip,
.category-overview-card {
    border: 1px solid var(--line);
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.9));
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.category-chip {
    min-height: 150px;
    padding: 24px;
}

.category-chip:hover,
.category-overview-card:hover {
    transform: translateY(-5px);
    border-color: rgba(251, 191, 36, 0.38);
    background: linear-gradient(135deg, rgba(51, 65, 85, 0.94), rgba(15, 23, 42, 0.94));
}

.category-chip span,
.category-overview-card h2 {
    display: block;
    margin: 0 0 10px;
    color: var(--text);
    font-size: 1.2rem;
    font-weight: 900;
}

.category-chip small,
.category-overview-card p {
    color: var(--muted-2);
}

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--bg-card);
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.2);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(251, 191, 36, 0.42);
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.32);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    transition: transform 0.32s ease;
}

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

.poster-link::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), transparent 45%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.movie-card:hover .poster-link::after {
    opacity: 1;
}

.poster-play {
    z-index: 2;
    width: 44px;
    height: 44px;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.rank-badge {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 3;
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #111827;
    border-radius: 10px;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    font-weight: 950;
}

.movie-info {
    padding: 14px;
}

.meta-line {
    margin-bottom: 10px;
}

.movie-info h3 {
    margin: 0 0 8px;
    min-height: 2.8em;
    font-size: 1rem;
    line-height: 1.38;
    font-weight: 850;
}

.movie-info h3 a:hover {
    color: #fbbf24;
}

.movie-info p {
    margin: 0 0 12px;
    min-height: 3.2em;
    color: var(--muted-2);
    font-size: 0.9rem;
}

.tag-row {
    min-height: 28px;
}

.page-main {
    padding: 36px 0 76px;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 30px;
    background:
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.18), transparent 26rem),
        linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(2, 6, 23, 0.92));
    box-shadow: var(--shadow);
}

.page-hero {
    padding: clamp(32px, 6vw, 64px);
    margin-bottom: 30px;
}

.compact-hero h1,
.category-hero h1 {
    font-size: clamp(2.1rem, 5vw, 4.2rem);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 18px;
    color: var(--muted-2);
    font-size: 0.95rem;
}

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

.filter-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(140px, 190px));
    gap: 12px;
    margin: 26px 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
}

.empty-state {
    display: none;
    margin: 34px 0;
    padding: 28px;
    color: var(--muted);
    text-align: center;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.72);
}

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

.category-overview-card {
    padding: 22px;
}

.category-overview-card p {
    margin: 0 0 18px;
}

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

.mini-links a {
    color: var(--muted);
    font-size: 0.92rem;
}

.mini-links a:hover {
    color: #fbbf24;
}

.ranking-list-wrap {
    margin-top: 54px;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.7);
}

.ranking-list-wrap h2 {
    margin: 0 0 18px;
}

.ranking-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ranking-list li {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 8px 12px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.ranking-list li > span {
    grid-row: span 2;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #111827;
    border-radius: 10px;
    background: rgba(251, 191, 36, 0.92);
    font-weight: 900;
}

.ranking-list a {
    font-weight: 780;
}

.ranking-list a:hover {
    color: #fbbf24;
}

.ranking-list small {
    color: var(--muted-2);
}

.detail-main {
    max-width: 1180px;
}

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

.detail-poster {
    overflow: hidden;
    border-radius: 22px;
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.3);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: linear-gradient(135deg, #0f172a, #1e293b);
}

.detail-copy h1 {
    font-size: clamp(2rem, 5vw, 4rem);
}

.detail-tags {
    margin-top: 20px;
}

.detail-tags a:hover {
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.42);
}

.player-section {
    margin: 28px 0;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: #000;
    box-shadow: var(--shadow);
}

.movie-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.play-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: radial-gradient(circle, rgba(2, 6, 23, 0.06), rgba(2, 6, 23, 0.55));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    color: #111827;
    border-radius: 50%;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    box-shadow: 0 20px 50px rgba(245, 158, 11, 0.36);
    font-size: 2rem;
    transition: transform 0.2s ease;
}

.play-layer:hover .play-button {
    transform: scale(1.08);
}

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

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

.content-card h2 {
    margin: 0 0 14px;
    color: #fbbf24;
    font-size: 1.28rem;
}

.content-card p {
    margin: 0;
    color: var(--muted);
}

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

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) 1fr 1fr;
    gap: 34px;
    padding: 44px 0;
}

.footer-brand {
    margin-bottom: 14px;
    font-size: 1.25rem;
}

.footer-grid p,
.footer-grid a,
.footer-bottom {
    color: var(--muted-2);
}

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

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

.footer-grid a:hover {
    color: #fbbf24;
}

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

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

    .menu-toggle {
        display: block;
    }

    .hero-content,
    .search-entrance,
    .detail-hero,
    .detail-content-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-content {
        gap: 28px;
        padding-top: 40px;
    }

    .hero-card {
        width: 220px;
        justify-self: start;
    }

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

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

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

@media (max-width: 640px) {
    .container {
        width: min(100% - 24px, 1200px);
    }

    .header-inner {
        height: 64px;
    }

    .brand-text {
        font-size: 1.2rem;
    }

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

    .hero-slide {
        position: absolute;
    }

    .hero-content {
        min-height: 620px;
        padding: 34px 0 76px;
        align-content: center;
    }

    .hero-card {
        width: 160px;
    }

    .hero-arrow {
        display: none;
    }

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

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

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

    .movie-info {
        padding: 12px;
    }

    .movie-info p {
        display: none;
    }

    .detail-hero,
    .page-hero,
    .content-card,
    .ranking-list-wrap,
    .search-entrance {
        border-radius: 22px;
        padding: 20px;
    }

    .detail-poster {
        max-width: 210px;
    }

    .play-button {
        width: 68px;
        height: 68px;
    }
}
