:root {
    --bg: #fff7ed;
    --bg-soft: #fffbeb;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --line: rgba(251, 146, 60, 0.24);
    --orange: #f97316;
    --amber: #f59e0b;
    --deep: #7c2d12;
    --shadow: 0 24px 60px rgba(124, 45, 18, 0.12);
    --radius: 26px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(251, 146, 60, 0.18), transparent 28rem),
        linear-gradient(180deg, #fff7ed 0%, #ffffff 46%, #fff7ed 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

img.is-broken {
    opacity: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.86);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.nav-shell {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 74px;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    box-shadow: 0 12px 28px rgba(249, 115, 22, 0.28);
}

.brand-text {
    font-size: 20px;
    letter-spacing: -0.03em;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.main-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: #4b5563;
    font-weight: 700;
    transition: 0.25s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    box-shadow: 0 10px 28px rgba(249, 115, 22, 0.22);
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
}

.nav-search input,
.hero-search input,
.filter-panel input,
.filter-panel select {
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.nav-search input {
    width: 210px;
    padding: 10px 8px 10px 14px;
}

.nav-search button,
.hero-search button,
.btn-primary,
.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 14px 32px rgba(249, 115, 22, 0.22);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.nav-search button {
    padding: 9px 15px;
}

.nav-search button:hover,
.hero-search button:hover,
.btn-primary:hover,
.section-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(249, 115, 22, 0.32);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    color: var(--deep);
    background: #ffedd5;
    font-size: 22px;
}

.hero-carousel {
    position: relative;
    width: min(1200px, calc(100% - 32px));
    min-height: 650px;
    margin: 28px auto 24px;
    overflow: hidden;
    border-radius: 34px;
    background: #111827;
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 40px;
    align-items: center;
    padding: clamp(28px, 6vw, 72px);
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

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

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

.hero-bg {
    background-size: cover;
    background-position: center;
    filter: blur(8px) saturate(1.15);
    transform: scale(1.08);
    opacity: 0.46;
}

.hero-shade {
    background:
        radial-gradient(circle at 80% 20%, rgba(251, 146, 60, 0.28), transparent 24rem),
        linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.68) 48%, rgba(17, 24, 39, 0.42));
}

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

.eyebrow {
    margin: 0 0 12px;
    color: var(--orange);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero-content h1 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 0.95;
    letter-spacing: -0.08em;
    text-shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
}

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

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

.hero-tags {
    margin-top: 22px;
}

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.hero-tags span {
    color: #fed7aa;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.btn-primary,
.btn-ghost {
    min-height: 46px;
    padding: 0 22px;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.12);
    font-weight: 800;
    backdrop-filter: blur(12px);
    transition: 0.25s ease;
}

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

.hero-poster {
    display: block;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 28px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
    transform: rotate(2deg);
    transition: 0.35s ease;
}

.hero-poster:hover {
    transform: rotate(0deg) translateY(-6px);
}

