:root {
    color-scheme: light;
    --bg: #f7f7f8;
    --paper: #ffffff;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --brand: #d97706;
    --brand-deep: #ea580c;
    --brand-soft: #fff7ed;
    --shadow: 0 18px 45px rgba(17, 24, 39, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(180deg, #fffaf0 0%, var(--bg) 34%, #f1f5f9 100%);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, #d97706 0%, #f97316 100%);
    color: #ffffff;
    box-shadow: 0 14px 30px rgba(217, 119, 6, 0.24);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

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

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-link,
.mobile-link {
    font-weight: 650;
    opacity: 0.9;
    transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    opacity: 1;
    transform: translateY(-1px);
}

.menu-button {
    display: none;
    border: 0;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 1.2rem;
}

.mobile-nav {
    display: none;
    padding: 0 16px 16px;
}

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

.mobile-link {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.12);
}

.hero {
    position: relative;
    height: clamp(460px, 70vh, 720px);
    overflow: hidden;
    background: #111827;
}

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

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

.hero-slide > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05) contrast(1.05);
}

.hero-shade,
.detail-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.84) 0%, rgba(0, 0, 0, 0.55) 42%, rgba(0, 0, 0, 0.22) 100%), linear-gradient(0deg, rgba(0, 0, 0, 0.84) 0%, rgba(0, 0, 0, 0.08) 68%);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 1.1fr 0.72fr;
    align-items: center;
    gap: 48px;
    color: #ffffff;
}

.hero-copy {
    max-width: 720px;
}

.eyebrow {
    margin: 0 0 10px;
    color: #f59e0b;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(2.25rem, 6vw, 5.4rem);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.hero-text,
.detail-one-line,
.page-hero p {
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.75;
}

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

.hero-tags,
.detail-tags {
    margin-top: 22px;
}

.hero-tags span,
.detail-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 11px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 650;
}

.tag-row span {
    background: #fff7ed;
    color: #9a3412;
}

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

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

.primary-button,
.quick-search button {
    background: linear-gradient(90deg, #f59e0b, #f97316);
    color: #ffffff;
    box-shadow: 0 16px 30px rgba(249, 115, 22, 0.34);
}

.ghost-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

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

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

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

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 4;
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 2rem;
    cursor: pointer;
    backdrop-filter: blur(14px);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

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

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

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

.quick-search-card,
.filter-panel,
.content-panel,
.category-overview-card {
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.quick-search-card {
    display: grid;
    grid-template-columns: 1fr minmax(300px, 520px) auto;
    align-items: center;
    gap: 22px;
    padding: 24px;
}

.quick-search-card h2,
.section-heading h2,
.content-panel h2,
.category-overview-card h2 {
    margin: 0;
    color: #111827;
}

.quick-search {
    display: flex;
    gap: 10px;
}

.quick-search input,
.search-box input,
.filter-select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    padding: 0 16px;
    color: var(--ink);
    outline: none;
}

.ranking-entry,
.section-heading > a,
.text-button {
    color: #c2410c;
    font-weight: 800;
}

.section-block {
    padding: 58px 0 0;
}

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

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

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(17, 24, 39, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 44px rgba(17, 24, 39, 0.16);
}

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

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

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

.card-play,
.rank-badge {
    position: absolute;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 900;
}

.card-play {
    right: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
    background: rgba(249, 115, 22, 0.92);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.24);
}

.rank-badge {
    left: 12px;
    top: 12px;
    min-width: 38px;
    height: 30px;
    padding: 0 10px;
    background: linear-gradient(90deg, #ef4444, #f97316);
}

.card-body {
    padding: 16px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #b45309;
    font-size: 0.8rem;
    font-weight: 750;
}

.card-body h3 {
    margin: 10px 0 8px;
    font-size: 1.05rem;
    line-height: 1.35;
}

.card-body p {
    display: -webkit-box;
    min-height: 3.1em;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.category-tile {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    border-radius: 22px;
    background: #111827;
    color: #ffffff;
    box-shadow: var(--shadow);
}

.category-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
    transition: transform 0.35s ease;
}

.category-tile::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.1));
}

