:root {
  --bg: #fffaf0;
  --panel: #ffffff;
  --panel-soft: #fff7ed;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #fde68a;
  --brand: #b45309;
  --brand-2: #ea580c;
  --brand-3: #f59e0b;
  --dark: #111827;
  --radius: 22px;
  --shadow: 0 18px 45px rgba(146, 64, 14, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: radial-gradient(circle at top left, #ffedd5 0, rgba(255, 247, 237, 0) 34rem), var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body.menu-open {
  overflow: hidden;
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(255, 251, 235, 0.94), rgba(255, 237, 213, 0.94));
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(245, 158, 11, 0.22);
  box-shadow: 0 12px 28px rgba(146, 64, 14, 0.08);
}

.header-inner {
  max-width: 1220px;
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.brand-mark,
.footer-brand span {
  width: 36px;
  height: 36px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 24px rgba(180, 83, 9, 0.28);
}

.brand-text {
  font-size: 24px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.main-nav a {
  color: #374151;
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover {
  color: var(--brand);
  transform: translateY(-1px);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.big-search input,
.mobile-panel input {
  border: 1px solid #fcd34d;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  outline: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.header-search input {
  width: 220px;
  padding: 10px 16px;
}

.header-search input:focus,
.big-search input:focus,
.mobile-panel input:focus {
  border-color: var(--brand-3);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18);
}

.header-search button,
.big-search button,
.mobile-panel button,
.btn-primary,
.btn-ghost,
.filter-bar button,
.pagination a {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.header-search button,
.big-search button,
.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 24px rgba(180, 83, 9, 0.24);
}

.header-search button {
  padding: 10px 18px;
}

.header-search button:hover,
.big-search button:hover,
.btn-primary:hover,
.btn-ghost:hover,
.filter-bar button:hover,
.pagination a:hover {
  transform: translateY(-2px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  color: var(--brand);
  background: #ffedd5;
  cursor: pointer;
}

.mobile-panel {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 24px 18px;
  display: grid;
  gap: 12px;
}

.mobile-panel[hidden] {
  display: none;
}

.mobile-panel a,
.mobile-panel form {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.mobile-panel form {
  display: flex;
  gap: 8px;
}

.mobile-panel input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
}

.mobile-panel button {
  padding: 10px 14px;
  color: #ffffff;
  background: var(--brand);
}

main {
  max-width: 1220px;
  margin: 0 auto;
  padding: 28px 24px 72px;
}

.hero-shell,
.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  background: linear-gradient(135deg, #78350f 0%, #b45309 44%, #f97316 100%);
  color: #ffffff;
  box-shadow: var(--shadow);
}

.hero-shell::before,
.page-hero::before,
.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.28), transparent 24rem), radial-gradient(circle at 80% 10%, rgba(254, 215, 170, 0.28), transparent 22rem);
  pointer-events: none;
}

.hero-carousel {
  position: relative;
  min-height: 580px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.75fr);
  gap: 42px;
  align-items: center;
  padding: 66px;
  opacity: 0;
  transform: scale(0.985);
  pointer-events: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

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

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 66px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-desc,
.page-hero p,
.detail-one-line {
  max-width: 720px;
  margin: 20px 0 0;
  color: #fff7ed;
  font-size: 18px;
}

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

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

.hero-tags span,
.detail-tags a,
.tag-row span,
.chip-cloud a,
.filter-bar button {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.14);
  color: inherit;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 800;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
}

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 22px;
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.38);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

.hero-poster,
.ranking-card-large {
  position: relative;
  min-height: 460px;
  border-radius: 30px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 237, 213, 0.55), rgba(120, 53, 15, 0.35));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
}

.hero-poster::after,
.ranking-card-large::after,
.poster-frame::after,
.rank-cover::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 46%;
  background: linear-gradient(180deg, transparent, rgba(17, 24, 39, 0.78));
  pointer-events: none;
}

.hero-poster span {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 22px;
  z-index: 1;
  font-size: 24px;
  font-weight: 900;
}

.hero-dots {
  position: absolute;
  left: 66px;
  bottom: 34px;
  z-index: 4;
  display: flex;
  gap: 9px;
}

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

.hero-dot.is-active {
  width: 32px;
  background: #ffffff;
}

.hero-quick-links {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 66px 42px;
}

