:root {
    --yellow: #facc15;
    --yellow-deep: #f59e0b;
    --orange: #fb923c;
    --orange-deep: #ea580c;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --soft: #fff7ed;
    --white: #ffffff;
    --shadow: 0 18px 50px rgba(17, 24, 39, 0.12);
    --shadow-soft: 0 10px 30px rgba(17, 24, 39, 0.08);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: linear-gradient(180deg, #fffbeb 0%, #ffffff 48%, #fff7ed 100%);
    min-width: 320px;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: linear-gradient(90deg, #facc15 0%, #fb923c 52%, #f59e0b 100%);
    box-shadow: 0 12px 35px rgba(217, 119, 6, 0.24);
}

.header-inner {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

.brand-text {
    color: #ffffff;
    font-size: 24px;
    line-height: 1;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

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

.nav-link:hover,
.nav-link.is-active {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    border: 0;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    width: 42px;
    height: 42px;
    font-size: 24px;
}

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

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

.mobile-link {
    color: #ffffff;
    padding: 11px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.16);
    font-weight: 700;
}

.page-bg,
.detail-bg {
    min-height: 70vh;
    background: radial-gradient(circle at top left, rgba(250, 204, 21, 0.28), transparent 32%), linear-gradient(180deg, #fffbeb 0%, #ffffff 48%, #fff7ed 100%);
}

.home-stack,
.page-stack,
.detail-stack {
    padding: 32px 0 72px;
}

.home-stack,
.page-stack {
    display: grid;
    gap: 56px;
}

.hero-slider {
    height: 590px;
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    box-shadow: var(--shadow);
    background: #111827;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transform: scale(1.02);
    transition: opacity 0.6s ease, visibility 0.6s ease, transform 0.8s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.76) 0%, rgba(0, 0, 0, 0.54) 45%, rgba(0, 0, 0, 0.12) 100%);
}

.hero-copy {
    position: absolute;
    left: clamp(24px, 7vw, 78px);
    top: 50%;
    transform: translateY(-50%);
    width: min(620px, calc(100% - 48px));
    color: #ffffff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    color: #111827;
    background: var(--yellow);
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 10px 28px rgba(250, 204, 21, 0.24);
}

.hero-copy h1,
.page-hero h1 {
    margin: 18px 0 16px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -0.06em;
}

.hero-copy p,
.page-hero p {
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.75;
}

.hero-tags,
.detail-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.pill,
.badge-strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 5px 12px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #374151;
    font-size: 13px;
    font-weight: 700;
}

.badge-strong {
    background: var(--yellow);
    color: #111827;
}

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

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

.primary-button,
.filter-bar button {
    background: var(--yellow);
    color: #111827;
    box-shadow: 0 12px 30px rgba(250, 204, 21, 0.32);
}

.primary-button:hover,
.filter-bar button:hover,
.mini-button:hover {
    transform: translateY(-2px);
    background: #f59e0b;
}

.ghost-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(10px);
}

.ghost-button.light {
    color: #111827;
    background: #ffffff;
    border-color: #f3f4f6;
}

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

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.72);
}

.hero-arrow.prev {
    left: 18px;
}

.hero-arrow.next {
    right: 18px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 26px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
}

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

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

.content-section,
.detail-card,
.related-panel,
.player-card {
    background: rgba(255, 255, 255, 0.88);
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255, 255, 255, 0.74);
}

.content-section {
    padding: clamp(24px, 4vw, 44px);
}

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

.section-heading.centered {
    text-align: center;
    display: block;
}

.section-heading h2,
.related-panel h2,
.detail-card h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.14;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.section-heading p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.section-link,
.mini-button {
    background: #111827;
    color: #ffffff;
}

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

.movie-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border-radius: 20px;
    background: #ffffff;
    color: var(--ink);
    box-shadow: 0 8px 22px rgba(17, 24, 39, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 18px 42px rgba(17, 24, 39, 0.18);
}

.card-image {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: #111827;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.card-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.62) 100%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.movie-card:hover .card-gradient {
    opacity: 1;
}

.card-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--yellow);
    color: #111827;
    font-size: 12px;
    font-weight: 900;
}

.rank-badge {
    left: auto;
    right: 12px;
    min-width: 34px;
    text-align: center;
    background: #111827;
    color: #ffffff;
}

