:root {
  color-scheme: light;
  --stone-950: #1c1917;
  --stone-900: #292524;
  --stone-800: #44403c;
  --stone-700: #57534e;
  --stone-600: #78716c;
  --stone-300: #d6d3d1;
  --stone-200: #e7e5e4;
  --amber-950: #451a03;
  --amber-900: #78350f;
  --amber-800: #92400e;
  --amber-700: #b45309;
  --amber-600: #d97706;
  --amber-500: #f59e0b;
  --amber-300: #fcd34d;
  --amber-200: #fde68a;
  --amber-100: #fef3c7;
  --orange-700: #c2410c;
  --orange-600: #ea580c;
  --paper: #fff8eb;
  --paper-deep: #f5ead4;
  --ink: #221a14;
  --shadow: 0 14px 38px rgba(120, 53, 15, 0.22);
  --shadow-soft: 0 6px 20px rgba(120, 53, 15, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.12), transparent 28rem),
    linear-gradient(180deg, #fffaf0 0%, #f6eee0 55%, #fffaf0 100%);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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-900), var(--orange-700), var(--amber-900));
  border-bottom: 4px solid var(--orange-600);
  color: var(--amber-100);
  box-shadow: 0 14px 28px rgba(69, 26, 3, 0.25);
}

.header-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 190px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--amber-300), var(--amber-600));
  color: var(--amber-950);
  font-weight: 900;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}

.brand-copy strong,
.brand-copy small {
  display: block;
  line-height: 1.15;
}

.brand-copy strong {
  font-size: 22px;
  letter-spacing: 0.04em;
}

.brand-copy small {
  margin-top: 4px;
  color: var(--amber-300);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
}

.nav-link {
  font-weight: 700;
  color: var(--amber-100);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff7d6;
  border-color: var(--amber-300);
}

.header-search {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(253, 230, 138, 0.22);
  border-radius: 999px;
  overflow: hidden;
  backdrop-filter: blur(12px);
}

.header-search input {
  width: 190px;
  border: 0;
  outline: 0;
  padding: 10px 14px;
  color: #fff;
  background: transparent;
}

.header-search input::placeholder {
  color: rgba(254, 243, 199, 0.75);
}

.header-search button {
  border: 0;
  padding: 10px 16px;
  background: var(--amber-400, #fbbf24);
  color: var(--amber-950);
  font-weight: 800;
  cursor: pointer;
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--amber-100);
  font-size: 28px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0 18px;
  border-top: 1px solid rgba(253, 230, 138, 0.22);
}

.mobile-nav.open {
  display: grid;
  gap: 10px;
}

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

.page-main {
  padding: 32px 0 24px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 540px;
  border-radius: 32px;
  background: var(--stone-900);
  box-shadow: var(--shadow);
}

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

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

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

.hero-image {
  position: absolute;
  inset: 0;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.12)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.86), transparent 58%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(760px, 90%);
  padding: 80px 70px;
  color: #fff;
}

.hero-eyebrow {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 6px 12px;
  border: 1px solid rgba(253, 230, 138, 0.35);
  border-radius: 999px;
  background: rgba(120, 53, 15, 0.42);
  color: var(--amber-200);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero h1 {
  margin: 22px 0 16px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

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

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  background: linear-gradient(90deg, var(--amber-500), var(--orange-600));
  color: #fff;
  box-shadow: 0 12px 26px rgba(234, 88, 12, 0.35);
}

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

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

.hero-dots {
  position: absolute;
  z-index: 4;
  left: 70px;
  bottom: 34px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.hero-side {
  position: absolute;
  z-index: 3;
  right: 42px;
  bottom: 42px;
  display: grid;
  gap: 12px;
  width: min(360px, 36%);
}

.hero-mini {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(253, 230, 138, 0.22);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.44);
  color: #fff;
  backdrop-filter: blur(14px);
}

.hero-mini img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
}

.hero-mini strong,
.hero-mini span {
  display: block;
}

.hero-mini span {
  color: var(--amber-200);
  font-size: 13px;
}

.section-heading {
  margin: 54px 0 22px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.section-heading h2 {
  margin: 0;
  color: var(--stone-900);
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.2;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--stone-600);
}

.section-link {
  flex: none;
  color: var(--amber-700);
  font-weight: 900;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(120, 53, 15, 0.09);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, var(--amber-900), var(--orange-600));
}

.poster-link img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent);
}

.rating {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--amber-500);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.22);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
}

.card-body {
  padding: 15px;
}

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

.card-body h3 a:hover {
  color: var(--amber-700);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 9px;
  color: var(--stone-600);
  font-size: 13px;
}

.meta a {
  color: var(--amber-700);
  font-weight: 800;
}

