:root {
    --bg: #fffaf0;
    --panel: #ffffff;
    --panel-soft: #fff7ed;
    --text: #291607;
    --muted: #7c5b33;
    --line: #f5d6a5;
    --brand: #b45309;
    --brand-dark: #92400e;
    --brand-soft: #f59e0b;
    --shadow: 0 18px 55px rgba(146, 64, 14, 0.16);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, #ffffff 0%, var(--bg) 48%, #fff7ed 100%);
}

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(255, 251, 235, 0.94), rgba(255, 255, 255, 0.94), rgba(255, 247, 237, 0.94));
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(245, 214, 165, 0.78);
    box-shadow: 0 8px 24px rgba(146, 64, 14, 0.08);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand-soft), var(--brand-dark));
    box-shadow: 0 14px 30px rgba(180, 83, 9, 0.25);
}

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

.brand-text strong {
    font-size: 20px;
    color: #78350f;
    letter-spacing: 0.02em;
}

.brand-text small {
    margin-top: 4px;
    font-size: 12px;
    color: var(--brand);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link,
.mobile-link {
    color: #5d4037;
    font-weight: 700;
    padding: 10px 14px;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand-soft), var(--brand-dark));
    transform: translateY(-1px);
}

.mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: #ffedd5;
    cursor: pointer;
    padding: 11px;
}

.mobile-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    margin: 5px 0;
    background: #78350f;
    border-radius: 99px;
}

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

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

.hero-carousel {
    position: relative;
    height: min(70vh, 640px);
    min-height: 520px;
    overflow: hidden;
    background: #231307;
}

.hero-stage,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.9s ease;
}

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

.hero-slide img,
.detail-backdrop {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 22%, rgba(245, 158, 11, 0.4), transparent 32%),
        linear-gradient(90deg, rgba(24, 12, 3, 0.9) 0%, rgba(45, 22, 5, 0.74) 42%, rgba(0, 0, 0, 0.18) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1180px;
    height: 100%;
    margin: 0 auto;
    padding: 86px 22px 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    color: #ffffff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 7px 12px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(245, 158, 11, 0.92);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.eyebrow.dark {
    color: #92400e;
    background: #ffedd5;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
    max-width: 780px;
    margin: 18px 0 16px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

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

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

.hero-meta span,
.detail-meta span,
.detail-meta strong {
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-weight: 700;
}

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

.hero-actions.centered {
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand-soft), var(--brand-dark));
    box-shadow: 0 18px 36px rgba(180, 83, 9, 0.28);
}

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

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.35);
    font-size: 34px;
    cursor: pointer;
    transform: translateY(-50%);
}

.hero-arrow.prev {
    left: 22px;
}

.hero-arrow.next {
    right: 22px;
}

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

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

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

.hero-mini-strip {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4;
    background: linear-gradient(180deg, transparent, rgba(26, 12, 4, 0.82));
    padding: 24px 22px 18px;
}

.hero-mini-inner {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.hero-mini-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px;
    border-radius: 16px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(14px);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-mini-card:hover,
.hero-mini-card.active {
    background: rgba(245, 158, 11, 0.45);
    transform: translateY(-2px);
}

.hero-mini-card img {
    width: 48px;
    height: 64px;
    flex: 0 0 48px;
    border-radius: 12px;
    object-fit: cover;
}

.hero-mini-card span {
    font-size: 14px;
    font-weight: 800;
    line-height: 1.35;
}

.quick-search-panel,
.section-wrap,
.footer-grid,
.footer-bottom,
.page-hero,
.detail-wrap {
    max-width: 1180px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 22px;
    padding-right: 22px;
}

.quick-search-panel {
    margin-top: 34px;
    display: grid;
    grid-template-columns: 1fr minmax(280px, 460px);
    gap: 24px;
    align-items: center;
    padding-top: 26px;
    padding-bottom: 26px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.84);
    box-shadow: var(--shadow);
    border: 1px solid rgba(245, 214, 165, 0.82);
}

.quick-search-panel h2,
.section-title h2,
.text-card h2 {
    margin: 10px 0 0;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: #78350f;
}

