:root {
    --bg: #fff7ed;
    --surface: #ffffff;
    --surface-soft: #fffbeb;
    --text: #1e293b;
    --muted: #64748b;
    --line: rgba(148, 163, 184, 0.28);
    --amber: #f59e0b;
    --orange: #ea580c;
    --rose: #be123c;
    --dark: #2b1208;
    --shadow: 0 20px 50px rgba(120, 53, 15, 0.16);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

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

.page-main {
    min-height: 70vh;
    padding-top: 72px;
}

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(120, 53, 15, 0.92), rgba(154, 52, 18, 0.9), rgba(136, 19, 55, 0.88));
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(251, 191, 36, 0.18);
    transition: box-shadow 0.25s ease, background 0.25s ease;
}

.site-header.is-scrolled {
    background: linear-gradient(90deg, rgba(69, 26, 3, 0.98), rgba(124, 45, 18, 0.98), rgba(136, 19, 55, 0.96));
    box-shadow: 0 18px 35px rgba(69, 26, 3, 0.18);
}

.nav-shell {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff7ed;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.logo-mark {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    color: #78350f;
    background: linear-gradient(135deg, #fde68a, #f59e0b);
    border-radius: 50%;
    box-shadow: 0 0 28px rgba(251, 191, 36, 0.42);
    font-size: 14px;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    color: #fffbeb;
    font-size: 14px;
    font-weight: 700;
}

.nav-links a {
    position: relative;
    padding: 8px 0;
    opacity: 0.92;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 2px;
    height: 2px;
    background: #fcd34d;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.22s ease;
}

.nav-links a:hover {
    color: #fde68a;
}

.nav-links a:hover::after {
    transform: scaleX(1);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 10px;
    border: 1px solid rgba(253, 230, 138, 0.42);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
}

.nav-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #fff7ed;
    border-radius: 999px;
}

.hero-carousel {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    background: #451a03;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    background-image:
        linear-gradient(90deg, rgba(32, 13, 4, 0.88), rgba(69, 26, 3, 0.65), rgba(136, 19, 55, 0.46)),
        var(--hero-image);
    background-size: cover;
    background-position: center;
    transition: opacity 0.8s ease;
}

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 24%, rgba(251, 191, 36, 0.25), transparent 28%),
        radial-gradient(circle at 78% 42%, rgba(244, 63, 94, 0.28), transparent 32%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(69, 26, 3, 0.62));
}

.hero-content {
    position: relative;
    z-index: 1;
    min-height: 680px;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.62fr);
    align-items: center;
    gap: 58px;
    padding: 70px 0;
}

.hero-copy {
    color: #fff7ed;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 14px;
    padding: 7px 13px;
    color: #78350f;
    background: linear-gradient(135deg, #fde68a, #fbbf24);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.hero-copy h1 {
    margin: 0 0 12px;
    font-size: clamp(38px, 5.4vw, 68px);
    line-height: 1.05;
    font-weight: 950;
    letter-spacing: -0.045em;
}

.hero-copy h2 {
    margin: 0 0 18px;
    color: #fde68a;
    font-size: clamp(24px, 3vw, 42px);
    line-height: 1.15;
}

.hero-copy p {
    max-width: 760px;
    margin: 0 0 24px;
    color: #ffedd5;
    font-size: clamp(16px, 2vw, 21px);
}

.hero-tags,
.tag-row,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.tag-row span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    color: #9a3412;
    background: rgba(255, 247, 237, 0.88);
    border: 1px solid rgba(251, 191, 36, 0.28);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

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

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

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

.btn-primary {
    color: #fff7ed;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 14px 30px rgba(234, 88, 12, 0.28);
}

.btn-primary:hover {
    box-shadow: 0 20px 44px rgba(234, 88, 12, 0.35);
}

.btn-ghost {
    color: #fff7ed;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 247, 237, 0.38);
    backdrop-filter: blur(12px);
}

.btn-soft {
    color: #9a3412;
    background: #ffedd5;
    border: 1px solid rgba(251, 146, 60, 0.22);
}

.hero-poster {
    position: relative;
    display: block;
    overflow: hidden;
    border: 1px solid rgba(253, 230, 138, 0.28);
    border-radius: 34px;
    box-shadow: 0 34px 80px rgba(0, 0, 0, 0.28);
    transform: rotate(1.4deg);
}

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

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

.hero-poster span {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    padding: 12px 14px;
    color: #fff7ed;
    background: rgba(69, 26, 3, 0.72);
    border: 1px solid rgba(253, 230, 138, 0.28);
    border-radius: 18px;
    text-align: center;
    font-weight: 900;
    backdrop-filter: blur(12px);
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
}

.hero-dot.active {
    width: 38px;
    background: #fbbf24;
}

.quick-search-section {
    margin-top: -54px;
    position: relative;
    z-index: 5;
}

.quick-search-card,
.filter-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.quick-search-card h2,
.section-heading h2,
.sub-hero h1,
.detail-info h1 {
    margin: 0;
    color: #1e293b;
    font-size: clamp(28px, 3.3vw, 46px);
    line-height: 1.12;
    letter-spacing: -0.035em;
}

.home-search {
    display: flex;
    min-width: min(480px, 100%);
    gap: 10px;
}

.home-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    padding: 0 15px;
    color: var(--text);
    background: #fff7ed;
    border: 1px solid rgba(251, 146, 60, 0.25);
    border-radius: 999px;
    outline: none;
}

