:root {
    --bg: #070707;
    --bg-soft: #111111;
    --panel: rgba(23, 23, 23, 0.82);
    --panel-strong: #171717;
    --line: rgba(245, 158, 11, 0.18);
    --text: #f9fafb;
    --muted: #d1d5db;
    --muted-2: #9ca3af;
    --amber: #f59e0b;
    --amber-light: #fcd34d;
    --amber-dark: #b45309;
    --danger: #ef4444;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --container: 1200px;
}

* {
    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(245, 158, 11, 0.16), transparent 32rem),
        radial-gradient(circle at 80% 8%, rgba(180, 83, 9, 0.12), transparent 28rem),
        var(--bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
}

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

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

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

button,
input,
select {
    font: inherit;
}

.container {
    width: min(100% - 32px, var(--container));
    margin-inline: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(245, 158, 11, 0.12);
    background: rgba(7, 7, 7, 0.76);
    backdrop-filter: blur(18px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
}

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

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 14px;
    color: #111111;
    background: linear-gradient(135deg, var(--amber-light), var(--amber), var(--amber-dark));
    box-shadow: 0 14px 40px rgba(245, 158, 11, 0.28);
}

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

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

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted);
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--amber-light);
    background: rgba(245, 158, 11, 0.12);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 5px auto;
    border-radius: 99px;
    background: currentColor;
}

.mobile-nav {
    display: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(7, 7, 7, 0.94);
}

.mobile-nav a {
    display: block;
    padding: 14px 24px;
    color: var(--muted);
}

.mobile-nav a:hover {
    color: var(--amber-light);
    background: rgba(245, 158, 11, 0.1);
}

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

.hero {
    position: relative;
    min-height: 720px;
    overflow: hidden;
    isolation: isolate;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    opacity: 0;
    transform: scale(1.015);
    transition: opacity 0.6s ease, transform 0.8s ease;
    pointer-events: none;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    z-index: -2;
    background-position: center;
    background-size: cover;
    filter: saturate(1.08) contrast(1.05);
}

.hero-backdrop::after {
    position: absolute;
    inset: 0;
    content: "";
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.72) 42%, rgba(0, 0, 0, 0.32) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.18), #070707 96%);
}

.hero-slide-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.72fr);
    align-items: center;
    gap: 56px;
    min-height: 720px;
    padding-top: 56px;
    padding-bottom: 56px;
}

.hero-copy {
    max-width: 760px;
}

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

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 1.05;
    letter-spacing: -0.055em;
}

.hero-copy p {
    max-width: 680px;
    margin: 22px 0 0;
    color: var(--muted);
    font-size: clamp(17px, 2vw, 22px);
}

.hero-tags,
.tag-row,
.inline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

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

.hero-tags span,
.tag-row span,
.inline-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 4px 10px;
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 999px;
    color: #fde68a;
    background: rgba(245, 158, 11, 0.1);
    font-size: 13px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--text);
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: #111111;
    background: linear-gradient(135deg, var(--amber-light), var(--amber));
    box-shadow: 0 18px 44px rgba(245, 158, 11, 0.24);
}

.btn-ghost {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
}

.btn-small {
    min-height: 42px;
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.24);
}

.hero-poster {
    position: relative;
    display: block;
    overflow: hidden;
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 34px;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

.hero-poster::before {
    position: absolute;
    inset: 18px;
    z-index: -1;
    content: "";
    border-radius: inherit;
    background: rgba(245, 158, 11, 0.2);
    filter: blur(30px);
}

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

.hero-poster span {
    position: absolute;
    left: 20px;
    bottom: 20px;
    padding: 10px 14px;
    border-radius: 999px;
    color: #111111;
    background: var(--amber-light);
    font-weight: 800;
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 4;
    display: grid;
    width: 50px;
    height: 50px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    color: var(--text);
    background: rgba(0, 0, 0, 0.42);
    cursor: pointer;
    transform: translateY(-50%);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

.hero-dots button.is-active {
    width: 30px;
    background: var(--amber);
}

.search-hero-panel,
.stats-grid,
.content-section,
.page-hero,
.detail-content,
.prev-next {
    margin-top: 56px;
}

.search-hero-panel {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 520px);
    gap: 24px;
    align-items: center;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.search-hero-panel h2,
.section-heading h2,
.ranking-panel h3,
.ranking-panel h2,
.detail-article h2,
.detail-info-card h2 {
    margin: 0;
    line-height: 1.2;
}

.global-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

.global-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    outline: none;
}

.global-search input {
    padding: 0 18px;
}

.filter-panel input,
.filter-panel select {
    padding: 0 14px;
}

.filter-panel select option {
    color: #111111;
}

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

.stat-card {
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.06);
}