.global-search-form,
.filter-bar {
    display: flex;
    gap: 12px;
    align-items: center;
}

.global-search-form input,
.filter-bar input {
    width: 100%;
    height: 48px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 18px;
    outline: 0;
    background: #fffaf0;
    color: var(--text);
}

.global-search-form input:focus,
.filter-bar input:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.global-search-form button,
.filter-pills button {
    height: 48px;
    border: 0;
    border-radius: 999px;
    padding: 0 18px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand-soft), var(--brand-dark));
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}

.section-wrap {
    padding-top: 62px;
}

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

.section-title > a,
.text-link {
    color: var(--brand-dark);
    font-weight: 800;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 210px;
    border-radius: var(--radius);
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: #ffffff;
    box-shadow: var(--shadow);
    background: #78350f;
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(45, 21, 5, 0.86));
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.category-card span,
.category-card p {
    position: relative;
    z-index: 2;
}

.category-card span {
    font-size: 22px;
    font-weight: 900;
}

.category-card p {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.6;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(245, 214, 165, 0.78);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 32px rgba(146, 64, 14, 0.09);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: #f59e0b;
    box-shadow: var(--shadow);
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #fed7aa;
}

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

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

.score,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    padding: 0 10px;
    color: #ffffff;
    font-weight: 900;
}

.score {
    right: 10px;
    bottom: 10px;
    background: rgba(146, 64, 14, 0.92);
}

.rank-badge {
    left: 10px;
    top: 10px;
    background: linear-gradient(135deg, #f59e0b, #b45309);
}

.card-body {
    padding: 16px;
}

.card-meta {
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.card-body h2 {
    margin: 10px 0 8px;
    color: #78350f;
    font-size: 19px;
    line-height: 1.35;
}

.card-body h2 a:hover {
    color: var(--brand);
}

.card-body p {
    min-height: 48px;
    margin: 0;
    color: #6b4a22;
    font-size: 14px;
    line-height: 1.65;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 14px;
}

.tag-row span,
.chip-row a {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    color: #92400e;
    background: #ffedd5;
    font-size: 12px;
    font-weight: 800;
}

.tag-row.large span {
    min-height: 34px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
}

.page-hero {
    margin-top: 28px;
    border-radius: 32px;
    overflow: hidden;
    text-align: center;
    color: #ffffff;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 237, 213, 0.32), transparent 28%),
        linear-gradient(135deg, #92400e, #d97706 48%, #f59e0b);
    box-shadow: var(--shadow);
    padding-top: 74px;
    padding-bottom: 74px;
}

.page-hero.slim {
    padding-top: 58px;
    padding-bottom: 58px;
}

.page-hero h1 {
    margin-left: auto;
    margin-right: auto;
}

.page-hero p {
    max-width: 760px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
    line-height: 1.8;
}

.ranking-hero {
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 237, 213, 0.44), transparent 34%),
        linear-gradient(135deg, #451a03, #92400e 48%, #d97706);
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 26px;
}

.chip-row a:hover {
    color: #ffffff;
    background: #92400e;
}

.filter-bar {
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid rgba(245, 214, 165, 0.82);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 12px 34px rgba(146, 64, 14, 0.08);
}

.filter-bar.large {
    align-items: flex-start;
    flex-direction: column;
}

.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-pills button {
    height: 38px;
    color: #92400e;
    background: #ffedd5;
}

.filter-pills button.active,
.filter-pills button:hover {
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand-soft), var(--brand-dark));
}

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

.category-overview-grid {
    display: grid;
    gap: 22px;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
    align-items: center;
    padding: 20px;
    border: 1px solid rgba(245, 214, 165, 0.78);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 34px rgba(146, 64, 14, 0.08);
}

