:root {
  --bg: #fff7ed;
  --bg-soft: #fffbeb;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-strong: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: rgba(251, 146, 60, 0.2);
  --accent: #f97316;
  --accent-dark: #c2410c;
  --amber: #f59e0b;
  --shadow: 0 24px 80px rgba(124, 45, 18, 0.14);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(251, 146, 60, 0.18), transparent 32rem),
    linear-gradient(135deg, #fff7ed 0%, #fff 45%, #fffbeb 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

body.menu-open {
  overflow: hidden;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 247, 237, 0.88);
  border-bottom: 1px solid rgba(251, 146, 60, 0.18);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 40px rgba(124, 45, 18, 0.08);
}

.navbar {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: white;
  border-radius: 14px;
  background: linear-gradient(135deg, #f97316, #d97706);
  box-shadow: 0 14px 32px rgba(234, 88, 12, 0.32);
}

.brand-text {
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  background: linear-gradient(90deg, #ea580c, #92400e);
  -webkit-background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  padding: 10px 16px;
  border-radius: 14px;
  color: #475569;
  font-weight: 700;
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: white;
  background: linear-gradient(135deg, #f97316, #d97706);
  box-shadow: 0 14px 30px rgba(234, 88, 12, 0.22);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(251, 146, 60, 0.12);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: #9a3412;
  border-radius: 99px;
}

main {
  min-height: 70vh;
}

.hero {
  position: relative;
  min-height: calc(100vh - 76px);
  overflow: hidden;
  background: #111827;
  color: white;
}

.hero-track {
  min-height: inherit;
  position: relative;
}

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

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

.hero-backdrop,
.detail-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.hero-backdrop::after,
.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(251, 146, 60, 0.28), transparent 24rem),
    linear-gradient(0deg, rgba(15, 23, 42, 0.96), transparent 50%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  min-height: calc(100vh - 76px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.72fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  padding: 64px 0 118px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  color: #fed7aa;
  border: 1px solid rgba(251, 146, 60, 0.35);
  border-radius: 999px;
  background: rgba(251, 146, 60, 0.12);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.detail-info h1,
.page-hero h1 {
  margin: 18px 0 18px;
  font-size: clamp(2.5rem, 8vw, 6.4rem);
  line-height: 0.96;
  font-weight: 950;
  letter-spacing: -0.055em;
}

.hero-summary,
.detail-one-line,
.page-hero p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.8;
}

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

.hero-tags span,
.tag-row span {
  padding: 6px 10px;
  border-radius: 999px;
  color: #9a3412;
  background: rgba(255, 237, 213, 0.92);
  font-size: 0.78rem;
  font-weight: 800;
}

.tag-row.large span {
  color: #fed7aa;
  border: 1px solid rgba(251, 146, 60, 0.32);
  background: rgba(15, 23, 42, 0.38);
}

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

.primary-btn,
.ghost-btn,
.watch-link,
.search-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 14px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-btn,
.watch-link,
.search-form button {
  color: white;
  background: linear-gradient(135deg, #f97316, #d97706);
  box-shadow: 0 18px 42px rgba(234, 88, 12, 0.26);
}

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

.primary-btn:hover,
.ghost-btn:hover,
.watch-link:hover,
.search-form button:hover {
  transform: translateY(-2px);
}

.primary-btn.small {
  min-height: 40px;
  padding: 0 16px;
  font-size: 0.92rem;
}

.hero-poster {
  position: relative;
  display: block;
  width: min(360px, 100%);
  justify-self: center;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 38px 100px rgba(0, 0, 0, 0.44);
  transform: perspective(1200px) rotateY(-8deg) rotateX(4deg);
}

.hero-poster img,
.detail-cover img,
.poster img,
.player-cover img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: linear-gradient(135deg, #fdba74, #7c2d12);
}

.hero-controls {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 36px;
  transform: translateX(-50%);
  width: min(1240px, calc(100% - 32px));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.hero-controls button {
  border: 0;
  color: white;
  background: rgba(255, 255, 255, 0.16);
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.hero-controls > button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1.7rem;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 36px;
  background: linear-gradient(135deg, #fb923c, #f59e0b);
}

.hero-search {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 92px;
  transform: translateX(-50%);
  width: min(720px, calc(100% - 32px));
  display: flex;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(16px);
}

.hero-search input,
.search-form input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  border-radius: 15px;
  padding: 0 16px;
  min-height: 48px;
  color: #1f2937;
  background: rgba(255, 255, 255, 0.94);
  font-size: 1rem;
}

.hero-search button {
  border: 0;
  border-radius: 15px;
  padding: 0 18px;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, #f97316, #d97706);
  cursor: pointer;
}

.section {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 76px 0 0;
}

.section-heading,
.category-overview-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.section-heading span {
  display: block;
  margin-bottom: 8px;
  color: #ea580c;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-heading h2,
.category-overview-head h2,
.detail-block h2,
.side-card h2 {
  margin: 0;
  color: #1e293b;
  font-size: clamp(1.65rem, 3vw, 2.5rem);
  font-weight: 950;
  letter-spacing: -0.035em;
}

.section-heading a,
.text-link {
  color: #ea580c;
  font-weight: 900;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(249, 115, 22, 0.42);
  box-shadow: 0 30px 100px rgba(124, 45, 18, 0.2);
}

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: #7c2d12;
}

.poster img {
  transition: transform 0.35s ease, filter 0.35s ease;
}

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

.poster-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.24), transparent);
  transform: translateX(-120%);
  transition: transform 0.6s ease;
}

.movie-card:hover .poster-shine {
  transform: translateX(120%);
}

.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  min-width: 36px;
  height: 36px;
  padding: 0 9px;
  display: grid;
  place-items: center;
  color: white;
  border-radius: 12px;
  background: linear-gradient(135deg, #f97316, #b45309);
  font-weight: 950;
  box-shadow: 0 12px 30px rgba(124, 45, 18, 0.34);
}

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

.movie-meta {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.movie-card h3 {
  margin: 0 0 10px;
  color: #111827;
  font-size: 1.08rem;
  line-height: 1.35;
  font-weight: 950;
}

.movie-card h3 a:hover {
  color: #ea580c;
}

.movie-line {
  margin: 0 0 13px;
  color: #64748b;
  font-size: 0.92rem;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 15px;
}

.watch-link {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  font-size: 0.86rem;
}

.movie-card-compact .movie-card-body {
  padding: 14px;
}

.movie-card-compact .movie-line {
  -webkit-line-clamp: 2;
}

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

.category-card,
.category-overview-card,
.search-panel,
.side-card,
.detail-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.category-card {
  min-height: 172px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  background:
    radial-gradient(circle at right top, rgba(251, 146, 60, 0.24), transparent 12rem),
    rgba(255, 255, 255, 0.86);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 28px 90px rgba(124, 45, 18, 0.2);
}

.category-card span {
  color: #ea580c;
  font-weight: 950;
}

.category-card strong {
  color: #1e293b;
  font-size: 1.18rem;
  line-height: 1.42;
}

.category-card em {
  color: #64748b;
  font-style: normal;
  line-height: 1.65;
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: white;
  background: #111827;
}

.slim-hero {
  min-height: 320px;
  display: grid;
  place-items: center;
  padding: 72px 16px;
  text-align: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(251, 146, 60, 0.3), transparent 18rem),
    linear-gradient(135deg, #111827, #7c2d12 82%);
}

.slim-hero > div {
  width: min(860px, 100%);
}

.search-panel {
  width: min(1080px, calc(100% - 32px));
  margin: -42px auto 0;
  position: relative;
  z-index: 3;
  padding: 18px;
}

.search-form {
  display: flex;
  gap: 12px;
}

.search-form input {
  min-height: 52px;
  background: #fff7ed;
  border: 1px solid rgba(251, 146, 60, 0.2);
}

.quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.quick-filters button,
.category-pills a {
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  color: #9a3412;
  background: #ffedd5;
  font-weight: 850;
  cursor: pointer;
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 24px;
}

.category-overview-card {
  padding: 24px;
  margin-bottom: 28px;
}

.detail-hero {
  min-height: 620px;
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding: 72px 0;
}

.detail-cover {
  overflow: hidden;
  border-radius: 30px;
  box-shadow: 0 38px 100px rgba(0, 0, 0, 0.48);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 800;
}

.breadcrumb a:hover {
  color: #fdba74;
}

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

.detail-meta span {
  padding: 9px 13px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.1);
  font-weight: 800;
}

.player-section {
  width: min(1180px, calc(100% - 32px));
  margin: -86px auto 0;
  position: relative;
  z-index: 4;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: 0 40px 120px rgba(2, 6, 23, 0.38);
}

.movie-video,
.player-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
}

.movie-video {
  display: block;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  color: white;
  background: #020617;
  cursor: pointer;
  overflow: hidden;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.84), rgba(2, 6, 23, 0.24));
}

