:root {
    --bg: #0f172a;
    --bg-soft: #111827;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(30, 41, 59, 0.88);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --amber: #f59e0b;
    --orange: #f97316;
    --blue: #2563eb;
    --radius: 22px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.14), transparent 34rem),
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.14), transparent 30rem),
        var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(15, 23, 42, 0.9);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    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: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    color: white;
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.35);
}

.brand-text {
    font-size: 21px;
    background: linear-gradient(90deg, #fbbf24, #fb923c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    color: var(--muted-strong);
    font-size: 14px;
    white-space: nowrap;
}

.desktop-nav a,
.mobile-nav a,
.site-footer a {
    transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.site-footer a:hover {
    color: #fbbf24;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: white;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

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

.mobile-nav a {
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.72);
    color: var(--muted-strong);
}

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

.hero-stage,
.hero-slide,
.hero-image,
.hero-cover {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.65s ease;
}

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

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05);
    transform: scale(1.03);
}

.hero-cover {
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.97) 0%, rgba(15, 23, 42, 0.82) 42%, rgba(15, 23, 42, 0.24) 100%),
        linear-gradient(0deg, var(--bg) 0%, rgba(15, 23, 42, 0.1) 45%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 70vh;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 92px 0 80px;
}

.eyebrow {
    margin: 0 0 12px;
    color: #fbbf24;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(42px, 7vw, 86px);
    line-height: 0.96;
    letter-spacing: -0.06em;
}

.hero-summary {
    max-width: 680px;
    margin: 24px 0 0;
    color: var(--muted-strong);
    font-size: 18px;
}

.hero-meta,
.movie-meta,
.detail-meta {
    color: var(--muted);
}

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

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

.primary-button {
    background: linear-gradient(135deg, var(--amber), var(--orange));
    color: white;
    box-shadow: 0 16px 40px rgba(249, 115, 22, 0.28);
}

.ghost-button {
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.66);
    color: white;
}

.primary-button:hover,
.ghost-button:hover {
    transform: translateY(-2px);
}

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

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

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

.search-panel,
.section-block,
.page-hero,
.category-section,
.detail-text,
.player-section {
    width: min(1180px, calc(100% - 32px));
    margin: 34px auto;
}

.search-panel,
.page-hero,
.category-section,
.detail-text {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.search-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px;
}

.search-panel h2,
.section-head h2,
.category-section h2,
.detail-text h2,
.site-footer h2 {
    margin: 0;
}

.search-panel p,
.section-head p,
.category-section p,
.page-hero p,
.detail-text p,
.site-footer p {
    color: var(--muted-strong);
}

.search-controls {
    display: flex;
    gap: 12px;
    width: min(520px, 100%);
}

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

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

.section-head a {
    color: #fbbf24;
    font-weight: 800;
}

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

.category-tile {
    min-height: 230px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.72));
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover,
.movie-card:hover {
    transform: translateY(-4px);
    border-color: rgba(251, 191, 36, 0.56);
}

.category-covers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 14px;
}

.category-covers img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 12px;
    background: linear-gradient(135deg, #1e293b, #020617);
}

.category-tile strong {
    font-size: 18px;
}

.category-tile p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 14px;
}

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

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

.movie-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.64);
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.movie-card.is-hidden {
    display: none;
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #1e293b, #020617);
}

.poster-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.68), transparent 55%);
}

.play-chip,
.rank-badge {
    position: absolute;
    z-index: 3;
    border-radius: 999px;
    font-weight: 900;
}

.play-chip {
    right: 12px;
    bottom: 12px;
    padding: 7px 11px;
    background: rgba(245, 158, 11, 0.94);
    color: white;
    font-size: 12px;
}

.rank-badge {
    left: 12px;
    top: 12px;
    min-width: 32px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    background: rgba(15, 23, 42, 0.86);
    color: #fbbf24;
}

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