.card-body {
    display: grid;
    gap: 9px;
    padding: 16px;
}

.card-body strong {
    font-size: 18px;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.movie-card:hover .card-body strong {
    color: #d97706;
}

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

.card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    font-size: 12px;
    font-style: normal;
}

.card-meta em {
    font-style: normal;
}

.masonry-grid {
    columns: 4 220px;
    column-gap: 22px;
}

.movie-card.masonry {
    display: inline-flex;
    width: 100%;
    margin: 0 0 22px;
    break-inside: avoid;
}

.movie-card.masonry:nth-child(3n + 1) .card-image {
    aspect-ratio: 1 / 1.24;
}

.movie-card.masonry:nth-child(3n + 2) .card-image {
    aspect-ratio: 1 / 1.42;
}

.rail-section {
    background: linear-gradient(135deg, rgba(254, 243, 199, 0.95), rgba(255, 237, 213, 0.95));
}

.rail-buttons {
    display: flex;
    gap: 10px;
}

.rail-buttons button {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: #ffffff;
    color: #111827;
    font-size: 28px;
    box-shadow: 0 8px 22px rgba(17, 24, 39, 0.12);
}

.movie-rail {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    padding: 4px 4px 18px;
    scrollbar-width: none;
}

.movie-rail::-webkit-scrollbar {
    display: none;
}

.movie-card.rail {
    flex: 0 0 290px;
}

.movie-card.rail .card-image {
    aspect-ratio: 16 / 9;
}

.editor-list,
.related-list {
    display: grid;
    gap: 16px;
}

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

.compact-card {
    display: grid;
    grid-template-columns: auto 92px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(17, 24, 39, 0.07);
    transition: background 0.2s ease, transform 0.2s ease;
}

.compact-card:hover {
    background: #fffbeb;
    transform: translateY(-2px);
}

.compact-card img {
    width: 92px;
    height: 92px;
    border-radius: 14px;
    object-fit: cover;
    background: #111827;
}

.compact-card span:not(.list-rank) {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.compact-card strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compact-card em,
.compact-card small {
    color: var(--muted);
    font-style: normal;
    line-height: 1.45;
}

.compact-card small {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.list-rank {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: #111827;
    color: #ffffff;
    font-weight: 900;
}

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

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

.category-tile {
    display: grid;
    gap: 10px;
    padding: 24px;
    border-radius: 20px;
    background: linear-gradient(135deg, #fef3c7, #ffedd5);
    box-shadow: 0 8px 20px rgba(217, 119, 6, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 16px 36px rgba(217, 119, 6, 0.22);
}

.category-tile span {
    font-size: 34px;
}

.category-tile strong {
    font-size: 20px;
}

.category-tile em {
    color: #6b7280;
    font-style: normal;
    line-height: 1.6;
}

.page-hero {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    padding: clamp(34px, 7vw, 80px);
    color: #ffffff;
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.96), rgba(180, 83, 9, 0.88)), radial-gradient(circle at top right, rgba(250, 204, 21, 0.42), transparent 32%);
    box-shadow: var(--shadow);
}

.compact-hero h1 {
    max-width: 780px;
}

.compact-hero p {
    max-width: 760px;
}

.compact-actions {
    margin-top: 28px;
}

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

.category-card-large {
    position: relative;
    min-height: 245px;
    overflow: hidden;
    border-radius: 24px;
    background: #111827;
    box-shadow: var(--shadow-soft);
}

.category-card-large img {
    width: 100%;
    height: 100%;
    min-height: 245px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-card-large:hover img {
    transform: scale(1.08);
}

.category-cover {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.75) 100%);
}

.category-card-content {
    position: absolute;
    inset: auto 20px 20px;
    display: grid;
    gap: 8px;
    color: #ffffff;
}

.category-card-content em {
    width: max-content;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--yellow);
    color: #111827;
    font-style: normal;
    font-weight: 900;
}

.category-card-content strong {
    font-size: 26px;
    line-height: 1.1;
}

.category-card-content small {
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.82);
}

.filter-bar {
    display: grid;
    grid-template-columns: 2fr repeat(3, minmax(140px, 1fr)) auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 26px;
}

.filter-bar label {
    display: grid;
    gap: 7px;
    color: #6b7280;
    font-size: 13px;
    font-weight: 800;
}

