:root {
  color-scheme: light;
  --bg: #fffaf2;
  --bg-soft: #fff4dd;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-strong: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: rgba(251, 191, 36, 0.26);
  --primary: #d97706;
  --primary-dark: #92400e;
  --accent: #f59e0b;
  --dark: #101827;
  --shadow: 0 24px 80px rgba(146, 64, 14, 0.16);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(251, 191, 36, 0.28), transparent 34rem),
    linear-gradient(180deg, #fff7e8 0%, #ffffff 36%, #fffaf2 100%);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #fef3c7, #fed7aa);
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 250, 242, 0.82);
  backdrop-filter: blur(20px);
}

.nav-wrap {
  width: min(1220px, calc(100% - 36px));
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #111827;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  box-shadow: 0 12px 34px rgba(217, 119, 6, 0.32);
}

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

.nav-links a,
.mobile-links a {
  color: #374151;
  font-weight: 700;
  transition: color 0.22s ease, transform 0.22s ease;
}

.nav-links a:hover,
.nav-links a.active,
.mobile-links a:hover,
.mobile-links a.active {
  color: var(--primary);
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  padding: 6px;
  box-shadow: 0 10px 28px rgba(217, 119, 6, 0.08);
}

.nav-search input,
.mobile-search input,
.search-box input {
  border: 0;
  outline: 0;
  background: transparent;
  min-width: 210px;
  padding: 8px 12px;
  color: var(--text);
}

.nav-search button,
.mobile-search button,
.search-box button,
.primary-btn,
.secondary-btn,
.hero-dot,
.player-start,
.filter-chip {
  border: 0;
  cursor: pointer;
}

.nav-search button,
.mobile-search button,
.search-box button,
.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 800;
  box-shadow: 0 12px 26px rgba(217, 119, 6, 0.2);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.nav-search button:hover,
.mobile-search button:hover,
.search-box button:hover,
.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(217, 119, 6, 0.28);
}

.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #78350f;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(251, 191, 36, 0.42);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 800;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.secondary-btn:hover {
  transform: translateY(-2px);
  border-color: #f59e0b;
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  color: #78350f;
  background: #ffedd5;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  width: min(1220px, calc(100% - 36px));
  margin: 0 auto 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

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

.mobile-links {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.mobile-search {
  display: flex;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px;
}

.hero-shell {
  width: min(1220px, calc(100% - 36px));
  margin: 28px auto 48px;
}

.hero-carousel {
  position: relative;
  min-height: 560px;
  border-radius: 38px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.62fr);
  gap: 34px;
  align-items: center;
  padding: 68px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.65s ease, transform 0.65s ease;
  transform: scale(1.02);
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(16, 24, 39, 0.94), rgba(16, 24, 39, 0.72) 48%, rgba(16, 24, 39, 0.24)),
    var(--hero-image) center / cover;
  transform: scale(1.06);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 46%;
  background: linear-gradient(0deg, rgba(16, 24, 39, 0.96), transparent);
}

.hero-copy,
.hero-preview {
  position: relative;
  z-index: 2;
}

.hero-kicker {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: #fde68a;
  background: rgba(251, 191, 36, 0.14);
  border: 1px solid rgba(253, 230, 138, 0.34);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 800;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 20px 0 18px;
  color: #ffffff;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

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

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

.hero-tags span,
.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #92400e;
  background: #ffedd5;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span {
  color: #fde68a;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-preview {
  justify-self: end;
  width: min(360px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 30px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(14px);
  transform: rotate(2deg);
}

.hero-preview img {
  aspect-ratio: 3 / 4;
  border-radius: 22px;
}

.hero-preview-title {
  color: #ffffff;
  padding: 14px 6px 4px;
  font-weight: 900;
  font-size: 18px;
}

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 68px;
  bottom: 38px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 46px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  transition: width 0.24s ease, background 0.24s ease;
}

.hero-dot.active {
  width: 72px;
  background: #f59e0b;
}

.section,
.page-section,
.detail-section {
  width: min(1220px, calc(100% - 36px));
  margin: 0 auto 54px;
}

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

.section-title,
.page-head h1,
.detail-title {
  margin: 0;
  color: #111827;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.section-head p,
.page-head p,
.category-card p,
.detail-lead {
  margin: 8px 0 0;
  color: var(--muted);
}

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

.movie-card,
.category-card,
.ranking-row,
.info-panel,
.search-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 18px 54px rgba(146, 64, 14, 0.1);
  backdrop-filter: blur(18px);
}

.movie-card {
  overflow: hidden;
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.58);
  box-shadow: 0 28px 80px rgba(146, 64, 14, 0.18);
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #fed7aa;
}

.movie-poster img {
  transition: transform 0.35s ease;
}

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

.movie-type {
  position: absolute;
  top: 12px;
  right: 12px;
  border-radius: 999px;
  padding: 5px 10px;
  color: #ffffff;
  background: rgba(17, 24, 39, 0.78);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

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

.movie-card-title {
  display: -webkit-box;
  min-height: 3.2em;
  overflow: hidden;
  color: #111827;
  font-weight: 900;
  line-height: 1.28;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 10px 0;
  color: var(--muted);
  font-size: 13px;
}

.movie-card-body p,
.rank-body p,
.info-panel p,
.detail-copy p {
  color: #4b5563;
}

.movie-card-body p {
  min-height: 5.1em;
  margin: 0 0 14px;
  font-size: 14px;
}

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

.category-card {
  display: flex;
  min-height: 220px;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  overflow: hidden;
  position: relative;
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-card::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -72px;
  top: -72px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.22), transparent 68%);
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 26px 72px rgba(146, 64, 14, 0.16);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.category-card a,
.section-more {
  color: var(--primary-dark);
  font-weight: 900;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 72px 96px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 14px;
}

