:root {
    --autumn-50: #fff7ed;
    --autumn-100: #ffedd5;
    --autumn-200: #fed7aa;
    --autumn-300: #fdba74;
    --autumn-500: #f97316;
    --autumn-600: #ea580c;
    --autumn-700: #c2410c;
    --leaf-200: #fef08a;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
    --card: #ffffff;
    --soft: #fffaf4;
    --shadow: 0 20px 45px rgba(124, 45, 18, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, var(--autumn-50) 0%, #ffffff 32%, #ffffff 100%);
}

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

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

button,
input,
select {
    font: inherit;
}

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

.top-line {
    background: linear-gradient(135deg, var(--autumn-500), var(--autumn-600), #fb923c);
    color: #fff;
}

.top-line-inner {
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    font-size: 13px;
    letter-spacing: 0.03em;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(254, 215, 170, 0.8);
}

.main-nav {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--autumn-700);
    font-weight: 900;
}

.logo-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, var(--autumn-500), var(--autumn-700));
    box-shadow: 0 14px 28px rgba(234, 88, 12, 0.26);
}

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

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

.nav-link {
    font-weight: 700;
    color: #374151;
    transition: color 0.2s ease;
}

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

.nav-search,
.mobile-search,
.hero-search,
.search-page-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-search input,
.mobile-search input,
.hero-search input,
.search-page-form input,
.card-filter,
.year-filter {
    border: 2px solid var(--autumn-200);
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input {
    width: 220px;
    padding: 10px 16px;
}

.nav-search input:focus,
.mobile-search input:focus,
.hero-search input:focus,
.search-page-form input:focus,
.card-filter:focus,
.year-filter:focus {
    border-color: var(--autumn-500);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.14);
}

.nav-search button,
.mobile-search button,
.hero-search button,
.search-page-form button,
.primary-btn {
    border: 0;
    border-radius: 999px;
    padding: 11px 20px;
    color: #fff;
    font-weight: 800;
    background: linear-gradient(135deg, var(--autumn-500), var(--autumn-700));
    box-shadow: 0 12px 24px rgba(234, 88, 12, 0.22);
    cursor: pointer;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: var(--autumn-100);
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--autumn-700);
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--autumn-100);
    background: #fff;
}

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

.mobile-links {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    gap: 12px;
    padding: 18px 0;
}

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

.mobile-search input {
    flex: 1;
    padding: 11px 16px;
}

.hero-section {
    padding: 28px 0 52px;
    background:
        radial-gradient(circle at 18% 12%, rgba(250, 204, 21, 0.2), transparent 34%),
        radial-gradient(circle at 85% 20%, rgba(249, 115, 22, 0.22), transparent 28%);
}

.hero-shell {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    border-radius: 36px;
    background: #111827;
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    align-items: end;
    min-height: 560px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(17, 24, 39, 0.88), rgba(17, 24, 39, 0.5), rgba(17, 24, 39, 0.08)),
        linear-gradient(0deg, rgba(17, 24, 39, 0.9), transparent 62%);
}

.hero-copy {
    position: relative;
    z-index: 2;
    max-width: 720px;
    padding: 72px;
    color: #fff;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    margin-bottom: 14px;
    color: var(--leaf-200);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 0;
    font-size: clamp(36px, 5vw, 68px);
    line-height: 1.05;
    font-weight: 950;
    text-shadow: 0 12px 34px rgba(0, 0, 0, 0.36);
}

.hero-title {
    margin: 18px 0 8px;
    font-size: 24px;
    font-weight: 800;
}

.hero-desc {
    max-width: 620px;
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 17px;
}

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

.hero-tags span,
.tag-row span {
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.tag-row span {
    background: var(--autumn-100);
    color: var(--autumn-700);
}

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

.ghost-btn,
.text-btn,
.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 10px 18px;
    font-weight: 900;
    color: var(--autumn-700);
    background: #fff;
    border: 1px solid var(--autumn-200);
}

.ghost-btn.light {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.3);
}