.player-cover img {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  filter: blur(2px) saturate(1.1);
  transform: scale(1.04);
}

.play-icon {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  color: white;
  background: linear-gradient(135deg, #f97316, #d97706);
  box-shadow: 0 20px 60px rgba(234, 88, 12, 0.42);
  font-size: 2.1rem;
}

.player-cover strong {
  position: absolute;
  z-index: 3;
  left: 24px;
  right: 24px;
  bottom: 24px;
  font-size: clamp(1.2rem, 3vw, 2rem);
  text-align: left;
}

.player-cover.is-hidden {
  display: none;
}

.detail-layout {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 26px;
}

.detail-main {
  display: grid;
  gap: 22px;
}

.detail-block,
.side-card {
  padding: 24px;
}

.detail-block p {
  margin: 14px 0 0;
  color: #475569;
  font-size: 1.03rem;
  line-height: 1.9;
}

.side-card dl {
  display: grid;
  gap: 14px;
  margin: 18px 0 0;
}

.side-card div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(251, 146, 60, 0.14);
}

.side-card dt {
  color: #9a3412;
  font-weight: 950;
}

.side-card dd {
  margin: 0;
  color: #475569;
}

.pager-block {
  display: grid;
  gap: 12px;
}

.pager-block a {
  color: #ea580c;
  font-weight: 900;
}