.hero-poster img {
    width: 100%;
    height: 460px;
    object-fit: cover;
    background: linear-gradient(135deg, #431407, #f97316);
}

.hero-controls {
    position: absolute;
    z-index: 5;
    left: 72px;
    bottom: 104px;
    display: flex;
    gap: 10px;
}

.hero-controls button {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: 0.25s ease;
}

.hero-controls button.is-active {
    width: 42px;
    background: #ffffff;
}

.hero-search {
    position: absolute;
    z-index: 6;
    left: 50%;
    bottom: 26px;
    width: min(760px, calc(100% - 48px));
    display: flex;
    gap: 10px;
    transform: translateX(-50%);
    padding: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(18px);
}

.hero-search input {
    flex: 1;
    padding: 14px 18px;
    font-size: 16px;
}

.hero-search button {
    padding: 0 24px;
}

.quick-panel,
.content-section,
.detail-main,
.page-hero {
    width: min(1200px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.quick-panel {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 28px;
}

.quick-panel a {
    display: block;
    padding: 24px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--shadow);
    transition: 0.25s ease;
}

.quick-panel a:hover,
.category-card:hover,
.category-overview-card:hover,
.movie-card:hover {
    transform: translateY(-5px);
}

.quick-panel strong {
    display: block;
    color: var(--deep);
    font-size: 22px;
    margin-bottom: 8px;
}

.quick-panel span,
.section-heading span,
.category-card span,
.category-overview-card p,
.movie-card-body p,
.rank-copy small,
.site-footer p {
    color: var(--muted);
    line-height: 1.7;
}

.content-section {
    padding: 56px 0;
}

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

.section-heading h2,
.side-categories h2,
.page-hero h1,
.detail-info-card h1,
.text-card h2 {
    margin: 0;
    color: #111827;
    font-weight: 950;
    letter-spacing: -0.05em;
}

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

.section-link {
    min-height: 42px;
    padding: 0 18px;
}

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

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

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

.movie-card {
    min-width: 0;
    border: 1px solid rgba(251, 146, 60, 0.18);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 48px rgba(124, 45, 18, 0.09);
    transition: 0.25s ease;
}

.movie-card[hidden] {
    display: none;
}

.movie-card-link {
    display: flex;
    height: 100%;
    flex-direction: column;
}

.poster-box {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: 24px 24px 16px 16px;
    background:
        radial-gradient(circle at top, rgba(251, 191, 36, 0.42), transparent 45%),
        linear-gradient(135deg, #431407, #f97316);
}

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

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

.play-dot {
    position: absolute;
    right: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--orange);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.rank-badge,
.rank-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    box-shadow: 0 12px 28px rgba(249, 115, 22, 0.25);
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    width: 38px;
    height: 38px;
    border-radius: 14px;
}

.movie-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
}

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.movie-card h3 {
    margin: 0;
    color: #111827;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card-body p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 14px;
}

.tag-row {
    margin-top: auto;
}

.tag-row span {
    color: #9a3412;
    background: #ffedd5;
}

.warm-section {
    width: 100%;
    max-width: none;
    padding-left: max(16px, calc((100vw - 1200px) / 2));
    padding-right: max(16px, calc((100vw - 1200px) / 2));
    background: linear-gradient(90deg, rgba(255, 237, 213, 0.72), rgba(254, 243, 199, 0.72));
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.8fr);
    gap: 28px;
}

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

.rank-item {
    border-radius: 22px;
}

.rank-link {
    display: grid;
    grid-template-columns: 54px 78px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px;
}

.rank-number {
    width: 42px;
    height: 42px;
    border-radius: 16px;
    font-weight: 950;
}

.rank-link img {
    width: 78px;
    height: 104px;
    object-fit: cover;
    border-radius: 16px;
    background: linear-gradient(135deg, #431407, #f97316);
}

.rank-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.rank-copy b {
    color: #111827;
    font-size: 17px;
}

.rank-copy em {
    color: var(--orange);
    font-size: 13px;
    font-style: normal;
    font-weight: 800;
}

.side-categories,
.text-card,
.detail-info-card,
.player-card,
.category-overview-card,
.filter-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow);
}

.side-categories {
    align-self: start;
    padding: 28px;
}

.category-mini-grid {
    display: grid;
    gap: 12px;
    margin-top: 20px;
}

.category-card {
    position: relative;
    display: block;
    overflow: hidden;
    padding: 18px;
    border: 1px solid rgba(251, 146, 60, 0.16);
    border-radius: 18px;
    background: #ffffff;
    transition: 0.25s ease;
}

.category-card b {
    display: block;
    color: var(--deep);
    margin-bottom: 6px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    margin-top: 28px;
    padding: clamp(34px, 7vw, 72px);
    border-radius: 34px;
    background:
        radial-gradient(circle at 82% 18%, rgba(251, 146, 60, 0.26), transparent 22rem),
        linear-gradient(135deg, #fff7ed, #fffbeb);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

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

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

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

.category-overview-card {
    position: relative;
    overflow: hidden;
    min-height: 220px;
    padding: 28px;
    transition: 0.25s ease;
}

.category-orb {
    position: absolute;
    right: -40px;
    top: -40px;
    width: 140px;
    height: 140px;
    border-radius: 999px;
    background: rgba(251, 146, 60, 0.16);
}

.category-overview-card h2 {
    position: relative;
    margin: 0 0 14px;
    color: var(--deep);
    font-size: 26px;
}

.category-overview-card em {
    position: relative;
    display: block;
    margin-top: 18px;
    color: var(--orange);
    font-style: normal;
    font-weight: 800;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(150px, 0.35fr));
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px;
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid rgba(251, 146, 60, 0.24);
    border-radius: 15px;
    background: #fff7ed;
}

.empty-state {
    padding: 28px;
    text-align: center;
    color: var(--muted);
    border-radius: 20px;
    background: #ffffff;
}

.full-rank-list {
    gap: 14px;
}

.full-rank-list .rank-link {
    grid-template-columns: 64px 92px minmax(0, 1fr);
}

.full-rank-list .rank-link img {
    width: 92px;
    height: 124px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 26px auto 18px;
    color: var(--muted);
    font-size: 14px;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.48fr) minmax(320px, 0.78fr);
    gap: 24px;
    align-items: start;
}

