:root {
    --color-amber-50: #fffbeb;
    --color-amber-100: #fef3c7;
    --color-amber-400: #fbbf24;
    --color-amber-500: #f59e0b;
    --color-amber-600: #d97706;
    --color-orange-500: #f97316;
    --color-orange-600: #ea580c;
    --color-gray-50: #f9fafb;
    --color-gray-100: #f3f4f6;
    --color-gray-200: #e5e7eb;
    --color-gray-500: #6b7280;
    --color-gray-600: #4b5563;
    --color-gray-700: #374151;
    --color-gray-800: #1f2937;
    --color-gray-900: #111827;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 10px 20px rgba(15, 23, 42, 0.10);
    --shadow-xl: 0 24px 50px rgba(15, 23, 42, 0.20);
    --radius-lg: 18px;
    --radius-xl: 26px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--color-gray-800);
    background: linear-gradient(180deg, #ffffff 0%, var(--color-gray-50) 45%, #ffffff 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(90deg, var(--color-amber-600), var(--color-orange-500));
    box-shadow: 0 14px 30px rgba(234, 88, 12, 0.22);
}

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

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

.logo-mark {
    display: inline-grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 12px;
    color: var(--color-amber-600);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.logo-text {
    font-size: 20px;
}

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

.nav-link {
    position: relative;
    font-size: 15px;
    opacity: 0.92;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-link::after {
    position: absolute;
    right: 0;
    bottom: -10px;
    left: 0;
    height: 3px;
    content: "";
    border-radius: 999px;
    background: #ffffff;
    opacity: 0;
    transform: scaleX(0.4);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.nav-link.active::after,
.nav-link:hover::after {
    opacity: 1;
    transform: scaleX(1);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.14);
}

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

.mobile-nav {
    display: none;
    padding: 0 16px 16px;
}

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

.mobile-nav-link {
    padding: 11px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.12);
}

.mobile-nav-link.active {
    color: var(--color-amber-100);
    font-weight: 700;
}

.hero {
    position: relative;
    height: 70vh;
    min-height: 560px;
    overflow: hidden;
    background: #000000;
}

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

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

.hero-slide > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.05);
    transform: scale(1.03);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 80% 35%, rgba(245, 158, 11, 0.42), transparent 34%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.72) 38%, rgba(0, 0, 0, 0.24) 100%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.66), transparent 45%);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 360px;
    gap: 48px;
    align-items: center;
    color: #ffffff;
}

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

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    color: #7c2d12;
    background: var(--color-amber-100);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy h1 {
    max-width: 780px;
    margin: 0 0 18px;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 0.98;
    letter-spacing: -0.05em;
    text-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
}

.hero-copy p {
    max-width: 700px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(17px, 2.2vw, 22px);
}

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

.hero-tags span,
.chip-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    color: #92400e;
    background: #fff7ed;
    font-size: 13px;
    font-weight: 700;
}

.hero-tags span {
    padding: 7px 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(16px);
}

.chip-row span {
    padding: 5px 10px;
}

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

.primary-button,
.ghost-button,
.side-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    color: #ffffff;
    background: linear-gradient(90deg, var(--color-amber-500), var(--color-orange-600));
    box-shadow: 0 14px 28px rgba(234, 88, 12, 0.32);
}

.ghost-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(14px);
}

.ghost-button.light {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.42);
}

.primary-button:hover,
.ghost-button:hover,
.side-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.18);
}

.hero-poster {
    position: relative;
    overflow: hidden;
    border: 6px solid rgba(255, 255, 255, 0.18);
    border-radius: 30px;
    box-shadow: var(--shadow-xl);
    transform: rotate(1.5deg);
}

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

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.48);
    font-size: 34px;
    line-height: 1;
    transform: translateY(-50%);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

.hero-dots {
    position: absolute;
    right: 0;
    bottom: 34px;
    left: 0;
    z-index: 6;
    display: flex;
    justify-content: center;
    gap: 8px;
}

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

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

.quick-search-panel {
    display: grid;
    grid-template-columns: 1fr minmax(240px, 340px);
    gap: 18px 28px;
    align-items: center;
    margin-top: -44px;
    padding: 24px;
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(18px);
}

