:root {
    --bg: #fff7ed;
    --bg-soft: #ffedd5;
    --text: #1f2937;
    --muted: #6b7280;
    --line: rgba(146, 64, 14, 0.16);
    --amber: #f59e0b;
    --orange: #ea580c;
    --rose: #9f1239;
    --card: #ffffff;
    --shadow: 0 18px 45px rgba(124, 45, 18, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 48%, #fff1f2 100%);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, #78350f 0%, #9a3412 48%, #881337 100%);
    box-shadow: 0 10px 30px rgba(67, 20, 7, 0.25);
}

.nav-shell {
    max-width: 1180px;
    height: 68px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #ffedd5;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, #fbbf24, #ea580c);
    box-shadow: 0 10px 25px rgba(251, 146, 60, 0.35);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    color: #fde68a;
    font-weight: 600;
}

.desktop-nav a,
.mobile-nav a {
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active {
    color: #ffffff;
}

.mobile-toggle {
    display: none;
    border: 0;
    color: #fff7ed;
    background: transparent;
    font-size: 28px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    padding: 8px 20px 18px;
    background: rgba(120, 53, 15, 0.97);
}

.mobile-nav.open {
    display: grid;
    gap: 8px;
}

.mobile-nav a {
    padding: 12px 14px;
    color: #ffedd5;
    border-radius: 14px;
}

.mobile-nav a:hover,
.mobile-nav a.active {
    background: rgba(251, 191, 36, 0.16);
    color: #ffffff;
}

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

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

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

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

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.42) 48%, rgba(0, 0, 0, 0.12) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1180px;
    height: 100%;
    margin: 0 auto;
    padding: 0 20px 86px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.hero-kicker {
    display: inline-flex;
    width: fit-content;
    gap: 8px;
    padding: 7px 13px;
    margin-bottom: 18px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.92);
    font-size: 14px;
    font-weight: 700;
}

.hero h1 {
    max-width: 780px;
    margin: 0 0 16px;
    font-size: clamp(42px, 6vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.04em;
    text-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.hero p {
    max-width: 720px;
    margin: 0 0 24px;
    color: #e5e7eb;
    font-size: 19px;
    line-height: 1.7;
}

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

.btn-primary,
.btn-ghost,
.btn-soft {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    border-radius: 999px;
    font-weight: 800;
    border: 0;
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.btn-primary {
    color: #ffffff;
    background: linear-gradient(90deg, #f59e0b, #ea580c);
    box-shadow: 0 14px 30px rgba(234, 88, 12, 0.32);
}

.btn-primary:hover,
.btn-ghost:hover,
.btn-soft:hover {
    transform: translateY(-2px) scale(1.02);
}

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

.btn-soft {
    color: #9a3412;
    background: #fff7ed;
    border: 1px solid rgba(245, 158, 11, 0.24);
}

.hero-control {
    position: absolute;
    z-index: 3;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.46);
    cursor: pointer;
    transition: background 0.2s ease;
}

.hero-control:hover {
    background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

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

.hero-dots button.active {
    width: 34px;
    background: #f59e0b;
}

.hero-search {
    position: absolute;
    z-index: 5;
    right: max(20px, calc((100vw - 1180px) / 2 + 20px));
    bottom: 84px;
    width: min(360px, calc(100vw - 40px));
}

.search-box {
    display: flex;
    padding: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(18px);
}

.search-box input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    color: #ffffff;
    background: transparent;
    padding: 0 14px;
    font-size: 15px;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.76);
}

.search-box button {
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(90deg, #f59e0b, #ea580c);
    padding: 10px 16px;
    font-weight: 800;
    cursor: pointer;
}

.search-results {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 10px);
    max-height: 360px;
    overflow: auto;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
    border: 1px solid rgba(245, 158, 11, 0.22);
}

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

.search-results a,
.search-results span {
    display: block;
    padding: 13px 16px;
    color: var(--text);
    border-bottom: 1px solid rgba(245, 158, 11, 0.12);
}

.search-results strong {
    display: block;
    color: #9a3412;
    margin-bottom: 4px;
}

.section {
    max-width: 1180px;
    margin: 0 auto;
    padding: 66px 20px 0;
}

.section-fluid {
    margin-top: 66px;
    padding: 66px 20px;
    background: linear-gradient(90deg, rgba(255, 228, 230, 0.76), rgba(255, 237, 213, 0.85));
}

.section-inner {
    max-width: 1180px;
    margin: 0 auto;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}

.section-heading h1,
.section-heading h2 {
    margin: 0;
    color: transparent;
    background: linear-gradient(90deg, #92400e, #c2410c);
    -webkit-background-clip: text;
    background-clip: text;
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 900;
    letter-spacing: -0.03em;
}

.section-heading p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

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

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

.movie-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 20px;
    background: var(--card);
    box-shadow: 0 8px 22px rgba(124, 45, 18, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.14);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow);
    border-color: rgba(245, 158, 11, 0.38);
}

.movie-card figure {
    position: relative;
    margin: 0;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #fed7aa, #fecdd3);
}

.movie-card-wide figure {
    aspect-ratio: 16 / 9;
}

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

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

.movie-year {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 9px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.68);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.movie-card-body {
    padding: 15px;
}

.movie-card h3 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card:hover h3 {
    color: #c2410c;
}

.movie-card p {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-tags,
.movie-meta-line,
.rank-meta,
.detail-meta,
.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.movie-tags span,
.movie-meta-line span,
.rank-meta span,
.detail-meta span,
.tag-list span {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    color: #b45309;
    background: #fffbeb;
    font-size: 12px;
    font-weight: 700;
}

.hot-scroll {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    padding: 6px 2px 16px;
    scroll-snap-type: x mandatory;
}

.hot-card {
    flex: 0 0 300px;
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 22px;
    scroll-snap-align: start;
    box-shadow: var(--shadow);
    background: #111827;
}

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

.hot-card:hover img {
    transform: scale(1.06);
}

.hot-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.12));
}

