:root {
    color-scheme: light;
    --bg: #fff7ed;
    --surface: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --soft: #fed7aa;
    --line: rgba(251, 146, 60, 0.24);
    --orange: #ea580c;
    --red: #dc2626;
    --amber: #f59e0b;
    --shadow: 0 24px 70px rgba(124, 45, 18, 0.16);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at 10% 0%, rgba(251, 146, 60, 0.22), transparent 32rem),
        linear-gradient(180deg, #fff7ed 0%, #ffffff 48%, #fffaf3 100%);
    color: var(--text);
    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: linear-gradient(90deg, rgba(234, 88, 12, 0.97), rgba(220, 38, 38, 0.97));
    color: #fff;
    box-shadow: 0 18px 45px rgba(154, 52, 18, 0.28);
    backdrop-filter: blur(18px);
}

.topbar {
    max-width: 1240px;
    margin: 0 auto;
    min-height: 72px;
    padding: 0 22px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.logo {
    font-size: 22px;
}

.logo-mark {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

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

.nav-link,
.mobile-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.88);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
}

.global-search-form {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.global-search-form input,
.local-search {
    border: 1px solid rgba(255, 255, 255, 0.28);
    outline: none;
    border-radius: 999px;
    padding: 11px 16px;
}

.global-search-form input {
    width: 230px;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
}

.global-search-form input::placeholder {
    color: rgba(255, 255, 255, 0.72);
}

.global-search-form button,
.btn,
.ghost-btn,
.play-overlay,
.rank-link {
    cursor: pointer;
    border: 0;
    border-radius: 999px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.global-search-form button,
.btn {
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--red));
    box-shadow: 0 14px 30px rgba(220, 38, 38, 0.25);
    padding: 11px 18px;
    font-weight: 800;
}

.global-search-form button {
    background: rgba(255, 255, 255, 0.22);
    box-shadow: none;
}

.btn:hover,
.ghost-btn:hover,
.global-search-form button:hover,
.play-overlay:hover,
.rank-link:hover {
    transform: translateY(-2px);
}

.ghost-btn {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.34);
    padding: 11px 18px;
    font-weight: 800;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.15);
    border: 0;
    border-radius: 14px;
    padding: 10px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #fff;
    border-radius: 99px;
}

.mobile-panel {
    display: none;
    padding: 0 22px 18px;
    max-width: 1240px;
    margin: 0 auto;
}

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

.mobile-panel .global-search-form {
    margin-left: 0;
}

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

.category-ribbon {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 22px 14px;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
}

.category-ribbon::-webkit-scrollbar {
    display: none;
}

.category-ribbon a {
    flex: 0 0 auto;
    padding: 7px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.92);
    font-size: 14px;
}

main {
    max-width: 1240px;
    margin: 0 auto;
    padding: 28px 22px 56px;
}

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

.hero-slider {
    position: relative;
    min-height: 560px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 380px;
    gap: 36px;
    align-items: center;
    padding: 54px;
    color: #fff;
    transition: opacity 0.6s ease;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(17, 24, 39, 0.94), rgba(127, 29, 29, 0.70), rgba(17, 24, 39, 0.55)),
        var(--hero-image) center / cover no-repeat;
    transform: scale(1.05);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: auto -120px -160px auto;
    width: 440px;
    height: 440px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(251, 146, 60, 0.42), transparent 68%);
    filter: blur(4px);
}

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

.hero-copy,
.hero-poster {
    position: relative;
    z-index: 2;
}

.hero-kicker {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    padding: 8px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffedd5;
    font-weight: 800;
    margin-bottom: 18px;
}

