:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: #111827;
    --panel-soft: #1e293b;
    --panel-line: #334155;
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --amber: #f59e0b;
    --amber-dark: #d97706;
    --red: #ef4444;
    --blue: #38bdf8;
    --green: #22c55e;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background: radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.12), transparent 26rem), var(--bg);
    color: var(--text);
    min-height: 100vh;
}

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

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

button,
input {
    font: inherit;
}

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

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

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

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.logo-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    box-shadow: 0 16px 40px rgba(245, 158, 11, 0.28);
}

.logo-text {
    font-size: 1.12rem;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    color: var(--muted-strong);
    font-size: 0.95rem;
}

.nav-link {
    position: relative;
    padding: 24px 0;
    transition: color 0.2s ease;
}

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

.nav-link.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 16px;
    height: 3px;
    border-radius: 999px;
    background: var(--amber);
}

.mobile-menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.75);
    color: var(--text);
    cursor: pointer;
}

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

.mobile-nav {
    display: none;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
}

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

.mobile-link {
    padding: 12px 14px;
    border: 1px solid rgba(51, 65, 85, 0.8);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.82);
    color: var(--muted-strong);
}

.hero {
    position: relative;
    height: min(72vh, 640px);
    min-height: 430px;
    overflow: hidden;
    background: #000;
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.66) 38%, rgba(2, 6, 23, 0.18)),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.64) 22%, transparent 58%);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    left: 50%;
    transform: translateX(-50%);
    padding-bottom: 74px;
}

.hero-copy {
    width: min(680px, 100%);
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--amber);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 4.6rem);
    line-height: 1.05;
    font-weight: 900;
    text-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}

.hero p,
.page-hero p,
.detail-one-line,
.home-intro p {
    margin: 18px 0 0;
    max-width: 780px;
    color: var(--muted-strong);
    font-size: 1.06rem;
    line-height: 1.85;
}

.hero-tags,
.tag-row,
.detail-meta,
.movie-meta,
.filter-buttons,
.hero-actions,
.intro-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

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

.hero-tags span,
.tag-row span,
.detail-meta span,
.movie-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(148, 163, 184, 0.14);
    color: var(--muted-strong);
    font-size: 0.82rem;
}

.hero-actions,
.intro-actions {
    margin-top: 26px;
}

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

.primary-button {
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, var(--amber));
    box-shadow: 0 14px 36px rgba(245, 158, 11, 0.24);
}

.ghost-button {
    color: var(--text);
    background: rgba(15, 23, 42, 0.55);
    border-color: rgba(148, 163, 184, 0.28);
}

.primary-button:hover,
.ghost-button:hover,
.category-tile:hover,
.movie-card:hover {
    transform: translateY(-4px);
}

.hero-control {
    position: absolute;
    top: 50%;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.62);
    color: var(--text);
    font-size: 2rem;
    line-height: 1;
    transform: translateY(-50%);
    cursor: pointer;
    transition: background 0.2s ease;
}

.hero-control:hover {
    background: rgba(245, 158, 11, 0.92);
}

.hero-control.prev {
    left: 18px;
}

.hero-control.next {
    right: 18px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 24px;
    display: flex;
    gap: 8px;
    transform: translateX(-50%);
}

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

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

.page-top {
    padding-top: 34px;
}

.home-intro {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    padding: 48px 0 14px;
}

.home-intro h2,
.section-heading h2,
.search-panel h2,
.story-card h2,
.footer-links h2,
.category-banner h2 {
    margin: 0;
    color: var(--text);
    font-size: clamp(1.45rem, 3vw, 2.25rem);
    line-height: 1.2;
}

.content-section {
    margin: 46px 0 64px;
}

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

.section-heading a {
    color: var(--amber);
    font-weight: 700;
}

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

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

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

.mini-grid {
    margin-top: 18px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
    border: 1px solid rgba(51, 65, 85, 0.85);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
    border-color: rgba(245, 158, 11, 0.58);
    box-shadow: var(--shadow);
}

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

.poster-wrap.wide {
    aspect-ratio: 16 / 9;
}

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

.movie-card:hover .poster-wrap img {
    transform: scale(1.08);
}

.year-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    color: #111827;
    background: var(--amber);
    font-weight: 900;
    font-size: 0.82rem;
}

.year-badge {
    right: 10px;
    top: 10px;
}

.rank-badge {
    left: 10px;
    top: 10px;
}

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

.movie-card h3 {
    margin: 0 0 8px;
    color: var(--text);
    font-size: 1rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;
}

.movie-card p {
    min-height: 42px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

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

.tag-row {
    gap: 7px;
}

.tag-row span {
    min-height: 24px;
    padding: 3px 8px;
    color: #fef3c7;
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.22);
}

.large-tags span {
    min-height: 32px;
    padding: 6px 12px;
}

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

.category-tile,
.category-banner,
.search-panel,
.story-card,
.page-hero,
.detail-hero,
.player-section {
    border: 1px solid rgba(51, 65, 85, 0.85);
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.92));
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.category-tile {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
    padding: 18px;
    border-radius: var(--radius);
    transition: transform 0.24s ease, border 0.24s ease;
}

