:root {
    --bg: #fffaf2;
    --surface: #ffffff;
    --surface-soft: #fff7ed;
    --surface-deep: #111827;
    --text: #111827;
    --muted: #6b7280;
    --line: #f1d7b4;
    --amber: #d97706;
    --amber-dark: #b45309;
    --orange: #ea580c;
    --red: #dc2626;
    --shadow: 0 20px 45px rgba(146, 64, 14, 0.14);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(217, 119, 6, 0.16);
}

.nav-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.logo-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--red));
    box-shadow: 0 12px 24px rgba(217, 119, 6, 0.28);
}

.desktop-nav,
.mobile-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 10px 15px;
    border-radius: 999px;
    color: #5f4b32;
    font-weight: 700;
    transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 12px 24px rgba(217, 119, 6, 0.2);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: #fff7ed;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 999px;
    background: #92400e;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    border-radius: 18px;
    background: #fff7ed;
}

.hero-stage {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 34px;
    overflow: hidden;
    min-height: 560px;
    border-radius: 34px;
    background: #111827;
    box-shadow: var(--shadow);
}

.hero-slider {
    position: relative;
    min-height: 560px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 0.94fr 1.06fr;
    gap: 30px;
    align-items: center;
    padding: 54px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(90deg, rgba(17, 24, 39, 0.88), rgba(17, 24, 39, 0.42), rgba(217, 119, 6, 0.2)), var(--hero-image);
    background-size: cover;
    background-position: center;
    filter: blur(18px) saturate(1.1);
    transform: scale(1.08);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.28), transparent 34%), linear-gradient(180deg, rgba(17, 24, 39, 0.1), rgba(17, 24, 39, 0.78));
}

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

.hero-media,
.hero-copy {
    position: relative;
    z-index: 2;
}

.hero-media {
    justify-self: center;
    width: min(360px, 100%);
    aspect-ratio: 3 / 4;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
    transform: rotate(-2deg);
}

.hero-media img,
.poster-link img,
.detail-poster img,
.category-tile img,
.ranking-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-copy {
    color: #ffffff;
    max-width: 590px;
}

.eyebrow {
    margin: 0 0 12px;
    color: #f59e0b;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 0;
    font-size: clamp(34px, 5vw, 68px);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.hero-copy h3 {
    margin: 16px 0 0;
    font-size: clamp(22px, 2.4vw, 34px);
}

.hero-copy p:not(.eyebrow) {
    margin: 18px 0 0;
    color: #fdebd1;
    font-size: 18px;
    line-height: 1.75;
}

.hero-actions,
.detail-copy .primary-btn {
    margin-top: 26px;
}

.primary-btn,
.ghost-btn,
.quick-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    font-weight: 900;
    cursor: pointer;
    transition: 0.25s ease;
}

.primary-btn,
.quick-search button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--red));
    box-shadow: 0 16px 32px rgba(220, 38, 38, 0.25);
}

.ghost-btn {
    margin-left: 10px;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.36);
    background: rgba(255, 255, 255, 0.12);
}

.primary-btn:hover,
.ghost-btn:hover,
.quick-search button:hover,
.section-link:hover {
    transform: translateY(-2px);
}

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

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

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

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

.intro-search,
.page-hero {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 420px);
    gap: 28px;
    align-items: center;
    padding: 34px;
    border: 1px solid rgba(217, 119, 6, 0.18);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 18px 45px rgba(146, 64, 14, 0.08);
}

.intro-search h2,
.section-heading h2,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(26px, 3vw, 42px);
    line-height: 1.18;
    letter-spacing: -0.03em;
}

.intro-search p:not(.eyebrow),
.page-hero p:not(.eyebrow) {
    color: var(--muted);
    line-height: 1.8;
}

.quick-search,
.inline-filter {
    display: flex;
    gap: 10px;
    padding: 8px;
    border-radius: 999px;
    background: #fff7ed;
    border: 1px solid rgba(217, 119, 6, 0.2);
}