.stat-card strong {
    display: block;
    color: var(--amber-light);
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1;
}

.stat-card span {
    display: block;
    margin-top: 10px;
    color: var(--muted-2);
}

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

.section-heading p {
    max-width: 720px;
    margin: 8px 0 0;
    color: var(--muted-2);
}

.section-link {
    flex: 0 0 auto;
    color: var(--amber-light);
    font-weight: 700;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.36);
    box-shadow: 0 24px 70px rgba(245, 158, 11, 0.12);
}

.movie-poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(255, 255, 255, 0.08));
}

.movie-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.poster-play,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.poster-play {
    right: 10px;
    bottom: 10px;
    padding: 7px 10px;
    color: #111111;
    background: var(--amber-light);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .poster-play {
    opacity: 1;
    transform: translateY(0);
}

.rank-badge {
    left: 10px;
    top: 10px;
    padding: 6px 9px;
    color: var(--text);
    background: rgba(0, 0, 0, 0.72);
}

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

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted-2);
    font-size: 12px;
}

.movie-card h3 {
    margin: 8px 0 0;
    font-size: 18px;
    line-height: 1.25;
}

.movie-card h3 a:hover {
    color: var(--amber-light);
}

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

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

.movie-card-compact h3 {
    font-size: 16px;
}

.movie-card-compact p {
    font-size: 13px;
}

.home-rank-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 20px;
    align-items: start;
}

.ranking-panel,
.detail-info-card,
.detail-article,
.category-overview-card a,
.filter-panel {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.06);
}

.ranking-panel {
    padding: 20px;
}

.ranking-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ranking-row:last-child {
    border-bottom: 0;
}

.ranking-number {
    grid-row: span 2;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 11px;
    color: #111111;
    background: var(--amber);
    font-weight: 900;
}

.ranking-title {
    font-weight: 700;
}

.ranking-meta {
    color: var(--muted-2);
    font-size: 13px;
}

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

.category-card,
.category-overview-card a {
    display: block;
    min-height: 150px;
    padding: 20px;
    border: 1px solid rgba(245, 158, 11, 0.16);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(135deg, rgba(245, 158, 11, 0.13), transparent),
        rgba(255, 255, 255, 0.06);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-card span,
.category-overview-card h2 {
    color: var(--amber-light);
    font-weight: 800;
}

.category-card strong,
.category-overview-card strong {
    display: block;
    margin-top: 8px;
    font-size: 28px;
}

.category-card p,
.category-overview-card p {
    margin: 10px 0 0;
    color: var(--muted-2);
    font-size: 14px;
}

.category-number {
    display: inline-grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 14px;
    color: #111111;
    background: var(--amber);
    font-weight: 900;
}

.page-main {
    padding-bottom: 72px;
}

.page-hero {
    padding: 72px 0 16px;
}

.page-hero h1 {
    max-width: 920px;
}

.page-hero p {
    max-width: 820px;
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 18px;
}

.filter-panel {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 12px;
    padding: 16px;
}

.filter-panel label {
    display: grid;
    gap: 6px;
    color: var(--muted-2);
    font-size: 13px;
}

.filter-count {
    margin: 0 0 18px;
    color: var(--muted-2);
}

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

.sticky-panel {
    position: sticky;
    top: 96px;
}

.detail-main {
    padding-bottom: 72px;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 46px 0 66px;
    isolation: isolate;
}

.detail-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    background-position: center;
    background-size: cover;
    filter: blur(8px) saturate(1.06);
    transform: scale(1.08);
}