.hero-quick-links a {
  padding: 10px 16px;
  border-radius: 999px;
  color: #78350f;
  background: rgba(255, 255, 255, 0.78);
  font-weight: 900;
}

.content-section,
.split-section,
.detail-layout {
  margin-top: 42px;
}

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

.section-heading h2,
.side-panel h2,
.detail-main h2,
.detail-side h2 {
  margin: 0;
  color: var(--dark);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
}

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

.section-link {
  color: var(--brand);
  font-weight: 900;
}

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

.movie-card {
  min-width: 0;
}

.movie-card a {
  display: block;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 30px rgba(146, 64, 14, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card a:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 22px 46px rgba(146, 64, 14, 0.16);
}

.poster-frame {
  position: relative;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #fed7aa, #92400e);
  overflow: hidden;
}

.poster-frame img,
.hero-poster img,
.rank-cover img,
.tile-posters img,
.detail-poster img,
.ranking-card-large img {
  background: linear-gradient(135deg, #fed7aa, #92400e);
}

.poster-frame img.is-missing,
.hero-poster img.is-missing,
.rank-cover img.is-missing,
.tile-posters img.is-missing,
.detail-poster img.is-missing,
.ranking-card-large img.is-missing {
  opacity: 0;
}

.score-pill,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--brand-3), var(--brand-2));
  box-shadow: 0 8px 16px rgba(124, 45, 18, 0.22);
}

.score-pill {
  right: 12px;
  bottom: 12px;
  padding: 5px 9px;
  font-size: 12px;
}

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
}

.card-content {
  padding: 16px;
}