.filter-bar input,
.filter-bar select {
    width: 100%;
    height: 46px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #ffffff;
    color: #111827;
    padding: 0 14px;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--yellow-deep);
    box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.18);
}

.filter-state,
.empty-state {
    margin: 12px 0 0;
    color: var(--muted);
}

.empty-state {
    text-align: center;
    padding: 40px 0;
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 52px 120px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 16px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.ranking-number {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #111827;
    background: var(--yellow);
    font-size: 18px;
    font-weight: 900;
}

.ranking-poster img {
    width: 120px;
    height: 86px;
    object-fit: cover;
    border-radius: 16px;
    background: #111827;
}

.ranking-info {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.ranking-title {
    font-size: 20px;
    font-weight: 900;
}

.ranking-info p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
    color: #6b7280;
    font-size: 14px;
}

.breadcrumb a {
    color: #b45309;
    font-weight: 800;
}

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

.detail-main {
    display: grid;
    gap: 22px;
}

.player-card {
    overflow: hidden;
    padding: 0;
    background: #000000;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000000;
    aspect-ratio: 16 / 9;
}

.movie-player {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
    object-fit: contain;
}

.player-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    color: #ffffff;
    border: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.62));
    font-weight: 900;
    font-size: 18px;
}

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

.play-icon {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    padding-left: 6px;
    background: var(--yellow);
    color: #111827;
    font-size: 34px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
    transition: transform 0.2s ease;
}

.player-start:hover .play-icon {
    transform: scale(1.08);
}

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

.detail-card h1 {
    margin: 18px 0 14px;
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.detail-one-line {
    margin: 0 0 18px;
    color: #374151;
    font-size: 19px;
    line-height: 1.75;
    font-weight: 700;
}

.detail-meta,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.detail-meta {
    margin: 18px 0;
    color: var(--muted);
}

.detail-card h2 {
    margin: 30px 0 12px;
    font-size: 26px;
}

.detail-card p {
    color: #374151;
    line-height: 1.9;
    font-size: 16px;
    white-space: pre-line;
}

.related-panel {
    position: sticky;
    top: 88px;
    padding: 22px;
}

.related-panel h2 {
    font-size: 26px;
    margin-bottom: 18px;
}

.related-panel .compact-card {
    grid-template-columns: 82px minmax(0, 1fr);
}

.related-panel .compact-card img {
    width: 82px;
    height: 82px;
}

.site-footer {
    background: linear-gradient(180deg, #111827, #000000);
    color: #ffffff;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 34px;
    padding: 48px 0;
}

.footer-brand {
    color: #ffffff;
    font-size: 22px;
}

.site-footer p,
.site-footer a,
.site-footer li {
    color: #cbd5e1;
    line-height: 1.7;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: var(--yellow);
    font-size: 18px;
}

.site-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    text-align: center;
    color: #94a3b8;
    padding: 18px 16px;
}

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

    .menu-toggle {
        display: grid;
        place-items: center;
    }

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

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

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

    .filter-bar .search-field {
        grid-column: 1 / -1;
    }

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

    .related-panel {
        position: static;
    }
}

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

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

    .hero-slider {
        height: 540px;
        border-radius: 22px;
    }

    .hero-copy {
        top: auto;
        bottom: 82px;
        transform: none;
    }

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

    .hero-arrow {
        display: none;
    }

    .content-section,
    .detail-card,
    .related-panel {
        border-radius: 20px;
        padding: 20px;
    }

    .section-heading {
        display: grid;
        gap: 14px;
    }

    .movie-grid,
    .category-grid,
    .ranking-grid,
    .category-grid.large,
    .editor-list,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .filter-bar {
        grid-template-columns: 1fr;
    }

    .ranking-row {
        grid-template-columns: 42px 86px minmax(0, 1fr);
        gap: 12px;
    }

    .ranking-poster img {
        width: 86px;
        height: 86px;
    }

    .ranking-row .mini-button {
        grid-column: 1 / -1;
    }

    .compact-card {
        grid-template-columns: 82px minmax(0, 1fr);
    }

    .compact-card .list-rank {
        display: none;
    }

    .compact-card img {
        width: 82px;
        height: 82px;
    }

    .hero-actions {
        gap: 10px;
    }

    .primary-button,
    .ghost-button {
        flex: 1 1 auto;
    }
}
