:root {
  --bg: #fff7ed;
  --paper: #ffffff;
  --paper-soft: rgba(255, 255, 255, 0.82);
  --text: #111827;
  --muted: #6b7280;
  --line: rgba(245, 158, 11, 0.22);
  --amber: #d97706;
  --amber-dark: #92400e;
  --orange: #f97316;
  --shadow: 0 20px 45px rgba(146, 64, 14, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  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));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 28px rgba(146, 64, 14, 0.08);
}

.nav-wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 10px 25px rgba(217, 119, 6, 0.28);
}

.brand-text,
.footer-brand {
  font-size: 20px;
  font-weight: 800;
  color: var(--amber-dark);
  letter-spacing: 0.02em;
}

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

.nav-link {
  padding: 9px 13px;
  border-radius: 999px;
  color: #4b5563;
  font-weight: 650;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--amber-dark);
  background: rgba(245, 158, 11, 0.15);
}

.nav-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input,
.mobile-search input,
.filter-toolbar input,
.filter-toolbar select,
.search-panel input {
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.86);
  outline: none;
}

.nav-search input:focus,
.mobile-search input:focus,
.filter-toolbar input:focus,
.search-panel input:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.nav-search button,
.mobile-search button {
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  color: white;
  background: var(--amber);
}

.mobile-toggle {
  display: none;
  border: 0;
  background: transparent;
  font-size: 24px;
  color: var(--amber-dark);
}

.mobile-panel {
  display: none;
  padding: 0 20px 16px;
  border-top: 1px solid var(--line);
}

.mobile-panel.open {
  display: block;
}

.mobile-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.mobile-links a {
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.75);
  text-align: center;
}

.hero-carousel {
  position: relative;
  height: min(620px, 72vh);
  min-height: 500px;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide > img,
.detail-bg {
  height: 100%;
  object-fit: cover;
}

.image-missing {
  opacity: 0.12;
  background: linear-gradient(135deg, #f59e0b, #7c2d12);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 74% 24%, rgba(245, 158, 11, 0.28), transparent 26%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.58) 48%, rgba(0, 0, 0, 0.08) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  padding: 110px 20px 0;
  margin-left: max(20px, calc((100vw - 1240px) / 2));
  color: #fff;
}

.hero-tags,
.tag-row,
.detail-meta,
.card-meta,
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.hero-tags span,
.tag-row span,
.detail-meta span,
.card-meta span,
.hero-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span,
.hero-meta span,
.detail-meta span {
  color: #fffbeb;
  background: rgba(255, 255, 255, 0.17);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-content h1 {
  margin: 20px 0 14px;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 660px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.8;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 0 20px;
  font-weight: 800;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 16px 30px rgba(217, 119, 6, 0.28);
}

.btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(12px);
}

.btn-small {
  min-height: 36px;
  padding: 0 14px;
  color: var(--amber-dark);
  background: #ffedd5;
}

.hero-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, 0.28);
  font-size: 36px;
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  transition: 0.25s ease;
}

.hero-dots button.active {
  width: 34px;
  background: #fff;
}

.quick-panel,
.section,
.footer-grid {
  max-width: 1240px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.quick-panel {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 18px;
  margin-top: -56px;
  position: relative;
  z-index: 4;
}

.quick-card {
  min-height: 150px;
  border-radius: var(--radius);
  padding: 22px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.quick-card.emphasis {
  color: #fff;
  background: linear-gradient(135deg, var(--amber-dark), var(--orange));
}

.quick-card h2,
.quick-card strong {
  display: block;
  margin: 8px 0;
  font-size: 25px;
}

.quick-card p {
  margin: 0;
  color: inherit;
  opacity: 0.8;
  line-height: 1.7;
}

.quick-label,
.section-kicker {
  color: var(--amber);
  font-weight: 900;
  letter-spacing: 0.04em;
}

.quick-card.emphasis .quick-label {
  color: #fde68a;
}

.quick-card.emphasis a {
  display: inline-flex;
  margin-top: 16px;
  font-weight: 900;
}

.section {
  padding-top: 72px;
  padding-bottom: 72px;
}

.section.tinted {
  max-width: none;
  padding-left: max(20px, calc((100vw - 1240px) / 2));
  padding-right: max(20px, calc((100vw - 1240px) / 2));
  background: linear-gradient(90deg, rgba(254, 243, 199, 0.8), rgba(255, 237, 213, 0.8));
}

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

.section-heading h2 {
  margin: 7px 0 0;
  font-size: clamp(27px, 4vw, 42px);
  line-height: 1.12;
}

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

.horizontal-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(238px, 280px);
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 14px;
  scroll-snap-type: x mandatory;
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: 0 16px 38px rgba(146, 64, 14, 0.09);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
  scroll-snap-align: start;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 54px rgba(146, 64, 14, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #f59e0b, #7c2d12);
  overflow: hidden;
}

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

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

.poster-badge,
.poster-play {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.54);
  backdrop-filter: blur(10px);
}

.poster-badge {
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
}

.poster-play {
  right: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
}

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

.card-meta span,
.tag-row span {
  color: var(--amber-dark);
  background: #ffedd5;
}

.movie-card h3 {
  margin: 12px 0 8px;
  font-size: 18px;
  line-height: 1.32;
}

.movie-card p {
  display: -webkit-box;
  margin: 0 0 14px;
  min-height: 46px;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.65;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

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

.category-tile {
  position: relative;
  min-height: 240px;
  overflow: hidden;
  border-radius: var(--radius);
  padding: 20px;
  color: #fff;
  background: #111827;
  box-shadow: var(--shadow);
}

.category-tile img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-tile:hover img {
  transform: scale(1.05);
  opacity: 0.58;
}

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

.category-tile span,
.category-tile strong,
.category-tile p {
  position: relative;
  z-index: 2;
}

.category-tile span {
  display: inline-flex;
  margin-bottom: 74px;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.18);
  font-weight: 800;
}

.category-tile strong {
  display: block;
  margin-bottom: 8px;
  font-size: 25px;
}

.category-tile p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
}