.hero-panel {
    position: absolute;
    right: 28px;
    bottom: 28px;
    z-index: 3;
    width: min(420px, calc(100% - 56px));
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(20px);
}

.hero-search input {
    flex: 1;
    padding: 12px 16px;
}

.hero-categories,
.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.category-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 8px 12px;
    color: var(--autumn-700);
    background: rgba(255, 255, 255, 0.88);
    font-size: 13px;
    font-weight: 900;
}

.hero-dots {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.hero-dot {
    width: 34px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.36);
}

.hero-dot.active {
    background: #fff;
}

.section-block {
    padding: 42px 0;
}

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

.section-head h2,
.page-hero h1,
.detail-copy h1,
.detail-content h2 {
    margin: 0;
    color: var(--ink);
    font-weight: 950;
}

.section-head h2 {
    font-size: clamp(28px, 4vw, 40px);
}

.section-kicker {
    color: var(--autumn-600);
}

.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.card-filter,
.year-filter {
    min-width: 220px;
    padding: 12px 16px;
}

.card-filter {
    flex: 1;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(254, 215, 170, 0.8);
    border-radius: 24px;
    background: var(--card);
    box-shadow: 0 12px 28px rgba(124, 45, 18, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, var(--autumn-100), #fff);
}

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

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

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

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

.play-pill,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #fff;
    font-weight: 900;
}

.play-pill {
    right: 12px;
    bottom: 12px;
    padding: 7px 12px;
    background: rgba(249, 115, 22, 0.92);
}

.rank-badge {
    left: 12px;
    top: 12px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #facc15, var(--autumn-600));
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
}

.movie-info {
    padding: 16px;
}

.meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 9px;
    color: var(--autumn-700);
    font-size: 12px;
    font-weight: 850;
}

.movie-info h3 {
    margin: 0 0 9px;
    font-size: 18px;
    line-height: 1.32;
}

.movie-info p {
    margin: 0 0 12px;
    min-height: 45px;
    color: var(--muted);
    font-size: 14px;
}

.page-hero {
    padding: 58px 0;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(249, 115, 22, 0.98), rgba(194, 65, 12, 0.96)),
        radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.26), transparent 36%);
}

.soft-hero {
    color: var(--ink);
    background:
        linear-gradient(135deg, var(--autumn-50), #fff),
        radial-gradient(circle at 80% 0%, rgba(249, 115, 22, 0.2), transparent 32%);
}

.page-hero h1 {
    color: inherit;
    font-size: clamp(34px, 5vw, 58px);
}

.page-hero p {
    max-width: 760px;
    margin: 12px 0 0;
    font-size: 18px;
    color: currentColor;
    opacity: 0.88;
}

.back-home {
    display: inline-flex;
    margin-bottom: 18px;
    font-weight: 900;
    opacity: 0.88;
}

.page-hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 22px;
}

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

.category-card {
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid var(--autumn-200);
    background: #fff;
    box-shadow: 0 14px 30px rgba(124, 45, 18, 0.08);
}

.category-cover {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: 180px;
    overflow: hidden;
}

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

.category-body {
    padding: 22px;
}

.category-body h2 {
    margin: 0 0 10px;
    color: var(--ink);
    font-size: 26px;
}

.category-body p {
    margin: 0 0 18px;
    color: var(--muted);
}

.ranking-layout {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 28px;
}

.rank-list {
    position: sticky;
    top: 120px;
    align-self: start;
    display: grid;
    gap: 10px;
}

.rank-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    grid-template-areas:
        "num title score"
        "num meta score";
    gap: 3px 12px;
    align-items: center;
    padding: 13px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--autumn-100);
}

.rank-num {
    grid-area: num;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: var(--autumn-600);
    font-weight: 950;
}

.rank-title {
    grid-area: title;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 900;
}

.rank-meta {
    grid-area: meta;
    color: var(--muted);
    font-size: 12px;
}

.rank-score {
    grid-area: score;
    color: var(--autumn-700);
    font-weight: 950;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: #111827;
}

.detail-bg {
    position: absolute;
    inset: 0;
}