.category-tile img,
.category-banner img {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.32;
}

.category-tile::after,
.category-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.3));
}

.category-tile span,
.category-banner h2 {
    font-size: 1.35rem;
    font-weight: 900;
}

.category-tile strong,
.category-banner p {
    color: var(--muted-strong);
    font-weight: 500;
    line-height: 1.65;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 0.92rem;
}

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

.breadcrumbs a::after {
    content: "/";
    margin-left: 8px;
    color: var(--muted);
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(28px, 5vw, 58px);
    border-radius: 28px;
}

.compact-hero,
.category-hero,
.ranking-hero {
    background:
        radial-gradient(circle at 10% 10%, rgba(245, 158, 11, 0.18), transparent 22rem),
        linear-gradient(135deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
}

.search-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 26px 0 40px;
    padding: 22px;
    border-radius: 22px;
}

.search-panel p {
    margin: 8px 0 0;
    color: var(--muted);
}

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

.movie-search-input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    color: var(--text);
    background: rgba(2, 6, 23, 0.56);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    outline: none;
}

.movie-search-input:focus {
    border-color: rgba(245, 158, 11, 0.72);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.filter-buttons {
    margin-top: 10px;
}

.filter-button {
    min-height: 34px;
    padding: 0 12px;
    color: var(--muted-strong);
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    cursor: pointer;
}

.filter-button.active,
.filter-button:hover {
    color: #111827;
    background: var(--amber);
    border-color: var(--amber);
}

.category-overview-list {
    display: grid;
    gap: 34px;
    margin: 42px 0 64px;
}

.category-overview-block {
    overflow: hidden;
}

.category-banner {
    position: relative;
    min-height: 240px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    padding: 28px;
    border-radius: 24px;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
    gap: clamp(24px, 5vw, 54px);
    padding: clamp(22px, 4vw, 40px);
    border-radius: 28px;
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: 22px;
    background: #0f172a;
    box-shadow: var(--shadow);
}

.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-info {
    align-self: center;
}

.detail-meta {
    margin: 22px 0 18px;
}

.player-section {
    margin: 42px 0;
    padding: clamp(18px, 4vw, 28px);
    border-radius: 28px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #000;
    aspect-ratio: 16 / 9;
    box-shadow: var(--shadow);
}

.movie-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    cursor: pointer;
}

.video-play {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: var(--text);
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.3), rgba(2, 6, 23, 0.72));
    cursor: pointer;
}

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

.play-circle {
    width: 78px;
    height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 5px;
    border-radius: 999px;
    color: #111827;
    background: var(--amber);
    font-size: 2rem;
    box-shadow: 0 18px 46px rgba(245, 158, 11, 0.35);
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    margin: 42px 0;
}

.story-card {
    padding: 24px;
    border-radius: 22px;
}

.story-card p {
    margin: 14px 0 0;
    color: var(--muted-strong);
    line-height: 1.9;
}

.site-footer {
    margin-top: 74px;
    border-top: 1px solid rgba(51, 65, 85, 0.8);
    background: rgba(2, 6, 23, 0.62);
}

.footer-shell {
    display: grid;
    grid-template-columns: 1.35fr 1fr 0.7fr;
    gap: 40px;
    padding: 44px 0 30px;
}

.footer-brand p {
    max-width: 520px;
    margin: 16px 0 0;
    color: var(--muted);
    line-height: 1.75;
}

.footer-links h2 {
    margin-bottom: 16px;
    font-size: 1.08rem;
}

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

.footer-link-grid a {
    color: var(--muted-strong);
}

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

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

.is-filtered-out {
    display: none !important;
}

@media (max-width: 1180px) {
    .card-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

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

    .mobile-menu-button {
        display: block;
    }

    .hero {
        min-height: 520px;
    }

    .hero-content {
        padding-bottom: 70px;
    }

    .home-intro,
    .section-heading,
    .search-panel {
        align-items: flex-start;
        flex-direction: column;
    }

    .search-controls {
        width: 100%;
    }

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

    .detail-poster {
        width: min(320px, 100%);
    }
}

@media (max-width: 620px) {
    .header-shell,
    .footer-shell,
    .page-shell,
    .mobile-nav,
    .footer-bottom {
        width: min(100% - 22px, 1280px);
    }

    .logo-text {
        font-size: 1rem;
    }

    .hero-control {
        display: none;
    }

    .card-grid,
    .featured-grid,
    .rank-grid,
    .mini-grid,
    .category-tile-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

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

    .movie-card h3 {
        font-size: 0.94rem;
    }

    .movie-card p {
        font-size: 0.82rem;
    }

    .page-hero,
    .detail-hero,
    .player-section,
    .story-card {
        border-radius: 20px;
    }

    .play-circle {
        width: 62px;
        height: 62px;
        font-size: 1.6rem;
    }
}
