:root {
    --bg: #030712;
    --bg-soft: #0f172a;
    --panel: #111827;
    --panel-2: #1f2937;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f9fafb;
    --muted: #9ca3af;
    --muted-2: #6b7280;
    --amber: #f59e0b;
    --amber-2: #d97706;
    --amber-3: #92400e;
    --shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(217, 119, 6, 0.18), transparent 32rem),
        linear-gradient(180deg, #111827 0%, #030712 42%, #111827 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, black, transparent 80%);
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(17, 24, 39, 0.86);
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--amber), var(--amber-3));
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.28);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.brand-text strong,
.footer-brand {
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(90deg, #fbbf24, #d97706);
    -webkit-background-clip: text;
    color: transparent;
}

.brand-text em {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-link,
.mobile-link {
    color: #d1d5db;
    font-weight: 700;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
    padding: 10px 14px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.12);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(31, 41, 55, 0.7);
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #e5e7eb;
    border-radius: 999px;
}

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

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

.mobile-link {
    padding: 12px 14px;
    background: rgba(31, 41, 55, 0.64);
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.75s ease, visibility 0.75s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    position: relative;
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.1);
    transform: scale(1.04);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 75% 45%, rgba(245, 158, 11, 0.18), transparent 24rem),
        linear-gradient(90deg, rgba(3, 7, 18, 0.95) 0%, rgba(3, 7, 18, 0.76) 42%, rgba(3, 7, 18, 0.48) 100%),
        linear-gradient(0deg, #030712 0%, transparent 42%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 72vh;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(220px, 0.52fr);
    align-items: center;
    gap: 46px;
    padding: 64px 0;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    gap: 8px;
    color: #fef3c7;
    background: rgba(146, 64, 14, 0.35);
    border: 1px solid rgba(251, 191, 36, 0.26);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 800;
}

.hero-copy h1 {
    max-width: 820px;
    margin: 18px 0 18px;
    font-size: clamp(38px, 7vw, 82px);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.hero-copy p {
    max-width: 680px;
    margin: 0;
    color: #d1d5db;
    font-size: clamp(16px, 2.5vw, 21px);
    line-height: 1.75;
}

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

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

.hero-tags span,
.tag-row span,
.detail-meta span,
.meta-row span {
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
}

.hero-actions {
    margin-top: 30px;
}

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

.primary-btn {
    background: linear-gradient(135deg, var(--amber), var(--amber-2));
    color: white;
    box-shadow: 0 16px 34px rgba(217, 119, 6, 0.28);
}

.ghost-btn,
.section-more,
.text-btn {
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.32);
    background: rgba(17, 24, 39, 0.62);
}

.primary-btn:hover,
.ghost-btn:hover,
.text-btn:hover,
.section-more:hover {
    transform: translateY(-2px);
}

.hero-poster {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(251, 191, 36, 0.24);
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

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

.hero-controls {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 26px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px;
    border-radius: 999px;
    background: rgba(3, 7, 18, 0.66);
    border: 1px solid rgba(148, 163, 184, 0.18);
    backdrop-filter: blur(12px);
}

.hero-prev,
.hero-next,
.hero-dot {
    border: 0;
    color: white;
    background: rgba(255, 255, 255, 0.12);
}

.hero-prev,
.hero-next {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
}

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

.hero-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border-radius: 50%;
}

.hero-dot.is-active {
    width: 26px;
    border-radius: 999px;
    background: var(--amber);
}

.intro-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 28px;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(17, 24, 39, 0.7);
    box-shadow: var(--shadow);
}

.intro-strip div {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.intro-strip span,
.intro-strip strong,
.intro-strip em {
    font-style: normal;
    color: #fef3c7;
    background: rgba(245, 158, 11, 0.12);
    border-radius: 999px;
    padding: 8px 12px;
}

.intro-strip a {
    color: #fbbf24;
    font-weight: 800;
}

.section-block {
    padding-top: 58px;
}

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

.section-head h2,
.page-hero h1,
.detail-copy h1 {
    margin: 12px 0 10px;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.1;
    letter-spacing: -0.035em;
}

.section-head p,
.page-hero p,
.site-footer p,
.category-overview-card p,
.category-card p,
.detail-copy p {
    color: var(--muted);
    line-height: 1.75;
}

.search-panel {
    margin-top: 30px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(17, 24, 39, 0.72);
    box-shadow: var(--shadow);
}

.search-label {
    display: block;
    margin-bottom: 10px;
    color: #fcd34d;
    font-weight: 800;
}

.search-box {
    display: flex;
    gap: 10px;
}

.search-input {
    flex: 1;
    min-width: 0;
    height: 48px;
    padding: 0 16px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    color: white;
    background: rgba(3, 7, 18, 0.76);
    outline: none;
}

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

.search-clear,
.filter-chip {
    border: 1px solid rgba(245, 158, 11, 0.28);
    border-radius: 14px;
    color: #fcd34d;
    background: rgba(146, 64, 14, 0.16);
    font-weight: 800;
}

.search-clear {
    padding: 0 16px;
}

.filter-row {
    margin-top: 14px;
}

.filter-chip {
    min-height: 36px;
    padding: 0 12px;
}

.filter-chip.is-active,
.filter-chip:hover {
    color: #111827;
    background: #fbbf24;
}

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

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(31, 41, 55, 0.74);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.65);
    box-shadow: 0 22px 52px rgba(146, 64, 14, 0.24);
}

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

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: #111827;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

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

