:root {
    --bg: #0f172a;
    --bg-2: #020617;
    --panel: #1e293b;
    --panel-soft: rgba(30, 41, 59, 0.72);
    --border: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-2: #cbd5e1;
    --accent: #f59e0b;
    --accent-2: #fbbf24;
    --danger: #ef4444;
    --shadow: 0 24px 70px rgba(2, 6, 23, 0.38);
    --radius: 24px;
}

* {
    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 32rem),
        linear-gradient(180deg, #0f172a 0%, #111827 42%, #020617 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    min-height: 100vh;
}

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

img {
    display: block;
    width: 100%;
    height: auto;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(15, 23, 42, 0.85));
}

button,
input {
    font: inherit;
}

button.primary-btn {
    border: 0;
    cursor: pointer;
}

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

.nav-shell {
    max-width: 1200px;
    height: 68px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-mark {
    color: var(--accent);
    display: inline-flex;
    filter: drop-shadow(0 0 16px rgba(245, 158, 11, 0.25));
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-link {
    color: var(--muted-2);
    font-weight: 650;
    transition: color 0.2s ease;
}

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

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    color: var(--text);
    background: rgba(148, 163, 184, 0.1);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}

.mobile-menu {
    display: none;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 18px;
}

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

.mobile-link {
    padding: 12px 14px;
    color: var(--muted-2);
    border-radius: 14px;
    background: rgba(148, 163, 184, 0.08);
}

.hero-carousel {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    background: var(--bg-2);
}

.hero-slides,
.hero-slide {
    position: absolute;
    inset: 0;
}

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

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 75% 24%, rgba(245, 158, 11, 0.24), transparent 22rem),
        linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.64), rgba(15, 23, 42, 0.92)),
        linear-gradient(0deg, #0f172a 0%, transparent 35%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    min-height: 72vh;
    margin: 0 auto;
    padding: 72px 20px 96px;
    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;
    color: var(--accent-2);
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.24);
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 0.88rem;
    font-weight: 750;
    margin-bottom: 16px;
}

.hero-copy h1 {
    font-size: clamp(3rem, 8vw, 6.8rem);
    line-height: 0.94;
    margin: 0 0 24px;
    font-weight: 900;
    letter-spacing: -0.06em;
}

.hero-copy p {
    max-width: 720px;
    color: #e2e8f0;
    font-size: clamp(1.1rem, 2.2vw, 1.45rem);
    line-height: 1.8;
    margin: 0 0 24px;
}

.hero-tags,
.mini-tags,
.detail-tags,
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.mini-tags span,
.detail-tags span,
.tag-cloud a {
    color: #fde68a;
    background: rgba(245, 158, 11, 0.13);
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 0.82rem;
}

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

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

.primary-btn {
    color: white;
    background: linear-gradient(135deg, var(--accent), #d97706);
    box-shadow: 0 18px 40px rgba(245, 158, 11, 0.24);
}

.primary-btn.full {
    width: 100%;
}

.primary-btn:hover,
.ghost-btn:hover,
.section-link:hover,
.inline-more:hover,
.rank-action:hover {
    transform: translateY(-2px);
}

.ghost-btn,
.section-link,
.inline-more {
    color: var(--accent-2);
    border: 1px solid rgba(245, 158, 11, 0.32);
    background: rgba(15, 23, 42, 0.48);
}

.hero-poster {
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transform: rotate(2deg);
    transition: transform 0.25s ease;
}

.hero-poster:hover {
    transform: rotate(0) scale(1.02);
}

.hero-poster img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.hero-poster span {
    position: absolute;
    right: 16px;
    bottom: 16px;
    border-radius: 999px;
    padding: 8px 12px;
    color: white;
    background: rgba(245, 158, 11, 0.9);
    font-weight: 800;
}

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

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

.hero-dot.active {
    width: 32px;
    background: var(--accent-2);
}

.hero-quick-links {
    position: absolute;
    z-index: 4;
    right: max(20px, calc((100vw - 1200px) / 2 + 20px));
    bottom: 28px;
    display: flex;
    gap: 10px;
}

.hero-quick-links a {
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.66);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 9px 13px;
    backdrop-filter: blur(10px);
}