.quick-search input,
.inline-filter input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 0 14px;
    color: var(--text);
}

.inline-filter {
    min-height: 58px;
}

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

.section-heading.light,
.ranking-band .section-heading {
    color: #ffffff;
}

.section-heading.light .eyebrow,
.ranking-band .eyebrow {
    color: #fbbf24;
}

.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 999px;
    color: #92400e;
    font-weight: 900;
    background: #fff7ed;
    border: 1px solid rgba(217, 119, 6, 0.18);
    transition: 0.25s ease;
}

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

.category-tile {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 18px 38px rgba(17, 24, 39, 0.15);
    background: #111827;
}

.category-tile img {
    position: absolute;
    inset: 0;
    transition: transform 0.5s ease;
}

.category-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.06), rgba(17, 24, 39, 0.86));
}

.category-content {
    position: absolute;
    inset: auto 18px 18px;
    color: #ffffff;
}

.category-content strong,
.category-content em,
.category-content small {
    display: block;
}

.category-content strong {
    font-size: 22px;
    font-style: normal;
}

.category-content em,
.category-content small {
    margin-top: 6px;
    color: #fdebd1;
    font-style: normal;
    line-height: 1.55;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(217, 119, 6, 0.16);
    border-radius: 24px;
    background: var(--surface);
    box-shadow: 0 16px 35px rgba(146, 64, 14, 0.1);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 60px rgba(146, 64, 14, 0.18);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #451a03, #111827);
}

.poster-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    background: rgba(220, 38, 38, 0.9);
}

.poster-play {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(17, 24, 39, 0.72);
    backdrop-filter: blur(10px);
}

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

.meta-line,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.meta-line span:not(:last-child)::after {
    content: "·";
    margin-left: 8px;
    color: #d6a46a;
}

.movie-card-title {
    margin: 10px 0 8px;
    font-size: 18px;
    line-height: 1.3;
}

.movie-card-title a:hover {
    color: var(--amber-dark);
}

.movie-card-body p {
    margin: 0;
    color: var(--muted);
    line-height: 1.68;
}

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

.tag-row span {
    padding: 5px 9px;
    border-radius: 999px;
    color: #92400e;
    font-size: 12px;
    font-weight: 800;
    background: #fff7ed;
}

.is-compact .movie-card-body {
    padding: 13px;
}

.is-compact .movie-card-title {
    font-size: 16px;
}

.is-compact .movie-card-body p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.ranking-band {
    padding: 34px;
    border-radius: 30px;
    background: radial-gradient(circle at top left, rgba(251, 191, 36, 0.2), transparent 34%), linear-gradient(135deg, #111827, #7c2d12 58%, #dc2626);
    box-shadow: 0 28px 75px rgba(17, 24, 39, 0.25);
}

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

.ranking-strip.wide {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.ranking-item {
    display: grid;
    grid-template-columns: 42px 70px 1fr;
    gap: 12px;
    align-items: center;
    min-height: 96px;
    padding: 12px;
    border-radius: 18px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: 0.25s ease;
}

.ranking-item:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.18);
}

.rank-number {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--amber), var(--red));
}

.ranking-item img {
    width: 70px;
    height: 92px;
    border-radius: 12px;
}

.ranking-item strong,
.ranking-item em {
    display: block;
}

.ranking-item em,
.ranking-list em {
    margin-top: 5px;
    color: #fdebd1;
    font-style: normal;
    line-height: 1.5;
}

.page-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 34px;
    min-height: 240px;
    background: radial-gradient(circle at 82% 16%, rgba(251, 191, 36, 0.26), transparent 28%), linear-gradient(135deg, #ffffff, #fff7ed);
}

.slim-hero,
.search-hero,
.category-hero {
    border-radius: 30px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 20px;
    color: #fdebd1;
    font-weight: 700;
}

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