.hero h1,
.page-heading h1,
.detail-info h1 {
    margin: 0;
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.hero h1 {
    max-width: 760px;
    font-size: clamp(36px, 6vw, 78px);
}

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

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

.hero-meta {
    margin-top: 22px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-meta span,
.detail-chip,
.year-badge,
.play-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-weight: 800;
}

.hero-meta span {
    background: rgba(255, 255, 255, 0.13);
    padding: 8px 12px;
    color: #fff7ed;
}

.hero-poster {
    align-self: stretch;
    display: flex;
    align-items: center;
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 28px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-dots {
    position: absolute;
    z-index: 4;
    left: 54px;
    bottom: 38px;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 36px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
}

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

.hero-category-strip {
    position: absolute;
    right: 32px;
    bottom: 30px;
    z-index: 3;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    max-width: 520px;
}

.hero-category-strip a {
    padding: 9px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    backdrop-filter: blur(12px);
}

.section {
    margin-top: 46px;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.section-title div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title span {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 16px;
    background: #ffedd5;
    color: var(--orange);
    font-size: 20px;
}

.section-title h2 {
    margin: 0;
    color: #111827;
    font-size: clamp(24px, 3vw, 34px);
    letter-spacing: -0.03em;
}

.section-title a {
    color: var(--orange);
    font-weight: 900;
}

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

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

.movie-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 18px 50px rgba(124, 45, 18, 0.10);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 70px rgba(124, 45, 18, 0.18);
    border-color: rgba(249, 115, 22, 0.45);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #1f2937;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.year-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 6px 10px;
    background: rgba(17, 24, 39, 0.76);
    color: #fff;
    font-size: 12px;
}

.play-chip {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 7px 12px;
    background: linear-gradient(135deg, var(--orange), var(--red));
    color: #fff;
    font-size: 13px;
    box-shadow: 0 12px 28px rgba(220, 38, 38, 0.25);
}

.card-body {
    padding: 16px;
}

.card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 48px;
    overflow: hidden;
    font-size: 17px;
    font-weight: 900;
    color: #111827;
    line-height: 1.4;
}

.card-title:hover {
    color: var(--orange);
}

.card-meta,
.card-desc,
.category-card p,
.page-heading p,
.detail-summary p,
.site-footer p,
.empty-state {
    color: var(--muted);
    line-height: 1.75;
}

.card-meta {
    margin: 9px 0 8px;
    font-size: 13px;
}

.card-desc {
    min-height: 50px;
    margin: 0 0 12px;
    font-size: 14px;
}

.tag-list {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    min-height: 28px;
}

.tag-list span,
.detail-chip {
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fed7aa;
    padding: 5px 9px;
    font-size: 12px;
}

.category-link {
    display: inline-flex;
    margin-top: 12px;
    color: var(--orange);
    font-weight: 800;
    font-size: 14px;
}

.page-heading {
    border-radius: 30px;
    padding: 38px;
    background:
        linear-gradient(135deg, rgba(255, 237, 213, 0.94), rgba(255, 255, 255, 0.94)),
        radial-gradient(circle at top right, rgba(251, 146, 60, 0.3), transparent 28rem);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

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

.page-heading p {
    max-width: 850px;
    margin: 16px 0 0;
    font-size: 17px;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: center;
    margin: 26px 0;
}

.local-search {
    width: 100%;
    background: #fff;
    color: #111827;
    border-color: var(--line);
    box-shadow: 0 10px 26px rgba(124, 45, 18, 0.08);
}

.filter-note {
    color: var(--muted);
    font-weight: 700;
}

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

.category-card {
    position: relative;
    min-height: 240px;
    overflow: hidden;
    border-radius: 30px;
    padding: 26px;
    color: #fff;
    background: linear-gradient(135deg, #f97316, #dc2626);
    box-shadow: var(--shadow);
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.28), transparent 18rem);
}

.category-card > * {
    position: relative;
    z-index: 1;
}

.category-card h2 {
    margin: 0 0 12px;
    font-size: 28px;
}

.category-card p {
    color: rgba(255, 255, 255, 0.86);
    margin: 0 0 20px;
}

.category-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 22px;
    display: grid;
    gap: 8px;
}

.category-card li {
    color: rgba(255, 255, 255, 0.92);
}

.category-card .ghost-btn {
    display: inline-flex;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 70px 92px 1fr auto;
    align-items: center;
    gap: 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 14px;
    box-shadow: 0 14px 42px rgba(124, 45, 18, 0.08);
}

.rank-num {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: #ffedd5;
    color: var(--orange);
    font-size: 22px;
    font-weight: 900;
}

