:root {
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: rgba(15, 23, 42, 0.72);
    --panel-strong: #111827;
    --line: #1e293b;
    --muted: #94a3b8;
    --text: #f8fafc;
    --sub: #cbd5e1;
    --amber: #f59e0b;
    --amber-dark: #d97706;
    --amber-soft: rgba(245, 158, 11, 0.18);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
    --radius: 20px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(circle at 16% 8%, rgba(245, 158, 11, 0.16), transparent 34%),
        radial-gradient(circle at 82% 22%, rgba(59, 130, 246, 0.12), transparent 32%),
        linear-gradient(180deg, #020617 0%, #050816 46%, #020617 100%);
}

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

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

button,
input {
    font: inherit;
}

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

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

.nav-shell {
    width: min(1240px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--amber), #facc15);
    color: #111827;
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.3);
}

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

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-left: auto;
}

.nav-link {
    color: var(--sub);
    font-weight: 600;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--amber);
}

.nav-search {
    position: relative;
    width: 260px;
}

.nav-search input,
.mobile-search input,
.filter-bar input {
    width: 100%;
    border: 1px solid transparent;
    outline: 0;
    border-radius: 999px;
    background: #1e293b;
    color: var(--text);
    padding: 12px 48px 12px 18px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input:focus,
.mobile-search input:focus,
.filter-bar input:focus {
    border-color: var(--amber);
    box-shadow: 0 0 0 4px var(--amber-soft);
}

.nav-search button {
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    color: var(--amber);
    background: transparent;
    cursor: pointer;
}

.menu-button {
    display: none;
    margin-left: auto;
    border: 0;
    border-radius: 12px;
    background: #1e293b;
    color: var(--text);
    width: 42px;
    height: 42px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    padding: 16px;
}

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

.mobile-search {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.mobile-search button,
.filter-bar button {
    border: 0;
    border-radius: 999px;
    background: var(--amber);
    color: #111827;
    padding: 0 18px;
    font-weight: 700;
    cursor: pointer;
}

.mobile-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.mobile-link {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.78);
    color: var(--sub);
}

.hero {
    position: relative;
    min-height: 640px;
    height: 72vh;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

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

.hero-bg {
    position: absolute;
    inset: -18px;
    width: calc(100% + 36px);
    height: calc(100% + 36px);
    object-fit: cover;
    filter: blur(10px) brightness(0.38) saturate(1.2);
    transform: scale(1.06);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.72) 48%, rgba(2, 6, 23, 0.88)),
        linear-gradient(180deg, rgba(15, 23, 42, 0.42), rgba(2, 6, 23, 0.96));
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--amber);
    font-weight: 800;
    letter-spacing: 0.04em;
    margin-bottom: 16px;
}