.rank-number {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  font-size: 20px;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(217, 119, 6, 0.18);
}

.rank-thumb {
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  overflow: hidden;
}

.rank-title {
  color: #111827;
  font-size: 18px;
  font-weight: 900;
}

.search-panel {
  padding: 24px;
}

.search-box {
  display: flex;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  padding: 8px;
}

.search-box input {
  width: 100%;
  min-width: 0;
}

.filter-row {
  margin-top: 18px;
}

.filter-chip {
  color: #78350f;
  background: #ffedd5;
  border-radius: 999px;
  padding: 8px 13px;
  font-weight: 800;
  transition: background 0.22s ease, color 0.22s ease, transform 0.22s ease;
}

.filter-chip.active,
.filter-chip:hover {
  color: #ffffff;
  background: var(--primary);
  transform: translateY(-2px);
}

.breadcrumb {
  width: min(1220px, calc(100% - 36px));
  margin: 24px auto 18px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--primary-dark);
  font-weight: 800;
}

.detail-hero {
  width: min(1220px, calc(100% - 36px));
  margin: 0 auto 36px;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 32px;
  align-items: stretch;
}

.detail-poster {
  border-radius: 32px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #fed7aa;
}

.detail-poster img {
  aspect-ratio: 3 / 4;
}

.detail-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 32px;
  padding: 34px;
  background:
    linear-gradient(135deg, rgba(255, 237, 213, 0.72), rgba(255, 255, 255, 0.9)),
    var(--surface-strong);
  box-shadow: var(--shadow);
}

.detail-title {
  margin-bottom: 16px;
}

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

.detail-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  color: #78350f;
  background: rgba(255, 255, 255, 0.74);
  font-weight: 800;
}

.player-section {
  width: min(1220px, calc(100% - 36px));
  margin: 0 auto 42px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  background: #030712;
  box-shadow: 0 30px 90px rgba(17, 24, 39, 0.34);
}

.player-box video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #030712;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(3, 7, 18, 0.3), rgba(3, 7, 18, 0.72));
  font-size: 20px;
  font-weight: 900;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.play-icon {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  box-shadow: 0 22px 48px rgba(239, 68, 68, 0.28);
  font-size: 32px;
}

.player-box.is-playing .player-start {
  opacity: 0;
  visibility: hidden;
}

.detail-layout {
  width: min(1220px, calc(100% - 36px));
  margin: 0 auto 54px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
}

.detail-copy,
.side-panel {
  display: grid;
  gap: 18px;
}

.info-panel {
  padding: 24px;
}

.info-panel h2,
.side-panel h2 {
  margin: 0 0 12px;
  color: #111827;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.side-panel .movie-card {
  border-radius: 22px;
}

.side-panel .movie-card-body p {
  display: none;
}

.side-panel .movie-card-title {
  min-height: auto;
}

.site-footer {
  margin-top: 70px;
  color: #d1d5db;
  background:
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.24), transparent 30rem),
    #0f172a;
}

.footer-grid {
  width: min(1220px, calc(100% - 36px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 1fr;
  gap: 36px;
  padding: 54px 0 34px;
}

.footer-brand {
  color: #ffffff;
  margin-bottom: 14px;
}

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

.site-footer p {
  max-width: 440px;
  margin: 0;
  color: #9ca3af;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links a {
  color: #d1d5db;
  transition: color 0.22s ease;
}

.footer-links a:hover {
  color: #f59e0b;
}

.footer-bottom {
  width: min(1220px, calc(100% - 36px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #9ca3af;
}

@media (max-width: 1080px) {
  .movie-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 48px;
  }

  .hero-preview {
    display: none;
  }

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

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

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

  .hero-carousel {
    min-height: 620px;
    border-radius: 28px;
  }

  .hero-slide {
    padding: 34px;
  }

  .hero-controls {
    left: 34px;
  }

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

  .detail-hero {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 560px) {
  .nav-wrap,
  .hero-shell,
  .section,
  .page-section,
  .breadcrumb,
  .detail-hero,
  .player-section,
  .detail-layout,
  .footer-grid,
  .footer-bottom,
  .mobile-panel {
    width: min(100% - 24px, 1220px);
  }

  .brand span:last-child {
    font-size: 16px;
  }

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

  .hero-slide {
    padding: 28px;
  }

  .hero-copy p {
    font-size: 16px;
  }

  .hero-actions,
  .section-head,
  .page-head,
  .search-box,
  .mobile-search {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-controls {
    left: 28px;
    bottom: 28px;
  }

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

  .ranking-row {
    grid-template-columns: 48px 78px minmax(0, 1fr);
    gap: 12px;
  }

  .rank-number {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 16px;
  }

  .detail-info {
    padding: 24px;
  }

  .player-box {
    border-radius: 22px;
  }
}
