:root {
    --page-bg: #fff7ed;
    --card-bg: #ffffff;
    --text-main: #111827;
    --text-muted: #6b7280;
    --text-soft: #9ca3af;
    --brand: #f97316;
    --brand-dark: #ea580c;
    --brand-soft: #ffedd5;
    --line: #fed7aa;
    --dark: #111827;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

html {
    scroll-behavior: smooth;
}

body {
    background: radial-gradient(circle at top left, rgba(251, 146, 60, 0.16), transparent 32rem), var(--page-bg);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

img {
    background: linear-gradient(135deg, #431407, #fed7aa);
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(251, 146, 60, 0.22);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.header-inner {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #fb923c, #ef4444);
    color: #fff;
    box-shadow: 0 12px 24px rgba(249, 115, 22, 0.35);
}

.brand-text {
    font-size: 1.32rem;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-link {
    color: #374151;
    font-size: 0.95rem;
    font-weight: 700;
    transition: color 0.18s ease, background 0.18s ease;
    border-radius: 999px;
    padding: 8px 10px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--brand-dark);
    background: var(--brand-soft);
}

.nav-category {
    font-size: 0.88rem;
    color: #6b7280;
}

.mobile-menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    background: var(--brand-soft);
}

.mobile-menu-button span {
    width: 22px;
    height: 2px;
    background: var(--brand-dark);
    border-radius: 999px;
}

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

.mobile-nav.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.hero-slider {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    background: #111827;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.03);
    pointer-events: none;
    transition: opacity 0.7s ease, transform 0.9s ease;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.15);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.68) 46%, rgba(17, 24, 39, 0.2)), linear-gradient(0deg, rgba(17, 24, 39, 0.92), transparent 45%);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 680px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 380px;
    gap: 48px;
    align-items: center;
    padding: 80px 0;
}

.eyebrow {
    color: var(--brand);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.hero-copy h1 {
    color: #fff;
    font-size: clamp(2.8rem, 7vw, 5.9rem);
    line-height: 0.95;
    font-weight: 950;
    letter-spacing: -0.06em;
    max-width: 820px;
    margin-bottom: 26px;
}

.hero-desc {
    color: #ffedd5;
    font-size: 1.18rem;
    line-height: 1.8;
    max-width: 760px;
    margin-bottom: 22px;
}

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 0.78rem;
    font-weight: 800;
    background: rgba(255, 237, 213, 0.18);
    color: #fed7aa;
    border: 1px solid rgba(255, 237, 213, 0.28);
}

.tag-row span {
    background: var(--brand-soft);
    color: #9a3412;
    border-color: #fed7aa;
}

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

.primary-button,
.ghost-button,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 999px;
    padding: 0 20px;
    font-weight: 900;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.primary-button {
    color: #fff;
    background: linear-gradient(135deg, #fb923c, #ef4444);
    box-shadow: 0 18px 34px rgba(239, 68, 68, 0.28);
}

.ghost-button {
    color: #fff7ed;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.ghost-button.light {
    color: #9a3412;
    background: var(--brand-soft);
    border-color: #fed7aa;
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover {
    transform: translateY(-2px);
}

.hero-poster {
    position: relative;
    display: block;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.38);
    aspect-ratio: 3 / 4;
}

.hero-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-poster span {
    position: absolute;
    left: 24px;
    bottom: 24px;
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, #fb923c, #ef4444);
    font-size: 1.6rem;
    box-shadow: 0 20px 40px rgba(239, 68, 68, 0.38);
}

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

.hero-dot {
    width: 34px;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
}

.hero-dot.active {
    background: #fb923c;
}

.section-block,
.page-main {
    padding: 42px 0;
}

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

.section-heading h2,
.page-hero h1,
.rank-panel h2,
.detail-copy h1 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 950;
    letter-spacing: -0.04em;
    line-height: 1.08;
}

.section-heading p,
.page-hero p,
.category-overview-head p,
.rank-panel p {
    color: var(--text-muted);
    line-height: 1.8;
}

