:root {
  --amber: #f59e0b;
  --orange: #f97316;
  --yellow: #facc15;
  --dark: #1f2937;
  --muted: #6b7280;
  --light: #fff7ed;
  --card: #ffffff;
  --line: #fed7aa;
  --shadow: 0 18px 45px rgba(251, 146, 60, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  color: var(--dark);
  background: linear-gradient(180deg, #fff7ed 0%, #fff 45%, #f9fafb 100%);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--amber), var(--orange), var(--yellow));
  color: #fff;
  box-shadow: 0 12px 30px rgba(249, 115, 22, 0.28);
}

.nav-wrap {
  max-width: 1220px;
  margin: 0 auto;
  height: 68px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--orange);
  background: #fff;
  box-shadow: 0 8px 18px rgba(255, 255, 255, 0.25);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-weight: 700;
}

.desktop-nav a,
.mobile-nav a {
  opacity: 0.92;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
  opacity: 1;
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  border: 0;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 12px;
  padding: 8px 11px;
  font-size: 22px;
}

.mobile-nav {
  display: none;
  padding: 12px 20px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  color: #fff;
  background: radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.24), transparent 28%), linear-gradient(135deg, #f59e0b, #f97316 55%, #facc15);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.3) 1px, transparent 0);
  background-size: 42px 42px;
  opacity: 0.22;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1220px;
  margin: 0 auto;
  padding: 78px 20px 70px;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.96fr);
  gap: 48px;
  align-items: center;
}

.hero-copy h1 {
  margin: 0 0 20px;
  font-size: clamp(40px, 6vw, 78px);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.hero-copy p {
  margin: 0 0 18px;
  max-width: 720px;
  font-size: 20px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.9);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 26px 0 30px;
}

.hero-tags a,
.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.hero-actions,
.section-actions,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn,
.hero-actions a,
.section-actions a,
.card-actions a,
.play-cover {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 12px 19px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.hero-actions a:first-child,
.btn-primary,
.play-cover {
  color: var(--orange);
  background: #fff;
  box-shadow: 0 18px 38px rgba(255, 255, 255, 0.22);
}

.hero-actions a:last-child,
.btn-ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.12);
}

.btn:hover,
.hero-actions a:hover,
.section-actions a:hover,
.card-actions a:hover,
.play-cover:hover {
  transform: translateY(-2px) scale(1.01);
}

.hero-stage {
  position: relative;
  min-height: 470px;
}

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

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

.hero-card {
  height: 100%;
  display: grid;
  grid-template-columns: 42% 58%;
  overflow: hidden;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 30px 80px rgba(127, 29, 29, 0.24);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

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

.hero-card-content {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-card-content h2 {
  margin: 0 0 12px;
  font-size: 34px;
  line-height: 1.2;
}

.hero-card-content p {
  margin: 0 0 18px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.88);
}

.hero-dots {
  position: absolute;
  bottom: -30px;
  left: 0;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 36px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

.hero-dot.is-active {
  background: #fff;
}

.container {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 58px 0;
}

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

.section-kicker {
  margin: 0 0 8px;
  color: var(--orange);
  font-weight: 900;
  letter-spacing: 0.08em;
}

.section h2,
.page-title h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
}

.section-desc,
.page-title p {
  color: var(--muted);
  line-height: 1.8;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
  border: 1px solid rgba(254, 215, 170, 0.65);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 64px rgba(249, 115, 22, 0.24);
}

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

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

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

.play-mark {
  position: absolute;
  inset: auto 14px 14px auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--orange);
  background: rgba(255, 255, 255, 0.92);
}

.score-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

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