.detail-bg::after {
    position: absolute;
    inset: 0;
    content: "";
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.58)),
        linear-gradient(180deg, rgba(7, 7, 7, 0.35), #070707 100%);
}

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

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

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    gap: 34px;
    align-items: center;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 28px;
    background: #000000;
    box-shadow: var(--shadow);
}

.movie-player {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
    cursor: pointer;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 14px;
    padding: 24px;
    border: 0;
    color: var(--text);
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.78));
    cursor: pointer;
}

.player-overlay[hidden] {
    display: none;
}

.play-icon {
    display: grid;
    width: 78px;
    height: 78px;
    place-items: center;
    border-radius: 999px;
    color: #111111;
    background: var(--amber-light);
    box-shadow: 0 18px 44px rgba(245, 158, 11, 0.34);
    font-size: 28px;
}

.player-overlay strong {
    max-width: 80%;
    font-size: 20px;
    text-align: center;
}

.player-status {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 16px;
    min-height: 24px;
    color: var(--amber-light);
    font-size: 14px;
    text-align: center;
    pointer-events: none;
}

.detail-copy h1 {
    font-size: clamp(36px, 5vw, 62px);
}

.detail-one-line {
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 18px;
}

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

.detail-meta span {
    padding: 6px 12px;
    border-radius: 999px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.08);
}

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

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

.detail-article,
.detail-info-card {
    padding: 24px;
}

.detail-article p {
    color: var(--muted);
    font-size: 17px;
}

.detail-info-card dl {
    margin: 0;
}

.detail-info-card div {
    display: grid;
    grid-template-columns: 86px 1fr;
    gap: 16px;
    padding: 13px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.detail-info-card div:last-child {
    border-bottom: 0;
}

.detail-info-card dt {
    color: var(--muted-2);
}

.detail-info-card dd {
    margin: 0;
    color: var(--text);
}

.detail-info-card a {
    color: var(--amber-light);
}

.prev-next {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.prev-next a {
    color: var(--amber-light);
}

.site-footer {
    margin-top: 80px;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(0, 0, 0, 0.42);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.6fr 0.6fr;
    gap: 32px;
    padding: 42px 0;
}

.footer-grid p {
    max-width: 560px;
    color: var(--muted-2);
}

.footer-grid h3 {
    margin: 0 0 12px;
}

.footer-grid a:not(.brand) {
    display: block;
    margin: 8px 0;
    color: var(--muted-2);
}

.footer-grid a:not(.brand):hover {
    color: var(--amber-light);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 0 26px;
    color: var(--muted-2);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.is-hidden {
    display: none !important;
}

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

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

    .home-rank-layout,
    .ranking-layout,
    .detail-content {
        grid-template-columns: 1fr;
    }

    .sticky-panel {
        position: static;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .hero,
    .hero-slide-inner {
        min-height: auto;
    }

    .hero-slide {
        position: relative;
        display: none;
    }

    .hero-slide.is-active {
        display: grid;
    }

    .hero-slide-inner,
    .detail-grid,
    .search-hero-panel {
        grid-template-columns: 1fr;
    }

    .hero-slide-inner {
        padding-top: 46px;
        padding-bottom: 92px;
    }

    .hero-poster {
        max-width: 360px;
        margin-inline: auto;
        transform: none;
    }

    .hero-control {
        top: auto;
        bottom: 22px;
        transform: none;
    }

    .hero-prev {
        left: 24px;
    }

    .hero-next {
        right: 24px;
    }

    .stats-grid,
    .filter-panel,
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .global-search {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .container {
        width: min(100% - 22px, var(--container));
    }

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

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

    .stats-grid,
    .movie-grid,
    .compact-grid,
    .category-grid,
    .category-overview-grid,
    .filter-panel,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .section-heading,
    .prev-next,
    .footer-bottom {
        align-items: flex-start;
        flex-direction: column;
    }

    .detail-info-card div {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}