.section-more {
    color: #9a3412;
    background: #fff;
    border: 1px solid #fed7aa;
    white-space: nowrap;
}

.quick-search-block {
    margin-top: -62px;
    position: relative;
    z-index: 5;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
    padding: 28px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(160px, 0.22fr));
    gap: 12px;
    align-items: end;
    margin-bottom: 24px;
}

.search-box {
    display: grid;
    gap: 6px;
    color: var(--text-muted);
    font-weight: 800;
}

.search-box input,
.filter-select {
    width: 100%;
    height: 48px;
    border-radius: 16px;
    border: 1px solid #fed7aa;
    background: #fff;
    padding: 0 15px;
    outline: none;
    box-shadow: 0 8px 20px rgba(251, 146, 60, 0.08);
}

.search-box input:focus,
.filter-select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.13);
}

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

.category-tile {
    min-height: 142px;
    border-radius: 26px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #7c2d12;
    background: linear-gradient(135deg, #fff, #ffedd5);
    border: 1px solid #fed7aa;
    box-shadow: 0 18px 34px rgba(251, 146, 60, 0.1);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 50px rgba(251, 146, 60, 0.18);
}

.category-tile strong {
    font-size: 1.25rem;
    font-weight: 950;
}

.category-tile span {
    color: #9a3412;
    font-size: 0.92rem;
    line-height: 1.65;
}

.home-grid-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    align-items: start;
}

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

.movie-card {
    overflow: hidden;
    border-radius: 24px;
    background: var(--card-bg);
    border: 1px solid rgba(254, 215, 170, 0.8);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 26px 54px rgba(15, 23, 42, 0.14);
}

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

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #431407, #fed7aa);
}

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

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

.poster-play {
    position: absolute;
    left: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: rgba(249, 115, 22, 0.94);
    box-shadow: 0 12px 26px rgba(249, 115, 22, 0.35);
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    min-width: 42px;
    height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, #ef4444, #f97316);
    font-weight: 950;
}

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

.movie-meta-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.movie-meta-row a {
    color: var(--brand-dark);
}

.movie-card h2 {
    min-height: 3.2em;
    font-weight: 950;
    line-height: 1.22;
    font-size: 1.06rem;
    margin-bottom: 8px;
}

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

.movie-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 4.9em;
    margin-bottom: 12px;
}

.rank-panel {
    position: sticky;
    top: 96px;
    border-radius: 28px;
    padding: 26px;
    background: #111827;
    color: #fff;
    box-shadow: var(--shadow);
}

.rank-panel p {
    color: #d1d5db;
}

.rank-lines {
    display: grid;
    gap: 10px;
    margin-top: 20px;
}

.rank-line {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    transition: background 0.18s ease;
}

.rank-line:hover {
    background: rgba(249, 115, 22, 0.22);
}

.rank-line span {
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--brand);
    font-weight: 950;
}

.rank-line strong {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-line em {
    color: #fed7aa;
    font-style: normal;
    font-weight: 900;
}

.page-main {
    padding-top: 28px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    color: var(--text-muted);
    font-weight: 800;
    margin: 18px 0;
}

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

.page-hero,
.small-hero {
    border-radius: 30px;
    padding: 42px;
    margin-bottom: 28px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 237, 213, 0.95));
    box-shadow: var(--shadow);
    border: 1px solid #fed7aa;
}

.page-hero p {
    max-width: 820px;
}

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

