:root {
    --color-bg: #f5f6f8;
    --color-surface: #ffffff;
    --color-text: #1f2937;
    --color-muted: #6b7280;
    --color-dark: #111827;
    --color-dark-soft: #1f2937;
    --color-amber: #f59e0b;
    --color-amber-dark: #d97706;
    --color-orange: #f97316;
    --color-border: #e5e7eb;
    --shadow-card: 0 18px 45px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.08);
    --radius-lg: 18px;
    --radius-xl: 28px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--color-text);
    background: linear-gradient(180deg, #f9fafb 0%, #eef2f7 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #fff;
    background: linear-gradient(90deg, #1f2937 0%, #111827 100%);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.18);
}

.site-header__inner {
    width: min(var(--container), calc(100% - 32px));
    height: 64px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.site-logo__icon {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    color: #111827;
    background: linear-gradient(135deg, #fbbf24 0%, #f97316 100%);
    box-shadow: 0 10px 20px rgba(245, 158, 11, 0.36);
}

.site-logo__text {
    font-size: 20px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 26px;
}

.nav-link,
.mobile-nav-link {
    color: rgba(255, 255, 255, 0.86);
    transition: color 180ms ease, transform 180ms ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
    color: #fde68a;
}

.nav-link:hover {
    transform: translateY(-1px);
}

.mobile-nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.10);
}

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

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

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

.mobile-nav-link {
    padding: 8px 0;
}

.page {
    min-height: 60vh;
}

.hero-slider {
    position: relative;
    height: 70vh;
    min-height: 540px;
    overflow: hidden;
    background: linear-gradient(135deg, #111827 0%, #3f2f12 55%, #7c2d12 100%);
}

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

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

.hero-slide > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-slide > img.is-hidden {
    display: none;
}

.hero-slide__shade,
.detail-hero__shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 24% 20%, rgba(245, 158, 11, 0.25), transparent 32%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.58) 45%, rgba(0, 0, 0, 0.18) 100%);
}

.hero-slide__content {
    position: absolute;
    left: 50%;
    bottom: 12%;
    transform: translateX(-50%);
    z-index: 2;
    color: #fff;
}

.hero-badge,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: max-content;
    margin-bottom: 14px;
    padding: 6px 12px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--color-amber) 0%, var(--color-orange) 100%);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.hero-slide h1,
.page-hero h1,
.detail-hero h1 {
    margin: 0 0 16px;
    font-size: clamp(36px, 6vw, 68px);
    line-height: 1.05;
    font-weight: 900;
    text-shadow: 0 5px 20px rgba(0, 0, 0, 0.38);
}

.hero-slide p,
.page-hero p,
.detail-hero p {
    max-width: 780px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(16px, 2vw, 21px);
}

.hero-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 0 24px;
}

.hero-meta span,
.meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    color: #fff;
    background: rgba(17, 24, 39, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
}

.meta-pill b {
    color: #fde68a;
}

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 22px;
    border-radius: 12px;
    font-weight: 800;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

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

.button--primary {
    color: #fff;
    background: linear-gradient(135deg, var(--color-amber) 0%, var(--color-orange) 100%);
    box-shadow: 0 12px 24px rgba(249, 115, 22, 0.32);
}

.button--ghost {
    color: #fff;
    background: rgba(0, 0, 0, 0.34);
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.button--text,
.section-action {
    color: var(--color-amber-dark);
    background: #fff7ed;
    border: 1px solid #fed7aa;
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(0, 0, 0, 0.45);
    font-size: 38px;
    line-height: 1;
    transition: background 180ms ease;
}

.hero-control:hover {
    background: rgba(0, 0, 0, 0.72);
}

.hero-control--prev {
    left: 22px;
}

.hero-control--next {
    right: 22px;
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.58);
    transition: width 180ms ease, background 180ms ease;
}

.hero-dot.is-active {
    width: 32px;
    background: var(--color-amber);
}

.content-section {
    margin-top: 56px;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 36px);
    line-height: 1.15;
}

.section-heading p {
    max-width: 720px;
    margin: 8px 0 0;
    color: var(--color-muted);
}

.movie-grid {
    display: grid;
    gap: 22px;
}

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

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

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

