:root {
    --bg: #fff8ed;
    --bg-soft: #fffbeb;
    --card: #ffffff;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: #fde68a;
    --brand: #f59e0b;
    --brand-dark: #b45309;
    --brand-soft: #fef3c7;
    --danger: #ef4444;
    --shadow: 0 18px 45px rgba(146, 64, 14, 0.14);
    --shadow-strong: 0 28px 80px rgba(31, 41, 55, 0.28);
    --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;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.14), transparent 34rem),
        linear-gradient(180deg, #fff8ed 0%, #fffdf8 42%, #fff8ed 100%);
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    border: 0;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(253, 230, 138, 0.82);
    background: rgba(255, 248, 237, 0.86);
    backdrop-filter: blur(18px);
    box-shadow: 0 12px 32px rgba(146, 64, 14, 0.08);
}

.header-inner {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: none;
    font-size: 22px;
    font-weight: 900;
    color: var(--brand-dark);
    letter-spacing: -0.03em;
}

.logo-mark {
    width: 42px;
    height: 42px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #ef4444 72%, #7c2d12);
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.38);
}

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

.main-nav a {
    padding: 10px 13px;
    border-radius: 999px;
    color: #7c2d12;
    font-size: 15px;
    font-weight: 700;
    transition: 0.22s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: #ffffff;
    background: var(--brand);
    box-shadow: 0 12px 26px rgba(245, 158, 11, 0.26);
}

.nav-search {
    position: relative;
    width: min(260px, 26vw);
    flex: none;
}

.nav-search input,
.hero-search input,
.filter-input,
.filter-select {
    width: 100%;
    border: 1px solid rgba(245, 158, 11, 0.24);
    outline: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--ink);
    box-shadow: 0 8px 24px rgba(146, 64, 14, 0.08);
    transition: 0.2s ease;
}

.nav-search input {
    padding: 11px 42px 11px 16px;
}

.nav-search button {
    position: absolute;
    top: 50%;
    right: 6px;
    width: 34px;
    height: 34px;
    transform: translateY(-50%);
    border-radius: 50%;
    color: #ffffff;
    background: var(--brand);
}

.nav-search input:focus,
.hero-search input:focus,
.filter-input:focus,
.filter-select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.search-suggestions {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    overflow: hidden;
    border: 1px solid rgba(245, 158, 11, 0.18);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.search-suggestions.open {
    display: block;
}

.search-suggestions a {
    display: block;
    padding: 10px 14px;
    color: var(--ink);
    font-size: 14px;
    border-bottom: 1px solid #fff3d0;
}

.search-suggestions a:hover {
    background: var(--brand-soft);
    color: var(--brand-dark);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: var(--brand-dark);
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(146, 64, 14, 0.12);
}

.mobile-nav {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 0 0 16px;
}

.mobile-nav.open {
    display: grid;
}

.mobile-nav a {
    padding: 12px 14px;
    border-radius: 16px;
    background: #ffffff;
    color: var(--brand-dark);
    font-weight: 800;
    box-shadow: 0 8px 22px rgba(146, 64, 14, 0.08);
}

.hero {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    color: #ffffff;
    background: #111827;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.72s ease;
}

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

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    filter: saturate(1.1);
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(circle at 78% 38%, rgba(245, 158, 11, 0.36), transparent 22rem),
        linear-gradient(90deg, rgba(17, 24, 39, 0.95) 0%, rgba(17, 24, 39, 0.72) 44%, rgba(17, 24, 39, 0.18) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.18) 0%, rgba(17, 24, 39, 0.84) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 70vh;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) 320px;
    align-items: center;
    gap: 46px;
    padding: 72px 0;
}

.hero-badge,
.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 8px 14px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(245, 158, 11, 0.92);
    font-size: 14px;
    font-weight: 900;
    box-shadow: 0 12px 26px rgba(245, 158, 11, 0.3);
}

.hero h1,
.page-hero h1,
.detail-title {
    margin: 0;
    letter-spacing: -0.05em;
    line-height: 1.05;
}

.hero h1 {
    max-width: 820px;
    margin-top: 18px;
    font-size: clamp(42px, 6vw, 76px);
    font-weight: 950;
}

.hero-desc {
    max-width: 760px;
    margin: 22px 0 0;
    color: #e5e7eb;
    font-size: clamp(17px, 2vw, 22px);
}

.hero-meta,
.detail-meta,
.card-meta,
.rank-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-meta {
    margin-top: 24px;
}

.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    color: #fef3c7;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    font-size: 14px;
    font-weight: 800;
}

.hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 34px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 12px 20px;
    border-radius: 999px;
    font-weight: 900;
    transition: 0.22s ease;
}

.btn-primary {
    color: #ffffff;
    background: var(--brand);
    box-shadow: 0 16px 34px rgba(245, 158, 11, 0.32);
}

.btn-primary:hover {
    background: #d97706;
    transform: translateY(-2px);
}

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

.btn-light {
    color: var(--brand-dark);
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(146, 64, 14, 0.12);
}

.hero-search {
    position: relative;
    width: min(100%, 520px);
    margin-top: 28px;
}

.hero-search input {
    min-height: 58px;
    padding: 0 60px 0 22px;
    font-size: 16px;
}

.hero-search button {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #ffffff;
    background: var(--brand);
}

.hero-poster-card {
    align-self: center;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 32px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: var(--shadow-strong);
    backdrop-filter: blur(16px);
}

.hero-poster-card img {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 24px;
    object-fit: cover;
    filter: none;
    transform: none;
}

.hero-mini-info {
    padding: 15px 4px 2px;
}

.hero-mini-info strong {
    display: block;
    font-size: 18px;
}

.hero-mini-info span {
    color: #fde68a;
    font-size: 13px;
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    transition: 0.22s ease;
}

.hero-dot.active {
    width: 34px;
    background: var(--brand);
}

.section {
    padding: 54px 0;
}

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

.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--brand-dark);
    font-weight: 900;
}

.section-title {
    margin: 4px 0 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.section-desc {
    margin: 10px 0 0;
    max-width: 680px;
    color: var(--muted);
}

.category-strip {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 3px 0 12px;
    scrollbar-width: thin;
}

.category-pill {
    flex: none;
    padding: 12px 16px;
    border-radius: 999px;
    color: #7c2d12;
    background: #ffffff;
    font-weight: 900;
    box-shadow: 0 12px 28px rgba(146, 64, 14, 0.1);
    transition: 0.22s ease;
}

.category-pill:hover,
.category-pill.active {
    color: #ffffff;
    background: var(--brand);
    transform: translateY(-2px);
}

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

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

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

.movie-card a {
    display: block;
    height: 100%;
    border-radius: 24px;
    background: var(--card);
    box-shadow: 0 12px 28px rgba(146, 64, 14, 0.1);
    overflow: hidden;
    transition: 0.24s ease;
}

.movie-card a:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 46px rgba(146, 64, 14, 0.2);
}

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

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

.movie-card a:hover img,
.rank-card:hover img,
.related-card:hover img {
    transform: scale(1.08);
}

.poster-overlay {
    position: absolute;
    inset: auto 0 0;
    min-height: 44%;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
    padding: 12px;
    color: #ffffff;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.78));
}

.score-pill,
.type-pill {
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    background: rgba(245, 158, 11, 0.92);
}

.type-pill {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(6px);
}

.card-body {
    padding: 14px;
}

.card-title {
    margin: 0;
    display: -webkit-box;
    min-height: 45px;
    overflow: hidden;
    color: var(--ink);
    font-size: 16px;
    line-height: 1.4;
    font-weight: 900;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
}

.card-line {
    margin-top: 8px;
    display: -webkit-box;
    min-height: 40px;
    overflow: hidden;
    color: #7c2d12;
    font-size: 13px;
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.rank-card {
    position: relative;
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 14px;
    min-height: 170px;
    padding: 12px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(146, 64, 14, 0.1);
    overflow: hidden;
    transition: 0.22s ease;
}

.rank-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 46px rgba(146, 64, 14, 0.18);
}

.rank-poster {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: var(--brand-soft);
}

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

.rank-index {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, #ef4444, #f59e0b);
    font-weight: 950;
}

.rank-info h3 {
    margin: 4px 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

.rank-info p {
    margin: 8px 0 0;
    color: var(--muted);
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

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

.category-panel {
    position: relative;
    overflow: hidden;
    min-height: 260px;
    padding: 24px;
    border-radius: 30px;
    color: #ffffff;
    background: linear-gradient(135deg, #92400e, #f59e0b);
    box-shadow: var(--shadow);
}

.category-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 82% 20%, rgba(255, 255, 255, 0.28), transparent 14rem);
}

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

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

.category-panel p {
    margin: 10px 0 22px;
    color: #fffbeb;
}

.panel-posters {
    display: flex;
    gap: 9px;
    margin-top: 18px;
}

.panel-posters img {
    width: 64px;
    height: 86px;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.18);
}

