:root {
  --bg: #fffaf0;
  --bg-soft: #fffbeb;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --card: #ffffff;
  --brand: #b45309;
  --brand-dark: #92400e;
  --brand-soft: #fef3c7;
  --orange: #ea580c;
  --shadow: 0 18px 45px rgba(17, 24, 39, 0.10);
  --radius-lg: 24px;
  --radius-md: 16px;
  --max: 1280px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  backdrop-filter: blur(16px);
}

.site-header__inner {
  width: min(100%, var(--max));
  height: 66px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.site-logo__mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--orange));
  box-shadow: 0 10px 24px rgba(180, 83, 9, 0.22);
}

.site-logo__text {
  font-size: 20px;
  transition: color 0.2s ease;
}

.site-logo:hover .site-logo__text,
.nav-link:hover,
.nav-link.is-active {
  color: var(--brand);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.nav-link {
  color: #374151;
  font-weight: 650;
  transition: color 0.2s ease;
}

.header-search {
  width: 270px;
  display: flex;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
  min-width: 0;
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--text);
  background: #ffffff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18);
}

.header-search button,
.mobile-search button,
.button {
  border: 0;
  border-radius: 12px;
  padding: 10px 18px;
  color: #ffffff;
  background: var(--brand);
  cursor: pointer;
  font-weight: 750;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.button:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #374151;
  font-size: 26px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  padding: 12px 20px 20px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

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

.mobile-search {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.hero-section {
  min-height: 70vh;
  position: relative;
  overflow: hidden;
  background: #111827;
}

.hero-media,
.hero-media img,
.hero-overlay {
  position: absolute;
  inset: 0;
}

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

.hero-fallback,
.poster-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  text-align: center;
  color: rgba(255, 255, 255, 0.78);
  background: radial-gradient(circle at 30% 10%, rgba(245, 158, 11, 0.48), transparent 34%), linear-gradient(135deg, #111827, #78350f 55%, #ea580c);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero-overlay {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.84) 0%, rgba(0, 0, 0, 0.56) 47%, rgba(0, 0, 0, 0.12) 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(100%, var(--max));
  min-height: 70vh;
  margin: 0 auto;
  padding: 76px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 42px;
  align-items: center;
}

.hero-content {
  max-width: 780px;
  color: #ffffff;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 14px;
  color: #ffffff;
  background: rgba(180, 83, 9, 0.92);
  font-size: 14px;
  font-weight: 750;
  letter-spacing: 0.04em;
}

.eyebrow {
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.hero-content h1 {
  margin: 22px 0 18px;
  font-size: clamp(42px, 6vw, 74px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-summary {
  max-width: 720px;
  margin: 0;
  color: #e5e7eb;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.7;
}

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

.hero-meta span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 14px;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  box-shadow: 0 16px 30px rgba(180, 83, 9, 0.25);
}

.button--primary {
  background: var(--brand);
}

.button--ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(8px);
}

.hero-side-panel {
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.11);
  backdrop-filter: blur(18px);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.26);
}

.hero-side-panel h2 {
  margin: 0 0 16px;
  color: #ffffff;
  font-size: 22px;
}

.hero-mini-list {
  display: grid;
  gap: 12px;
}

.content-section,
.detail-layout {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 64px 20px;
}

.content-section--warm {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-inline: max(20px, calc((100vw - var(--max)) / 2 + 20px));
  background: linear-gradient(90deg, #fff7ed, #fffbeb);
}

.content-section--intro {
  padding-top: 44px;
  padding-bottom: 44px;
}

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

.section-heading h2,
.rank-column h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

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

.section-action {
  color: var(--brand);
  font-weight: 800;
  white-space: nowrap;
}

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

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

.movie-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.86);
  border-radius: var(--radius-md);
  background: var(--card);
  box-shadow: 0 8px 25px rgba(17, 24, 39, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.42);
  box-shadow: var(--shadow);
}

.poster-frame,
.category-card__image,
.ranking-row__cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: #111827;
}

.poster-frame {
  aspect-ratio: 2 / 3;
}