.card-content h3 {
  margin: 0;
  overflow: hidden;
  color: var(--dark);
  font-size: 18px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-line {
  min-height: 48px;
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: #92400e;
  font-size: 13px;
  font-weight: 800;
}

.tag-row {
  margin-top: 12px;
}

.tag-row span {
  border-color: #fed7aa;
  color: #92400e;
  background: #fff7ed;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
  align-items: start;
}

.content-panel,
.side-panel,
.detail-main,
.detail-side {
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.content-panel,
.detail-main {
  padding: 26px;
}

.side-panel,
.detail-side {
  padding: 24px;
  position: sticky;
  top: 92px;
}

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

.rank-item a {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 12px;
  border-radius: 20px;
  background: #fff7ed;
  transition: transform 0.2s ease, background 0.2s ease;
}

.rank-item a:hover {
  background: #ffedd5;
  transform: translateX(4px);
}

.rank-cover {
  position: relative;
  height: 142px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, #fed7aa, #92400e);
}

.rank-cover b {
  position: absolute;
  z-index: 2;
  left: 10px;
  top: 10px;
  min-width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: var(--brand-2);
}

.rank-item h3 {
  margin: 0;
  color: var(--dark);
  font-size: 18px;
}

.rank-item p {
  margin: 7px 0 10px;
  color: var(--muted);
  font-size: 14px;
}

.big-search {
  display: flex;
  gap: 10px;
  width: 100%;
}

.big-search input {
  flex: 1;
  min-width: 0;
  padding: 14px 18px;
}

.big-search button {
  padding: 14px 22px;
}

.chip-cloud {
  margin-top: 18px;
}

.chip-cloud a {
  border-color: #fed7aa;
  color: #92400e;
  background: #fff7ed;
}

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

.category-tile,
.overview-tile a {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-height: 160px;
  padding: 18px;
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 12px 30px rgba(146, 64, 14, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.overview-tile a:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 44px rgba(146, 64, 14, 0.14);
}

.category-tile img {
  height: 130px;
  border-radius: 18px;
  background: linear-gradient(135deg, #fed7aa, #92400e);
}

.category-tile h3,
.overview-tile h2 {
  margin: 0 0 8px;
  color: var(--dark);
}

.category-tile p,
.overview-tile p {
  margin: 0;
  color: var(--muted);
}

.page-hero {
  display: grid;
  gap: 18px;
  padding: 54px;
}

.compact-hero {
  min-height: 280px;
}

.hero-search {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.overview-tile a {
  grid-template-columns: 180px minmax(0, 1fr);
}

.tile-posters {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.tile-posters img {
  height: 92px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fed7aa, #92400e);
}

.filter-section {
  padding: 0;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.filter-bar button {
  border-color: #fed7aa;
  color: #92400e;
  background: #fff7ed;
}

.filter-bar button.is-active,
.filter-bar button:hover {
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

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

.pagination:last-child {
  margin: 24px 0 0;
}

.pagination a {
  min-width: 42px;
  min-height: 42px;
  display: inline-grid;
  place-items: center;
  padding: 8px 14px;
  color: #92400e;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

.pagination a.is-current {
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.ranking-hero {
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: center;
}

.ranking-card-large {
  min-height: 430px;
  padding: 0;
}

.ranking-card-large span,
.ranking-card-large h2,
.ranking-card-large p {
  position: absolute;
  z-index: 2;
  left: 22px;
  right: 22px;
}

.ranking-card-large span {
  top: 22px;
  right: auto;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--brand-2);
  font-weight: 900;
}

.ranking-card-large h2 {
  bottom: 58px;
  margin: 0;
}

.ranking-card-large p {
  bottom: 22px;
  margin: 0;
  color: #fff7ed;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 4px 0 20px;
  color: #92400e;
  font-weight: 800;
}

.detail-hero {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: 46px;
}

.detail-poster {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(135deg, #fed7aa, #92400e);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.26);
}

.detail-copy,
.detail-poster,
.page-hero > *,
.ranking-card-large {
  position: relative;
  z-index: 2;
}

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

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #78350f;
  background: rgba(255, 255, 255, 0.78);
  font-weight: 900;
}

.detail-tags {
  margin: 12px 0 28px;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #000000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
  object-fit: contain;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(180, 83, 9, 0.42), rgba(0, 0, 0, 0.58));
  cursor: pointer;
  z-index: 2;
}

.play-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-icon {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand-3), var(--brand-2));
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.28);
  font-size: 34px;
}

.play-overlay span:last-child {
  font-size: 20px;
  font-weight: 900;
}

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

.detail-main p {
  color: #374151;
  font-size: 17px;
}

.detail-side dl {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
}

.detail-side dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.detail-side dd {
  margin: 0 0 8px;
  color: var(--dark);
  font-weight: 800;
}

.search-filter {
  justify-content: center;
}

.site-footer {
  color: #fffbeb;
  background: linear-gradient(135deg, #78350f, #92400e 48%, #b45309);
}

.footer-inner {
  max-width: 1220px;
  margin: 0 auto;
  padding: 44px 24px;
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 1fr;
  gap: 34px;
}

.footer-brand {
  color: #ffffff;
  font-size: 22px;
}

.site-footer p {
  max-width: 460px;
  color: #fde68a;
}

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

.footer-links a {
  padding: 8px 10px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(255, 255, 255, 0.09);
}

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

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

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

  .hero-slide,
  .detail-hero,
  .ranking-hero,
  .split-section,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .hero-carousel {
    min-height: 760px;
  }

  .hero-poster,
  .ranking-card-large {
    min-height: 380px;
  }

  .side-panel,
  .detail-side {
    position: static;
  }
}

@media (max-width: 780px) {
  .header-inner {
    height: 64px;
    padding: 0 16px;
  }

  .main-nav {
    display: none;
  }

  .menu-toggle {
    display: grid;
    place-items: center;
    margin-left: auto;
  }

  main {
    padding: 18px 14px 48px;
  }

  .brand-text {
    font-size: 20px;
  }

  .hero-slide,
  .page-hero,
  .detail-hero {
    padding: 30px;
  }

  .hero-carousel {
    min-height: 700px;
  }

  .hero-dots {
    left: 30px;
    bottom: 24px;
  }

  .hero-quick-links {
    padding: 0 30px 30px;
  }

  .movie-grid,
  .category-grid,
  .overview-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .category-tile,
  .overview-tile a,
  .rank-item a {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .category-tile img,
  .rank-cover {
    height: 112px;
  }

  .tile-posters {
    display: none;
  }

  .big-search,
  .mobile-panel form {
    flex-direction: column;
  }

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

@media (max-width: 520px) {
  .movie-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .card-content {
    padding: 12px;
  }

  .card-content h3 {
    font-size: 16px;
  }

  .card-line,
  .tag-row {
    display: none;
  }

  .hero-carousel {
    min-height: 640px;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 30px;
  }

  .hero-poster,
  .ranking-card-large {
    min-height: 300px;
  }

  .footer-inner {
    padding: 34px 16px;
  }
}