.quick-search-panel h2 {
    margin: 0 0 4px;
    font-size: 26px;
}

.quick-search-panel p {
    margin: 0;
    color: var(--color-gray-600);
}

.search-box,
.inline-search {
    display: grid;
    gap: 6px;
    font-weight: 800;
}

.search-box input,
.inline-search input {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--color-gray-200);
    border-radius: 999px;
    outline: none;
    padding: 0 18px;
    color: var(--color-gray-800);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.search-box input:focus,
.inline-search input:focus {
    border-color: var(--color-amber-500);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.quick-category-links {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quick-category-links a {
    padding: 8px 13px;
    border-radius: 999px;
    color: #92400e;
    background: var(--color-amber-100);
    font-weight: 700;
}

.section-block {
    margin-top: 64px;
}

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

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

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

.compact-heading {
    margin-bottom: 18px;
}

.highlight-block {
    padding: clamp(22px, 4vw, 44px);
    border-radius: 32px;
    background: linear-gradient(135deg, var(--color-amber-50), #fff7ed);
    box-shadow: var(--shadow-md);
}

.movie-grid {
    display: grid;
    gap: 20px;
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.poster-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: var(--color-gray-200);
}

.movie-card.compact .poster-wrap {
    aspect-ratio: 16 / 10;
}

.movie-card.featured .poster-wrap {
    aspect-ratio: 4 / 3;
}

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

.movie-card:hover .poster-wrap img,
.horizontal-card:hover img,
.category-tile:hover img {
    transform: scale(1.07);
}

.poster-gradient {
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent);
}

.play-dot {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: var(--color-amber-500);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.28);
}

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-amber-500), var(--color-orange-600));
    font-size: 12px;
    font-weight: 900;
}

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

.movie-card h3,
.horizontal-card h3 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.35;
}

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

.movie-card h3 a,
.horizontal-card h3 a {
    transition: color 0.2s ease;
}

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

.movie-card p,
.horizontal-card p {
    display: -webkit-box;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--color-gray-600);
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

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

.movie-card .chip-row {
    margin-top: 12px;
}

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

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

