:root {
    --bg: #fff7ed;
    --paper: #ffffff;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: #fed7aa;
    --brand: #c2410c;
    --brand-dark: #7c2d12;
    --brand-soft: #ffedd5;
    --amber: #f59e0b;
    --shadow: 0 24px 60px rgba(124, 45, 18, 0.18);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background:
        radial-gradient(circle at 20% 0%, rgba(251, 191, 36, 0.24), transparent 32rem),
        linear-gradient(180deg, #fff7ed 0%, #ffffff 44%, #fff7ed 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(90deg, #78350f, #c2410c, #78350f);
    box-shadow: 0 12px 30px rgba(124, 45, 18, 0.22);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    width: min(1180px, calc(100% - 2rem));
    height: 4.25rem;
    margin: 0 auto;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-width: max-content;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    color: #7c2d12;
    font-weight: 900;
    border-radius: 999px;
    background: #fde68a;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-text strong {
    font-size: 1.15rem;
    letter-spacing: 0.04em;
}

.brand-text em {
    margin-top: 0.2rem;
    color: #fde68a;
    font-size: 0.76rem;
    font-style: normal;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    font-weight: 700;
}

.main-nav a,
.nav-dropdown button {
    color: rgba(255, 255, 255, 0.86);
    font: inherit;
    border: 0;
    background: transparent;
    cursor: pointer;
    transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active,
.nav-dropdown button:hover {
    color: #fde68a;
}

.nav-dropdown {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    top: calc(100% + 0.8rem);
    left: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(8rem, 1fr));
    gap: 0.15rem;
    width: 19rem;
    padding: 0.75rem;
    color: #374151;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 1rem;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(0.5rem);
    transition: all 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-panel a {
    padding: 0.65rem 0.75rem;
    color: #374151;
    border-radius: 0.7rem;
}

.dropdown-panel a:hover {
    color: #9a3412;
    background: #ffedd5;
}

.nav-search {
    display: flex;
    align-items: center;
    min-width: 18rem;
    padding: 0.2rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
}

.nav-search input {
    flex: 1;
    min-width: 0;
    padding: 0.62rem 0.9rem;
    color: #ffffff;
    border: 0;
    outline: 0;
    background: transparent;
}

.nav-search input::placeholder {
    color: #fde68a;
}

.nav-search button {
    padding: 0.55rem 0.95rem;
    color: #7c2d12;
    font-weight: 800;
    border: 0;
    border-radius: 999px;
    background: #fde68a;
    cursor: pointer;
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 0.3rem;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.mobile-toggle span {
    display: block;
    width: 1.55rem;
    height: 0.14rem;
    border-radius: 999px;
    background: #ffffff;
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 0 0 1rem;
}

.mobile-panel a {
    display: block;
    padding: 0.75rem 0;
    color: rgba(255, 255, 255, 0.9);
    border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.mobile-panel form {
    margin-top: 0.75rem;
}

.mobile-panel input {
    width: 100%;
    padding: 0.8rem 1rem;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    outline: 0;
    background: rgba(255, 255, 255, 0.12);
}

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

main {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
}

.hero {
    position: relative;
    width: 100%;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, #78350f, #c2410c 52%, #92400e);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.2), transparent 16rem),
        linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.42));
}

.hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: 1.05fr 1.3fr;
    gap: 2.2rem;
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 5rem 0 4.5rem;
}

.hero-copy {
    align-self: center;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 1.1rem;
    padding: 0.4rem 0.8rem;
    color: #fde68a;
    font-weight: 800;
    border: 1px solid rgba(253, 230, 138, 0.32);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.hero h1 {
    margin: 0 0 1rem;
    font-size: clamp(2.4rem, 5vw, 4.8rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero p {
    max-width: 42rem;
    margin: 0 0 1.5rem;
    color: #fffbeb;
    font-size: 1.12rem;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin: 1.5rem 0 1.25rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.8rem;
    padding: 0.78rem 1.15rem;
    color: #ffffff;
    font-weight: 900;
    border-radius: 999px;
    background: #ea580c;
    box-shadow: 0 16px 30px rgba(124, 45, 18, 0.26);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    background: #c2410c;
    box-shadow: 0 20px 36px rgba(124, 45, 18, 0.34);
}

.btn-light {
    color: #7c2d12;
    background: #fde68a;
}

.btn-ghost {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.08);
}

.hero-search {
    display: flex;
    max-width: 35rem;
    padding: 0.26rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(8px);
}

.hero-search input {
    flex: 1;
    min-width: 0;
    padding: 0.9rem 1.05rem;
    color: #ffffff;
    border: 0;
    outline: 0;
    background: transparent;
}

.hero-search input::placeholder {
    color: #ffedd5;
}

.hero-search button {
    min-width: 6rem;
    color: #7c2d12;
    font-weight: 900;
    border: 0;
    border-radius: 999px;
    background: #fde68a;
    cursor: pointer;
}

.hero-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.hero-card {
    position: relative;
    min-height: 29rem;
    overflow: hidden;
    border-radius: 1.25rem;
    box-shadow: 0 28px 50px rgba(0, 0, 0, 0.28);
    transform: translateY(0);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hero-card:hover {
    transform: translateY(-0.35rem) scale(1.015);
    box-shadow: 0 35px 70px rgba(0, 0, 0, 0.36);
}

.hero-card img {
    width: 100%;
    height: 100%;
    min-height: 29rem;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.hero-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 20%, rgba(0, 0, 0, 0.78) 100%);
}

.hero-card-content {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    padding: 1rem;
}

.hero-card-content strong {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 1.05rem;
    line-height: 1.35;
}

.hero-card-content span {
    display: inline-flex;
    margin-bottom: 0.5rem;
    padding: 0.18rem 0.55rem;
    color: #7c2d12;
    font-size: 0.76rem;
    font-weight: 900;
    border-radius: 999px;
    background: #fde68a;
}

.hero-card-content p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: #e5e7eb;
    font-size: 0.88rem;
    line-height: 1.55;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.content-section {
    margin: 4rem 0;
}

.section-title {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.4rem;
}

.section-title h2 {
    margin: 0;
    color: #111827;
    font-size: clamp(1.55rem, 3vw, 2.3rem);
}

.section-title p {
    margin: 0.35rem 0 0;
    color: var(--muted);
    line-height: 1.6;
}

.section-title a {
    color: #ea580c;
    font-weight: 900;
}

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

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

.movie-card {
    min-width: 0;
}

.movie-card a {
    display: block;
    height: 100%;
    overflow: hidden;
    border: 1px solid #fed7aa;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 14px 34px rgba(124, 45, 18, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.movie-card a:hover {
    transform: translateY(-0.32rem);
    border-color: #fb923c;
    box-shadow: 0 24px 48px rgba(124, 45, 18, 0.18);
}

.poster-frame {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #92400e, #111827);
}

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

.movie-card a:hover .poster-frame img {
    transform: scale(1.06);
}

.poster-frame::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 46%;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.62));
}