.hot-card div {
    position: absolute;
    z-index: 2;
    left: 18px;
    right: 18px;
    bottom: 18px;
    color: #ffffff;
}

.hot-card h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.hot-card p {
    margin: 0;
    color: #fcd34d;
    font-size: 14px;
}

.category-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.category-tabs button {
    border: 1px solid rgba(245, 158, 11, 0.24);
    background: #ffffff;
    color: #78350f;
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.category-tabs button.active,
.category-tabs button:hover {
    color: #ffffff;
    background: linear-gradient(90deg, #f59e0b, #ea580c);
    transform: translateY(-1px);
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 66px 128px minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
    overflow: hidden;
    min-height: 116px;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid rgba(245, 158, 11, 0.16);
    box-shadow: 0 8px 20px rgba(124, 45, 18, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow);
}

.rank-num {
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    font-size: 28px;
    font-weight: 900;
}

.rank-item img {
    width: 128px;
    height: 116px;
    object-fit: cover;
}

.rank-item div {
    min-width: 0;
    padding: 16px 16px 16px 0;
}

.rank-item h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

.rank-item p {
    margin: 0 0 10px;
    color: var(--muted);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 220px;
    border-radius: 26px;
    padding: 28px;
    color: #ffffff;
    background: linear-gradient(135deg, #92400e, #ea580c 52%, #9f1239);
    box-shadow: var(--shadow);
}

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

.category-card p {
    max-width: 520px;
    margin: 0 0 22px;
    color: #ffedd5;
    line-height: 1.7;
}

.category-mini-posters {
    display: flex;
    gap: 8px;
    margin-top: 18px;
}

.category-mini-posters img {
    width: 58px;
    height: 76px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
}

.page-hero {
    max-width: 1180px;
    margin: 0 auto;
    padding: 58px 20px 20px;
}

.page-hero-card {
    border-radius: 30px;
    padding: 42px;
    color: #ffffff;
    background: radial-gradient(circle at top left, rgba(251, 191, 36, 0.34), transparent 34%), linear-gradient(135deg, #78350f, #9a3412 48%, #881337);
    box-shadow: var(--shadow);
}

.page-hero-card h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 58px);
    letter-spacing: -0.04em;
}

.page-hero-card p {
    max-width: 760px;
    margin: 0;
    color: #ffedd5;
    font-size: 18px;
    line-height: 1.8;
}

.filter-bar {
    display: flex;
    gap: 12px;
    margin: 28px 0;
}

.filter-bar input {
    flex: 1;
    border: 1px solid rgba(245, 158, 11, 0.28);
    border-radius: 999px;
    padding: 14px 18px;
    outline: 0;
    background: #ffffff;
    color: var(--text);
    font-size: 15px;
    box-shadow: 0 8px 20px rgba(124, 45, 18, 0.07);
}

.detail-shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 34px 20px 0;
}

.breadcrumbs {
    color: #92400e;
    font-size: 14px;
    margin-bottom: 22px;
}

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

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 0.85fr);
    gap: 28px;
    align-items: start;
}