.player-card {
    overflow: hidden;
    padding: 12px;
    background: #0f172a;
}

.video-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 20px;
    background: #000000;
}

.stream-player {
    width: 100%;
    height: 100%;
    background: #000000;
    object-fit: contain;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle at center, rgba(249, 115, 22, 0.22), rgba(0, 0, 0, 0.54));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover span {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--orange);
    background: rgba(255, 255, 255, 0.96);
    font-size: 34px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.38);
}

.video-frame.is-playing .player-cover {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.detail-info-card {
    padding: 28px;
}

.detail-info-card h1 {
    font-size: clamp(30px, 4vw, 46px);
}

.lead-text {
    color: #4b5563;
    font-size: 17px;
    line-height: 1.85;
}

.detail-meta {
    display: grid;
    gap: 10px;
    margin: 22px 0;
    color: #4b5563;
    font-weight: 700;
}

.detail-actions .btn-ghost {
    color: var(--deep);
    border-color: rgba(251, 146, 60, 0.22);
    background: #ffedd5;
}

.detail-text-section {
    padding-bottom: 20px;
}

.text-card {
    padding: clamp(24px, 4vw, 42px);
}

.text-card h2 {
    margin-top: 0;
    margin-bottom: 14px;
    font-size: 28px;
}

.text-card h2:not(:first-child) {
    margin-top: 32px;
}

.text-card p {
    color: #374151;
    font-size: 17px;
    line-height: 2;
}

.site-footer {
    margin-top: 30px;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, #fff7ed, #ffedd5);
}

.footer-grid {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 0.6fr 0.8fr;
    gap: 28px;
    padding: 44px 0;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: var(--deep);
    font-size: 17px;
}

.site-footer a:not(.footer-brand) {
    display: block;
    margin: 8px 0;
    color: #9a3412;
    font-weight: 800;
}

.footer-bottom {
    padding: 18px;
    color: #9a3412;
    text-align: center;
    border-top: 1px solid var(--line);
}

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

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

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

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

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

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

@media (max-width: 820px) {
    .nav-shell {
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px 0;
    }

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

    .main-nav {
        order: 4;
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        margin-left: 0;
        padding: 10px 0;
    }

    .main-nav.is-open {
        display: flex;
    }

    .main-nav a {
        border-radius: 16px;
        background: #fff7ed;
    }

    .hero-carousel {
        min-height: 720px;
        border-radius: 24px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: start;
        gap: 24px;
        padding: 30px;
    }

    .hero-content h1 {
        font-size: 42px;
    }

    .hero-summary {
        font-size: 16px;
    }

    .hero-poster {
        max-width: 240px;
        transform: none;
    }

    .hero-poster img {
        height: 320px;
    }

    .hero-controls {
        left: 30px;
        bottom: 104px;
    }

    .hero-search {
        width: calc(100% - 28px);
        flex-direction: column;
        border-radius: 22px;
    }

    .hero-search button {
        min-height: 44px;
    }

    .quick-panel,
    .footer-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

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

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

    .rank-link,
    .full-rank-list .rank-link {
        grid-template-columns: 48px 72px minmax(0, 1fr);
        gap: 10px;
    }

    .rank-link img,
    .full-rank-list .rank-link img {
        width: 72px;
        height: 96px;
    }

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

@media (max-width: 520px) {
    .brand-text {
        font-size: 17px;
    }

    .movie-grid,
    .all-movie-grid,
    .compact-grid {
        grid-template-columns: 1fr;
    }

    .page-hero,
    .content-section,
    .detail-main,
    .quick-panel {
        width: min(100% - 20px, 1200px);
    }

    .hero-carousel {
        width: min(100% - 20px, 1200px);
    }
}