.page-hero {
    padding: 58px 0 42px;
    color: #ffffff;
    background:
        radial-gradient(circle at 78% 16%, rgba(245, 158, 11, 0.34), transparent 18rem),
        linear-gradient(135deg, #1f2937 0%, #7c2d12 52%, #f59e0b 100%);
}

.page-hero h1 {
    max-width: 900px;
    font-size: clamp(36px, 5vw, 62px);
    font-weight: 950;
}

.page-hero p {
    max-width: 760px;
    margin: 16px 0 0;
    color: #fffbeb;
    font-size: 18px;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 180px;
    gap: 14px;
    margin-bottom: 26px;
    padding: 18px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 12px 28px rgba(146, 64, 14, 0.09);
}

.filter-input,
.filter-select {
    height: 48px;
    padding: 0 16px;
    border-radius: 16px;
}

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

.breadcrumb a:hover {
    color: var(--brand-dark);
}

.detail-wrap {
    padding: 36px 0 60px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) 360px;
    gap: 28px;
    align-items: start;
}

.detail-main,
.detail-side,
.content-card {
    border-radius: 30px;
    background: #ffffff;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #0f172a;
    cursor: pointer;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #ffffff;
    background:
        radial-gradient(circle at center, rgba(245, 158, 11, 0.2), transparent 16rem),
        linear-gradient(180deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.72));
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-button {
    width: 92px;
    height: 92px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, #ef4444, #f59e0b);
    box-shadow: 0 22px 48px rgba(239, 68, 68, 0.34);
    font-size: 34px;
    transform: translateZ(0);
}

.player-text {
    margin-top: 12px;
    text-align: center;
    font-weight: 900;
}

.detail-content {
    padding: 26px;
}

.detail-title {
    font-size: clamp(32px, 5vw, 54px);
    font-weight: 950;
}

.detail-meta {
    margin-top: 16px;
}

.detail-meta .meta-chip {
    color: #7c2d12;
    background: #fffbeb;
    border-color: #fde68a;
}

.detail-section {
    margin-top: 28px;
}

.detail-section h2 {
    margin: 0 0 10px;
    font-size: 24px;
}

.detail-section p {
    margin: 0;
    color: #374151;
    font-size: 16px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.tag-list span,
.tag-list a {
    padding: 8px 12px;
    border-radius: 999px;
    color: #7c2d12;
    background: var(--brand-soft);
    font-size: 13px;
    font-weight: 800;
}

.detail-side {
    position: sticky;
    top: 96px;
    padding: 16px;
}

.detail-cover {
    overflow: hidden;
    border-radius: 24px;
    background: var(--brand-soft);
}

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

.side-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 14px;
}

.side-stat {
    padding: 12px;
    border-radius: 18px;
    background: #fff7ed;
}

.side-stat strong {
    display: block;
    color: var(--brand-dark);
    font-size: 18px;
}

.side-stat span {
    color: var(--muted);
    font-size: 12px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 18px;
}

.related-card {
    overflow: hidden;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(146, 64, 14, 0.1);
}

.related-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: 0.45s ease;
}

.related-card strong {
    display: -webkit-box;
    min-height: 44px;
    padding: 12px;
    overflow: hidden;
    font-size: 15px;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

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

.site-footer {
    margin-top: 30px;
    padding: 44px 0;
    color: #fffbeb;
    background:
        radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.3), transparent 18rem),
        linear-gradient(135deg, #1f2937, #7c2d12);
}

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

.footer-grid p,
.footer-grid a {
    color: #fde68a;
}

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

.footer-links {
    display: grid;
    gap: 8px;
}

@media (max-width: 1100px) {
    .movie-grid,
    .movie-grid.compact,
    .related-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

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

    .detail-side {
        position: static;
        display: grid;
        grid-template-columns: 220px minmax(0, 1fr);
        gap: 18px;
    }
}

@media (max-width: 860px) {
    .header-inner {
        height: auto;
        min-height: 66px;
        padding: 10px 0;
    }

    .main-nav,
    .nav-search {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .hero,
    .hero-content {
        min-height: 760px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 26px;
        padding: 44px 0 86px;
    }

    .hero-poster-card {
        width: min(280px, 70vw);
    }

    .section-head {
        display: block;
    }

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

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

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

    .logo {
        font-size: 18px;
    }

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

    .hero h1 {
        font-size: 40px;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

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

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

    .rank-card {
        grid-template-columns: 104px minmax(0, 1fr);
    }

    .detail-content {
        padding: 18px;
    }

    .detail-side {
        display: block;
    }

    .side-stats {
        grid-template-columns: 1fr 1fr;
    }

    .page-hero {
        padding: 42px 0 30px;
    }
}