.detail-main,
.detail-side,
.story-panel {
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(124, 45, 18, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.14);
}

.detail-main {
    overflow: hidden;
}

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

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

.play-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.12));
    cursor: pointer;
    transition: opacity 0.25s ease;
}

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

.play-button {
    display: grid;
    width: 92px;
    height: 92px;
    place-items: center;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(245, 158, 11, 0.92);
    box-shadow: 0 20px 48px rgba(245, 158, 11, 0.38);
    font-size: 34px;
    cursor: pointer;
    transition: transform 0.22s ease, background 0.22s ease;
}

.play-button:hover {
    transform: scale(1.08);
    background: #ea580c;
}

.player-message {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    display: none;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.72);
    border-radius: 14px;
    padding: 12px 14px;
    text-align: center;
}

.player-message.show {
    display: block;
}

.detail-info {
    padding: 24px;
}

.detail-info h1 {
    margin: 0 0 18px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.detail-meta {
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid rgba(245, 158, 11, 0.16);
}

.story-panel {
    padding: 24px;
    margin-top: 24px;
}

.story-panel h2 {
    margin: 0 0 14px;
    color: #78350f;
}

.story-panel p {
    margin: 0 0 18px;
    color: #4b5563;
    line-height: 1.9;
}

.detail-side {
    padding: 18px;
    position: sticky;
    top: 92px;
}

.detail-side img {
    width: 100%;
    border-radius: 18px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: linear-gradient(135deg, #fed7aa, #fecdd3);
}

.side-block {
    padding: 18px 4px 4px;
}

.side-block h2 {
    margin: 0 0 12px;
    font-size: 20px;
    color: #78350f;
}

.tag-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

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

.no-result {
    display: none;
    padding: 30px;
    text-align: center;
    border-radius: 20px;
    color: var(--muted);
    background: #ffffff;
}

.no-result.show {
    display: block;
}

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

    .mobile-toggle {
        display: inline-flex;
    }

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

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

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

    .detail-side {
        position: static;
    }

    .hero-search {
        left: 20px;
        right: 20px;
        bottom: 26px;
        width: auto;
    }

    .hero-content {
        padding-bottom: 116px;
    }
}

@media (max-width: 680px) {
    .hero {
        min-height: 640px;
    }

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

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

    .hero-control {
        display: none;
    }

    .section,
    .section-fluid,
    .page-hero,
    .detail-shell {
        padding-left: 14px;
        padding-right: 14px;
    }

    .section-heading {
        display: block;
    }

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

    .rank-item {
        grid-template-columns: 52px 86px minmax(0, 1fr);
        gap: 10px;
    }

    .rank-item img {
        width: 86px;
        height: 106px;
    }

    .rank-item div {
        padding: 12px 12px 12px 0;
    }

    .rank-item p,
    .rank-meta {
        display: none;
    }

    .page-hero-card {
        padding: 28px;
    }

    .category-card {
        min-height: 0;
        padding: 22px;
    }

    .category-mini-posters {
        display: none;
    }

    .brand {
        font-size: 21px;
    }
}