.section-wrap,
.detail-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 72px 20px;
}

.intro-search {
    padding-bottom: 24px;
}

.section-heading {
    margin-bottom: 30px;
}

.section-heading.center {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

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

.section-heading h2,
.page-hero h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p {
    color: var(--muted-2);
    line-height: 1.8;
    margin: 12px 0 0;
}

.filter-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px;
    border-radius: 24px;
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.58);
    box-shadow: var(--shadow);
    margin-bottom: 32px;
}

.search-box {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    border-radius: 18px;
    background: rgba(30, 41, 59, 0.9);
    padding: 0 14px;
    min-height: 52px;
}

.search-box input {
    width: 100%;
    color: var(--text);
    background: transparent;
    border: 0;
    outline: 0;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-btn {
    min-height: 42px;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0 15px;
    color: var(--muted-2);
    background: rgba(30, 41, 59, 0.9);
}

.filter-btn.active,
.filter-btn:hover {
    color: white;
    border-color: rgba(245, 158, 11, 0.5);
    background: rgba(245, 158, 11, 0.9);
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 24px;
    background: rgba(30, 41, 59, 0.82);
    border: 1px solid var(--border);
    box-shadow: 0 20px 48px rgba(2, 6, 23, 0.24);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-7px) scale(1.01);
    border-color: rgba(245, 158, 11, 0.38);
    box-shadow: 0 26px 64px rgba(2, 6, 23, 0.34);
}

.movie-card.hidden,
.rank-row.hidden {
    display: none;
}

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

.poster-link img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

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

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

.rank-badge {
    left: 12px;
    top: 12px;
    min-width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    color: white;
    background: linear-gradient(135deg, #ef4444, var(--accent));
}

.play-pill {
    right: 12px;
    bottom: 12px;
    padding: 7px 11px;
    color: white;
    background: rgba(245, 158, 11, 0.92);
}

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

.card-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 0.84rem;
    margin-bottom: 10px;
}

.card-meta span,
.detail-meta span {
    border-radius: 999px;
    padding: 4px 8px;
    background: rgba(148, 163, 184, 0.1);
}

.movie-card h2 {
    margin: 0 0 8px;
    color: white;
    font-size: 1.05rem;
    font-weight: 850;
    line-height: 1.35;
}

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

.mini-tags span {
    font-size: 0.75rem;
    padding: 5px 8px;
}

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

.category-tile,
.category-overview-card,
.side-card,
.detail-card {
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(30, 41, 59, 0.78);
    box-shadow: var(--shadow);
}

.category-tile a {
    display: block;
    min-height: 228px;
    padding: 22px;
}

.category-index {
    display: inline-flex;
    color: var(--accent-2);
    font-weight: 900;
    margin-bottom: 18px;
}

.category-tile h2,
.category-overview-card h2,
.side-card h2 {
    margin: 0 0 10px;
    font-size: 1.35rem;
}

.category-tile p,
.category-overview-card p,
.side-card p {
    color: var(--muted-2);
    line-height: 1.75;
    margin: 0 0 14px;
}

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-samples a {
    color: #fde68a;
    font-size: 0.84rem;
    border-bottom: 1px solid rgba(245, 158, 11, 0.4);
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 92px 20px 70px;
    border-bottom: 1px solid var(--border);
    background:
        radial-gradient(circle at 75% 20%, rgba(245, 158, 11, 0.18), transparent 28rem),
        linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.96));
}

.page-hero-inner {
    max-width: 1200px;
    margin: 0 auto;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 22px;
    padding: 22px;
}

.category-cover-stack {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.category-cover-stack img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 14px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 58px 80px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: rgba(30, 41, 59, 0.72);
}

