:root {
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-200: #fde68a;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --amber-700: #b45309;
    --orange-500: #f97316;
    --red-500: #ef4444;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-soft: 0 20px 45px rgba(17, 24, 39, 0.10);
    --shadow-card: 0 14px 30px rgba(17, 24, 39, 0.08);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --max-width: 1280px;
}

* {
    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: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    backdrop-filter: blur(14px);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--amber-700);
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: var(--white);
    background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
    box-shadow: 0 8px 18px rgba(217, 119, 6, 0.26);
}

.brand-text {
    font-size: 22px;
    letter-spacing: -0.02em;
}

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

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

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

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    background: var(--amber-50);
    border-radius: 12px;
    padding: 10px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--amber-700);
    border-radius: 99px;
}

.mobile-nav {
    display: none;
    padding: 8px 24px 18px;
    background: var(--white);
    border-top: 1px solid var(--gray-200);
}

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

.mobile-link {
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--gray-700);
    font-weight: 650;
}

.hero-carousel {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    background: linear-gradient(120deg, var(--amber-500), var(--orange-500));
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(90deg, rgba(17, 24, 39, 0.86), rgba(217, 119, 6, 0.52), rgba(249, 115, 22, 0.20)),
        var(--hero-image);
    background-size: cover;
    background-position: center;
    transform: scale(1.05);
    filter: saturate(1.12);
}

.hero-panel {
    position: relative;
    z-index: 2;
    max-width: var(--max-width);
    min-height: 560px;
    margin: 0 auto;
    padding: 68px 24px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 360px;
    gap: 54px;
    align-items: center;
}

.hero-copy {
    color: var(--white);
    max-width: 760px;
}

.hero-kicker,
.section-heading span,
.page-hero-inner span,
.search-banner span {
    display: inline-flex;
    align-items: center;
    margin-bottom: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: var(--amber-100);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.hero-copy h1 {
    margin: 0 0 10px;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero-copy h2 {
    margin: 0 0 18px;
    font-size: clamp(24px, 3vw, 38px);
    color: var(--amber-100);
}

.hero-copy p {
    max-width: 680px;
    margin: 0 0 24px;
    color: #fff7ed;
    font-size: 18px;
}

.hero-tags,
.info-strip,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.info-strip span {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: var(--white);
    font-size: 14px;
    font-weight: 700;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 22px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-light {
    background: var(--white);
    color: var(--amber-700);
    box-shadow: 0 18px 30px rgba(17, 24, 39, 0.18);
}

.btn-ghost {
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.12);
}

.btn-primary {
    color: var(--white);
    background: linear-gradient(135deg, var(--amber-600), var(--orange-500));
    box-shadow: 0 14px 24px rgba(217, 119, 6, 0.22);
}

.hero-poster {
    position: relative;
    display: block;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.36);
    transform: rotate(2deg);
}

.hero-poster img {
    width: 100%;
    height: 480px;
    object-fit: cover;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    color: var(--white);
    background: rgba(17, 24, 39, 0.32);
    font-size: 34px;
    line-height: 1;
    transform: translateY(-50%);
}

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

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

.hero-dot {
    width: 11px;
    height: 11px;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.48);
    transition: width 0.2s ease, background 0.2s ease;
}

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

.section-wrap {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 72px 24px;
}

.section-band {
    background: linear-gradient(135deg, var(--amber-50), #fff7ed);
}

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

.section-heading span {
    background: var(--amber-100);
    color: var(--amber-700);
}

.section-heading h2 {
    margin: 0;
    color: var(--gray-800);
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.section-heading p {
    margin: 10px 0 0;
    color: var(--gray-600);
}

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

.center-heading {
    text-align: center;
}

.text-link {
    color: var(--amber-700);
    font-weight: 800;
}

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

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

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

.movie-card {
    overflow: hidden;
    background: var(--white);
    border: 1px solid rgba(229, 231, 235, 0.92);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
    border-color: var(--amber-200);
    box-shadow: var(--shadow-soft);
    transform: translateY(-8px);
}

.poster-link {
    position: relative;
    display: block;
    height: 300px;
    overflow: hidden;
    background: var(--amber-50);
}

.movie-card-small .poster-link {
    height: 230px;
}

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

.movie-card:hover .poster-link img,
.category-tile:hover img,
.rank-hero-card:hover img,
.detail-cover:hover img {
    transform: scale(1.08);
}

.poster-year {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--amber-700);
    font-size: 12px;
    font-weight: 800;
}

.card-body {
    padding: 20px;
}

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

.card-body h2 {
    margin: 0 0 8px;
    color: var(--gray-800);
    font-size: 20px;
    line-height: 1.3;
}

.movie-card-small .card-body h2 {
    overflow: hidden;
    font-size: 16px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.card-body h2:hover {
    color: var(--amber-700);
}

.card-body p {
    margin: 0 0 14px;
    color: var(--gray-600);
    font-size: 14px;
}

.card-meta {
    color: var(--gray-500);
    font-size: 13px;
}

.card-meta span {
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--gray-100);
}

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

.tag-row span {
    padding: 4px 9px;
    border-radius: 999px;
    background: var(--amber-50);
    color: var(--amber-700);
    font-size: 12px;
    font-weight: 700;
}

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

.category-tile {
    position: relative;
    min-height: 250px;
    overflow: hidden;
    border-radius: var(--radius-xl);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: var(--white);
    background: var(--gray-900);
    box-shadow: var(--shadow-card);
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.58;
    transition: transform 0.3s ease;
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.08), rgba(17, 24, 39, 0.82));
}