.year-badge,
.type-badge {
    position: absolute;
    z-index: 1;
    padding: 0.25rem 0.5rem;
    color: #ffffff;
    font-size: 0.74rem;
    font-weight: 800;
    border-radius: 0.55rem;
    background: rgba(0, 0, 0, 0.68);
}

.year-badge {
    top: 0.65rem;
    right: 0.65rem;
}

.type-badge {
    bottom: 0.65rem;
    left: 0.65rem;
}

.card-body {
    padding: 0.95rem;
}

.card-body h2 {
    display: -webkit-box;
    overflow: hidden;
    min-height: 2.75rem;
    margin: 0 0 0.55rem;
    color: #111827;
    font-size: 1rem;
    line-height: 1.38;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-body p {
    display: -webkit-box;
    overflow: hidden;
    min-height: 2.9rem;
    margin: 0 0 0.75rem;
    color: #4b5563;
    font-size: 0.88rem;
    line-height: 1.65;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
    color: #6b7280;
    font-size: 0.76rem;
}

.card-meta span:first-child {
    flex: 0 0 auto;
    padding: 0.25rem 0.5rem;
    color: #b45309;
    font-weight: 900;
    border-radius: 0.45rem;
    background: #fffbeb;
}

.card-meta span:last-child {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.tag-row span {
    padding: 0.18rem 0.48rem;
    color: #4b5563;
    font-size: 0.72rem;
    border-radius: 999px;
    background: #f3f4f6;
}

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

.category-tile {
    padding: 1.25rem;
    min-height: 11rem;
    overflow: hidden;
    position: relative;
    border-radius: 1.1rem;
    color: #ffffff;
    background: linear-gradient(135deg, #92400e, #ea580c);
    box-shadow: var(--shadow);
}

.category-tile::after {
    content: "";
    position: absolute;
    width: 9rem;
    height: 9rem;
    right: -3rem;
    bottom: -3rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
}

.category-tile strong {
    display: block;
    margin-bottom: 0.6rem;
    font-size: 1.25rem;
}

.category-tile p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: #fffbeb;
    line-height: 1.7;
}

.ranking-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1.25rem;
}

.rank-list {
    display: grid;
    gap: 0.75rem;
}

.compact-card {
    display: grid;
    grid-template-columns: auto 4.3rem 1fr;
    align-items: center;
    gap: 0.85rem;
    padding: 0.72rem;
    border: 1px solid #fed7aa;
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(124, 45, 18, 0.08);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.compact-card:hover {
    transform: translateX(0.28rem);
    border-color: #fb923c;
}

.compact-card img {
    width: 4.3rem;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 0.7rem;
    background: #92400e;
}

.compact-card strong {
    display: -webkit-box;
    overflow: hidden;
    margin-bottom: 0.3rem;
    color: #111827;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.compact-card em {
    display: block;
    color: #6b7280;
    font-size: 0.82rem;
    font-style: normal;
}

.rank-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    color: #ffffff;
    font-weight: 900;
    border-radius: 999px;
    background: #ea580c;
}

.page-hero {
    margin: 2rem 0;
    padding: 2.2rem;
    color: #ffffff;
    border-radius: 1.35rem;
    background: linear-gradient(135deg, #78350f, #c2410c 58%, #92400e);
    box-shadow: var(--shadow);
}

.page-hero h1 {
    margin: 0 0 0.65rem;
    font-size: clamp(1.9rem, 4vw, 3rem);
}

.page-hero p {
    max-width: 56rem;
    margin: 0;
    color: #fffbeb;
    line-height: 1.8;
}

.toolbar {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 0.8rem;
    margin-bottom: 1.25rem;
    padding: 0.9rem;
    border: 1px solid #fed7aa;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 30px rgba(124, 45, 18, 0.08);
}

.toolbar input,
.toolbar select {
    width: 100%;
    padding: 0.82rem 1rem;
    color: #374151;
    border: 1px solid #fdba74;
    border-radius: 0.8rem;
    outline: 0;
    background: #ffffff;
}

.no-results {
    display: none;
    padding: 2rem;
    text-align: center;
    color: #9a3412;
    border: 1px dashed #fb923c;
    border-radius: 1rem;
    background: #fff7ed;
}

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

.detail-hero {
    width: min(1180px, calc(100% - 2rem));
    margin: 2rem auto;
    padding: 1.25rem;
    border-radius: 1.4rem;
    background: linear-gradient(135deg, #78350f, #c2410c);
    box-shadow: var(--shadow);
}

.detail-layout {
    display: grid;
    grid-template-columns: 16rem 1fr;
    gap: 1.4rem;
    color: #ffffff;
}

.detail-poster {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 1rem;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.28);
    background: #92400e;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.8rem;
    color: #fde68a;
    font-size: 0.88rem;
}

.breadcrumbs a:hover {
    color: #ffffff;
}

.detail-layout h1 {
    margin: 0 0 0.8rem;
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.08;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin: 1rem 0;
}

.detail-meta span {
    padding: 0.38rem 0.65rem;
    color: #7c2d12;
    font-weight: 900;
    border-radius: 999px;
    background: #fde68a;
}

.detail-one-line {
    max-width: 56rem;
    color: #fffbeb;
    font-size: 1.08rem;
    line-height: 1.85;
}

.detail-main {
    display: grid;
    grid-template-columns: 1fr 18rem;
    gap: 1.35rem;
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto 4rem;
}

.detail-content,
.detail-side,
.player-section {
    border: 1px solid #fed7aa;
    border-radius: 1.1rem;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 14px 36px rgba(124, 45, 18, 0.1);
}

.player-section {
    overflow: hidden;
    margin-bottom: 1.25rem;
}

.player-heading {
    padding: 1rem 1.1rem;
    border-bottom: 1px solid #ffedd5;
}

.player-heading h2,
.detail-content h2,
.detail-side h2 {
    margin: 0;
    color: #111827;
    font-size: 1.35rem;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.movie-player {
    width: 100%;
    height: 100%;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.32);
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-symbol {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 5rem;
    height: 5rem;
    padding-left: 0.24rem;
    color: #7c2d12;
    font-size: 2rem;
    border-radius: 999px;
    background: #fde68a;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
}

.detail-content {
    padding: 1.35rem;
}

.detail-content h2 {
    margin: 0 0 0.8rem;
}

.detail-content p {
    margin: 0 0 1.35rem;
    color: #374151;
    line-height: 1.9;
}

.detail-side {
    align-self: start;
    padding: 1rem;
}

.side-list {
    display: grid;
    gap: 0.75rem;
    margin-top: 0.9rem;
}

.side-list .compact-card {
    grid-template-columns: 3.8rem 1fr;
}

.side-list .compact-card .rank-num {
    display: none;
}

.side-list .compact-card img {
    width: 3.8rem;
}

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

    .hero-inner,
    .ranking-layout,
    .detail-main {
        grid-template-columns: 1fr;
    }

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

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

    .mobile-toggle {
        display: flex;
    }

    .brand-text em {
        display: none;
    }

    .hero-inner {
        padding: 3.4rem 0 3rem;
    }

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

    .hero-card,
    .hero-card img {
        min-height: 20rem;
    }

    .movie-grid,
    .movie-grid.dense,
    .category-band {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.85rem;
    }

    .section-title,
    .toolbar {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

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

    .detail-poster {
        max-width: 16rem;
    }

    .detail-hero {
        padding: 1rem;
    }

    .card-body {
        padding: 0.8rem;
    }
}

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

    .hero-search {
        border-radius: 1rem;
        flex-direction: column;
    }

    .hero-search button {
        min-height: 2.7rem;
    }
}