.category-tile span,
.category-tile p {
    position: absolute;
    left: 18px;
    right: 18px;
    z-index: 2;
}

.category-tile span {
    bottom: 58px;
    font-size: 1.25rem;
    font-weight: 900;
}

.category-tile p {
    bottom: 16px;
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.88rem;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.page-main {
    padding-bottom: 64px;
}

.page-hero {
    margin-top: 34px;
    border-radius: 32px;
    padding: clamp(34px, 6vw, 68px);
    background: linear-gradient(135deg, #111827 0%, #7c2d12 48%, #f97316 100%);
    color: #ffffff;
    box-shadow: var(--shadow);
}

.small-hero p,
.category-hero p,
.ranking-hero p {
    max-width: 740px;
}

.crumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
    color: rgba(255, 255, 255, 0.78);
}

.crumbs a {
    color: #fde68a;
    font-weight: 750;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto;
    align-items: end;
    gap: 16px;
    margin-bottom: 24px;
    padding: 18px;
}

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

.category-overview-grid {
    display: grid;
    gap: 20px;
    margin-top: 30px;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
    padding: 22px;
}

.category-cover-stack {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    overflow: hidden;
    border-radius: 18px;
}

.category-cover-stack img {
    width: 100%;
    height: 170px;
    object-fit: cover;
}

.category-overview-card p,
.content-panel p {
    color: var(--muted);
    line-height: 1.8;
}

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

.detail-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(8px) saturate(1.08);
    transform: scale(1.04);
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    padding-top: 34px;
    padding-bottom: 56px;
}

.detail-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 44px;
    align-items: center;
    min-height: 520px;
}

.detail-poster {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 30px;
    box-shadow: 0 30px 72px rgba(0, 0, 0, 0.48);
}

.detail-copy {
    max-width: 780px;
}

.player-section {
    margin-top: -70px;
    position: relative;
    z-index: 4;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #000000;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.movie-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-start {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    gap: 10px;
    border: 0;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.24), rgba(0, 0, 0, 0.58));
    color: #ffffff;
    cursor: pointer;
}

.player-start span {
    display: grid;
    width: 74px;
    height: 74px;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(90deg, #f59e0b, #f97316);
    box-shadow: 0 18px 36px rgba(249, 115, 22, 0.36);
    font-size: 2rem;
}

.player-start strong {
    font-size: 1.1rem;
}

.player-shell.is-playing .player-start {
    display: none;
}

.detail-content-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 22px;
    padding-top: 32px;
}

.content-panel {
    padding: 26px;
}

.site-footer {
    margin-top: 70px;
    padding: 38px 0;
    background: #111827;
    color: rgba(255, 255, 255, 0.82);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 32px;
}

.footer-brand {
    color: #ffffff;
    font-size: 1.3rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 14px 22px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.76);
    font-weight: 700;
}

[data-filter-card].is-hidden {
    display: none;
}

@media (max-width: 1060px) {
    .movie-grid,
    .featured-grid,
    .compact-grid,
    .ranking-preview,
    .library-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .quick-search-card {
        grid-template-columns: 1fr;
    }

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

    .hero-poster {
        display: none;
    }
}

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

    .menu-button {
        display: inline-grid;
    }

    .hero {
        height: 620px;
    }

    .hero-content {
        align-items: end;
        padding-bottom: 78px;
    }

    .hero-control {
        display: none;
    }

    .quick-search {
        display: grid;
    }

    .section-heading,
    .filter-panel,
    .detail-content-grid,
    .footer-grid,
    .category-overview-card,
    .detail-layout {
        grid-template-columns: 1fr;
    }

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

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

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

    .detail-layout {
        gap: 24px;
    }

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

    .footer-links {
        justify-content: flex-start;
    }
}

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

    .movie-grid,
    .featured-grid,
    .compact-grid,
    .ranking-preview,
    .library-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .page-hero {
        border-radius: 22px;
    }

    .hero-tags span,
    .detail-tags span {
        font-size: 0.78rem;
    }
}