.summary {
  min-height: 46px;
  margin: 0 0 12px;
  color: var(--stone-700);
  font-size: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-row span,
.detail-tags span {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--amber-100);
  color: var(--amber-800);
  font-size: 12px;
  font-weight: 800;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 22px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(254, 243, 199, 0.9)),
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 0, 0, 0.03) 2px, rgba(0, 0, 0, 0.03) 4px);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

.category-card p {
  margin: 0 0 18px;
  color: var(--stone-600);
}

.category-card a {
  color: var(--amber-700);
  font-weight: 900;
}

.panel {
  border: 1px solid rgba(120, 53, 15, 0.1);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow-soft);
}

.panel-body {
  padding: 24px;
}

.ranking-layout {
  display: grid;
  grid-template-columns: 1fr 390px;
  gap: 26px;
}

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

.movie-row {
  display: grid;
  grid-template-columns: 48px 74px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

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

.row-poster img {
  width: 74px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
}

.movie-row h3 {
  margin: 0 0 4px;
  font-size: 17px;
}

.movie-row p {
  margin: 0 0 4px;
  color: var(--stone-600);
  font-size: 13px;
}

.movie-row strong {
  color: var(--amber-700);
}

.page-hero {
  padding: 52px;
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(69, 26, 3, 0.92), rgba(180, 83, 9, 0.84)),
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255, 255, 255, 0.06) 2px, rgba(255, 255, 255, 0.06) 4px);
  color: #fff;
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.1;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.breadcrumb {
  margin-bottom: 18px;
  color: var(--stone-600);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--amber-700);
  font-weight: 800;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
}

.player-card {
  overflow: hidden;
  border-radius: 30px;
  background: #050505;
  box-shadow: var(--shadow);
}

.video-wrap {
  position: relative;
  background: #000;
}

.video-wrap video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.62));
  color: #fff;
  cursor: pointer;
}

.play-overlay.hidden {
  display: none;
}

.play-overlay span {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber-500), var(--orange-600));
  font-size: 34px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.36);
}

.detail-card {
  padding: 28px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

.detail-card h1 {
  margin: 0 0 12px;
  color: var(--stone-900);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.15;
}

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

.detail-meta span,
.detail-meta a {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--amber-100);
  color: var(--amber-900);
  font-weight: 800;
  font-size: 13px;
}

.detail-card h2 {
  margin: 28px 0 10px;
  font-size: 24px;
}

.detail-card p {
  margin: 0 0 14px;
  color: var(--stone-700);
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.side-card {
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

.side-card img {
  width: 100%;
  border-radius: 18px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

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

.side-card p {
  margin: 0;
  color: var(--stone-600);
}

.search-page-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin: 30px 0;
}

.search-page-form input {
  width: 100%;
  border: 1px solid var(--stone-200);
  border-radius: 18px;
  padding: 16px 18px;
  font-size: 16px;
  box-shadow: var(--shadow-soft);
}

.search-page-form button {
  border: 0;
  border-radius: 18px;
  padding: 0 24px;
  background: linear-gradient(90deg, var(--amber-600), var(--orange-600));
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

.site-footer {
  margin-top: 70px;
  background: linear-gradient(90deg, var(--stone-900), var(--amber-950), var(--stone-900));
  color: var(--amber-100);
}

.footer-grid {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 34px;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: var(--amber-200);
  font-size: 20px;
}

.site-footer p {
  margin: 0;
  color: var(--amber-300);
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.site-footer a {
  color: var(--amber-300);
}

.site-footer a:hover {
  color: #fff7d6;
}

.footer-bottom {
  border-top: 1px solid rgba(253, 230, 138, 0.16);
  padding: 16px;
  text-align: center;
  color: var(--amber-300);
}

@media (max-width: 1180px) {
  .desktop-nav {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }

  .header-search {
    margin-left: auto;
  }

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

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

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

  .hero-side {
    display: none;
  }
}

@media (max-width: 820px) {
  .header-inner {
    min-height: 66px;
  }

  .brand-copy small,
  .header-search {
    display: none;
  }

  .hero,
  .hero-track {
    min-height: 500px;
  }

  .hero-content {
    padding: 58px 28px;
  }

  .hero-dots {
    left: 28px;
  }

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

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

  .page-hero {
    padding: 34px 24px;
  }

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

@media (max-width: 520px) {
  .container,
  .header-inner,
  .mobile-nav,
  .footer-grid {
    width: min(100% - 24px, 1280px);
  }

  .brand-copy strong {
    font-size: 19px;
  }

  .hero {
    border-radius: 22px;
  }

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

  .movie-row {
    grid-template-columns: 40px 62px 1fr;
  }

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