:root {
    --bg: #070b16;
    --bg-soft: #0e1627;
    --panel: rgba(15, 23, 42, 0.84);
    --panel-solid: #111827;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --accent: #f59e0b;
    --accent-2: #fbbf24;
    --danger: #ef4444;
    --radius: 24px;
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 28rem),
        radial-gradient(circle at 86% 8%, rgba(59, 130, 246, 0.16), transparent 24rem),
        linear-gradient(180deg, #070b16 0%, #0b1020 52%, #070b16 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    min-height: 100vh;
}

body.menu-open {
    overflow: hidden;
}

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(7, 11, 22, 0.78);
    backdrop-filter: blur(18px);
}

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

.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 {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent), #ef4444);
    color: #111827;
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.28);
}

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

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.nav-link:hover,
.nav-link.active {
    color: var(--text);
    background: rgba(245, 158, 11, 0.12);
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.92);
    padding: 9px;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    border-radius: 99px;
    background: var(--text);
}

.hero {
    position: relative;
    overflow: hidden;
    padding: 34px 0 28px;
}

.hero::before {
    content: "";
    position: absolute;
    inset: -25% -12% auto -12%;
    height: 520px;
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.24), rgba(14, 165, 233, 0.14), transparent);
    filter: blur(28px);
    pointer-events: none;
}

.hero-frame {
    position: relative;
    min-height: 560px;
    border: 1px solid var(--line);
    border-radius: 34px;
    overflow: hidden;
    background: #0f172a;
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.72fr);
    gap: 30px;
    align-items: center;
    padding: 64px;
    opacity: 0;
    transform: scale(1.02);
    pointer-events: none;
    transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.04);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(7, 11, 22, 0.96) 0%, rgba(7, 11, 22, 0.72) 44%, rgba(7, 11, 22, 0.3) 100%),
        linear-gradient(180deg, rgba(7, 11, 22, 0.18), #070b16 100%);
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 28px;
    color: var(--accent-2);
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 0.85rem;
    font-weight: 800;
}

.hero h1 {
    font-size: clamp(2.35rem, 6vw, 5rem);
    line-height: 0.98;
    margin: 18px 0 16px;
    max-width: 820px;
    letter-spacing: -0.05em;
}

.hero-lead {
    max-width: 720px;
    color: var(--soft);
    font-size: clamp(1rem, 1.8vw, 1.22rem);
    line-height: 1.9;
    margin: 0 0 24px;
}

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

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

.btn:hover {
    transform: translateY(-2px);
    border-color: rgba(245, 158, 11, 0.38);
}

.btn-primary {
    color: #111827;
    font-weight: 900;
    border-color: transparent;
    background: linear-gradient(135deg, var(--accent-2), var(--accent));
    box-shadow: 0 16px 34px rgba(245, 158, 11, 0.22);
}

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

.hero-tags span,
.tag-row span,
.meta-pills span {
    color: #fde68a;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.18);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 0.78rem;
}

.hero-poster {
    justify-self: end;
    width: min(100%, 340px);
    transform: rotate(2deg);
}

.hero-poster img {
    aspect-ratio: 2 / 3;
    width: 100%;
    object-fit: cover;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 34px 80px rgba(0, 0, 0, 0.52);
}

.hero-controls {
    position: absolute;
    left: 64px;
    right: 64px;
    bottom: 28px;
    z-index: 3;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.hero-dots {
    display: flex;
    gap: 8px;
}

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

.hero-dot.is-active {
    background: var(--accent-2);
}

.hero-arrow {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: var(--text);
    background: rgba(15, 23, 42, 0.72);
    cursor: pointer;
}

.hero-search {
    margin-top: 22px;
    display: flex;
    max-width: 620px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px;
    background: rgba(15, 23, 42, 0.72);
}

.hero-search input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.hero-search input {
    padding: 0 14px;
}

.hero-search button {
    border: 0;
    white-space: nowrap;
}

.page-wrap {
    padding: 34px 0 58px;
}

.section {
    margin-top: 48px;
}

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

.section-head h2,
.page-title h1 {
    margin: 8px 0 0;
    font-size: clamp(1.8rem, 3vw, 2.65rem);
    letter-spacing: -0.03em;
}

.page-title p,
.section-head p {
    color: var(--muted);
    line-height: 1.8;
}

.section-more {
    color: #fde68a;
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 999px;
    padding: 9px 14px;
}

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

.movie-card,
.category-card,
.info-panel,
.detail-panel,
.related-panel,
.player-shell,
.filter-bar,
.rank-board,
.breadcrumb {
    border: 1px solid var(--line);
    background: var(--panel);
    backdrop-filter: blur(16px);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.2);
}

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.34);
    background: rgba(15, 23, 42, 0.95);
}

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

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

.movie-card:hover .poster-link img {
    transform: scale(1.05);
    filter: brightness(1.07);
}

.poster-shine {
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    background: linear-gradient(180deg, transparent, rgba(7, 11, 22, 0.88));
}