.category-cover-stack {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.category-cover-stack img {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 18px;
    object-fit: cover;
}

.category-overview-card h2 {
    margin: 12px 0;
    color: #78350f;
    font-size: 30px;
}

.category-overview-card p {
    color: #6b4a22;
    line-height: 1.8;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    color: #ffffff;
    background: #231307;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    filter: blur(3px) saturate(1.05);
    transform: scale(1.02);
}

.detail-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 70% 20%, rgba(245, 158, 11, 0.35), transparent 34%),
        linear-gradient(90deg, rgba(20, 9, 2, 0.92), rgba(43, 20, 4, 0.82), rgba(20, 9, 2, 0.64));
}

.detail-wrap {
    position: relative;
    z-index: 2;
    min-height: 620px;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 42px;
    align-items: center;
    padding-top: 58px;
    padding-bottom: 58px;
}

.detail-poster img {
    width: 100%;
    border-radius: 28px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.36);
}

.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.74);
    font-weight: 700;
}

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

.detail-info h1 {
    margin-top: 18px;
}

.detail-one-line {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 19px;
    line-height: 1.8;
}

.player-section {
    padding-top: 48px;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #140902;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.movie-video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
}

.play-layer {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 16px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle at 50% 42%, rgba(245, 158, 11, 0.18), rgba(0, 0, 0, 0.52));
    cursor: pointer;
}

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

.play-icon {
    width: 82px;
    height: 82px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #92400e);
    box-shadow: 0 20px 45px rgba(245, 158, 11, 0.28);
    font-size: 34px;
    padding-left: 5px;
}

.play-layer strong {
    font-size: 20px;
    letter-spacing: 0.08em;
}

.detail-text {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.text-card {
    padding: 26px;
    border: 1px solid rgba(245, 214, 165, 0.78);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 34px rgba(146, 64, 14, 0.08);
}

.text-card h2 {
    font-size: 28px;
}

.text-card p {
    color: #5d4037;
    line-height: 1.9;
}

.site-footer {
    margin-top: 80px;
    border-top: 1px solid rgba(245, 214, 165, 0.78);
    background: linear-gradient(180deg, #fffaf0, #ffedd5);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 28px;
    padding-top: 42px;
    padding-bottom: 34px;
}

.footer-brand p {
    max-width: 520px;
    margin: 8px 0 0;
    color: #6b4a22;
    line-height: 1.7;
}

.site-footer h2 {
    margin: 0 0 12px;
    color: #78350f;
    font-size: 18px;
}

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

.footer-links a {
    color: #6b4a22;
    font-weight: 700;
}

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

.footer-bottom {
    padding-top: 18px;
    padding-bottom: 26px;
    border-top: 1px solid rgba(245, 214, 165, 0.82);
    color: #7c5b33;
    text-align: center;
    font-weight: 700;
}

@media (max-width: 1024px) {
    .category-grid,
    .movie-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hero-mini-inner {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

    .mobile-toggle {
        display: block;
    }

    .hero-carousel {
        height: auto;
        min-height: 640px;
    }

    .hero-content {
        padding-top: 78px;
        padding-bottom: 190px;
    }

    .hero-arrow {
        display: none;
    }

    .hero-mini-strip {
        padding-bottom: 16px;
    }

    .hero-mini-inner,
    .category-grid,
    .movie-grid,
    .footer-grid,
    .detail-text,
    .quick-search-panel,
    .category-overview-card,
    .detail-wrap {
        grid-template-columns: 1fr;
    }

    .hero-mini-card:nth-child(n + 4) {
        display: none;
    }

    .filter-bar,
    .global-search-form,
    .section-title {
        align-items: stretch;
        flex-direction: column;
    }

    .detail-wrap {
        gap: 24px;
    }

    .detail-poster {
        max-width: 280px;
    }
}

@media (max-width: 560px) {
    .brand-text small {
        display: none;
    }

    .hero-content h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 36px;
    }

    .hero-content p,
    .page-hero p,
    .detail-one-line {
        font-size: 16px;
    }

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

    .card-body {
        padding: 12px;
    }

    .card-body h2 {
        font-size: 16px;
    }

    .card-body p {
        display: none;
    }

    .category-cover-stack {
        grid-template-columns: repeat(2, 1fr);
    }

    .player-box {
        border-radius: 20px;
    }
}
