:root {
  --bg: #fff7ed;
  --surface: #ffffff;
  --surface-soft: #fffaf0;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #f5d0a1;
  --brand: #d97706;
  --brand-dark: #92400e;
  --brand-light: #f59e0b;
  --shadow: 0 18px 45px rgba(146, 64, 14, 0.16);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background: linear-gradient(180deg, #fff7ed 0%, #ffffff 34%, #fffaf0 100%);
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(255, 251, 235, 0.96), rgba(255, 237, 213, 0.96));
  box-shadow: 0 8px 24px rgba(146, 64, 14, 0.1);
  backdrop-filter: blur(10px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.42rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #b45309, #f97316);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  box-shadow: 0 12px 24px rgba(217, 119, 6, 0.24);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 30px;
  color: #374151;
  font-weight: 650;
}

.nav-menu a {
  position: relative;
  padding: 8px 0;
}

.nav-menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--brand);
  transition: width 0.25s ease;
}

.nav-menu a:hover {
  color: var(--brand);
}

.nav-menu a:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: rgba(217, 119, 6, 0.1);
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--brand-dark);
}

.hero-carousel {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 76% 30%, rgba(245, 158, 11, 0.32), transparent 28%),
    linear-gradient(90deg, rgba(17, 24, 39, 0.94), rgba(17, 24, 39, 0.72) 46%, rgba(17, 24, 39, 0.25));
}

.hero-content {
  position: relative;
  min-height: 680px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.55fr);
  align-items: center;
  gap: 56px;
  color: #ffffff;
  padding: 80px 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 14px;
  padding: 7px 13px;
  border: 1px solid rgba(245, 158, 11, 0.36);
  border-radius: 999px;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.category-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2.4rem, 6vw, 5.8rem);
  line-height: 0.96;
  letter-spacing: -0.065em;
}

.hero-copy p,
.page-hero p,
.category-hero p {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.08rem;
  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 {
  padding: 5px 10px;
  border-radius: 999px;
  color: #92400e;
  background: #fef3c7;
  font-size: 0.78rem;
  font-weight: 700;
}

.hero-tags span {
  color: #fde68a;
  background: rgba(255, 255, 255, 0.12);
}

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

.button,
.home-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover,
.home-search button:hover {
  transform: translateY(-2px);
}

.button-primary,
.home-search button {
  color: #ffffff;
  background: linear-gradient(90deg, #f59e0b, #ea580c);
  box-shadow: 0 16px 34px rgba(217, 119, 6, 0.28);
}

.button-glass {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
}

.button-light {
  color: #92400e;
  background: #fff7ed;
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  min-height: 430px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
  transform: rotate(2deg);
}

.hero-poster::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 24px;
  z-index: 1;
}

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

.hero-poster span {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 2;
  padding: 9px 14px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.6);
  font-weight: 800;
}

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

.hero-dots button {
  width: 34px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: #f59e0b;
}

.search-panel {
  position: relative;
  z-index: 2;
  margin-top: -42px;
  padding: 22px;
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.home-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.home-search input,
.filter-toolbar input,
.filter-toolbar select {
  width: 100%;
  min-height: 48px;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  padding: 0 18px;
  color: var(--text);
  background: #fffaf0;
  outline: none;
}

.home-search input:focus,
.filter-toolbar input:focus,
.filter-toolbar select:focus {
  border-color: var(--brand-light);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.13);
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.quick-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--brand-dark);
  background: #ffedd5;
  font-weight: 700;
}

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

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

.section-heading.compact {
  align-items: start;
  flex-direction: column;
  gap: 5px;
}

.section-heading span {
  color: var(--brand);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: -0.04em;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.16);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 25px rgba(146, 64, 14, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
}

.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.06);
}

.play-mark,
.rank-badge {
  position: absolute;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(4px);
}

.play-mark {
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.86);
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 58px;
  min-height: 28px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
}

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

.movie-meta-line,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.movie-meta-line span,
.detail-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff7ed;
}

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

.movie-card h3 a:hover {
  color: var(--brand);
}