.poster-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #111827;
    background: linear-gradient(135deg, var(--accent-2), var(--accent));
    font-size: 0.75rem;
    font-weight: 900;
}

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

.card-meta,
.detail-meta {
    color: var(--accent-2);
    font-size: 0.82rem;
    font-weight: 800;
}

.movie-card h3 {
    margin: 7px 0 8px;
    font-size: 1.02rem;
    line-height: 1.35;
}

.movie-card p {
    color: var(--muted);
    line-height: 1.65;
    margin: 0 0 12px;
    font-size: 0.9rem;
}

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

.category-card {
    border-radius: 22px;
    padding: 20px;
    min-height: 170px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card::after {
    content: "";
    position: absolute;
    width: 120px;
    height: 120px;
    right: -34px;
    bottom: -42px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.11);
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 158, 11, 0.34);
}

.category-icon {
    font-size: 2rem;
}

.category-card h3 {
    margin: 12px 0 8px;
}

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

.two-column {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 22px;
    align-items: start;
}

.rank-board {
    border-radius: 24px;
    padding: 18px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: auto 54px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.035);
    transition: transform 0.2s ease, background 0.2s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    background: rgba(245, 158, 11, 0.09);
}

.rank-number {
    color: var(--accent-2);
    font-weight: 900;
}

.rank-item img {
    width: 54px;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
}

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

.rank-item em {
    color: var(--muted);
    font-style: normal;
    font-size: 0.82rem;
    margin-top: 4px;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 170px 150px;
    gap: 12px;
    align-items: center;
    border-radius: 22px;
    padding: 12px;
    margin: 24px 0;
}

.filter-bar input,
.filter-bar select {
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0 12px;
    background: rgba(7, 11, 22, 0.72);
}

.filter-status {
    color: var(--muted);
    margin: 0 0 16px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    border-radius: 18px;
    padding: 12px 16px;
    color: var(--muted);
    margin-bottom: 22px;
}

.breadcrumb a {
    color: #fde68a;
}

.detail-hero {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    margin-bottom: 28px;
}

.detail-cover {
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

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

.detail-panel {
    border-radius: 26px;
    padding: 26px;
}

.detail-panel h1 {
    margin: 10px 0 16px;
    font-size: clamp(2rem, 4vw, 3.45rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

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

.player-shell {
    border-radius: 28px;
    padding: 16px;
    margin-bottom: 28px;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #000;
    aspect-ratio: 16 / 9;
}

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

.play-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.18), rgba(7, 11, 22, 0.72));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #111827;
    background: linear-gradient(135deg, var(--accent-2), var(--accent));
    box-shadow: 0 18px 42px rgba(245, 158, 11, 0.34);
    font-size: 2rem;
    transform: translateZ(0);
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    align-items: start;
}

.info-panel,
.related-panel {
    border-radius: 24px;
    padding: 22px;
}

.info-panel h2,
.related-panel h2 {
    margin: 0 0 14px;
}

.info-panel p {
    color: var(--soft);
    line-height: 1.95;
}

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

.related-panel .rank-item {
    grid-template-columns: 58px minmax(0, 1fr);
}

.related-panel .rank-item img {
    width: 58px;
    height: 78px;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(7, 11, 22, 0.82);
    padding: 34px 0;
}

.footer-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
    gap: 28px;
    align-items: start;
}

.footer-inner p,
.copyright {
    color: var(--muted);
    line-height: 1.8;
}

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

.footer-links a {
    color: var(--soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 12px;
}

.copyright {
    width: min(1180px, calc(100% - 32px));
    margin: 22px auto 0;
    font-size: 0.9rem;
}

.empty-state {
    display: none;
    border: 1px dashed rgba(245, 158, 11, 0.35);
    border-radius: 22px;
    padding: 28px;
    color: var(--muted);
    text-align: center;
}

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

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

    .two-column,
    .content-grid {
        grid-template-columns: 1fr;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        padding: 44px;
    }

    .hero-poster {
        display: none;
    }
}

@media (max-width: 720px) {
    .header-inner,
    .footer-inner,
    .page-wrap {
        width: min(100% - 22px, 1180px);
    }

    .header-inner {
        height: 64px;
    }

    .nav-toggle {
        display: block;
    }

    .main-nav {
        position: fixed;
        top: 64px;
        left: 12px;
        right: 12px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 22px;
        background: rgba(7, 11, 22, 0.96);
        box-shadow: var(--shadow);
    }

    body.menu-open .main-nav {
        display: flex;
    }

    .nav-link {
        border-radius: 14px;
    }

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

    .hero-slide {
        padding: 28px 22px 84px;
    }

    .hero-controls {
        left: 22px;
        right: 22px;
        bottom: 20px;
    }

    .hero-search {
        border-radius: 20px;
        align-items: stretch;
        flex-direction: column;
        padding: 10px;
    }

    .hero-search input {
        min-height: 42px;
    }

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

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

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

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

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

    .detail-cover {
        width: min(260px, 70%);
    }

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

    .footer-links {
        justify-content: start;
    }
}

@media (max-width: 430px) {
    .movie-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }
}