.separator {
    opacity: 0.6;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: #111827;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(90deg, rgba(17, 24, 39, 0.95), rgba(17, 24, 39, 0.76), rgba(120, 53, 15, 0.7)), var(--detail-image);
    background-size: cover;
    background-position: center;
    filter: blur(10px) saturate(1.1);
    transform: scale(1.06);
}

.detail-inner {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 38px 0 52px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 36px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    aspect-ratio: 3 / 4;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.42);
}

.detail-copy .lead-text {
    max-width: 780px;
    color: #fdebd1;
    font-size: 19px;
    line-height: 1.9;
}

.detail-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

.detail-tags span {
    color: #fff7ed;
    background: rgba(245, 158, 11, 0.25);
}

.player-section {
    margin-top: 44px;
}

.player-box {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 28px;
    background: #000000;
    box-shadow: 0 28px 68px rgba(17, 24, 39, 0.22);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.58));
    cursor: pointer;
    z-index: 3;
}

.player-cover.is-hidden {
    display: none;
}

.play-orb {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    padding-left: 5px;
    border-radius: 50%;
    font-size: 34px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--red));
    box-shadow: 0 20px 52px rgba(220, 38, 38, 0.38);
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.content-card {
    padding: 28px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 16px 40px rgba(146, 64, 14, 0.1);
    border: 1px solid rgba(217, 119, 6, 0.16);
}

.content-card h2 {
    margin-top: 0;
}

.content-card p {
    color: #4b5563;
    line-height: 1.9;
}

.ranking-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.ranking-list a {
    display: grid;
    grid-template-columns: 46px 1fr;
    gap: 14px;
    align-items: center;
    padding: 18px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid rgba(217, 119, 6, 0.16);
    box-shadow: 0 12px 30px rgba(146, 64, 14, 0.08);
}

.ranking-list a:hover {
    border-color: rgba(217, 119, 6, 0.45);
}

.ranking-list strong {
    display: block;
    color: var(--text);
}

.ranking-list em {
    color: var(--muted);
}

.empty-state {
    display: none;
    margin: 30px 0 0;
    padding: 22px;
    border-radius: 18px;
    text-align: center;
    color: var(--muted);
    background: #fff7ed;
}

.empty-state.is-visible {
    display: block;
}

.site-footer {
    margin-top: 40px;
    padding: 42px 0;
    color: #fdebd1;
    background: #111827;
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 28px;
}

.footer-logo {
    color: #ffffff;
}

.footer-inner p {
    max-width: 560px;
    color: #d1d5db;
    line-height: 1.8;
}

.footer-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-content: flex-start;
}

.footer-links a {
    padding: 9px 13px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

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

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

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

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

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

    .nav-toggle {
        display: block;
    }

    .mobile-nav.is-open {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .hero-stage,
    .hero-slider {
        min-height: 720px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        padding: 30px;
        align-content: center;
    }

    .hero-media {
        width: min(260px, 78vw);
    }

    .hero-copy {
        text-align: center;
    }

    .intro-search,
    .page-hero,
    .detail-grid,
    .detail-content {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        width: min(300px, 72vw);
        margin: 0 auto;
    }

    .ranking-list {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .section-shell,
    .hero-stage,
    .page-hero,
    .detail-inner,
    .nav-shell,
    .mobile-nav,
    .footer-inner {
        width: min(100% - 22px, 1180px);
    }

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

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

    .quick-search,
    .inline-filter {
        border-radius: 18px;
        flex-direction: column;
    }

    .quick-search button {
        width: 100%;
    }

    .hero-actions {
        display: grid;
        gap: 10px;
    }

    .ghost-btn {
        margin-left: 0;
    }

    .ranking-item {
        grid-template-columns: 34px 56px 1fr;
    }

    .ranking-item img {
        width: 56px;
        height: 74px;
    }

    .content-card,
    .ranking-band,
    .intro-search,
    .page-hero {
        padding: 22px;
    }
}