.movie-grid--secondary {
    margin-top: 22px;
}

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
    transition: transform 220ms ease, box-shadow 220ms ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-card);
}

.movie-card__poster {
    position: relative;
    display: block;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, #111827 0%, #7c2d12 100%);
}

.poster {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background:
        radial-gradient(circle at 32% 22%, rgba(245, 158, 11, 0.36), transparent 35%),
        linear-gradient(135deg, #111827 0%, #3f2f12 100%);
}

.poster--small {
    width: 78px;
    min-width: 78px;
    border-radius: 12px;
}

.poster--detail {
    border-radius: 22px;
    box-shadow: var(--shadow-card);
}

.poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 420ms ease;
}

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

.poster-fallback-title {
    position: absolute;
    inset: auto 12px 14px;
    display: none;
    color: #fff;
    font-weight: 800;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.55);
}

.poster-missing .poster-fallback-title {
    display: block;
}

.movie-card__score {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    border-radius: 999px;
    color: #fff;
    background: var(--color-amber);
    font-weight: 800;
    font-size: 13px;
}

.movie-card__play {
    position: absolute;
    inset: auto 12px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    border-radius: 10px;
    color: #fff;
    background: rgba(0, 0, 0, 0.56);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 180ms ease, transform 180ms ease;
}

.movie-card:hover .movie-card__play {
    opacity: 1;
    transform: translateY(0);
}

.movie-card__body {
    padding: 14px;
}

.movie-card__body h3 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.28;
}

.movie-card__body p {
    display: -webkit-box;
    min-height: 42px;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--color-muted);
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-card__meta,
.movie-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    color: #6b7280;
    font-size: 12px;
}

.movie-card__meta span,
.movie-card__tags {
    padding: 3px 7px;
    border-radius: 999px;
    background: #f3f4f6;
}

.movie-card__tags {
    width: max-content;
    max-width: 100%;
    margin-top: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.highlight-section {
    padding: 36px;
    border-radius: var(--radius-xl);
    background: linear-gradient(90deg, #fffbeb 0%, #fff7ed 100%);
    box-shadow: var(--shadow-soft);
}

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

.category-tile,
.category-card {
    position: relative;
    min-height: 190px;
    padding: 22px;
    overflow: hidden;
    border: 1px solid rgba(245, 158, 11, 0.24);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow-soft);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.category-tile:hover,
.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card);
}

.category-tile::after,
.category-card::after {
    content: "";
    position: absolute;
    right: -30px;
    bottom: -40px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.12);
}

.category-tile__count,
.category-card__head span {
    display: inline-flex;
    margin-bottom: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    color: #92400e;
    background: #fef3c7;
    font-size: 13px;
    font-weight: 700;
}

.category-tile h3,
.category-card h2 {
    margin: 0 0 10px;
    font-size: 22px;
}

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

.category-tile__sample {
    color: var(--color-amber-dark);
    font-weight: 700;
    font-size: 14px;
}

.category-card ul {
    position: relative;
    z-index: 1;
    margin: 0 0 18px;
    padding-left: 18px;
    color: var(--color-muted);
}

.ranking-preview {
    padding: 34px;
    border-radius: var(--radius-xl);
    background: #fff;
    box-shadow: var(--shadow-soft);
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 58px 78px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 5px 14px rgba(15, 23, 42, 0.04);
}

.ranking-item--top {
    border-color: #fcd34d;
    background: linear-gradient(90deg, #fffbeb 0%, #ffffff 100%);
}

.ranking-item__rank {
    width: 46px;
    height: 46px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--color-amber) 0%, var(--color-orange) 100%);
    font-weight: 900;
}

.ranking-item__poster {
    display: block;
}

.ranking-item__body h3 {
    margin: 0 0 6px;
    font-size: 18px;
}

.ranking-item__body p {
    margin: 0 0 8px;
    color: var(--color-muted);
}

.ranking-item__score {
    text-align: right;
    color: var(--color-muted);
    font-size: 13px;
}

.ranking-item__score strong {
    display: block;
    color: var(--color-amber-dark);
    font-size: 24px;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, #111827 0%, #2f2416 48%, #7c2d12 100%);
}

.page-hero {
    padding: 72px 0;
}

.page-hero--category {
    padding: 64px 0;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
}

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

