:root {
  --amber-950: #451a03;
  --amber-900: #78350f;
  --amber-800: #92400e;
  --amber-700: #b45309;
  --amber-600: #d97706;
  --amber-500: #f59e0b;
  --orange-700: #c2410c;
  --orange-100: #ffedd5;
  --paper: #fffaf0;
  --text: #1f2937;
  --muted: #6b7280;
  --line: rgba(146, 64, 14, 0.16);
  --shadow: 0 18px 50px rgba(120, 53, 15, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, #fffbeb 0%, #fff7ed 45%, #fef3c7 100%);
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  color: #fff;
  background: linear-gradient(90deg, var(--amber-900), var(--orange-700), var(--amber-900));
  box-shadow: 0 10px 28px rgba(69, 26, 3, 0.24);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

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

.brand strong {
  display: block;
  font-size: 22px;
  letter-spacing: 0.04em;
}

.brand em {
  display: block;
  margin-top: 2px;
  font-style: normal;
  font-size: 12px;
  color: #fde68a;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.desktop-nav a,
.mobile-nav a {
  padding: 10px 13px;
  border-radius: 12px;
  color: #fff7ed;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fef3c7;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
}

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

.mobile-nav.open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.hero {
  position: relative;
  min-height: 690px;
  overflow: hidden;
  color: #fff;
  background: var(--amber-950);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.7s ease;
  pointer-events: none;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
}

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

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 30%, rgba(245, 158, 11, 0.32), transparent 34%),
    linear-gradient(90deg, rgba(69, 26, 3, 0.98) 0%, rgba(120, 53, 15, 0.78) 42%, rgba(69, 26, 3, 0.48) 100%),
    linear-gradient(0deg, rgba(69, 26, 3, 0.9), transparent 48%);
}

.hero-content {
  position: relative;
  min-height: 690px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  align-items: center;
  gap: 56px;
  padding: 72px 0 104px;
}

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

.eyebrow,
.section-heading span,
.page-hero span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  font-weight: 700;
  letter-spacing: 0.06em;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 6vw, 66px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero h2 {
  margin: 0 0 18px;
  color: #fed7aa;
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1.1;
}

.hero p {
  margin: 0 0 24px;
  max-width: 680px;
  color: #ffedd5;
  font-size: clamp(16px, 2.3vw, 22px);
  line-height: 1.8;
}

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

.hero-tags span,
.tag-row span,
.detail-tags a {
  display: inline-flex;
  padding: 7px 11px;
  border-radius: 999px;
  color: #7c2d12;
  background: #ffedd5;
  font-size: 13px;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(69, 26, 3, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(69, 26, 3, 0.22);
}

.btn.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--amber-600), var(--orange-700));
}

.btn.ghost {
  color: #fff7ed;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn.ghost.dark {
  color: var(--amber-900);
  background: #fff7ed;
  border-color: var(--line);
}

.btn.light {
  color: var(--amber-900);
  background: #fff7ed;
}

.hero-poster {
  position: relative;
  align-self: center;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  transform: rotate(2deg);
}

.hero-poster img {
  aspect-ratio: 3 / 4.2;
  object-fit: cover;
}

.hero-poster span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 10px 15px;
  border-radius: 999px;
  color: #fff;
  background: rgba(217, 119, 6, 0.92);
  backdrop-filter: blur(8px);
  font-weight: 800;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 34px;
  display: flex;
  align-items: center;
  gap: 18px;
  transform: translateX(-50%);
}

.hero-controls button {
  border: 0;
  cursor: pointer;
}

.hero-controls > button {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  font-size: 28px;
  line-height: 1;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
}

.hero-dots button.active {
  width: 28px;
  background: #f59e0b;
}

.section-block,
.page-main {
  padding: 64px 0;
}

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

.section-heading span,
.page-hero span {
  color: var(--amber-700);
  background: #ffedd5;
  border-color: rgba(217, 119, 6, 0.16);
}

.section-heading h2,
.page-hero h1,
.detail-article h2,
.player-section h2,
.side-panel h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
}

.section-heading a {
  color: var(--amber-700);
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(120, 53, 15, 0.22);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--amber-900);
}

.poster-link img {
  aspect-ratio: 3 / 4.1;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.66), transparent 58%);
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-link::after {
  opacity: 1;
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--amber-600);
  transform: translate(-50%, -50%) scale(0.82);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-badge {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.type-badge,
.duration-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
}

.type-badge {
  left: 12px;
  background: rgba(217, 119, 6, 0.92);
}

.duration-badge {
  right: 12px;
}

.card-body {
  padding: 16px;
}

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

.card-body h3 a:hover,
.rank-content h3 a:hover,
.side-links a:hover {
  color: var(--amber-700);
}

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

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 13px;
}

.meta-row span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

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

.tag-row span,
.detail-tags a {
  padding: 5px 9px;
  font-size: 12px;
}

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

.category-tile,
.category-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 166px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(135deg, #fff 0%, #fff7ed 100%);
  box-shadow: 0 12px 34px rgba(120, 53, 15, 0.1);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-tile:hover,
.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 48px rgba(120, 53, 15, 0.18);
}

.category-tile strong,
.category-card h2 {
  color: var(--amber-900);
  font-size: 22px;
}

.category-tile span,
.category-card p {
  color: var(--muted);
  line-height: 1.75;
}

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

.category-card {
  min-height: 0;
}

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

.category-covers img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
}

