* {
    box-sizing: border-box;
}

:root {
    color-scheme: light;
    --bg: #fff7ed;
    --bg-soft: #fffbeb;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --line: #fed7aa;
    --amber: #f59e0b;
    --orange: #f97316;
    --red: #ef4444;
    --shadow: 0 18px 45px rgba(146, 64, 14, 0.12);
    --radius: 22px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(251, 191, 36, 0.24), transparent 34rem),
        linear-gradient(135deg, #fff7ed 0%, #fffbeb 48%, #fff7ed 100%);
    min-height: 100vh;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 251, 235, 0.88);
    border-bottom: 1px solid rgba(251, 191, 36, 0.32);
    backdrop-filter: blur(18px);
    box-shadow: 0 8px 26px rgba(146, 64, 14, 0.08);
}

.navbar {
    width: min(1180px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 20px;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #b45309, #f97316);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, #fbbf24, #fb923c);
    box-shadow: 0 12px 24px rgba(249, 115, 22, 0.24);
    transition: transform 0.25s ease;
    -webkit-background-clip: border-box;
    background-clip: border-box;
}

.brand:hover .brand-mark,
.footer-brand:hover .brand-mark {
    transform: rotate(10deg) scale(1.04);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
    font-size: 15px;
    font-weight: 700;
    color: #4b5563;
}

.nav-links a {
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: #d97706;
}

.top-search,
.mobile-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-search input,
.mobile-search input,
.filter-bar input {
    width: 230px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 11px 16px;
    background: #ffffff;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.top-search input:focus,
.mobile-search input:focus,
.filter-bar input:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.top-search button,
.mobile-search button {
    border: 0;
    border-radius: 999px;
    padding: 10px 14px;
    color: #ffffff;
    background: linear-gradient(90deg, var(--amber), var(--orange));
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(249, 115, 22, 0.18);
}

.menu-toggle {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(251, 191, 36, 0.15);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: #92400e;
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

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

.mobile-panel a {
    padding: 8px 2px;
    color: #4b5563;
    font-weight: 700;
}

.mobile-search input {
    width: 100%;
}

.hero {
    position: relative;
    height: min(720px, 72vh);
    min-height: 520px;
    overflow: hidden;
    background: #111827;
}

.hero-track,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.75s ease;
}

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.58) 46%, rgba(0, 0, 0, 0.1) 100%),
        linear-gradient(0deg, rgba(17, 24, 39, 0.52), transparent 44%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 760px;
    margin-left: max(16px, calc((100vw - 1180px) / 2));
    color: #ffffff;
}

.hero-kicker,
.page-hero span,
.section-heading span,
.detail-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.16);
    color: #fbbf24;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.hero h1 {
    margin: 18px 0 16px;
    font-size: clamp(42px, 6vw, 76px);
    line-height: 0.96;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 680px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
    line-height: 1.8;
}

.hero-tags,
.detail-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.hero-tags span,
.detail-tags span,
.tag-row span {
    border-radius: 999px;
    padding: 6px 11px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    backdrop-filter: blur(8px);
}

.tag-row span {
    background: #fffbeb;
    color: #b45309;
}

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

.primary-button,
.ghost-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(--amber), var(--orange));
    box-shadow: 0 14px 30px rgba(249, 115, 22, 0.28);
}

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

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

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.42);
    font-size: 34px;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.2s ease, transform 0.2s ease;
}

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

.hero-prev {
    left: 20px;
}

.hero-next {
    right: 20px;
}

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

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

.hero-dot.is-active {
    width: 32px;
    background: #ffffff;
}

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

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

.section-heading h2,
.detail-section h2 {
    margin: 12px 0 0;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.15;
}

.section-heading a,
.filter-bar a {
    color: #d97706;
    font-weight: 800;
}

.scroll-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(240px, 300px);
    gap: 22px;
    overflow-x: auto;
    padding: 4px 4px 24px;
    scroll-snap-type: x mandatory;
}

.scroll-row .movie-card {
    scroll-snap-align: start;
}

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

.compact-grid {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(251, 191, 36, 0.26);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 10px 28px rgba(146, 64, 14, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card.is-hidden {
    display: none;
}

.movie-card:hover {
    transform: translateY(-8px);
    border-color: rgba(245, 158, 11, 0.55);
    box-shadow: var(--shadow);
}

.card-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #fde68a, #fed7aa);
}

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

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

.card-poster::after {
    content: "";
    position: absolute;
    inset: 42% 0 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.66), transparent);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .card-poster::after {
    opacity: 1;
}

.year-badge,
.type-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    padding: 6px 10px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    background: rgba(245, 158, 11, 0.92);
    backdrop-filter: blur(8px);
}

.year-badge {
    top: 12px;
    right: 12px;
}

.type-badge {
    left: 12px;
    bottom: 12px;
    background: rgba(0, 0, 0, 0.62);
}