.movie-card p {
  min-height: 44px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

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

.rating {
  color: var(--brand);
  font-weight: 900;
}

.card-bottom a {
  color: var(--brand-dark);
  font-weight: 800;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 26px;
  align-items: start;
}

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

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

.category-card {
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(146, 64, 14, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.category-cover-stack {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 118px;
  background: #fef3c7;
}

.category-cover-stack img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.category-card-body span {
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 800;
}

.category-card-body h3 {
  margin: 8px 0;
  font-size: 1.28rem;
}

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

.ranking-box {
  position: sticky;
  top: 92px;
  padding: 22px;
  border-radius: 24px;
  color: #ffffff;
  background: linear-gradient(180deg, #92400e, #451a03);
  box-shadow: var(--shadow);
}

.ranking-box ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-box a {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.ranking-box span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #451a03;
  background: #fbbf24;
  font-weight: 900;
}

.ranking-box strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ranking-box em {
  color: #fde68a;
  font-style: normal;
  font-weight: 900;
}

.page-hero,
.category-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background:
    radial-gradient(circle at 15% 20%, rgba(251, 191, 36, 0.33), transparent 28%),
    linear-gradient(135deg, #111827, #78350f 54%, #ea580c);
}

.page-hero .container {
  padding: 90px 0;
}

.category-hero {
  min-height: 430px;
}

.category-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(120, 53, 15, 0.62), rgba(17, 24, 39, 0.2));
}

.category-hero-content {
  position: relative;
  padding: 84px 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.92rem;
}

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

.filter-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 170px 170px auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
  padding: 16px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(146, 64, 14, 0.08);
}

.filter-toolbar span {
  color: var(--brand-dark);
  font-weight: 800;
  white-space: nowrap;
}

.search-toolbar {
  grid-template-columns: minmax(220px, 1fr) 190px auto;
}

.detail-page {
  background: linear-gradient(180deg, #111827 0%, #1f2937 40%, #fff7ed 40%, #fffaf0 100%);
}

.player-section {
  padding: 34px 0 50px;
}

.breadcrumb.dark {
  color: rgba(255, 255, 255, 0.76);
}

.hls-player {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #000000;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.45);
}

.hls-player video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.25));
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.player-overlay span {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.92);
  box-shadow: 0 15px 40px rgba(245, 158, 11, 0.32);
  font-size: 2rem;
}

.hls-player.is-playing .player-overlay {
  opacity: 0;
  pointer-events: none;
}

.player-status {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.58);
  font-size: 0.82rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 28px;
  align-items: start;
  margin-top: -28px;
}

.detail-main,
.detail-side {
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.detail-main {
  padding: 30px;
}

.detail-main h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: -0.05em;
}

.detail-main h2 {
  margin: 30px 0 10px;
}

.detail-main p {
  color: #4b5563;
  font-size: 1rem;
  line-height: 1.88;
}

.detail-main .one-line {
  color: #92400e;
  font-weight: 800;
}

.detail-side {
  position: sticky;
  top: 92px;
  overflow: hidden;
  padding: 16px;
}

.detail-side img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 18px;
  object-fit: cover;
  background: #fef3c7;
}

.detail-side .button {
  width: 100%;
  margin-top: 12px;
}

.site-footer {
  margin-top: 30px;
  padding: 48px 0;
  color: #fde68a;
  background: linear-gradient(180deg, #78350f, #451a03);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 32px;
}

.site-footer p {
  max-width: 460px;
  color: #fef3c7;
  line-height: 1.7;
}

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

.site-footer a:not(.footer-brand) {
  display: block;
  margin: 8px 0;
  color: #fde68a;
}

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

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

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

  .ranking-box,
  .detail-side {
    position: static;
  }

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

  .hero-poster {
    display: none;
  }
}

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

  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: absolute;
    left: 12px;
    right: 12px;
    top: 74px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow);
  }

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

  .nav-menu a {
    padding: 13px 12px;
  }

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

  .hero-copy h1,
  .page-hero h1,
  .category-hero h1 {
    font-size: clamp(2.2rem, 12vw, 4rem);
  }

  .home-search,
  .filter-toolbar,
  .search-toolbar {
    grid-template-columns: 1fr;
  }

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

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

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

@media (max-width: 480px) {
  .movie-grid {
    grid-template-columns: 1fr;
  }
}