.poster-frame img,
.category-card__image img,
.ranking-row__cover img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.movie-card__body {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.movie-card__title {
  overflow: hidden;
  color: #111827;
  font-size: 16px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-card__meta,
.movie-card__desc {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.movie-card__desc {
  display: -webkit-box;
  min-height: 39px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-card--small .movie-card__desc,
.movie-card--mini .movie-card__desc {
  display: none;
}

.movie-card--mini {
  display: grid;
  grid-template-columns: 76px 1fr;
  align-items: center;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.10);
  box-shadow: none;
}

.movie-card--mini .poster-frame {
  aspect-ratio: 1 / 1.25;
}

.movie-card--mini .movie-card__title,
.movie-card--mini .movie-card__meta {
  color: #ffffff;
}

.rank-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  border-radius: 999px;
  padding: 5px 8px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--orange));
  font-size: 12px;
  font-weight: 800;
}

.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 28px;
  align-items: center;
  padding: 28px;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 50px rgba(245, 158, 11, 0.08);
}

.intro-grid h2 {
  margin: 14px 0 10px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
}

.intro-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.intro-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.quick-card {
  min-height: 120px;
  padding: 20px;
  border-radius: 20px;
  background: linear-gradient(135deg, #fffbeb, #ffffff);
  border: 1px solid rgba(245, 158, 11, 0.20);
  box-shadow: 0 10px 25px rgba(17, 24, 39, 0.05);
}

.quick-card strong,
.quick-card span {
  display: block;
}

.quick-card strong {
  color: #111827;
  font-size: 18px;
}

.quick-card span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.page-hero {
  background: radial-gradient(circle at 16% 10%, rgba(245, 158, 11, 0.38), transparent 28%), linear-gradient(135deg, #111827 0%, #78350f 58%, #ea580c 100%);
  color: #ffffff;
}

.page-hero--compact .page-hero__inner {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 70px 20px 62px;
}

.page-hero__inner h1 {
  max-width: 820px;
  margin: 18px 0 12px;
  font-size: clamp(38px, 5vw, 60px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.page-hero__inner p {
  max-width: 760px;
  margin: 0;
  color: #f3f4f6;
  font-size: 18px;
  line-height: 1.7;
}

.page-hero--amber {
  background: linear-gradient(135deg, #92400e, #ea580c);
}

.page-hero--type {
  background: linear-gradient(135deg, #111827, #b45309);
}

.page-hero--genre {
  background: linear-gradient(135deg, #78350f, #f59e0b);
}

.page-hero--ranking {
  background: radial-gradient(circle at 80% 20%, rgba(251, 191, 36, 0.38), transparent 26%), linear-gradient(135deg, #111827, #7c2d12 58%, #b45309);
}

.page-hero--search {
  background: linear-gradient(135deg, #111827, #92400e 52%, #ea580c);
}

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

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

.category-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: 0 14px 38px rgba(17, 24, 39, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-card__image {
  aspect-ratio: 16 / 10;
}

.category-card strong,
.category-card span:not(.category-card__image):not(.poster-fallback) {
  display: block;
  padding-inline: 18px;
}

.category-card strong {
  padding-top: 18px;
  font-size: 20px;
}

.category-card span:not(.category-card__image):not(.poster-fallback) {
  padding-top: 6px;
  padding-bottom: 18px;
  color: var(--muted);
}

.pill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.pill-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 999px;
  padding: 10px 14px;
  background: #ffffff;
  color: #374151;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(17, 24, 39, 0.04);
}

.pill-link span {
  color: var(--brand);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 34px;
}

.pagination a,
.pagination span {
  min-width: 40px;
  border-radius: 12px;
  padding: 9px 13px;
  text-align: center;
  background: #ffffff;
  border: 1px solid var(--line);
  color: #374151;
  font-weight: 750;
}

.pagination a.is-current,
.pagination a:hover {
  color: #ffffff;
  background: var(--brand);
  border-color: var(--brand);
}

.content-section--split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
}

.rank-column {
  padding: 26px;
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.07);
}

.ranking-list {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 42px 58px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: #f9fafb;
  transition: background 0.2s ease, transform 0.2s ease;
}

.ranking-row:hover {
  background: #fff7ed;
  transform: translateX(4px);
}

.ranking-row__num {
  color: var(--brand);
  font-weight: 900;
}

.ranking-row__cover {
  width: 58px;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
}

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

.ranking-row__main em {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr) auto;
  gap: 14px;
  align-items: end;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: 0 14px 40px rgba(17, 24, 39, 0.08);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: #374151;
  font-weight: 750;
}

.search-summary {
  margin: 24px 0;
  color: var(--muted);
  font-weight: 700;
}

.player-shell {
  background: #000000;
}

.player-wrap {
  position: relative;
  width: min(100%, var(--max));
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  background: #000000;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.42));
  cursor: pointer;
}

.play-overlay.is-hidden {
  display: none;
}

.play-overlay span {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: rgba(180, 83, 9, 0.92);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.32);
  position: relative;
  transition: transform 0.2s ease;
}

.play-overlay:hover span {
  transform: scale(1.08);
}

.play-overlay span::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 53%;
  transform: translate(-45%, -50%);
  border-top: 18px solid transparent;
  border-bottom: 18px solid transparent;
  border-left: 26px solid #ffffff;
}

.player-status {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 3;
  border-radius: 999px;
  padding: 8px 12px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.52);
  font-size: 13px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 360px;
  gap: 32px;
}

.detail-title-block h1 {
  margin: 16px 0 10px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-meta span {
  color: #374151;
  background: #f3f4f6;
}

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

.tag-chip {
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  font-size: 14px;
  font-weight: 700;
}

.detail-card,
.info-card {
  margin-top: 24px;
  padding: 26px;
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: 0 12px 35px rgba(17, 24, 39, 0.07);
}

.detail-card h2,
.info-card h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.detail-card p,
.info-card p {
  color: #4b5563;
  line-height: 1.9;
}

.detail-card .lead {
  color: #111827;
  font-size: 18px;
  font-weight: 700;
}

.info-card--gradient {
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--orange));
}

.info-card--gradient p {
  color: #ffedd5;
}

.info-card dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.info-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #f3f4f6;
  padding-bottom: 10px;
}

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

.info-card dd {
  margin: 0;
  font-weight: 750;
  text-align: right;
}

.site-footer {
  color: #d1d5db;
  background: #111827;
}

.site-footer__inner {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 52px 20px;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
}

.site-footer h2,
.site-footer h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

.site-footer p,
.site-footer li {
  color: #9ca3af;
  line-height: 1.8;
}

.site-footer ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.footer-note {
  font-size: 14px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 20px;
  text-align: center;
  color: #6b7280;
  font-size: 14px;
}

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

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

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

  .hero-inner,
  .detail-layout,
  .intro-grid,
  .content-section--split {
    grid-template-columns: 1fr;
  }

  .hero-side-panel {
    max-width: 620px;
  }
}

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-header__inner {
    height: 62px;
  }

  .hero-inner {
    padding-top: 54px;
    padding-bottom: 54px;
  }

  .hero-side-panel {
    display: none;
  }

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

  .category-grid,
  .category-grid--compact,
  .intro-actions,
  .filter-panel,
  .site-footer__inner {
    grid-template-columns: 1fr;
  }

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

  .player-status {
    left: 12px;
    right: auto;
    bottom: 12px;
  }
}

@media (max-width: 560px) {
  .site-logo__text {
    font-size: 17px;
  }

  .hero-section,
  .hero-inner {
    min-height: 620px;
  }

  .hero-content h1 {
    font-size: 42px;
  }

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

  .content-section,
  .detail-layout {
    padding-top: 42px;
    padding-bottom: 42px;
  }

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

  .movie-card__body {
    padding: 11px;
  }

  .movie-card__title {
    font-size: 15px;
  }

  .ranking-row {
    grid-template-columns: 34px 48px 1fr;
  }

  .play-overlay span {
    width: 66px;
    height: 66px;
  }
}