.rank-badge {
    left: 12px;
    top: 12px;
    background: linear-gradient(135deg, #ef4444, #f97316);
}

.card-body {
    padding: 16px;
}

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

.card-body h3 {
    margin: 10px 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

.card-body h3 a:hover {
    color: #d97706;
}

.card-body p {
    min-height: 46px;
    margin: 0 0 14px;
    color: #5b6472;
    font-size: 14px;
    line-height: 1.65;
}

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

.category-card {
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    border: 1px solid rgba(251, 191, 36, 0.28);
    border-radius: 24px;
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 251, 235, 0.86)),
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.22), transparent 12rem);
    box-shadow: 0 14px 34px rgba(146, 64, 14, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.category-card strong {
    font-size: 24px;
}

.category-card span {
    color: #6b7280;
    line-height: 1.7;
}

.category-card em {
    color: #d97706;
    font-style: normal;
    font-weight: 800;
}

.overview-grid .category-card {
    min-height: 190px;
}

.rank-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

.rank-item {
    display: grid;
    grid-template-columns: 38px 56px 1fr auto;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(251, 191, 36, 0.28);
    border-radius: 18px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 10px 24px rgba(146, 64, 14, 0.06);
}

.rank-item span {
    color: #d97706;
    font-weight: 900;
}

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

.rank-item strong {
    line-height: 1.35;
}

.rank-item em {
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 80% 10%, rgba(251, 146, 60, 0.28), transparent 26rem),
        linear-gradient(135deg, #111827, #78350f 58%, #f59e0b 140%);
    color: #ffffff;
}

.small-hero > div,
.detail-hero > div {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.small-hero {
    padding: 78px 0;
}

.page-hero h1 {
    max-width: 820px;
    margin: 18px 0 16px;
    font-size: clamp(36px, 5vw, 60px);
    line-height: 1.05;
}

.page-hero p {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
    line-height: 1.8;
}

.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
    padding: 18px;
    border: 1px solid rgba(251, 191, 36, 0.28);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 10px 28px rgba(146, 64, 14, 0.06);
}

.filter-bar input {
    flex: 1;
    width: 100%;
}

.detail-hero {
    padding: 34px 0 74px;
}

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

.breadcrumb a:hover {
    color: #fbbf24;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(210px, 300px) 1fr;
    gap: 36px;
    align-items: center;
}

.detail-poster {
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.32);
}

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

.detail-info h1 {
    margin: 18px 0 18px;
    font-size: clamp(38px, 5vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.detail-info .lead {
    max-width: 780px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 20px;
    line-height: 1.75;
}

.detail-info .primary-button {
    margin-top: 28px;
}

.detail-section {
    padding-top: 48px;
    padding-bottom: 24px;
}

.detail-section > p {
    color: #4b5563;
    font-size: 17px;
    line-height: 1.95;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: #000000;
    box-shadow: 0 24px 58px rgba(0, 0, 0, 0.22);
}

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

.play-layer {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.46), rgba(0, 0, 0, 0.08));
    cursor: pointer;
}

.play-layer span {
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    font-size: 34px;
    box-shadow: 0 18px 42px rgba(249, 115, 22, 0.38);
    transition: transform 0.2s ease;
}

.play-layer:hover span {
    transform: scale(1.08);
}

.player-frame.is-playing .play-layer {
    display: none;
}

.site-footer {
    margin-top: 48px;
    border-top: 1px solid rgba(251, 191, 36, 0.32);
    background: rgba(255, 251, 235, 0.78);
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0 34px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 36px;
}

.footer-grid p,
.footer-grid a,
.footer-grid li {
    color: #6b7280;
    line-height: 1.8;
}

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

.footer-grid ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-grid a:hover {
    color: #d97706;
}

.copyright {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0 28px;
    border-top: 1px solid rgba(251, 191, 36, 0.28);
    color: #6b7280;
    text-align: center;
}

@media (max-width: 980px) {
    .nav-links,
    .top-search {
        display: none;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .hero {
        height: 620px;
    }

    .hero-content {
        width: min(100% - 32px, 720px);
        margin: 0 auto;
    }

    .hero-arrow {
        display: none;
    }

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

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

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

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

    .brand,
    .footer-brand {
        font-size: 18px;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
    }

    .hero {
        min-height: 560px;
    }

    .hero p,
    .page-hero p,
    .detail-info .lead {
        font-size: 16px;
    }

    .section {
        width: min(100% - 24px, 1180px);
        padding: 38px 0;
    }

    .section-heading,
    .filter-bar {
        align-items: flex-start;
        flex-direction: column;
    }

    .scroll-row {
        grid-auto-columns: minmax(220px, 82vw);
    }

    .movie-grid,
    .compact-grid,
    .ranking-grid {
        grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
        gap: 16px;
    }

    .card-body {
        padding: 13px;
    }

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

    .card-body p {
        font-size: 13px;
    }

    .small-hero,
    .detail-hero {
        padding: 48px 0;
    }

    .play-layer span {
        width: 68px;
        height: 68px;
        font-size: 26px;
    }
}