.hero h1,
.hero h2,
.page-hero h1 {
    margin: 0;
    font-size: clamp(42px, 8vw, 78px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-line {
    max-width: 780px;
    margin: 22px 0 0;
    color: var(--sub);
    font-size: clamp(18px, 2.1vw, 25px);
    line-height: 1.6;
}

.hero-summary {
    max-width: 760px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.9;
    margin: 18px 0 0;
}

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

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

.primary-button {
    background: var(--amber);
    color: #111827;
    box-shadow: 0 14px 30px rgba(245, 158, 11, 0.28);
}

.primary-button:hover,
.mobile-search button:hover,
.filter-bar button:hover {
    background: #fbbf24;
    transform: translateY(-1px);
}

.ghost-button,
.section-more {
    border: 1px solid rgba(245, 158, 11, 0.32);
    color: var(--amber);
    background: rgba(15, 23, 42, 0.56);
}

.ghost-button:hover,
.section-more:hover {
    border-color: var(--amber);
    background: var(--amber-soft);
}

.hero-poster {
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: var(--shadow);
    aspect-ratio: 3 / 4;
    background: #111827;
    transform: rotate(2deg);
}

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

.hero-poster:hover img {
    transform: scale(1.06);
}

.hero-poster span {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.9);
    color: #111827;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 0 38px rgba(245, 158, 11, 0.45);
}

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

.hero-dot {
    width: 11px;
    height: 11px;
    border: 0;
    border-radius: 999px;
    background: rgba(203, 213, 225, 0.5);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

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

.section {
    padding: 74px 0;
}

.section:nth-of-type(even) {
    background: rgba(15, 23, 42, 0.34);
}

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

.section-head h2,
.footer-grid h2,
.text-block h2,
.side-box h2 {
    margin: 0;
    color: var(--text);
}

.section-head h2 {
    font-size: clamp(26px, 3vw, 38px);
    letter-spacing: -0.03em;
}

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

.category-tile,
.category-panel,
.side-box,
.text-block,
.player-card,
.filter-bar {
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.74);
    border-radius: var(--radius);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

.category-tile {
    padding: 22px;
    min-height: 160px;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.category-tile:hover,
.category-panel:hover {
    transform: translateY(-3px);
    border-color: rgba(245, 158, 11, 0.55);
    background: rgba(30, 41, 59, 0.76);
}

.category-tile strong,
.category-title {
    display: block;
    color: var(--text);
    font-size: 22px;
    font-weight: 900;
    margin-bottom: 10px;
}

.category-tile span,
.category-panel p {
    color: var(--muted);
    line-height: 1.75;
}

.feature-grid,
.movie-grid {
    display: grid;
    gap: 22px;
}

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

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

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

.feature-card,
.movie-card,
.list-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(30, 41, 59, 0.9);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.feature-card:hover,
.movie-card:hover,
.list-card:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 158, 11, 0.58);
    background: rgba(30, 41, 59, 0.86);
}

.feature-card {
    min-height: 360px;
}

.feature-card img {
    width: 100%;
    height: 100%;
    min-height: 360px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.card-glow,
.feature-body {
    position: absolute;
    inset: 0;
}

.card-glow {
    background: linear-gradient(180deg, transparent 15%, rgba(0, 0, 0, 0.78) 62%, rgba(0, 0, 0, 0.95));
}

.feature-body {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
}

.feature-body h3,
.movie-card h3,
.list-card h3 {
    margin: 0;
    color: var(--text);
    transition: color 0.2s ease;
}

.feature-card:hover h3,
.movie-card:hover h3,
.list-card:hover h3 {
    color: var(--amber);
}

.feature-body p,
.movie-card p,
.list-card p {
    color: var(--muted);
    line-height: 1.7;
}

.poster-wrap {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #0f172a;
}

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

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

.play-pill {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.92);
    color: #111827;
    font-weight: 900;
    font-size: 12px;
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--amber);
    color: #111827;
    box-shadow: 0 10px 28px rgba(245, 158, 11, 0.3);
}

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

.movie-card-body h3 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 50px;
    line-height: 1.45;
}

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

.compact-card .movie-card-body p {
    -webkit-line-clamp: 2;
    min-height: 48px;
}

.meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    color: #64748b;
    font-size: 13px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tag-row span,
.tag-cloud a {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    background: rgba(51, 65, 85, 0.85);
    color: var(--sub);
    padding: 0 10px;
    font-size: 12px;
}

.large-tags span {
    min-height: 34px;
    padding: 0 14px;
    font-size: 14px;
}

.list-card {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 18px;
    padding: 14px;
}

.list-card img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    border-radius: 14px;
}

.page-hero {
    position: relative;
    padding: 94px 0 74px;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(2, 6, 23, 1)),
        radial-gradient(circle at 15% 20%, rgba(245, 158, 11, 0.2), transparent 34%);
    border-bottom: 1px solid var(--line);
}

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

.compact-actions {
    margin-top: 24px;
}

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

.category-panel {
    padding: 26px;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.category-preview-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.category-preview-links a {
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.12);
    color: var(--amber);
    padding: 8px 12px;
    font-size: 13px;
}

.filter-bar {
    display: flex;
    gap: 12px;
    padding: 14px;
    margin-bottom: 26px;
}