.category-tile {
    overflow: hidden;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.category-covers {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    grid-template-rows: 110px 110px;
    gap: 4px;
    overflow: hidden;
    background: var(--color-gray-200);
}

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

.category-covers img:first-child {
    grid-row: 1 / 3;
}

.category-tile-body {
    padding: 20px;
}

.category-tile-body h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

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

.category-tile-body span {
    color: var(--color-amber-600);
    font-weight: 800;
}

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

.ranking-panel,
.side-card,
.detail-card {
    border-radius: 26px;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

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

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

.wide-ranking-list {
    gap: 18px;
}

.horizontal-card {
    position: relative;
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 16px;
    overflow: hidden;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.horizontal-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.horizontal-cover {
    overflow: hidden;
    min-height: 112px;
}

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

.horizontal-info {
    position: relative;
    padding: 16px 16px 16px 0;
}

.rank-number {
    display: inline-flex;
    min-width: 38px;
    height: 28px;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    border-radius: 999px;
    color: #ffffff;
    background: var(--color-gray-900);
    font-size: 13px;
    font-weight: 900;
}

.page-hero {
    padding: 76px 0;
    color: #ffffff;
    background:
        radial-gradient(circle at 78% 20%, rgba(251, 191, 36, 0.40), transparent 26%),
        linear-gradient(135deg, var(--color-gray-900), #7c2d12 55%, var(--color-orange-600));
}

.soft-hero {
    color: var(--color-gray-900);
    background:
        radial-gradient(circle at 85% 12%, rgba(251, 191, 36, 0.38), transparent 24%),
        linear-gradient(135deg, var(--color-amber-50), #ffffff);
}

.page-hero h1 {
    max-width: 820px;
    margin: 0 0 14px;
    font-size: clamp(38px, 6vw, 64px);
    line-height: 1;
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    font-size: 18px;
    opacity: 0.9;
}

.page-actions {
    margin-top: 26px;
}

.sticky-tools {
    position: sticky;
    top: 80px;
    z-index: 10;
    align-items: center;
    padding: 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(14px);
}

.inline-search {
    min-width: 280px;
}

.movie-detail-top {
    padding: 24px 0 0;
    background: linear-gradient(180deg, var(--color-gray-900) 0, var(--color-gray-900) 450px, var(--color-gray-50) 450px);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
}

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

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

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000000;
    box-shadow: var(--shadow-xl);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    gap: 14px;
    place-items: center;
    align-content: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.64), rgba(0, 0, 0, 0.18));
    font-size: 18px;
    font-weight: 900;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay.is-hidden {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.play-icon {
    display: grid;
    width: 78px;
    height: 78px;
    place-items: center;
    padding-left: 4px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--color-amber-500), var(--color-orange-600));
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.36);
}

.detail-card {
    margin-top: 24px;
    padding: clamp(22px, 4vw, 34px);
}

.detail-card h1 {
    margin: 0 0 12px;
    font-size: clamp(32px, 5vw, 48px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

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

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

.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--color-gray-700);
    background: var(--color-gray-100);
    font-weight: 700;
}

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

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

.detail-card p {
    color: var(--color-gray-700);
    font-size: 16px;
}

.detail-sidebar {
    position: sticky;
    top: 92px;
}

.detail-poster {
    display: block;
    overflow: hidden;
    border-radius: 26px;
    box-shadow: var(--shadow-xl);
}

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

.side-card {
    margin-top: 18px;
    padding: 22px;
}

.side-card h2 {
    margin: 0 0 14px;
    font-size: 22px;
}

.side-card dl {
    display: grid;
    gap: 10px;
    margin: 0 0 18px;
}

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

.side-card dd {
    margin: -8px 0 0;
    font-weight: 800;
}

.side-button {
    width: 100%;
    color: #ffffff;
    background: linear-gradient(90deg, var(--color-amber-500), var(--color-orange-600));
}

.site-footer {
    margin-top: 80px;
    color: #d1d5db;
    background: linear-gradient(90deg, var(--color-gray-800), var(--color-gray-900));
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 28px;
    padding: 44px 0;
}

.site-footer h2 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: 18px;
}

.site-footer p {
    margin: 0;
    color: #d1d5db;
}

.site-footer a {
    display: block;
    width: fit-content;
    margin: 0 0 8px;
    color: #d1d5db;
}

.site-footer a:hover {
    color: var(--color-amber-400);
}

.footer-bottom {
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
}

.hidden-by-search {
    display: none !important;
}

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

    .hero-content {
        grid-template-columns: 1fr 280px;
    }

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

    .ranking-panel,
    .detail-sidebar {
        position: static;
    }
}

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

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

    .hero {
        min-height: 620px;
        height: auto;
    }

    .hero-content {
        position: absolute;
        padding-top: 34px;
        padding-bottom: 68px;
        grid-template-columns: 1fr;
        gap: 22px;
        align-content: center;
    }

    .hero-poster {
        display: none;
    }

    .hero-arrow {
        display: none;
    }

    .quick-search-panel {
        grid-template-columns: 1fr;
        margin-top: -20px;
    }

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

    .section-heading,
    .sticky-tools {
        align-items: flex-start;
        flex-direction: column;
    }

    .inline-search {
        width: 100%;
        min-width: 0;
    }

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

@media (max-width: 560px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

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

    .compact-grid,
    .featured-grid,
    .standard-grid,
    .category-grid,
    .large-category-grid {
        grid-template-columns: 1fr;
    }

    .horizontal-card {
        grid-template-columns: 126px minmax(0, 1fr);
        gap: 12px;
    }

    .horizontal-info {
        padding: 12px 12px 12px 0;
    }

    .category-covers {
        grid-template-rows: 90px 90px;
    }

    .movie-detail-top {
        background: linear-gradient(180deg, var(--color-gray-900) 0, var(--color-gray-900) 320px, var(--color-gray-50) 320px);
    }

    .play-icon {
        width: 60px;
        height: 60px;
    }
}