.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(20px) saturate(1.05);
    transform: scale(1.08);
    opacity: 0.38;
}

.detail-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.62));
}

.detail-grid {
    position: relative;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 38px;
    align-items: center;
    padding: 58px 0;
}

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

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

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.76);
    font-weight: 800;
}

.detail-copy h1 {
    color: #fff;
    font-size: clamp(34px, 5vw, 58px);
}

.detail-one {
    max-width: 820px;
    margin: 18px 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 18px;
}

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

.detail-meta span {
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.14);
    font-weight: 800;
}

.player-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #000;
    box-shadow: 0 22px 52px rgba(17, 24, 39, 0.2);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: #fff;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.2));
    cursor: pointer;
}

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

.player-icon {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    padding-left: 5px;
    color: var(--autumn-700);
    background: #fff;
    font-size: 32px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

.player-title {
    font-size: 22px;
    font-weight: 950;
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 32px;
}

.detail-content article,
.detail-content aside {
    border: 1px solid var(--autumn-100);
    border-radius: 26px;
    padding: 26px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(124, 45, 18, 0.06);
}

.detail-content h2 {
    margin-bottom: 14px;
    font-size: 26px;
}

.detail-content p {
    margin: 0 0 18px;
    color: #4b5563;
    line-height: 1.85;
}

.info-list {
    display: grid;
    gap: 14px;
    margin: 0;
}

.info-list div {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
}

.info-list dt {
    color: var(--autumn-700);
    font-weight: 950;
}

.info-list dd {
    margin: 0;
    color: #4b5563;
}

.search-page-form {
    max-width: 720px;
    margin-top: 24px;
}

.search-page-form input {
    flex: 1;
    padding: 14px 18px;
}

.search-results {
    display: grid;
    gap: 12px;
    margin-bottom: 36px;
}

.search-result-item {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--autumn-100);
    border-radius: 20px;
    background: #fff;
}

.search-result-item img {
    width: 76px;
    height: 104px;
    border-radius: 14px;
    object-fit: cover;
}

.search-result-item h2 {
    margin: 0 0 8px;
    font-size: 20px;
}

.search-result-item p {
    margin: 0;
    color: var(--muted);
}

.site-footer {
    margin-top: 42px;
    padding-top: 42px;
    color: #fff;
    background: #1f2937;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 32px;
}

.footer-logo {
    margin-bottom: 12px;
    color: #fff;
    font-size: 24px;
}

.site-footer p {
    max-width: 420px;
    color: rgba(255, 255, 255, 0.72);
}

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

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-links a {
    border-radius: 999px;
    padding: 8px 12px;
    color: rgba(255, 255, 255, 0.84);
    background: rgba(255, 255, 255, 0.08);
}

.copyright {
    margin-top: 34px;
    padding: 18px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.is-hidden {
    display: none !important;
}

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

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

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

    .rank-list {
        position: static;
    }
}

@media (max-width: 820px) {
    .top-line-inner {
        gap: 12px;
        font-size: 12px;
    }

    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .hero-shell,
    .hero-slide {
        min-height: 660px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
    }

    .hero-copy {
        padding: 38px 26px 220px;
    }

    .hero-panel {
        left: 18px;
        right: 18px;
        bottom: 18px;
        width: auto;
    }

    .hero-search,
    .filter-bar,
    .section-head {
        align-items: stretch;
        flex-direction: column;
    }

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

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

    .movie-grid,
    .hot-grid,
    .related-grid,
    .rank-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .search-result-item {
        grid-template-columns: 60px minmax(0, 1fr);
    }

    .search-result-item .text-btn {
        grid-column: 1 / -1;
    }
}

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

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

    .hero-shell {
        border-radius: 24px;
    }

    .hero-copy h1,
    .hero-copy h2,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 34px;
    }

    .movie-grid,
    .hot-grid,
    .related-grid,
    .rank-grid {
        grid-template-columns: 1fr;
    }

    .category-cover {
        height: 140px;
    }

    .detail-grid {
        padding: 34px 0;
    }
}
