:root {
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-200: #fde68a;
    --amber-300: #fcd34d;
    --amber-400: #fbbf24;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --amber-700: #b45309;
    --amber-800: #92400e;
    --amber-900: #78350f;
    --ink: #111827;
    --muted: #6b7280;
    --paper: #ffffff;
    --soft: #fff7ed;
    --shadow: 0 20px 55px rgba(120, 53, 15, 0.16);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: linear-gradient(180deg, var(--amber-50) 0%, #fff 48%, #fff7ed 100%);
    color: var(--ink);
}

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

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

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: background 0.3s ease, box-shadow 0.3s ease, border 0.3s ease;
}

.site-header.is-scrolled,
.site-header:hover {
    background: linear-gradient(90deg, rgba(255, 251, 235, 0.96), rgba(254, 252, 232, 0.96));
    border-bottom: 1px solid rgba(217, 119, 6, 0.18);
    box-shadow: 0 12px 30px rgba(120, 53, 15, 0.12);
    backdrop-filter: blur(18px);
}

.header-inner {
    max-width: 1240px;
    height: 80px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
}

.brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--amber-500), #facc15);
    box-shadow: 0 12px 24px rgba(245, 158, 11, 0.35);
    transition: transform 0.3s ease;
}

.brand:hover .brand-icon {
    transform: rotate(12deg) scale(1.04);
}

.brand-text strong {
    display: block;
    font-size: 24px;
    line-height: 1.05;
    font-weight: 800;
    background: linear-gradient(90deg, var(--amber-700), #ca8a04);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-text small {
    display: block;
    margin-top: 2px;
    color: var(--amber-700);
    font-size: 12px;
}

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

.nav-link {
    color: var(--amber-900);
    font-weight: 700;
    transition: color 0.2s ease, transform 0.2s ease;
}

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

.header-search {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.58);
    border: 2px solid rgba(252, 211, 77, 0.78);
    border-radius: 999px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.header-search input,
.mobile-panel input,
.filter-controls input,
.filter-controls select {
    border: 0;
    outline: 0;
    font: inherit;
}

.header-search input {
    width: 210px;
    padding: 11px 14px;
    background: transparent;
}

.header-search button,
.mobile-panel button {
    border: 0;
    padding: 11px 16px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(90deg, var(--amber-500), #eab308);
    cursor: pointer;
}

.menu-toggle {
    display: none;
    border: 0;
    background: rgba(255, 251, 235, 0.75);
    color: var(--amber-900);
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 22px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    padding: 18px 24px 24px;
    background: linear-gradient(180deg, var(--amber-50), #fefce8);
    border-top: 1px solid rgba(217, 119, 6, 0.18);
}

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

.mobile-panel nav {
    display: grid;
    gap: 14px;
    margin-bottom: 16px;
}

.mobile-panel form {
    display: grid;
    grid-template-columns: 1fr auto;
    border: 2px solid var(--amber-300);
    border-radius: 18px;
    overflow: hidden;
}

.mobile-panel input {
    padding: 12px 14px;
    background: #fff;
}

.hero-carousel {
    position: relative;
    height: 680px;
    min-height: 76vh;
    overflow: hidden;
    background: #1f1407;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.03);
    transition: opacity 0.7s ease, transform 0.7s ease;
    pointer-events: none;
}

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.08)),
        linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 44%);
}

.hero-content {
    position: absolute;
    left: calc((100% - 1240px) / 2 + 24px);
    right: 24px;
    bottom: 82px;
    max-width: 780px;
    color: #fff;
    animation: fadeIn 0.8s ease;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--amber-500), #facc15);
    color: #fff;
    font-weight: 800;
    box-shadow: 0 14px 32px rgba(245, 158, 11, 0.28);
}

.hero-content h1,
.hero-content h2 {
    margin: 22px 0 16px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero-content p {
    margin: 0 0 22px;
    max-width: 720px;
    font-size: clamp(17px, 2.1vw, 22px);
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.88);
}

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

.hero-meta span,
.detail-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-weight: 700;
    backdrop-filter: blur(10px);
}