.soft-panel {
  width: min(1180px, calc(100% - 32px));
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(255, 237, 213, 0.82), rgba(254, 243, 199, 0.86));
  box-shadow: inset 0 0 0 1px rgba(217, 119, 6, 0.12);
}

.search-panel {
  margin-bottom: 26px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 36px rgba(120, 53, 15, 0.08);
}

.search-panel input {
  width: 100%;
  height: 52px;
  padding: 0 18px;
  border: 1px solid rgba(217, 119, 6, 0.2);
  border-radius: 16px;
  outline: none;
  background: #fff;
}

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

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.filter-row button {
  border: 0;
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--amber-900);
  background: #ffedd5;
  cursor: pointer;
}

.filter-row button.active {
  color: #fff;
  background: var(--amber-700);
}

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

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

.rank-card {
  position: relative;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(120, 53, 15, 0.1);
}

.rank-num {
  position: absolute;
  left: -8px;
  top: -8px;
  z-index: 2;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber-600), var(--orange-700));
  font-weight: 900;
}

.rank-img img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 14px;
}

.rank-content h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.rank-content p {
  display: -webkit-box;
  margin: 0 0 10px;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.page-main {
  min-height: 70vh;
}

.page-hero {
  margin-bottom: 34px;
  padding: 48px;
  border-radius: 34px;
  color: #fff;
  background:
    radial-gradient(circle at 78% 20%, rgba(245, 158, 11, 0.35), transparent 26%),
    linear-gradient(135deg, var(--amber-900), var(--orange-700));
  box-shadow: var(--shadow);
}

.page-hero h1 {
  color: #fff;
  font-size: clamp(34px, 5vw, 58px);
}

.page-hero p {
  max-width: 780px;
  margin: 16px 0 0;
  color: #ffedd5;
  font-size: 18px;
  line-height: 1.8;
}

.inline-actions {
  margin-top: 22px;
}

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

.detail-main {
  background: linear-gradient(135deg, #fffbeb 0%, #fff7ed 100%);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: var(--amber-950);
}

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

.detail-bg img {
  height: 100%;
  object-fit: cover;
  filter: blur(8px) saturate(1.1);
  transform: scale(1.05);
}

.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(69, 26, 3, 0.98), rgba(120, 53, 15, 0.82), rgba(69, 26, 3, 0.68));
}

.detail-hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  align-items: center;
  gap: 42px;
  padding: 68px 0;
}

.detail-poster img {
  aspect-ratio: 3 / 4.2;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: 0 24px 68px rgba(0, 0, 0, 0.38);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  color: #fde68a;
  font-weight: 700;
}

.detail-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.08;
}

.detail-one-line {
  max-width: 850px;
  margin: 0 0 20px;
  color: #ffedd5;
  font-size: 20px;
  line-height: 1.8;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.player-section {
  padding: 56px 0 24px;
}

.player-section h2 {
  margin-bottom: 20px;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #000;
  box-shadow: 0 24px 70px rgba(69, 26, 3, 0.28);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.48));
  cursor: pointer;
}

.play-overlay span {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber-600), var(--orange-700));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
  font-size: 40px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 26px;
  padding: 34px 0 24px;
}

.detail-article,
.side-panel {
  padding: 28px;
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow);
}

.detail-article h2,
.side-panel h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.detail-article p {
  margin: 0 0 26px;
  color: #374151;
  font-size: 17px;
  line-height: 1.9;
}

.info-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 24px;
}

.info-list div {
  padding: 14px;
  border-radius: 16px;
  background: #fff7ed;
}

.info-list dt {
  color: var(--amber-700);
  font-weight: 800;
}

.info-list dd {
  margin: 5px 0 0;
  color: #374151;
}

.pager-links {
  display: grid;
  gap: 10px;
}

.pager-links a,
.side-links a {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff7ed;
  color: var(--amber-900);
  font-weight: 700;
}

.side-links {
  display: grid;
  gap: 10px;
}

.side-links span {
  color: var(--muted);
  font-weight: 500;
}

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

.site-footer {
  margin-top: 44px;
  color: #d1d5db;
  background: linear-gradient(90deg, #111827, #1f2937, #111827);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 30px;
  padding: 48px 0;
}

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

.site-footer p {
  max-width: 620px;
  margin: 0;
  line-height: 1.8;
}

.site-footer a {
  display: block;
  margin: 8px 0;
  color: #d1d5db;
}

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

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

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

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

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

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

  .hero-poster {
    display: none;
  }

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

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

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

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

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

  .brand strong {
    font-size: 18px;
  }

  .brand em {
    display: none;
  }

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

  .hero-content {
    padding: 48px 0 92px;
  }

  .hero-actions,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .movie-grid,
  .featured-grid,
  .category-movie-grid,
  .related-grid,
  .category-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }

  .card-body {
    padding: 13px;
  }

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

  .rank-card {
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 12px;
  }

  .page-hero {
    padding: 30px;
    border-radius: 24px;
  }

  .detail-hero-inner {
    grid-template-columns: 1fr;
    padding: 42px 0;
  }

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

  .detail-layout {
    padding-top: 24px;
  }

  .info-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 460px) {
  .movie-grid,
  .featured-grid,
  .category-movie-grid,
  .related-grid,
  .category-overview {
    grid-template-columns: 1fr;
  }

  .mobile-nav.open {
    grid-template-columns: 1fr;
  }
}