.movie-title {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movie-card:hover .movie-title {
  color: var(--orange);
}

.movie-meta,
.movie-genre,
.movie-line {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

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

.card-actions a,
.section-actions a {
  padding: 9px 13px;
  font-size: 13px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

.banner {
  margin: 46px 0 0;
  padding: 34px;
  border-radius: 30px;
  color: #fff;
  background: linear-gradient(135deg, #111827, #7c2d12 55%, #f97316);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
  box-shadow: 0 26px 70px rgba(17, 24, 39, 0.22);
}

.banner h2 {
  margin: 0 0 10px;
}

.banner p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
}

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

.category-card {
  padding: 24px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  transition: transform 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
}

.category-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 20px;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.rank-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.rank-row {
  display: grid;
  grid-template-columns: 42px 70px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(251, 146, 60, 0.1);
}

.rank-num {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

.rank-row img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-info {
  min-width: 0;
}

.rank-info strong,
.rank-info em {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-info em {
  margin-top: 4px;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.rank-score {
  color: var(--orange);
  font-weight: 900;
}

.page-hero {
  padding: 54px 0;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange), var(--yellow));
}

.page-title {
  max-width: 880px;
}

.page-title p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
}

.toolbar {
  margin: 34px 0 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
}

.search-input,
.select-control {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 16px;
  font-size: 16px;
  outline: none;
  background: #fff;
}

.search-input:focus,
.select-control:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.8fr);
  gap: 28px;
  align-items: start;
}

.player-card,
.info-card,
.side-card {
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  overflow: hidden;
}

.player-shell {
  position: relative;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
}

.player-shell video,
.player-shell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-shell video {
  display: block;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.28);
  z-index: 2;
}

.player-shell.is-started .play-layer {
  opacity: 0;
  pointer-events: none;
}

.play-cover {
  font-size: 18px;
  min-width: 138px;
}

.detail-main {
  padding: 28px;
}

.detail-main h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 42px);
}

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

.detail-meta span,
.info-list span {
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--orange);
  background: #ffedd5;
  font-weight: 800;
  font-size: 13px;
}

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

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

.info-card,
.side-card {
  padding: 22px;
}

.info-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

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

.related-item {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: #fff7ed;
}

.related-item img {
  width: 70px;
  height: 88px;
  object-fit: cover;
  border-radius: 12px;
}

.related-item strong,
.related-item span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.related-item span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.breadcrumb {
  margin: 26px 0;
  color: var(--muted);
  font-weight: 700;
}

.breadcrumb a {
  color: var(--orange);
}

.empty-state {
  display: none;
  padding: 36px;
  border-radius: 24px;
  text-align: center;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
}

.site-footer {
  margin-top: 60px;
  padding: 48px 0;
  color: #fff;
  background: linear-gradient(180deg, #1f2937, #111827);
}

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

.footer-logo {
  margin-bottom: 12px;
  font-size: 24px;
  font-weight: 900;
}

.footer-inner p {
  margin: 0;
  color: #d1d5db;
  line-height: 1.8;
}

.footer-links {
  display: grid;
  gap: 10px;
  color: #e5e7eb;
}

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

@media (max-width: 860px) {
  .desktop-nav {
    display: none;
  }
  .mobile-toggle {
    display: inline-flex;
  }
  .mobile-nav.is-open {
    display: grid;
    gap: 12px;
  }
  .hero-inner,
  .detail-layout,
  .rank-panel,
  .footer-inner,
  .banner {
    grid-template-columns: 1fr;
  }
  .hero {
    min-height: auto;
  }
  .hero-stage {
    min-height: 560px;
  }
  .hero-card {
    grid-template-columns: 1fr;
  }
  .hero-card img {
    height: 280px;
  }
  .toolbar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nav-wrap {
    height: 62px;
  }
  .brand {
    font-size: 18px;
  }
  .section-head {
    display: block;
  }
  .movie-grid,
  .movie-grid.compact,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .movie-card-body {
    padding: 14px;
  }
  .movie-title {
    font-size: 16px;
  }
  .hero-inner {
    padding-top: 48px;
  }
  .hero-card-content {
    padding: 24px;
  }
  .rank-row {
    grid-template-columns: 34px 58px minmax(0, 1fr);
  }
  .rank-score {
    display: none;
  }
}