.content-section {
    padding: 76px 0;
}

.section-warm {
    background: linear-gradient(180deg, rgba(255, 237, 213, 0.52), rgba(255, 247, 237, 0.12));
}

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

.section-heading p,
.sub-hero p,
.category-overview-head p,
.detail-one-line,
.article-card p,
.side-card p,
.site-footer p {
    color: var(--muted);
}

.section-heading a {
    color: var(--orange);
    font-weight: 900;
}

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

.category-card,
.category-overview-card,
.movie-card,
.article-card,
.side-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.category-card {
    overflow: hidden;
    min-height: 250px;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover,
.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 60px rgba(120, 53, 15, 0.22);
}

.category-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.category-card div {
    padding: 16px;
}

.category-card h3,
.movie-card h3,
.article-card h2,
.side-card h2,
.category-overview-card h2 {
    margin: 0 0 8px;
    color: #1f2937;
    line-height: 1.25;
}

.category-card p,
.movie-card p {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
}

.category-card span {
    color: var(--orange);
    font-weight: 900;
}

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

.movie-card {
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-cover {
    position: relative;
    display: block;
    overflow: hidden;
    background: #451a03;
}

.movie-cover img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.play-mini {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    color: #fff7ed;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    border-radius: 50%;
    box-shadow: 0 12px 26px rgba(234, 88, 12, 0.32);
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 10px;
    color: #78350f;
    background: #fde68a;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 950;
}

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

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--orange);
    font-size: 12px;
    font-weight: 900;
}

.movie-meta-line span + span::before {
    content: "·";
    margin-right: 8px;
    color: #fdba74;
}

.movie-card h3 {
    min-height: 2.5em;
    font-size: 18px;
}

.movie-card h3 a:hover {
    color: var(--orange);
}

.tag-row span {
    color: #92400e;
    background: #fffbeb;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 50px 58px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 12px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 18px;
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.rank-row:hover {
    transform: translateX(4px);
    border-color: rgba(245, 158, 11, 0.5);
}

.rank-number {
    color: #f59e0b;
    font-size: 22px;
    font-weight: 950;
    text-align: center;
}

.rank-row img {
    width: 58px;
    height: 76px;
    object-fit: cover;
    border-radius: 12px;
}

.rank-info {
    min-width: 0;
}

.rank-info strong,
.rank-info em {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-info em {
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

.sub-hero {
    position: relative;
    padding: 86px 0 70px;
    color: #fff7ed;
    overflow: hidden;
    background:
        radial-gradient(circle at 10% 20%, rgba(251, 191, 36, 0.32), transparent 28%),
        linear-gradient(135deg, #451a03, #9a3412 52%, #881337);
}

.sub-hero h1,
.sub-hero p {
    max-width: 820px;
    color: #fff7ed;
}

.sub-hero p {
    margin: 14px 0 0;
    opacity: 0.88;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
    color: #fde68a;
    font-weight: 800;
}

.breadcrumb strong {
    color: #fff7ed;
}

.filter-panel {
    align-items: flex-end;
    margin-bottom: 22px;
}

.filter-panel label {
    flex: 1 1 190px;
}

.filter-panel span {
    display: block;
    margin: 0 0 6px 4px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
}

.result-summary {
    margin-bottom: 18px;
    color: var(--muted);
    font-weight: 900;
}

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

.category-overview-card {
    padding: 24px;
}

.category-overview-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.mini-poster-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.mini-poster-row a {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
}

.mini-poster-row img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.mini-poster-row span {
    position: absolute;
    inset: auto 0 0 0;
    padding: 30px 12px 10px;
    color: #fff7ed;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.76));
    font-weight: 900;
}

.detail-hero {
    position: relative;
    min-height: 590px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-image:
        linear-gradient(90deg, rgba(30, 13, 4, 0.92), rgba(69, 26, 3, 0.75), rgba(136, 19, 55, 0.55)),
        var(--detail-image);
    background-size: cover;
    background-position: center;
}

.detail-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(251, 191, 36, 0.24), transparent 30%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(69, 26, 3, 0.72));
}

.detail-hero-content {
    position: relative;
    z-index: 1;
    padding: 58px 0;
}

.detail-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 30px;
    box-shadow: 0 34px 80px rgba(0, 0, 0, 0.34);
}

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

.detail-info h1,
.detail-info p {
    color: #fff7ed;
}

.detail-one-line {
    max-width: 850px;
    font-size: 19px;
}

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: start;
}