.rank-number {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: white;
    background: linear-gradient(135deg, #ef4444, var(--accent));
    font-weight: 950;
}

.rank-thumb img {
    width: 80px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 12px;
}

.rank-info h2 {
    margin: 0 0 8px;
    font-size: 1.08rem;
}

.rank-info p {
    margin: 0 0 8px;
    color: var(--muted-2);
    line-height: 1.6;
}

.rank-action {
    color: white;
    background: rgba(245, 158, 11, 0.86);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    margin-bottom: 26px;
}

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

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

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: black;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.11);
    aspect-ratio: 16 / 9;
    margin-bottom: 24px;
}

.movie-player,
.player-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.movie-player {
    object-fit: contain;
    background: #000;
}

.player-cover {
    z-index: 3;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    color: white;
    cursor: pointer;
    overflow: hidden;
    background: #000;
}

.player-cover.is-hidden {
    display: none;
}

.player-cover img {
    position: absolute;
    inset: 0;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.52) saturate(1.1);
}

.player-cover-mask {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.2), rgba(2, 6, 23, 0.7));
}

.big-play {
    position: relative;
    z-index: 2;
    width: 92px;
    height: 92px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.92);
    box-shadow: 0 18px 48px rgba(245, 158, 11, 0.34);
    transition: transform 0.2s ease;
}

.player-cover:hover .big-play {
    transform: scale(1.08);
}

.detail-card {
    padding: 30px;
}

.detail-card h1 {
    margin: 0 0 16px;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.1;
    font-weight: 950;
}

.detail-card h2 {
    margin: 28px 0 12px;
    font-size: 1.35rem;
}

.detail-card p {
    color: var(--muted-2);
    line-height: 1.9;
    margin: 0;
}

.one-line {
    color: #fde68a !important;
    font-size: 1.1rem;
    font-style: italic;
    margin: 18px 0 24px !important;
}

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

.detail-side {
    position: sticky;
    top: 92px;
    display: grid;
    gap: 18px;
}

.side-card {
    padding: 20px;
}

.cover-card img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 18px;
    margin-bottom: 16px;
}

.info-list {
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 12px;
    margin: 0;
}

.info-list dt {
    color: var(--muted);
}

.info-list dd {
    margin: 0;
    color: var(--muted-2);
}

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

.movie-card.compact h2 {
    font-size: 0.95rem;
}

.movie-card.compact p {
    font-size: 0.84rem;
    -webkit-line-clamp: 2;
}

.site-footer {
    border-top: 1px solid var(--border);
    background: rgba(2, 6, 23, 0.82);
    padding: 54px 20px 28px;
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 38px;
}

.footer-brand {
    margin-bottom: 18px;
}

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

.site-footer h2 {
    margin: 0 0 16px;
    font-size: 1.1rem;
}

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

.footer-links a {
    color: var(--muted-2);
}

.footer-links a:hover,
.tag-cloud a:hover {
    color: var(--accent-2);
}

.footer-bottom {
    max-width: 1200px;
    margin: 34px auto 0;
    padding-top: 22px;
    color: var(--muted);
    border-top: 1px solid var(--border);
    text-align: center;
}

@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .hero-poster {
        display: none;
    }

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

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

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

    .detail-side {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

    .menu-toggle {
        display: inline-flex;
    }

    .hero-carousel,
    .hero-content {
        min-height: 78vh;
    }

    .hero-content {
        padding: 54px 20px 120px;
    }

    .hero-copy h1 {
        font-size: clamp(2.7rem, 15vw, 4.2rem);
    }

    .hero-quick-links {
        left: 20px;
        right: 20px;
        justify-content: center;
        flex-wrap: wrap;
    }

    .section-wrap,
    .detail-wrap {
        padding: 48px 16px;
    }

    .section-heading.split {
        align-items: flex-start;
        flex-direction: column;
    }

    .filter-panel {
        flex-direction: column;
        align-items: stretch;
    }

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

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

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

    .rank-row {
        grid-template-columns: 44px 64px minmax(0, 1fr);
    }

    .rank-action {
        grid-column: 2 / -1;
        width: 100%;
    }

    .rank-thumb img {
        width: 64px;
    }

    .detail-card {
        padding: 22px;
    }
}

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

    .mobile-menu.open {
        grid-template-columns: 1fr;
    }
}