.page-hero {
  min-height: 300px;
  display: grid;
  align-items: center;
  padding: 64px 20px;
  background:
    radial-gradient(circle at 82% 14%, rgba(245, 158, 11, 0.28), transparent 26%),
    linear-gradient(135deg, #fff7ed, #ffedd5);
}

.page-hero > div {
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
}

.page-hero h1 {
  margin: 10px 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.filter-toolbar,
.search-panel {
  display: flex;
  gap: 12px;
  margin-bottom: 26px;
  padding: 16px;
  border-radius: 20px;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.filter-toolbar input,
.search-panel input {
  flex: 1;
  min-width: 160px;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 64px 96px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: 0 12px 28px rgba(146, 64, 14, 0.08);
}

.rank-no {
  color: var(--amber);
  font-size: 28px;
  font-weight: 900;
  text-align: center;
}

.rank-cover {
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 16px;
  background: #ffedd5;
}

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

.rank-info h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rank-info p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.65;
}

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

.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0.46;
  filter: blur(4px) scale(1.04);
}

.detail-mask {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 20%, rgba(245, 158, 11, 0.32), transparent 28%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.42));
}

.detail-wrap {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  margin: 0 auto;
  padding: 72px 20px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 38px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
}

.detail-poster img {
  aspect-ratio: 2 / 3;
  height: 100%;
  object-fit: cover;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.74);
}

.detail-info h1 {
  margin: 0 0 16px;
  max-width: 820px;
  font-size: clamp(36px, 6vw, 68px);
  letter-spacing: -0.04em;
}

.detail-info p {
  max-width: 790px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.85;
}

.detail-info .tag-row {
  margin: 20px 0 24px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #0f172a;
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.22);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 8px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.62));
  text-align: center;
}

.player-overlay.hidden {
  display: none;
}

.big-play {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  margin: 0 auto 4px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 20px 42px rgba(217, 119, 6, 0.38);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
}

.prose-card,
.info-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.prose-card.standalone {
  max-width: 900px;
  margin: 0 auto;
}

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

.prose-card p {
  margin: 0 0 22px;
  color: #374151;
  line-height: 1.95;
}

.info-card dl {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  margin: 0 0 18px;
}

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

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

.search-summary {
  margin-bottom: 18px;
  color: var(--muted);
}

.site-footer {
  margin-top: 40px;
  padding: 54px 0;
  color: #fef3c7;
  background: linear-gradient(135deg, #111827, #451a03);
}

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

.site-footer p,
.site-footer a {
  color: rgba(255, 255, 255, 0.72);
}

.site-footer a {
  display: block;
  margin-top: 10px;
}

.footer-brand {
  color: #fde68a;
  margin-bottom: 12px;
}

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

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

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

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

  .mobile-toggle {
    display: block;
    margin-left: auto;
  }

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

  .hero-content {
    padding-top: 78px;
  }

  .hero-arrow {
    display: none;
  }

  .quick-panel,
  .category-grid,
  .category-grid.large,
  .grid-3,
  .grid-4,
  .footer-grid,
  .content-grid,
  .detail-wrap,
  .ranking-item {
    grid-template-columns: 1fr;
  }

  .quick-panel {
    margin-top: 18px;
  }

  .section,
  .section.tinted {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .detail-wrap {
    padding-top: 46px;
  }

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

  .filter-toolbar,
  .search-panel {
    flex-direction: column;
  }

  .ranking-item .btn {
    width: 100%;
  }
}