.category-tile span,
.category-tile em {
    position: relative;
    z-index: 2;
}

.category-tile span {
    font-size: 24px;
    font-style: normal;
    font-weight: 850;
}

.category-tile em {
    margin-top: 6px;
    color: #fffbeb;
    font-size: 14px;
    font-style: normal;
}

.two-column-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 32px;
    align-items: start;
}

.ranking-panel,
.detail-card,
.category-card-large {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
}

.ranking-panel {
    position: sticky;
    top: 92px;
    padding: 24px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 38px 58px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
    background: var(--amber-50);
    transform: translateX(4px);
}

.rank-no {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--gray-100);
    color: var(--gray-600);
    font-weight: 850;
}

.rank-gold,
.rank-silver,
.rank-bronze {
    color: var(--white);
}

.rank-gold {
    background: linear-gradient(135deg, #f59e0b, #f97316);
}

.rank-silver {
    background: linear-gradient(135deg, #9ca3af, #6b7280);
}

.rank-bronze {
    background: linear-gradient(135deg, #d97706, #92400e);
}

.rank-item img {
    width: 58px;
    height: 78px;
    border-radius: 12px;
    object-fit: cover;
}

.rank-copy {
    min-width: 0;
}

.rank-copy strong,
.rank-copy em {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-copy strong {
    color: var(--gray-800);
}

.rank-copy em {
    margin-top: 3px;
    color: var(--gray-500);
    font-size: 12px;
    font-style: normal;
}

.full-btn {
    width: 100%;
    margin-top: 18px;
}

.search-banner {
    max-width: var(--max-width);
    margin: 0 auto 72px;
    padding: 36px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: linear-gradient(135deg, var(--amber-600), var(--orange-500));
    color: var(--white);
    box-shadow: 0 22px 48px rgba(217, 119, 6, 0.24);
}

.search-banner h2 {
    margin: 0;
    font-size: clamp(24px, 4vw, 36px);
}

.page-hero {
    background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
    color: var(--white);
}

.category-hero {
    background: linear-gradient(135deg, #d97706, #f97316 55%, #fb923c);
}

.ranking-hero {
    background: linear-gradient(135deg, #991b1b, #d97706 55%, #f59e0b);
}

.search-hero {
    background: linear-gradient(135deg, #2563eb, #0891b2 55%, #f59e0b);
}

.page-hero-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 72px 24px;
}

.page-hero-inner h1 {
    margin: 0 0 14px;
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.page-hero-inner p {
    max-width: 760px;
    margin: 0;
    color: #fff7ed;
    font-size: 18px;
}

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

.category-card-large {
    overflow: hidden;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
}

.category-card-images {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    height: 100%;
    min-height: 230px;
    background: var(--amber-50);
}

.category-card-images img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-card-large div:not(.category-card-images) {
    padding: 28px;
}

.category-card-large h2 {
    margin: 0 0 10px;
    font-size: 26px;
}

.category-card-large p {
    margin: 0 0 18px;
    color: var(--gray-600);
}

.rank-hero-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 30px;
}

.rank-hero-card {
    overflow: hidden;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(8px);
}

.rank-hero-card img {
    width: 100%;
    height: 210px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.rank-hero-card strong,
.rank-hero-card span {
    display: block;
    padding: 0 16px;
}

.rank-hero-card strong {
    padding-top: 14px;
    color: var(--white);
    font-size: 18px;
}

.rank-hero-card span {
    padding-bottom: 16px;
    color: #fffbeb;
    font-size: 13px;
}

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

.search-inner {
    max-width: 980px;
}

.search-box {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin-top: 24px;
    padding: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
}

.search-box input {
    min-height: 54px;
    border: 0;
    outline: 0;
    border-radius: 999px;
    padding: 0 22px;
    color: var(--gray-800);
    background: var(--white);
}

.search-box button,
.search-chips button {
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.20);
    font-weight: 800;
    cursor: pointer;
}

.search-box button {
    padding: 0 22px;
}

.search-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.search-chips button {
    padding: 8px 14px;
}

.empty-state {
    display: none;
    padding: 72px 20px;
    text-align: center;
    color: var(--gray-600);
}

.empty-state.is-visible {
    display: block;
}

.detail-layout {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 28px 24px 72px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
    color: var(--gray-500);
    font-size: 14px;
}

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

.detail-card {
    overflow: hidden;
}

.player-shell {
    background: #000;
}

.player-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: var(--white);
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.18), rgba(17, 24, 39, 0.62));
    cursor: pointer;
}

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

.play-circle {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.play-circle span {
    width: 0;
    height: 0;
    margin-left: 6px;
    border-top: 16px solid transparent;
    border-bottom: 16px solid transparent;
    border-left: 24px solid var(--amber-600);
}

.detail-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 32px;
    padding: 34px;
}

.detail-main h1 {
    margin: 0 0 12px;
    color: var(--gray-900);
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.2;
}

.lead-text {
    margin: 0 0 20px;
    color: var(--gray-700);
    font-size: 18px;
    font-weight: 650;
}

.detail-tags {
    margin: 18px 0 26px;
}

.detail-main section {
    margin-top: 26px;
}

.detail-main h2 {
    margin: 0 0 10px;
    font-size: 24px;
}

.detail-main p {
    margin: 0;
    color: var(--gray-600);
}

.detail-cover {
    display: block;
    overflow: hidden;
    border-radius: 22px;
    box-shadow: var(--shadow-card);
}

.detail-cover img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-wrap {
    padding-left: 0;
    padding-right: 0;
}

.site-footer {
    background: linear-gradient(180deg, var(--amber-50), var(--amber-100));
    border-top: 1px solid var(--amber-200);
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 46px 24px 26px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1.4fr;
    gap: 32px;
}

.footer-inner p {
    max-width: 420px;
    color: var(--gray-600);
}

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

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}

.footer-links a {
    color: var(--gray-600);
    font-weight: 650;
}

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

.footer-links.compact a {
    font-size: 14px;
}

.footer-bottom {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 18px 24px 28px;
    color: var(--gray-600);
    font-size: 14px;
    border-top: 1px solid rgba(217, 119, 6, 0.18);
}

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

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

    .two-column-layout,
    .detail-body,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .ranking-panel {
        position: static;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .hero-panel {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 58px 22px 82px;
    }

    .hero-poster {
        max-width: 280px;
        transform: none;
    }

    .hero-poster img {
        height: 360px;
    }

    .hero-arrow {
        display: none;
    }

    .split-heading,
    .search-banner {
        align-items: flex-start;
        flex-direction: column;
    }

    .category-large-grid,
    .rank-list-large,
    .rank-hero-grid {
        grid-template-columns: 1fr;
    }

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

    .category-card-images {
        min-height: 170px;
    }

    .detail-side {
        order: -1;
        max-width: 280px;
    }
}

@media (max-width: 640px) {
    .header-inner {
        padding: 12px 16px;
    }

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

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

    .hero-copy p,
    .page-hero-inner p {
        font-size: 16px;
    }

    .section-wrap,
    .page-hero-inner,
    .detail-layout {
        padding-left: 16px;
        padding-right: 16px;
    }

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

    .poster-link,
    .movie-card-small .poster-link {
        height: 220px;
    }

    .card-body {
        padding: 14px;
    }

    .card-body h2 {
        font-size: 16px;
    }

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

    .search-box {
        grid-template-columns: 1fr;
        border-radius: 24px;
    }

    .search-box input,
    .search-box button {
        border-radius: 18px;
    }

    .detail-body {
        padding: 20px;
    }

    .detail-cover img {
        height: 340px;
    }

    .footer-inner {
        padding-left: 16px;
        padding-right: 16px;
    }
}