.search-panel {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr 1fr;
    gap: 12px;
    align-items: center;
    margin-top: 28px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-soft);
}

.search-panel--home {
    margin-top: -34px;
    position: relative;
    z-index: 5;
}

.search-panel--sticky {
    position: sticky;
    top: 76px;
    z-index: 20;
}

.search-panel label {
    font-weight: 800;
    color: #92400e;
}

.search-panel input,
.search-panel select {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: #fff;
    outline: none;
}

.search-panel input:focus,
.search-panel select:focus {
    border-color: var(--color-amber);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.filter-empty {
    padding: 30px;
    border-radius: 18px;
    color: var(--color-muted);
    text-align: center;
    background: #fff;
}

.detail-hero {
    min-height: 560px;
}

.detail-hero__bg {
    position: absolute;
    inset: 0;
}

.detail-hero__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(3px) saturate(0.9);
    transform: scale(1.04);
}

.detail-hero__bg img.is-hidden {
    display: none;
}

.detail-hero__inner {
    position: relative;
    z-index: 2;
    padding: 54px 0 64px;
}

.detail-hero__grid {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    gap: 34px;
    align-items: center;
}

.detail-hero__content p {
    color: rgba(255, 255, 255, 0.88);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 24px;
}

.tag-list span {
    padding: 5px 10px;
    border-radius: 999px;
    color: #fde68a;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.player-section {
    margin-top: -44px;
    position: relative;
    z-index: 5;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000;
    box-shadow: var(--shadow-card);
}

.movie-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: #fff;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.62));
    font-size: 18px;
    font-weight: 800;
}

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

.player-start__icon {
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #111827;
    background: linear-gradient(135deg, #fbbf24 0%, #fb923c 100%);
    box-shadow: 0 18px 32px rgba(249, 115, 22, 0.34);
}

.player-message {
    position: absolute;
    left: 20px;
    bottom: 18px;
    margin: 0;
    padding: 8px 12px;
    border-radius: 10px;
    color: #fff;
    background: rgba(127, 29, 29, 0.85);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    margin-top: 42px;
}

.detail-content-card,
.detail-side-card {
    padding: 28px;
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.detail-content-card h2,
.detail-side-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.detail-content-card p {
    margin: 0 0 28px;
    color: #374151;
    font-size: 16px;
    line-height: 1.9;
}

.detail-side-card dl {
    margin: 0 0 22px;
}

.detail-side-card dl div {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
}

.detail-side-card dt {
    color: var(--color-muted);
}

.detail-side-card dd {
    margin: 0;
    font-weight: 700;
}

.site-footer {
    margin-top: 72px;
    color: rgba(255, 255, 255, 0.78);
    background: linear-gradient(90deg, #1f2937 0%, #111827 100%);
}

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

.site-footer h2 {
    margin: 0 0 12px;
    color: #fff;
    font-size: 18px;
}

.site-footer p {
    margin: 0;
}

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

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

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

.footer-bottom {
    padding: 18px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    text-align: center;
    font-size: 14px;
}

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

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

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

    .mobile-nav-toggle {
        display: block;
    }

    .hero-slider {
        height: 72vh;
        min-height: 520px;
    }

    .hero-control {
        display: none;
    }

    .movie-grid--six,
    .movie-grid--five,
    .movie-grid--four {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .section-heading {
        display: block;
    }

    .section-action {
        margin-top: 12px;
    }

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

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

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

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

    .ranking-item__score {
        grid-column: 3 / 4;
        text-align: left;
    }
}

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

    .site-logo__text {
        font-size: 17px;
    }

    .hero-slide__content {
        bottom: 10%;
    }

    .hero-meta,
    .detail-meta {
        gap: 8px;
    }

    .hero-meta span,
    .meta-pill {
        padding: 6px 9px;
        font-size: 13px;
    }

    .movie-grid--six,
    .movie-grid--five,
    .movie-grid--four,
    .category-grid,
    .category-card-grid {
        grid-template-columns: 1fr;
    }

    .highlight-section,
    .ranking-preview,
    .detail-content-card,
    .detail-side-card {
        padding: 20px;
    }

    .ranking-item {
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .ranking-item__poster {
        display: none;
    }

    .ranking-item__score {
        grid-column: 2 / 3;
    }
}
