:root {
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-200: #fde68a;
    --amber-300: #fcd34d;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --amber-700: #b45309;
    --amber-800: #92400e;
    --amber-900: #78350f;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-500: #6b7280;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-soft: 0 12px 34px rgba(120, 53, 15, 0.12);
    --shadow-strong: 0 24px 70px rgba(17, 24, 39, 0.28);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--gray-900);
    background: linear-gradient(180deg, var(--amber-50), var(--white));
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 251, 235, 0.94);
    border-bottom: 1px solid var(--amber-200);
    box-shadow: 0 6px 20px rgba(120, 53, 15, 0.08);
    backdrop-filter: blur(14px);
}

.nav-wrap {
    height: 68px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--amber-900);
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.brand {
    font-size: 22px;
}

.brand-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(135deg, var(--amber-500), var(--amber-800));
    box-shadow: 0 8px 20px rgba(217, 119, 6, 0.28);
    font-size: 16px;
}

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

.nav-link {
    color: var(--amber-800);
    font-weight: 650;
    transition: color 0.2s ease;
    white-space: nowrap;
}

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

.header-search {
    display: flex;
    align-items: center;
    min-width: 286px;
}

.header-search input,
.mobile-panel input,
.search-panel input,
.filter-card input {
    width: 100%;
    border: 1px solid var(--amber-300);
    outline: none;
    color: var(--gray-800);
    background: var(--white);
}

.header-search input {
    height: 40px;
    padding: 0 14px;
    border-radius: 10px 0 0 10px;
}

.header-search button,
.mobile-panel button,
.search-panel button {
    border: 0;
    color: var(--white);
    background: var(--amber-600);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.header-search button {
    height: 40px;
    padding: 0 16px;
    border-radius: 0 10px 10px 0;
}

.header-search button:hover,
.mobile-panel button:hover,
.search-panel button:hover {
    background: var(--amber-700);
}

.mobile-toggle {
    display: none;
    border: 0;
    background: transparent;
    color: var(--amber-800);
    font-size: 28px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--amber-200);
    padding: 16px;
    background: var(--amber-50);
}

.mobile-panel.is-open {
    display: grid;
    gap: 12px;
}

.mobile-panel a {
    color: var(--amber-800);
    font-weight: 700;
}

.mobile-panel form {
    display: flex;
}

.mobile-panel input {
    padding: 11px 13px;
    border-radius: 10px 0 0 10px;
}

.mobile-panel button {
    padding: 0 16px;
    border-radius: 0 10px 10px 0;
}

.hero {
    position: relative;
    height: 70vh;
    min-height: 520px;
    overflow: hidden;
    background: var(--gray-900);
}

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

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.67), rgba(0, 0, 0, 0.08));
}

.hero-copy {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 780px;
    color: var(--white);
}

.eyebrow {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--amber-300);
    font-weight: 800;
    letter-spacing: 0.08em;
}

.hero-copy h1,
.small-hero h1 {
    margin: 0 0 18px;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.06;
    font-weight: 900;
}

.hero-copy p {
    max-width: 680px;
    margin: 0 0 26px;
    color: #e5e7eb;
    font-size: 19px;
    line-height: 1.8;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 30px;
}

.hero-meta span,
.detail-tags span,
.card-tags span,
.category-pill {
    border-radius: 999px;
    background: var(--amber-100);
    color: var(--amber-800);
    font-weight: 700;
}

.hero-meta span {
    padding: 8px 13px;
    color: var(--amber-900);
}

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

.primary-btn,
.ghost-btn,
.outline-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, border 0.2s ease;
}

.primary-btn {
    min-width: 138px;
    padding: 15px 24px;
    color: var(--white);
    background: var(--amber-600);
    box-shadow: 0 14px 34px rgba(217, 119, 6, 0.32);
}

.primary-btn:hover {
    background: var(--amber-700);
    transform: translateY(-2px) scale(1.02);
}

.ghost-btn {
    padding: 14px 22px;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.08);
}

.ghost-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-2px);
}

.outline-btn {
    padding: 11px 18px;
    color: var(--amber-700);
    border: 2px solid var(--amber-300);
    background: var(--white);
}

.outline-btn:hover {
    border-color: var(--amber-500);
    background: var(--amber-50);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.5);
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.72);
    transform: translateY(-50%) scale(1.08);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

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

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

.main-layout,
.page-shell,
.detail-content {
    padding: 56px 0;
}

.content-section {
    margin-bottom: 58px;
}

.section-title,
.category-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
}