.detail-main,
.detail-sidebar {
    display: grid;
    gap: 22px;
}

.player-card {
    overflow: hidden;
    background: #0f172a;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.player-stage {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.player-stage video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.play-button {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 8px;
    color: #fff7ed;
    background:
        radial-gradient(circle at 50% 50%, rgba(245, 158, 11, 0.22), transparent 28%),
        rgba(15, 23, 42, 0.38);
    border: 0;
    cursor: pointer;
}

.play-button span {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    padding-left: 5px;
    color: #78350f;
    background: linear-gradient(135deg, #fde68a, #f59e0b);
    border-radius: 50%;
    box-shadow: 0 20px 50px rgba(245, 158, 11, 0.38);
    font-size: 28px;
}

.player-card.is-playing .play-button {
    display: none;
}

.player-note {
    margin: 0;
    padding: 12px 16px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.92);
    font-size: 14px;
}

.article-card,
.side-card {
    padding: 24px;
}

.article-card p {
    margin: 0;
    white-space: pre-line;
}

.side-card dl {
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 10px 12px;
    margin: 0;
}

.side-card dt {
    color: var(--muted);
    font-weight: 900;
}

.side-card dd {
    margin: 0;
    min-width: 0;
}

.side-card a {
    color: var(--orange);
    font-weight: 900;
}

.score-meter {
    overflow: hidden;
    height: 12px;
    margin: 8px 0 12px;
    background: #ffedd5;
    border-radius: 999px;
}

.score-meter span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #fbbf24, #ea580c, #be123c);
    border-radius: inherit;
}

.site-footer {
    padding: 46px 0;
    color: #fffbeb;
    background: linear-gradient(135deg, #451a03, #7c2d12 55%, #881337);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr 0.8fr;
    gap: 34px;
}

.footer-logo {
    margin-bottom: 14px;
}

.site-footer h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

.site-footer p {
    color: #fed7aa;
}

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

.footer-links a {
    padding: 7px 11px;
    color: #fffbeb;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(253, 230, 138, 0.18);
    border-radius: 999px;
    font-size: 13px;
}

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

    .nav-links {
        gap: 12px;
        font-size: 13px;
    }
}

@media (max-width: 860px) {
    .page-main {
        padding-top: 64px;
    }

    .nav-shell {
        min-height: 64px;
    }

    .nav-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 18px;
        background: rgba(69, 26, 3, 0.96);
        border: 1px solid rgba(253, 230, 138, 0.22);
        border-radius: 22px;
        box-shadow: var(--shadow);
    }

    .nav-links.open {
        display: flex;
    }

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

    .hero-content,
    .detail-layout,
    .detail-content-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-poster,
    .detail-poster {
        max-width: 320px;
        margin: 0 auto;
    }

    .quick-search-card,
    .section-heading,
    .category-overview-head,
    .filter-panel {
        flex-direction: column;
        align-items: stretch;
    }

    .home-search {
        min-width: 0;
        flex-direction: column;
    }

    .category-grid,
    .movie-grid,
    .rank-list,
    .mini-poster-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

    .site-logo {
        font-size: 18px;
    }

    .hero-content {
        padding-top: 42px;
        gap: 26px;
    }

    .content-section {
        padding: 50px 0;
    }

    .category-grid,
    .movie-grid,
    .rank-list,
    .mini-poster-row {
        grid-template-columns: 1fr;
    }

    .rank-row {
        grid-template-columns: 42px 54px minmax(0, 1fr);
    }

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