:root {
    color-scheme: light;
    --page-bg: #f8f6f0;
    --surface: #ffffff;
    --surface-soft: #fffaf0;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --brand: #b45309;
    --brand-dark: #78350f;
    --brand-light: #f59e0b;
    --line: rgba(120, 53, 15, 0.14);
    --shadow: 0 18px 45px rgba(120, 53, 15, 0.12);
    --radius: 20px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.18), transparent 34rem),
        linear-gradient(180deg, #fffaf0 0%, var(--page-bg) 32rem, #ffffff 100%);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(135deg, rgba(120, 53, 15, 0.96), rgba(180, 83, 9, 0.94));
    color: #fff7ed;
    box-shadow: 0 12px 35px rgba(120, 53, 15, 0.22);
    backdrop-filter: blur(16px);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.logo-mark {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    color: #451a03;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45), 0 10px 22px rgba(0, 0, 0, 0.18);
}

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

.main-nav a {
    padding: 10px 12px;
    border-radius: 999px;
    color: rgba(255, 247, 237, 0.92);
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    transform: translateY(-1px);
}

.header-search {
    position: relative;
    width: 220px;
}

.header-search input {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    outline: none;
}

.header-search input::placeholder {
    color: rgba(255, 247, 237, 0.78);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
}

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

.mobile-nav a,
.mobile-nav input {
    width: 100%;
    border-radius: 14px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff7ed;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

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

.hero {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    color: #fff7ed;
    background: #1c1917;
}

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

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--hero-image);
    background-position: center;
    background-size: cover;
    filter: blur(20px) saturate(1.08);
    transform: scale(1.08);
    opacity: 0.52;
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(28, 25, 23, 0.96) 0%, rgba(28, 25, 23, 0.82) 42%, rgba(28, 25, 23, 0.48) 100%),
        radial-gradient(circle at 78% 22%, rgba(245, 158, 11, 0.35), transparent 28rem);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 680px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.03fr) minmax(320px, 0.62fr);
    align-items: center;
    gap: 48px;
    padding: 64px 0;
}

.hero-copy {
    display: grid;
    gap: 20px;
}

.hero-eyebrow {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid rgba(251, 191, 36, 0.38);
    border-radius: 999px;
    background: rgba(251, 191, 36, 0.12);
    color: #fde68a;
    font-weight: 800;
}

.hero h1 {
    margin: 0;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 1.02;
    letter-spacing: -0.05em;
    font-weight: 950;
}

.hero p {
    margin: 0;
    max-width: 720px;
    color: rgba(255, 247, 237, 0.9);
    font-size: 18px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-meta span,
.tag {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #92400e;
    background: #fef3c7;
    font-size: 13px;
    font-weight: 800;
}

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

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 8px;
}

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

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

.btn-primary {
    color: #451a03;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    box-shadow: 0 16px 35px rgba(249, 115, 22, 0.32);
}

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