.section-title h2,
.category-head h2 {
    margin: 0;
    color: var(--gray-900);
    font-size: clamp(25px, 3vw, 34px);
    font-weight: 900;
}

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

.section-title.light h2,
.section-title.light a {
    color: var(--white);
}

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

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

.movie-grid.compact,
.rail-grid {
    gap: 18px;
}

.movie-card {
    display: block;
    overflow: hidden;
    border-radius: 16px;
    background: var(--white);
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 50px rgba(120, 53, 15, 0.2);
}

.card-poster {
    position: relative;
    display: block;
    height: 256px;
    overflow: hidden;
    background: var(--gray-200);
}

.movie-card-large .card-poster {
    height: 310px;
}

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

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

.card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0);
    opacity: 0;
    transition: background 0.25s ease, opacity 0.25s ease;
}

.movie-card:hover .card-overlay {
    opacity: 1;
    background: rgba(0, 0, 0, 0.42);
}

.play-dot,
.player-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--white);
    background: var(--amber-600);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.play-dot {
    width: 56px;
    height: 56px;
    font-size: 24px;
    padding-left: 4px;
}

.rating-badge {
    position: absolute;
    right: 12px;
    top: 12px;
    padding: 6px 9px;
    border-radius: 8px;
    color: var(--white);
    background: var(--amber-600);
    font-size: 13px;
    font-weight: 800;
}

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

.card-body strong {
    min-height: 46px;
    color: var(--gray-900);
    font-size: 17px;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.movie-card:hover .card-body strong {
    color: var(--amber-600);
}

.card-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--gray-500);
    font-size: 14px;
}

.card-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.card-tags span {
    padding: 5px 8px;
    font-size: 12px;
}

.warm-block,
.category-overview {
    padding: 34px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--amber-100), #ffedd5);
    box-shadow: var(--shadow-soft);
}

.dark-block {
    padding: 34px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--amber-900), #7c2d12);
    box-shadow: var(--shadow-strong);
}

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

.year-card {
    display: grid;
    gap: 8px;
    padding: 26px;
    border: 2px solid var(--amber-200);
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow-soft);
    transition: transform 0.22s ease, border 0.22s ease;
}

.year-card:hover {
    border-color: var(--amber-500);
    transform: translateY(-4px);
}

.year-card strong {
    color: var(--amber-600);
    font-size: 28px;
}

.year-card span,
.category-head p,
.small-hero p {
    color: var(--gray-500);
}

.small-hero {
    padding: 48px;
    margin-bottom: 34px;
    border-radius: 28px;
    background: linear-gradient(135deg, var(--amber-900), #9a3412 48%, var(--amber-600));
    color: var(--white);
    box-shadow: var(--shadow-strong);
}

.small-hero h1 {
    font-size: clamp(34px, 5vw, 54px);
}

.small-hero p {
    max-width: 760px;
    margin: 0;
    color: #ffedd5;
    font-size: 18px;
    line-height: 1.8;
}

.crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 22px;
    color: var(--amber-700);
    font-weight: 700;
}

.crumbs.dark {
    color: var(--amber-200);
}

.filter-card,
.search-panel {
    display: grid;
    gap: 14px;
    padding: 24px;
    margin-bottom: 28px;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.filter-card label {
    color: var(--gray-800);
    font-weight: 800;
}

.filter-card input,
.search-panel input {
    min-height: 48px;
    padding: 0 16px;
    border-radius: 12px;
}

.search-panel {
    grid-template-columns: minmax(0, 1fr) auto;
}

.search-panel button {
    min-width: 126px;
    min-height: 48px;
    border-radius: 12px;
}

.category-grid {
    align-items: stretch;
}

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

.rank-card {
    display: grid;
    grid-template-columns: 64px 96px minmax(0, 1fr) 72px;
    gap: 18px;
    align-items: center;
    padding: 16px;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow-soft);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.rank-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(120, 53, 15, 0.18);
}

.rank-number {
    color: var(--amber-600);
    font-size: 30px;
    font-weight: 900;
    text-align: center;
}

.rank-card img {
    width: 96px;
    height: 128px;
    border-radius: 12px;
    object-fit: cover;
}

.rank-info {
    display: grid;
    gap: 8px;
}

.rank-info strong {
    font-size: 20px;
}

.rank-info span {
    color: var(--gray-500);
}

.rank-info em {
    color: var(--gray-700);
    font-style: normal;
    line-height: 1.6;
}

.rank-score {
    color: var(--white);
    background: var(--amber-600);
    padding: 9px 12px;
    border-radius: 999px;
    font-weight: 900;
    text-align: center;
}