.poster-shade {
    position: absolute;
    inset: auto 0 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.82), transparent);
}

.play-chip {
    position: absolute;
    right: 12px;
    bottom: 12px;
    color: white;
    background: rgba(245, 158, 11, 0.9);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 900;
}

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: white;
    background: linear-gradient(135deg, #f59e0b, #b45309);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
}

.card-body {
    padding: 15px;
}

.card-body h2 {
    margin: 0 0 8px;
    color: white;
    font-size: 17px;
    line-height: 1.35;
}

.card-body h2 a:hover {
    color: #fbbf24;
}

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

.meta-row {
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 10px;
}

.meta-row span {
    color: #d1d5db;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
}

.tag-row {
    gap: 6px;
}

.tag-row span {
    padding: 5px 8px;
}

.movie-card.list {
    display: grid;
    grid-template-columns: 136px minmax(0, 1fr);
    min-height: 188px;
}

.movie-card.list .poster-link img {
    height: 100%;
    aspect-ratio: auto;
}

.movie-card.list .card-line {
    -webkit-line-clamp: 3;
}

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

.category-card,
.category-overview-card,
.side-card,
.player-card,
.detail-copy {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(17, 24, 39, 0.72);
    box-shadow: var(--shadow);
}

.category-card,
.category-overview-card {
    padding: 18px;
    transition: transform 0.22s ease, border-color 0.22s ease;
}

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

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

.category-covers img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.25s ease;
}

.category-card h2,
.category-overview-card .category-title {
    display: block;
    margin: 0 0 8px;
    color: #fff;
    font-size: 22px;
    font-weight: 900;
}

.category-samples,
.inline-links,
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-samples {
    margin: 16px 0;
}

.category-samples a,
.inline-links a,
.footer-links a {
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 13px;
    font-weight: 700;
}

.page-main {
    padding: 36px 0 0;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 46px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background:
        radial-gradient(circle at 85% 20%, rgba(245, 158, 11, 0.22), transparent 20rem),
        linear-gradient(135deg, rgba(31, 41, 55, 0.92), rgba(3, 7, 18, 0.86));
    box-shadow: var(--shadow);
}

.page-hero.compact {
    min-height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.small-actions {
    margin-top: 22px;
}

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

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

.breadcrumb strong {
    color: #fff;
    font-weight: 800;
}

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

.detail-content {
    min-width: 0;
}

.player-card {
    position: relative;
    overflow: hidden;
    background: #000;
}

.movie-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: var(--radius);
}

.player-trigger {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: white;
    background:
        radial-gradient(circle, rgba(245, 158, 11, 0.22), transparent 22rem),
        rgba(0, 0, 0, 0.38);
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.player-trigger span {
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 20px 46px rgba(217, 119, 6, 0.35);
    font-size: 30px;
    text-indent: 4px;
}

.player-trigger strong {
    font-size: 18px;
}

.detail-copy {
    margin-top: 20px;
    padding: 28px;
}

.detail-copy h1 {
    margin-top: 0;
}

.detail-copy h2 {
    margin: 28px 0 10px;
    color: #fcd34d;
    font-size: 22px;
}

.detail-one-line {
    color: #e5e7eb;
    font-size: 18px;
}

.detail-meta,
.detail-tags {
    margin-top: 16px;
}

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

.detail-poster {
    width: 100%;
    border-radius: var(--radius);
    border: 1px solid rgba(245, 158, 11, 0.24);
    box-shadow: var(--shadow);
}

.side-card {
    padding: 20px;
}

.side-card h2 {
    margin: 0 0 16px;
    font-size: 20px;
}

.side-card dl {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 10px 12px;
    margin: 0;
}

.side-card dt {
    color: #fcd34d;
    font-weight: 800;
}

.side-card dd {
    margin: 0;
    color: #d1d5db;
}

.site-footer {
    margin-top: 72px;
    padding: 46px 0 26px;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.86), #020617);
}

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

.site-footer h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

.copyright {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 0;
    color: var(--muted-2);
    font-size: 14px;
}

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

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

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

    .detail-side {
        position: static;
        grid-template-columns: 220px 1fr;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .hero-content {
        grid-template-columns: 1fr;
        padding: 50px 0 92px;
    }

    .hero-poster {
        width: min(280px, 70vw);
        margin: 0 auto;
        transform: none;
    }

    .section-head,
    .intro-strip,
    .search-box {
        align-items: flex-start;
        flex-direction: column;
    }

    .search-clear {
        min-height: 42px;
    }

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

    .page-hero {
        padding: 32px 22px;
    }

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

@media (max-width: 560px) {
    .header-inner {
        height: 62px;
    }

    .brand-text em {
        display: none;
    }

    .mobile-nav.is-open,
    .movie-grid,
    .rank-grid,
    .category-grid,
    .overview-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .movie-card.list {
        grid-template-columns: 110px minmax(0, 1fr);
        min-height: 160px;
    }

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

    .card-line {
        -webkit-line-clamp: 2;
    }

    .hero-copy h1 {
        font-size: 38px;
    }

    .hero-copy p {
        font-size: 15px;
    }

    .hero-controls {
        bottom: 14px;
    }

    .detail-copy {
        padding: 20px;
    }
}