.rank-cover img {
    width: 92px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 16px;
}

.rank-main h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.rank-main p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.rank-score {
    color: var(--red);
    font-weight: 900;
}

.rank-link {
    padding: 10px 16px;
    background: linear-gradient(135deg, var(--orange), var(--red));
    color: #fff;
    font-weight: 900;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-weight: 700;
    margin: 8px 0 20px;
}

.breadcrumb a {
    color: var(--orange);
}

.detail-hero {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 30px;
    align-items: stretch;
    padding: 28px;
    border-radius: 32px;
    background:
        linear-gradient(135deg, rgba(17, 24, 39, 0.92), rgba(127, 29, 29, 0.82)),
        var(--detail-image) center / cover no-repeat;
    color: #fff;
    box-shadow: var(--shadow);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 26px;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
}

.detail-info {
    align-self: center;
}

.detail-info h1 {
    font-size: clamp(34px, 5vw, 62px);
}

.detail-one {
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
    line-height: 1.85;
}

.detail-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.detail-chip {
    color: #fff7ed;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
}

.player-section,
.detail-summary {
    margin-top: 34px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 30px;
    padding: 24px;
    box-shadow: var(--shadow);
}

.player-section h2,
.detail-summary h2 {
    margin: 0 0 18px;
    font-size: 28px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #111827;
}

.main-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    background: #111827;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: #fff;
    background:
        radial-gradient(circle, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.55)),
        transparent;
}

.play-overlay span {
    width: 90px;
    height: 90px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--orange), var(--red));
    box-shadow: 0 20px 50px rgba(220, 38, 38, 0.35);
    font-size: 34px;
    padding-left: 6px;
}

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

.detail-summary p {
    margin: 0 0 15px;
    font-size: 16px;
}

.site-footer {
    max-width: 1240px;
    margin: 0 auto 36px;
    padding: 30px 22px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    gap: 28px;
}

.footer-logo {
    color: #111827;
    font-size: 22px;
    margin-bottom: 8px;
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-content: center;
}

.site-footer nav a {
    color: var(--orange);
    font-weight: 800;
}

.empty-state {
    display: none;
    padding: 26px;
    border-radius: 24px;
    background: #fff;
    border: 1px dashed var(--line);
    text-align: center;
}

.empty-state.is-visible {
    display: block;
}

@media (max-width: 1024px) {
    .desktop-nav,
    .topbar > .global-search-form {
        display: none;
    }

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

    .hero-slide {
        grid-template-columns: 1fr 280px;
        padding: 40px;
    }

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

    .detail-hero {
        grid-template-columns: 240px 1fr;
    }
}

@media (max-width: 760px) {
    .topbar {
        min-height: 64px;
        padding-inline: 16px;
    }

    .category-ribbon {
        padding-inline: 16px;
    }

    main {
        padding: 18px 16px 40px;
    }

    .hero,
    .hero-slider {
        min-height: 680px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        padding: 28px;
        align-content: center;
    }

    .hero-poster {
        display: none;
    }

    .hero-category-strip {
        left: 24px;
        right: 24px;
        bottom: 74px;
        justify-content: flex-start;
    }

    .hero-dots {
        left: 28px;
        bottom: 34px;
    }

    .movie-grid,
    .movie-grid.compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .card-body {
        padding: 13px;
    }

    .card-title {
        font-size: 15px;
        min-height: 42px;
    }

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

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

    .rank-item {
        grid-template-columns: 48px 76px 1fr;
    }

    .rank-link {
        grid-column: 2 / 4;
        text-align: center;
    }

    .detail-hero {
        grid-template-columns: 1fr;
        padding: 20px;
    }

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

    .site-footer {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .movie-grid,
    .movie-grid.compact {
        grid-template-columns: 1fr;
    }

    .hero h1,
    .detail-info h1,
    .page-heading h1 {
        letter-spacing: -0.03em;
    }

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

    .rank-cover img {
        width: 100%;
        max-width: 180px;
    }

    .rank-link {
        grid-column: auto;
    }
}