.detail-page {
    background: linear-gradient(180deg, var(--gray-900), var(--gray-800) 420px, var(--amber-50) 421px, var(--white));
}

.player-area {
    padding: 34px 0 20px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #000000;
    box-shadow: var(--shadow-strong);
    aspect-ratio: 16 / 9;
}

.player-shell video,
.player-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.player-shell video {
    object-fit: contain;
    background: #000000;
}

.player-cover {
    border: 0;
    padding: 0;
    cursor: pointer;
    z-index: 2;
    overflow: hidden;
    background: #000000;
}

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

.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.56;
}

.player-button {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 88px;
    height: 88px;
    padding-left: 7px;
    font-size: 38px;
    transform: translate(-50%, -50%);
    transition: transform 0.22s ease, background 0.22s ease;
}

.player-cover:hover .player-button {
    background: var(--amber-700);
    transform: translate(-50%, -50%) scale(1.08);
}

.detail-content {
    padding-top: 36px;
}

.movie-detail-card {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 32px;
    padding: 34px;
    margin-bottom: 42px;
    border-radius: 26px;
    background: linear-gradient(180deg, var(--amber-50), var(--white));
    box-shadow: var(--shadow-soft);
}

.detail-poster {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    align-self: start;
    box-shadow: 0 18px 44px rgba(17, 24, 39, 0.16);
}

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

.detail-poster span {
    position: absolute;
    right: 14px;
    top: 14px;
    padding: 8px 12px;
    border-radius: 10px;
    color: var(--white);
    background: var(--amber-600);
    font-weight: 900;
}

.detail-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.14;
    font-weight: 900;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    color: var(--gray-700);
    font-weight: 700;
}

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

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

.detail-tags span {
    padding: 8px 12px;
}

.detail-copy h2 {
    margin: 26px 0 12px;
    font-size: 24px;
}

.detail-copy p {
    color: var(--gray-700);
    font-size: 17px;
    line-height: 1.85;
}

.review-box {
    padding: 22px;
    margin-top: 24px;
    border-radius: 18px;
    background: var(--white);
    box-shadow: 0 10px 28px rgba(120, 53, 15, 0.08);
}

.site-footer {
    color: var(--amber-50);
    background: var(--amber-900);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 38px;
    padding: 46px 0;
}

.footer-brand {
    margin-bottom: 14px;
    color: var(--amber-50);
    font-size: 20px;
}

.site-footer p {
    max-width: 560px;
    color: var(--amber-200);
    line-height: 1.8;
}

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

.site-footer a {
    display: block;
    margin-bottom: 10px;
    color: var(--amber-200);
    transition: color 0.2s ease;
}

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

.footer-bottom {
    padding: 20px 16px;
    border-top: 1px solid rgba(253, 230, 138, 0.2);
    color: var(--amber-200);
    text-align: center;
}

.back-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 30;
    display: none;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: var(--amber-600);
    box-shadow: var(--shadow-soft);
    cursor: pointer;
}

.back-top.is-visible {
    display: block;
}

[hidden] {
    display: none !important;
}

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

    .mobile-toggle {
        display: block;
        margin-left: auto;
    }

    .header-search {
        display: none;
    }

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

@media (max-width: 820px) {
    .hero {
        min-height: 620px;
    }

    .hero-copy {
        padding-right: 46px;
    }

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

    .featured-grid,
    .movie-grid,
    .rail-grid,
    .year-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .detail-poster {
        max-width: 320px;
    }

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

    .rank-card {
        grid-template-columns: 46px 78px minmax(0, 1fr);
    }

    .rank-score {
        grid-column: 3;
        width: fit-content;
    }
}

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

    .brand {
        font-size: 19px;
    }

    .hero {
        height: 78vh;
        min-height: 580px;
    }

    .hero-copy {
        padding-right: 0;
    }

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

    .hero-arrow {
        display: none;
    }

    .featured-grid,
    .movie-grid,
    .rail-grid,
    .year-grid {
        grid-template-columns: 1fr;
    }

    .warm-block,
    .dark-block,
    .category-overview,
    .small-hero,
    .movie-detail-card {
        padding: 22px;
        border-radius: 20px;
    }

    .section-title,
    .category-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .card-poster,
    .movie-card-large .card-poster {
        height: 300px;
    }

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

    .rank-card {
        grid-template-columns: 40px 70px minmax(0, 1fr);
        gap: 12px;
        padding: 12px;
    }

    .rank-card img {
        width: 70px;
        height: 96px;
    }

    .rank-info em {
        display: none;
    }
}