.filter-bar input {
    border-radius: 16px;
    padding-right: 18px;
}

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

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tag-cloud a {
    min-height: 38px;
    padding: 0 16px;
    background: #1e293b;
    color: var(--sub);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.tag-cloud a:hover {
    background: var(--amber);
    color: #111827;
    transform: translateY(-2px);
}

.detail-page {
    padding: 36px 0 28px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 30px;
    align-items: start;
}

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

.breadcrumb a {
    color: var(--amber);
}

.player-card {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    padding: 0;
    overflow: hidden;
    background: #000;
    border-radius: 24px;
}

.movie-video {
    display: block;
    width: 100%;
    height: 100%;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    border: 0;
    margin: 0;
    padding: 0;
    cursor: pointer;
    background: #000;
    color: #111827;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.58);
}

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

.big-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.95);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    box-shadow: 0 0 44px rgba(245, 158, 11, 0.45);
}

.detail-header {
    padding: 28px 0 8px;
}

.detail-header h1 {
    margin: 0 0 16px;
    font-size: clamp(32px, 5vw, 54px);
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.detail-header p {
    margin: 0;
    color: var(--sub);
    font-size: 18px;
    line-height: 1.8;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.detail-meta span,
.detail-meta a {
    border-radius: 999px;
    padding: 8px 14px;
    background: #1e293b;
    color: var(--sub);
    font-size: 14px;
}

.detail-meta a {
    color: var(--amber);
    background: var(--amber-soft);
}

.text-block {
    padding: 24px;
    margin-top: 22px;
}

.text-block p {
    margin: 14px 0 0;
    color: var(--sub);
    line-height: 2;
    font-size: 16px;
}

.side-poster {
    overflow: hidden;
    border-radius: 24px;
    box-shadow: var(--shadow);
    background: #0f172a;
}

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

.side-box {
    padding: 22px;
    margin-top: 20px;
}

.side-box dl {
    margin: 18px 0 0;
    display: grid;
    gap: 14px;
}

.side-box dt {
    color: #64748b;
    font-size: 13px;
}

.side-box dd {
    margin: 4px 0 0;
    color: var(--sub);
    line-height: 1.7;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.9);
}

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

.footer-grid p {
    color: var(--muted);
    line-height: 1.8;
    margin: 18px 0 0;
}

.footer-links {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.footer-links a {
    color: var(--muted);
    transition: color 0.2s ease;
}

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

.footer-bottom {
    border-top: 1px solid var(--line);
    text-align: center;
    color: #64748b;
    padding: 20px;
}

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

    .menu-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 84px 0 92px;
    }

    .hero-poster {
        display: none;
    }

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

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

    .detail-side {
        display: grid;
        grid-template-columns: 240px 1fr;
        gap: 20px;
    }

    .side-box {
        margin-top: 0;
    }
}

@media (max-width: 760px) {
    .container,
    .nav-shell {
        width: min(100% - 22px, 1240px);
    }

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

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

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

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

    .hero-actions,
    .section-head,
    .filter-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .primary-button,
    .ghost-button,
    .section-more {
        width: 100%;
    }

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

    .feature-card,
    .feature-card img {
        min-height: 300px;
    }

    .list-card {
        grid-template-columns: 118px 1fr;
        gap: 12px;
    }

    .list-card img {
        height: 96px;
    }

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

    .movie-card-body p,
    .meta-row,
    .tag-row {
        display: none;
    }

    .movie-card-body h3 {
        min-height: auto;
        font-size: 15px;
    }

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

    .page-hero {
        padding: 64px 0 52px;
    }
}

@media (max-width: 480px) {
    .mobile-nav,
    .category-grid,
    .movie-grid,
    .catalog-grid,
    .feature-grid {
        grid-template-columns: 1fr;
    }

    .poster-wrap,
    .movie-card.compact-card .poster-wrap {
        aspect-ratio: 16 / 9;
    }

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

    .list-card img {
        height: 180px;
    }
}