.category-overview-card {
    border-radius: 28px;
    padding: 24px;
    background: #fff;
    border: 1px solid #fed7aa;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

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

.category-overview-head h2 {
    font-size: 1.6rem;
    font-weight: 950;
    margin-bottom: 8px;
}

.detail-main {
    padding-top: 24px;
}

.detail-hero {
    min-height: 560px;
    border-radius: 34px;
    padding: 34px;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    color: #fff;
    background: radial-gradient(circle at top left, rgba(249, 115, 22, 0.36), transparent 24rem), linear-gradient(135deg, #111827, #431407);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.detail-cover {
    border-radius: 28px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
}

.detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-copy h1 {
    font-size: clamp(2.4rem, 6vw, 5rem);
    margin-bottom: 20px;
}

.detail-one-line {
    color: #ffedd5;
    font-size: 1.18rem;
    line-height: 1.85;
    margin-bottom: 18px;
    max-width: 840px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.detail-meta span {
    border-radius: 999px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff7ed;
    font-weight: 800;
}

.player-section {
    margin: 32px 0;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #000;
    box-shadow: 0 26px 60px rgba(15, 23, 42, 0.2);
    aspect-ratio: 16 / 9;
}

.movie-player {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    z-index: 1;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    gap: 12px;
    color: #fff;
    background: radial-gradient(circle, rgba(17, 24, 39, 0.35), rgba(17, 24, 39, 0.76));
    text-align: center;
}

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

.play-circle {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #fb923c, #ef4444);
    box-shadow: 0 20px 46px rgba(239, 68, 68, 0.32);
    font-size: 2rem;
}

.play-overlay strong {
    font-size: 1.25rem;
    letter-spacing: 0.08em;
}

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

.detail-article,
.detail-side {
    border-radius: 28px;
    background: #fff;
    padding: 28px;
    border: 1px solid #fed7aa;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.detail-article h2,
.detail-side h2 {
    font-size: 1.55rem;
    font-weight: 950;
    margin-bottom: 14px;
}

.detail-article p {
    color: #374151;
    line-height: 2;
    margin-bottom: 26px;
    font-size: 1.02rem;
}

.detail-side {
    position: sticky;
    top: 96px;
}

.detail-side dl {
    display: grid;
    gap: 12px;
}

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

.detail-side dd {
    color: var(--text-main);
    font-weight: 900;
    margin: 0;
    padding-bottom: 12px;
    border-bottom: 1px solid #ffedd5;
}

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

.related-card {
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #fed7aa;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

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

.related-card span {
    display: block;
    padding: 10px 12px 2px;
    font-weight: 900;
    line-height: 1.35;
    min-height: 48px;
}

.related-card em {
    display: block;
    color: var(--text-muted);
    padding: 0 12px 12px;
    font-style: normal;
    font-size: 0.83rem;
}

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

.site-footer {
    margin-top: 42px;
    background: #111827;
    color: #d1d5db;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 32px;
    padding: 54px 0 36px;
}

.site-footer h2,
.site-footer h3 {
    color: #fff;
    font-weight: 950;
    margin-bottom: 14px;
}

.site-footer p,
.site-footer a {
    color: #d1d5db;
    line-height: 1.8;
}

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

.site-footer li + li {
    margin-top: 8px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    color: #9ca3af;
    padding: 18px;
}

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

    .mobile-menu-button {
        display: flex;
    }

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

    .rank-panel,
    .detail-side {
        position: relative;
        top: 0;
    }

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

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

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

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

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

    .brand-text {
        font-size: 1.05rem;
    }

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

    .hero-content {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 46px 0 72px;
    }

    .hero-poster {
        max-width: 240px;
        justify-self: start;
    }

    .quick-search-block,
    .page-hero,
    .detail-hero {
        padding: 22px;
        border-radius: 24px;
    }

    .filter-panel {
        grid-template-columns: 1fr;
    }

    .section-heading,
    .category-overview-head {
        align-items: flex-start;
        flex-direction: column;
    }

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

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

    .detail-cover {
        max-width: 240px;
    }

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

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

@media (max-width: 460px) {
    .movie-grid,
    .category-grid,
    .related-grid,
    .compact-related {
        grid-template-columns: 1fr;
    }

    .hero-copy h1,
    .detail-copy h1 {
        font-size: 2.35rem;
    }

    .hero-actions,
    .detail-actions {
        flex-direction: column;
    }

    .primary-button,
    .ghost-button,
    .section-more {
        width: 100%;
    }
}