.site-footer {
  margin-top: 86px;
  color: rgba(255, 255, 255, 0.78);
  background:
    radial-gradient(circle at 15% 0%, rgba(249, 115, 22, 0.26), transparent 18rem),
    #111827;
}

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.footer-inner strong {
  color: #fed7aa;
  font-size: 1.3rem;
}

.footer-inner p {
  max-width: 620px;
  margin: 8px 0 0;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links a {
  color: #fed7aa;
  font-weight: 900;
}

.movie-card.is-hidden {
  display: none;
}

@media (max-width: 920px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 84px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    border: 1px solid rgba(251, 146, 60, 0.2);
    border-radius: 22px;
    background: rgba(255, 247, 237, 0.96);
    box-shadow: var(--shadow);
  }

  body.menu-open .nav-links {
    display: flex;
  }

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

  .hero-content {
    padding-top: 42px;
    text-align: left;
  }

  .hero-poster {
    display: none;
  }

  .hero-search {
    bottom: 86px;
  }

  .detail-cover {
    width: min(260px, 70vw);
  }

  .detail-hero-inner {
    min-height: auto;
  }

  .detail-hero {
    min-height: auto;
  }

  .detail-layout {
    gap: 18px;
  }
}

@media (max-width: 640px) {
  .navbar {
    width: min(100% - 22px, 1240px);
  }

  .hero h1,
  .detail-info h1,
  .page-hero h1 {
    font-size: clamp(2.25rem, 13vw, 3.8rem);
  }

  .hero-search,
  .search-form,
  .footer-inner,
  .section-heading,
  .category-overview-head {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-search button,
  .search-form button {
    min-height: 48px;
  }

  .section {
    padding-top: 52px;
  }

  .movie-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
  }

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

  .card-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .player-section {
    margin-top: -36px;
  }

  .player-shell {
    border-radius: 18px;
  }

  .play-icon {
    width: 64px;
    height: 64px;
    font-size: 1.55rem;
  }
}