.btn-dark {
    color: #fff7ed;
    background: linear-gradient(135deg, #78350f, #b45309);
    box-shadow: 0 14px 30px rgba(180, 83, 9, 0.22);
}

.hero-poster {
    position: relative;
    display: grid;
    justify-items: center;
}

.hero-poster a {
    width: min(380px, 100%);
    display: block;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
    transform: rotate(2deg);
}

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

.hero-tabs {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    width: min(1180px, calc(100% - 32px));
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.hero-tab {
    border: 0;
    border-radius: 18px;
    padding: 14px 16px;
    color: rgba(255, 247, 237, 0.84);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px);
    text-align: left;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.hero-tab.is-active {
    color: #451a03;
    background: linear-gradient(135deg, #fcd34d, #f97316);
}

.section {
    padding: 68px 0;
}

.section-soft {
    background: rgba(255, 255, 255, 0.56);
}

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

.section-kicker {
    color: var(--brand);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.section-title {
    margin: 4px 0 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.03em;
    font-weight: 950;
    color: #1c1917;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 10px 30px rgba(120, 53, 15, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(180, 83, 9, 0.32);
    box-shadow: var(--shadow);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #fef3c7;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 3 / 4.15;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.poster-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #451a03;
    background: rgba(254, 243, 199, 0.94);
    font-size: 12px;
    font-weight: 900;
}

.card-body {
    padding: 14px 14px 16px;
}

.card-title {
    margin: 0;
    font-size: 17px;
    line-height: 1.32;
    font-weight: 900;
    color: #1f2937;
}

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

.card-meta {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    color: var(--text-muted);
    font-size: 13px;
}

.card-summary {
    margin: 10px 0 0;
    color: #57534e;
    font-size: 14px;
    line-height: 1.55;
}

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

.category-card {
    min-height: 210px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 24px;
    padding: 24px;
    border: 1px solid rgba(180, 83, 9, 0.16);
    border-radius: 28px;
    color: #fff7ed;
    background:
        radial-gradient(circle at top right, rgba(251, 191, 36, 0.42), transparent 12rem),
        linear-gradient(135deg, #78350f, #b45309 58%, #d97706);
    box-shadow: 0 18px 45px rgba(120, 53, 15, 0.16);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 58px rgba(120, 53, 15, 0.24);
}

.category-card h3 {
    margin: 0;
    font-size: 25px;
    font-weight: 950;
}

.category-card p {
    margin: 10px 0 0;
    color: rgba(255, 247, 237, 0.86);
}

.category-card span {
    font-weight: 900;
    color: #fde68a;
}

.page-hero {
    padding: 72px 0 42px;
    color: #fff7ed;
    background:
        radial-gradient(circle at 20% 20%, rgba(251, 191, 36, 0.26), transparent 22rem),
        linear-gradient(135deg, #1c1917, #78350f 62%, #b45309);
}

.page-hero h1 {
    margin: 0;
    font-size: clamp(34px, 6vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.04em;
    font-weight: 950;
}

.page-hero p {
    max-width: 780px;
    margin: 16px 0 0;
    color: rgba(255, 247, 237, 0.88);
    font-size: 18px;
}

.breadcrumbs {
    margin-bottom: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: rgba(255, 247, 237, 0.82);
    font-weight: 700;
}

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

.filter-panel {
    margin-bottom: 28px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 12px 30px rgba(120, 53, 15, 0.08);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.filter-row + .filter-row {
    margin-top: 12px;
}

.filter-row strong {
    color: #451a03;
    min-width: 58px;
}

.filter-btn {
    border: 1px solid rgba(180, 83, 9, 0.18);
    border-radius: 999px;
    padding: 8px 12px;
    color: #78350f;
    background: #fff7ed;
    font-weight: 800;
}

.filter-btn.is-active,
.filter-btn:hover {
    color: #fff7ed;
    background: linear-gradient(135deg, #92400e, #d97706);
}

.inline-search {
    flex: 1 1 240px;
    min-width: 220px;
    border: 1px solid rgba(180, 83, 9, 0.22);
    border-radius: 999px;
    padding: 10px 14px;
    outline: none;
    background: #fff;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 72px 84px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(120, 53, 15, 0.08);
}

.rank-no {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 18px;
    color: #451a03;
    background: linear-gradient(135deg, #fde68a, #f97316);
    font-size: 20px;
    font-weight: 950;
}

.rank-poster img {
    width: 84px;
    height: 112px;
    border-radius: 16px;
    object-fit: cover;
}

.rank-info h2,
.rank-info h3 {
    margin: 0;
    font-size: 21px;
    line-height: 1.25;
    font-weight: 950;
}

.rank-info p {
    margin: 7px 0 0;
    color: var(--text-muted);
}

.detail-main {
    padding: 46px 0 70px;
}

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

.player-card,
.detail-card,
.side-card {
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 18px 45px rgba(120, 53, 15, 0.1);
    overflow: hidden;
}

.player-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #0c0a09;
}

.player-wrap video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #0c0a09;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    border: 0;
    color: #ffffff;
    background:
        linear-gradient(180deg, rgba(12, 10, 9, 0.26), rgba(12, 10, 9, 0.78)),
        var(--player-cover) center / cover no-repeat;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
    width: 84px;
    height: 84px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #451a03;
    background: linear-gradient(135deg, #fcd34d, #f97316);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
    font-size: 30px;
    font-weight: 950;
}

.player-caption {
    padding: 20px 22px;
}

.player-caption h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 950;
}

.player-caption p {
    margin: 8px 0 0;
    color: var(--text-muted);
}

.detail-card {
    padding: 26px;
    margin-top: 24px;
}

.detail-card h2,
.side-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
    font-weight: 950;
    color: #1c1917;
}

.detail-card p {
    margin: 0 0 16px;
    color: #3f3f46;
    font-size: 17px;
}

.meta-table {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.meta-cell {
    padding: 14px;
    border-radius: 18px;
    background: #fff7ed;
}

.meta-cell span {
    display: block;
    color: #92400e;
    font-size: 13px;
    font-weight: 900;
}

.meta-cell strong {
    display: block;
    margin-top: 4px;
    color: #1f2937;
}

.side-poster {
    overflow: hidden;
    border-radius: 28px;
    box-shadow: var(--shadow);
}

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

.side-card {
    padding: 22px;
    margin-top: 22px;
}

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

.related-item {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: #fff7ed;
    transition: transform 0.2s ease, background 0.2s ease;
}

.related-item:hover {
    transform: translateX(4px);
    background: #ffedd5;
}

.related-item img {
    width: 58px;
    height: 78px;
    border-radius: 12px;
    object-fit: cover;
}

.related-item strong {
    display: block;
    line-height: 1.3;
}

.related-item span {
    display: block;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 13px;
}

.search-results {
    display: grid;
    gap: 16px;
}

.search-result-card {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(120, 53, 15, 0.08);
}

.search-result-card img {
    width: 110px;
    height: 148px;
    border-radius: 16px;
    object-fit: cover;
}

.search-result-card h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 950;
}

.search-result-card p {
    margin: 9px 0 0;
    color: var(--text-muted);
}

.empty-state {
    padding: 38px;
    border: 1px dashed rgba(180, 83, 9, 0.28);
    border-radius: 26px;
    color: #78350f;
    background: #fff7ed;
    text-align: center;
    font-weight: 900;
}

.site-footer {
    color: #d6d3d1;
    background: #1c1917;
    padding: 44px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr 0.7fr;
    gap: 28px;
}

.site-footer h2,
.site-footer h3 {
    margin: 0 0 12px;
    color: #fff7ed;
    font-size: 20px;
    font-weight: 950;
}

.site-footer p,
.site-footer a {
    color: rgba(214, 211, 209, 0.86);
}

.site-footer a:hover {
    color: #fbbf24;
}

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

.footer-bottom {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid rgba(214, 211, 209, 0.14);
    color: rgba(214, 211, 209, 0.72);
    font-size: 14px;
}

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

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

    .header-search {
        display: none;
    }
}

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

    .mobile-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
    }

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

    .hero-content {
        grid-template-columns: 1fr;
        gap: 24px;
        align-content: center;
        padding-bottom: 128px;
    }

    .hero-poster a {
        width: min(280px, 78vw);
        transform: none;
    }

    .hero-tabs {
        grid-template-columns: 1fr;
        bottom: 18px;
        gap: 8px;
    }

    .hero-tab {
        padding: 10px 12px;
    }

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

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

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

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

    .rank-item {
        grid-template-columns: 48px 70px minmax(0, 1fr);
    }

    .rank-item .btn {
        grid-column: 2 / -1;
        width: fit-content;
    }

    .rank-no {
        width: 44px;
        height: 44px;
        border-radius: 14px;
    }

    .rank-poster img {
        width: 70px;
        height: 94px;
    }

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

@media (max-width: 520px) {
    .header-inner,
    .container,
    .hero-content,
    .hero-tabs,
    .mobile-nav {
        width: min(100% - 22px, 1180px);
    }

    .logo {
        font-size: 20px;
    }

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

    .section {
        padding: 48px 0;
    }

    .card-summary {
        display: none;
    }

    .meta-table {
        grid-template-columns: 1fr;
    }

    .search-result-card {
        grid-template-columns: 84px minmax(0, 1fr);
    }

    .search-result-card img {
        width: 84px;
        height: 112px;
    }
}