.movie-title {
    display: -webkit-box;
    min-height: 48px;
    overflow: hidden;
    font-size: 16px;
    font-weight: 850;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-title:hover {
    color: #fbbf24;
}

.movie-meta,
.movie-desc {
    margin: 8px 0 0;
    font-size: 13px;
}

.movie-desc {
    display: -webkit-box;
    min-height: 42px;
    overflow: hidden;
    color: var(--muted-strong);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.tag-row span {
    padding: 4px 8px;
    border: 1px solid rgba(251, 191, 36, 0.22);
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.08);
    color: #fde68a;
    font-size: 12px;
}

.two-column {
    display: grid;
    grid-template-columns: 0.88fr 1.12fr;
    gap: 28px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 44px 76px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.72);
}

.rank-item span {
    color: #fbbf24;
    font-weight: 900;
}

.rank-item img {
    width: 76px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 12px;
    background: linear-gradient(135deg, #1e293b, #020617);
}

.rank-item strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-item em {
    color: var(--muted);
    font-style: normal;
}

.page-main,
.detail-main {
    padding-bottom: 40px;
}

.page-hero {
    padding: 42px;
}

.slim-hero h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 62px);
    letter-spacing: -0.04em;
}

.category-section {
    padding: 24px;
}

.detail-hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: #020617;
}

.detail-bg,
.detail-mask {
    position: absolute;
    inset: 0;
}

.detail-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(3px) saturate(1.1);
    transform: scale(1.04);
    opacity: 0.42;
}

.detail-mask {
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.9)),
        linear-gradient(0deg, var(--bg), rgba(15, 23, 42, 0.18));
}

.detail-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 64px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 34px;
    color: var(--muted);
    font-size: 14px;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: 34px;
    align-items: end;
}

.detail-poster {
    border: 1px solid var(--line);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: linear-gradient(135deg, #1e293b, #020617);
}

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

.detail-info h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.detail-one-line {
    max-width: 780px;
    color: var(--muted-strong);
    font-size: 18px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.detail-meta span {
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.68);
}

.wide-tags {
    margin: 18px 0;
}

.player-section {
    margin-top: -66px;
    position: relative;
    z-index: 4;
}

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

.player-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    background: black;
}

.play-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.48), rgba(2, 6, 23, 0.12));
    color: white;
    cursor: pointer;
}

.play-layer span {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 24px 80px rgba(249, 115, 22, 0.34);
    font-size: 34px;
}

.play-layer.is-hidden {
    display: none;
}

.detail-text {
    padding: 30px;
}

.detail-text h2 {
    margin-top: 26px;
}

.detail-text h2:first-child {
    margin-top: 0;
}

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

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 38px 0;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 30px;
}

.site-footer a {
    display: block;
    margin-top: 8px;
    color: var(--muted-strong);
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    text-align: center;
}

@media (max-width: 1180px) {
    .desktop-nav {
        gap: 12px;
        font-size: 13px;
    }

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

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

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

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

    .nav-toggle {
        display: inline-grid;
        place-items: center;
    }

    .hero,
    .hero-content {
        min-height: 620px;
    }

    .search-panel,
    .section-head,
    .two-column,
    .detail-layout,
    .footer-grid {
        display: block;
    }

    .search-controls {
        margin-top: 16px;
        width: 100%;
    }

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

    .rank-list,
    .two-column > div + div {
        margin-top: 28px;
    }

    .detail-poster {
        width: min(260px, 80vw);
        margin-bottom: 24px;
    }

    .player-section {
        margin-top: -34px;
    }
}

@media (max-width: 560px) {
    .header-inner,
    .mobile-nav,
    .hero-content,
    .search-panel,
    .section-block,
    .page-hero,
    .category-section,
    .detail-content,
    .detail-text,
    .player-section,
    .footer-grid,
    .footer-bottom {
        width: min(100% - 22px, 1180px);
    }

    .brand-text {
        font-size: 18px;
    }

    .hero h1,
    .detail-info h1,
    .slim-hero h1 {
        letter-spacing: -0.03em;
    }

    .hero-summary,
    .detail-one-line {
        font-size: 16px;
    }

    .hero-actions,
    .page-actions,
    .search-controls {
        flex-direction: column;
    }

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

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

    .movie-card-compact .poster-link {
        min-height: 100%;
    }

    .rank-item {
        grid-template-columns: 36px 64px 1fr;
    }

    .rank-item em {
        display: none;
    }

    .page-hero,
    .category-section,
    .detail-text,
    .search-panel {
        padding: 20px;
    }
}
