:root {
  --orange: #f97316;
  --amber: #f59e0b;
  --yellow: #facc15;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #fed7aa;
  --surface: #ffffff;
  --dark: #111827;
  --soft: #fff7ed;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--orange), var(--amber), var(--yellow));
  box-shadow: 0 14px 34px rgba(249, 115, 22, 0.24);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--orange);
  font-weight: 900;
  box-shadow: 0 10px 25px rgba(255, 255, 255, 0.24);
}

.brand strong {
  display: block;
  font-size: 24px;
  line-height: 1.1;
}

.brand small {
  display: block;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  margin-top: 2px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: #fff;
  font-weight: 700;
}

.main-nav a {
  position: relative;
  opacity: 0.95;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.menu-button {
  display: none;
  border: 0;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border-radius: 12px;
  padding: 8px 12px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  color: #fff;
  background: radial-gradient(circle at top left, rgba(251, 146, 60, 0.72), transparent 42%), #111827;
}

.hero-slide {
  display: none;
  min-height: 620px;
  align-items: center;
  background-size: cover;
  background-position: center;
}

.hero-slide.is-active {
  display: flex;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.92) 0%, rgba(17, 24, 39, 0.68) 45%, rgba(17, 24, 39, 0.2) 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 46px;
  align-items: center;
  padding: 74px 0 86px;
}

.hero-kicker,
.page-kicker {
  display: inline-flex;
  width: fit-content;
  gap: 8px;
  align-items: center;
  padding: 7px 13px;
  border-radius: 999px;
  color: #fff;
  background: rgba(249, 115, 22, 0.92);
  font-size: 14px;
  font-weight: 800;
}

.hero h1 {
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.03;
  margin: 18px 0 18px;
  letter-spacing: -1.8px;
}

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

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  background: linear-gradient(90deg, var(--orange), var(--amber));
  color: #fff;
  box-shadow: 0 18px 35px rgba(249, 115, 22, 0.35);
}

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

.hero-panel {
  align-self: stretch;
  border-radius: 30px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
}

.hero-poster {
  overflow: hidden;
  border-radius: 24px;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #fb923c, #facc15);
}

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

.hero-panel h2 {
  margin: 18px 0 8px;
  font-size: 26px;
}

.hero-meta,
.card-meta,
.detail-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.hero-meta span,
.card-meta span,
.detail-meta span,
.rank-meta span {
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(255, 237, 213, 0.9);
  color: #9a3412;
  font-weight: 700;
}

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

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

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

.search-band {
  margin-top: -34px;
  position: relative;
  z-index: 4;
}

.search-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  border-radius: 26px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 40px rgba(146, 64, 14, 0.14);
  backdrop-filter: blur(14px);
}

.search-input {
  width: 100%;
  border: 2px solid #fed7aa;
  border-radius: 999px;
  padding: 14px 18px;
  outline: none;
  background: #fff;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

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

.category-strip,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-strip a,
.tag-row span,
.breadcrumb a,
.breadcrumb span {
  display: inline-flex;
  border-radius: 999px;
  padding: 7px 12px;
  background: #ffedd5;
  color: #9a3412;
  font-size: 13px;
  font-weight: 800;
}

.section-block {
  padding: 58px 0 18px;
}

.section-title-row,
.page-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

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

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

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

.movie-card,
.category-card,
.rank-card,
.detail-box,
.player-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(251, 146, 60, 0.15);
  border-radius: 22px;
  box-shadow: 0 12px 30px rgba(146, 64, 14, 0.08);
}

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

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

.movie-card-link {
  position: relative;
  display: block;
}

.poster-frame {
  display: block;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #fb923c, #facc15);
  overflow: hidden;
}

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

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

.movie-score {
  position: absolute;
  top: 12px;
  right: 12px;
  border-radius: 999px;
  padding: 5px 9px;
  color: #fff;
  background: rgba(17, 24, 39, 0.76);
  font-size: 13px;
  font-weight: 900;
  backdrop-filter: blur(8px);
}

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

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

.movie-card p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  min-height: 44px;
}

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

.tag-row span {
  padding: 4px 8px;
  font-size: 12px;
}

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

.category-card {
  display: block;
  padding: 26px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card h2 {
  margin: 0 0 10px;
  font-size: 26px;
}

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

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

.rank-card {
  display: grid;
  grid-template-columns: 72px 110px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.rank-thumb {
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #fb923c, #facc15);
}

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

.rank-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

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

.page-hero {
  padding: 54px 0 28px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.detail-hero {
  padding: 42px 0 24px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.4fr;
  gap: 26px;
  align-items: start;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(135deg, #fb923c, #facc15);
  box-shadow: 0 18px 50px rgba(146, 64, 14, 0.18);
}

.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-info h1 {
  margin: 12px 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
}

.detail-info p {
  color: var(--muted);
  line-height: 1.9;
  font-size: 17px;
}

.player-card {
  overflow: hidden;
  margin: 30px auto;
}

.player-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid #ffedd5;
}

.player-head h2 {
  margin: 0;
  font-size: 24px;
}

.watch-player {
  position: relative;
  background: #000;
  aspect-ratio: 16 / 9;
  cursor: pointer;
}

.watch-player video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.24), rgba(0, 0, 0, 0.58));
}

.play-button {
  pointer-events: auto;
  width: 82px;
  height: 82px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  font-size: 30px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 16px 36px rgba(249, 115, 22, 0.42);
}

.watch-player.is-playing .player-overlay {
  display: none;
}

.player-error {
  min-height: 24px;
  margin: 12px 22px 20px;
  color: #b91c1c;
  font-weight: 700;
}

.detail-box {
  padding: 26px;
  margin: 22px auto;
}

.detail-box h2 {
  margin: 0 0 14px;
  font-size: 28px;
}

.detail-box p {
  color: #374151;
  line-height: 2;
  font-size: 16px;
}

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

.site-footer {
  margin-top: 60px;
  padding: 42px 0;
  color: #d1d5db;
  background: #111827;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 28px;
}

.footer-brand {
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}

.site-footer p {
  max-width: 520px;
  color: #9ca3af;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.footer-links a {
  border-radius: 999px;
  padding: 8px 12px;
  color: #fed7aa;
  background: rgba(255, 255, 255, 0.06);
}

.empty-state {
  display: none;
  padding: 28px;
  border-radius: 20px;
  background: #fff;
  color: var(--muted);
  text-align: center;
}

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

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

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

@media (max-width: 760px) {
  .nav-shell {
    min-height: 64px;
  }

  .brand small {
    display: none;
  }

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

  .menu-button {
    display: inline-flex;
  }

  .main-nav {
    position: absolute;
    top: 64px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    border-radius: 18px;
    background: rgba(249, 115, 22, 0.98);
  }

  .main-nav.is-open {
    display: flex;
  }

  .hero,
  .hero-slide {
    min-height: auto;
  }

  .hero-inner {
    padding: 46px 0 72px;
  }

  .hero h1 {
    letter-spacing: -0.8px;
  }

  .search-card {
    grid-template-columns: 1fr;
  }

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

  .rank-card {
    grid-template-columns: 48px 82px 1fr;
  }

  .rank-card .btn {
    grid-column: 2 / -1;
    width: fit-content;
  }

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

  .footer-links {
    justify-content: flex-start;
  }
}

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

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

  .movie-card p {
    min-height: auto;
  }
}