.hero-actions,
.center-action {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.primary-button {
    color: #fff;
    background: linear-gradient(90deg, var(--amber-500), #eab308);
    box-shadow: 0 16px 34px rgba(245, 158, 11, 0.36);
}

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

.ghost-button.dark {
    color: var(--amber-900);
    border-color: rgba(217, 119, 6, 0.32);
    background: rgba(255, 255, 255, 0.72);
}

.primary-button:hover,
.ghost-button:hover {
    transform: translateY(-2px) scale(1.02);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: rgba(0, 0, 0, 0.34);
    font-size: 38px;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(8px);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

.hero-dots button.is-active {
    background: linear-gradient(90deg, var(--amber-400), #fde047);
}

.content-section {
    max-width: 1240px;
    margin: 0 auto;
    padding: 72px 24px;
}

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

.section-heading span {
    color: var(--amber-600);
    font-weight: 900;
    letter-spacing: 0.08em;
}

.section-heading h2 {
    margin: 8px 0 12px;
    font-size: clamp(30px, 4vw, 46px);
    letter-spacing: -0.04em;
    color: var(--ink);
}

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

.compact-heading h2 {
    font-size: clamp(24px, 3vw, 34px);
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 28px 65px rgba(120, 53, 15, 0.22);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, var(--amber-200), #fef3c7);
}

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

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

.poster-badge,
.poster-score {
    position: absolute;
    top: 12px;
    z-index: 2;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    color: #fff;
    backdrop-filter: blur(10px);
}

.poster-badge {
    left: 12px;
    background: rgba(217, 119, 6, 0.92);
}

.poster-score {
    right: 12px;
    background: rgba(0, 0, 0, 0.56);
}

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

.movie-card h3 {
    margin: 0 0 10px;
    font-size: 20px;
    line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-info a:hover,
.text-link:hover {
    color: var(--amber-600);
}

.movie-meta,
.movie-desc {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.movie-meta {
    font-size: 13px;
    font-weight: 700;
}

.movie-desc {
    margin-top: 10px;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

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

.tag-row span {
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--amber-800);
    background: var(--amber-100);
    font-size: 12px;
    font-weight: 800;
}

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

.category-card {
    min-height: 180px;
    padding: 24px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #fff, var(--amber-100));
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 26px 50px rgba(120, 53, 15, 0.2);
}

.category-card span {
    display: block;
    margin-bottom: 12px;
    font-size: 24px;
    font-weight: 900;
    color: var(--amber-900);
}

.category-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.ranking-preview {
    max-width: none;
    background: linear-gradient(135deg, var(--amber-900), #451a03);
    color: #fff;
}

.ranking-preview .section-heading,
.ranking-preview .rank-list,
.ranking-preview .center-action {
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
}

.ranking-preview .section-heading h2,
.ranking-preview .section-heading p {
    color: #fff;
}

.ranking-preview .section-heading span {
    color: var(--amber-300);
}

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

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

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

.rank-item {
    display: grid;
    grid-template-columns: auto 78px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(252, 211, 77, 0.26);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.page-main .rank-item,
.detail-sidebar .rank-item {
    background: #fff;
    border-color: rgba(217, 119, 6, 0.14);
    box-shadow: 0 16px 38px rgba(120, 53, 15, 0.1);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--amber-500), #eab308);
    color: #fff;
    font-weight: 900;
}

.rank-cover {
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: var(--amber-100);
}

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

.rank-info h3,
.rank-info p {
    margin: 0;
}

.rank-info h3 {
    font-size: 18px;
    line-height: 1.35;
}

.rank-info p {
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
}

.rank-info span {
    display: inline-block;
    margin-top: 8px;
    color: var(--amber-700);
    font-size: 13px;
    font-weight: 800;
}

.ranking-preview .rank-info p,
.ranking-preview .rank-info span {
    color: rgba(255, 255, 255, 0.76);
}

.ranking-preview .rank-info h3 {
    color: #fff;
}

.center-action {
    justify-content: center;
    margin-top: 32px;
}

.page-main,
.detail-main {
    padding-top: 96px;
}

.page-hero {
    max-width: 1240px;
    margin: 0 auto;
    padding: 72px 24px 42px;
    border-radius: 0 0 34px 34px;
}

.soft-hero {
    background: radial-gradient(circle at top left, rgba(251, 191, 36, 0.34), transparent 34%), linear-gradient(135deg, var(--amber-50), #fff);
}

.dark-hero {
    color: #fff;
    background: radial-gradient(circle at top left, rgba(251, 191, 36, 0.36), transparent 32%), linear-gradient(135deg, var(--amber-900), #451a03);
}

.page-hero h1 {
    margin: 18px 0 14px;
    font-size: clamp(36px, 5vw, 58px);
    letter-spacing: -0.05em;
}

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

.dark-hero p {
    color: rgba(255, 255, 255, 0.82);
}

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

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

.filter-shell {
    max-width: 1240px;
    margin: 32px auto 0;
    padding: 0 24px;
}

.filter-controls {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 14px;
    padding: 18px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow);
}

.filter-controls input,
.filter-controls select {
    width: 100%;
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--amber-50);
    color: var(--ink);
}

.no-results {
    display: none;
    margin-top: 20px;
    padding: 20px;
    border-radius: 18px;
    color: var(--amber-900);
    background: var(--amber-100);
    font-weight: 800;
    text-align: center;
}

.no-results.is-visible {
    display: block;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 20px;
    padding: 18px;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
}

.overview-covers {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.overview-covers img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 12px;
    background: var(--amber-100);
}

.category-overview-card h2 {
    margin: 0 0 10px;
}

.category-overview-card p {
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.7;
}

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

.prose-card {
    max-width: 900px;
    padding: 36px;
    margin-top: 54px;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
}

.prose-card h2 {
    margin-top: 0;
}

.prose-card p {
    color: var(--muted);
    line-height: 1.85;
    font-size: 17px;
}

.detail-layout {
    max-width: 1240px;
    margin: 0 auto;
    padding: 36px 24px 72px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 30px;
}

.detail-breadcrumb {
    margin: 0 0 20px;
}

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: #fff;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.66));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--amber-500), #facc15);
    box-shadow: 0 18px 42px rgba(245, 158, 11, 0.35);
    font-size: 30px;
}

.player-overlay strong {
    font-size: 20px;
}

.detail-card,
.side-card {
    margin-top: 24px;
    padding: 28px;
    border-radius: 28px;
    background: #fff;
    box-shadow: var(--shadow);
}

.detail-card h1 {
    margin: 0 0 16px;
    font-size: clamp(32px, 4vw, 48px);
    letter-spacing: -0.05em;
}

.detail-card .detail-meta span {
    background: var(--amber-100);
    color: var(--amber-800);
}

.lead-text {
    font-size: 20px;
    color: var(--ink);
    line-height: 1.75;
    font-weight: 700;
}

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

.detail-card p {
    color: #374151;
    line-height: 1.9;
}

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

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

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

.detail-sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}

.side-card h2 {
    margin: 0 0 18px;
}

.side-card dl {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 12px;
    margin: 0;
}

.side-card dt {
    color: var(--muted);
    font-weight: 800;
}

.side-card dd {
    margin: 0;
    color: var(--ink);
}

.sidebar-rank-list .rank-item {
    grid-template-columns: auto 64px 1fr;
    padding: 10px;
}

.sidebar-rank-list .rank-info h3 {
    font-size: 15px;
}

.sidebar-rank-list .rank-number {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    font-size: 13px;
}

.site-footer {
    color: var(--amber-50);
    background: linear-gradient(180deg, var(--amber-900), #451a03);
}

.footer-grid {
    max-width: 1240px;
    margin: 0 auto;
    padding: 56px 24px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 30px;
}

.footer-grid h2 {
    margin: 0 0 14px;
    color: var(--amber-300);
    font-size: 20px;
}

.footer-grid p,
.footer-grid a {
    display: block;
    margin: 0 0 10px;
    color: rgba(255, 251, 235, 0.82);
    line-height: 1.7;
}

.footer-grid a:hover {
    color: var(--amber-300);
}

.footer-bottom {
    padding: 18px 24px;
    border-top: 1px solid rgba(252, 211, 77, 0.16);
    color: rgba(255, 251, 235, 0.78);
    text-align: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

    .hero-content {
        left: 24px;
        bottom: 72px;
    }

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

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

    .detail-sidebar {
        position: static;
    }

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

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

    .hero-arrow {
        display: none;
    }

    .movie-grid,
    .featured-grid,
    .category-grid,
    .compact-rank-list,
    .wide-rank-list,
    .overview-grid,
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

@media (max-width: 560px) {
    .header-inner {
        height: 68px;
        padding: 0 16px;
    }

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

    .brand-text small {
        font-size: 11px;
    }

    .hero-carousel {
        height: 590px;
    }

    .hero-content {
        left: 18px;
        right: 18px;
        bottom: 58px;
    }

    .hero-content h1,
    .hero-content h2 {
        font-size: 38px;
    }

    .content-section,
    .page-hero,
    .filter-shell,
    .detail-layout {
        padding-left: 16px;
        padding-right: 16px;
    }

    .movie-grid,
    .featured-grid,
    .category-grid,
    .compact-rank-list,
    .wide-rank-list,
    .overview-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .rank-item {
        grid-template-columns: auto 70px 1fr;
    }

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