:root {
  --stone-950: #1c1917;
  --stone-900: #292524;
  --stone-800: #44403c;
  --stone-700: #57534e;
  --stone-500: #78716c;
  --stone-200: #e7e5e4;
  --stone-100: #f5f5f4;
  --stone-50: #fafaf9;
  --amber-700: #b45309;
  --amber-600: #d97706;
  --amber-500: #f59e0b;
  --amber-300: #fcd34d;
  --amber-100: #fef3c7;
  --orange-50: #fff7ed;
  --white: #ffffff;
  --shadow-sm: 0 8px 22px rgba(41, 37, 36, 0.08);
  --shadow-md: 0 18px 45px rgba(41, 37, 36, 0.16);
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--stone-800);
  background: var(--stone-50);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, var(--stone-900), var(--amber-700));
  box-shadow: var(--shadow-sm);
}

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

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--stone-900);
  background: linear-gradient(135deg, var(--amber-100), var(--amber-500));
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.brand-text {
  display: flex;
  flex-direction: column;
  letter-spacing: 0.06em;
}

.brand-text strong {
  font-size: 20px;
  line-height: 1.1;
}

.brand-text small {
  margin-top: 3px;
  color: var(--amber-100);
  font-size: 12px;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  font-weight: 700;
  font-size: 15px;
}

.main-nav a {
  padding: 8px 0;
  color: rgba(255, 255, 255, 0.92);
  transition: color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover {
  color: var(--amber-100);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  font-size: 22px;
}

.hero {
  position: relative;
  min-height: 68vh;
  overflow: hidden;
  color: var(--white);
  background: var(--stone-950);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 30%, rgba(245, 158, 11, 0.3), transparent 32%),
    linear-gradient(90deg, rgba(28, 25, 23, 0.98), rgba(28, 25, 23, 0.62) 52%, rgba(28, 25, 23, 0.28)),
    linear-gradient(0deg, rgba(28, 25, 23, 1), rgba(28, 25, 23, 0.06));
}

.hero-content {
  position: relative;
  z-index: 3;
  min-height: 68vh;
  display: grid;
  align-items: end;
  padding: 88px 0 68px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--amber-100);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  font-weight: 700;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 18px 0 14px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 720px;
  margin: 0;
  font-size: clamp(17px, 2vw, 22px);
  color: rgba(255, 255, 255, 0.86);
}

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

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

.btn-primary {
  color: var(--stone-950);
  background: linear-gradient(135deg, var(--amber-100), var(--amber-500));
  box-shadow: 0 18px 38px rgba(245, 158, 11, 0.3);
}

.btn-secondary {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.hero-controls {
  position: absolute;
  right: max(24px, calc((100vw - 1280px) / 2));
  bottom: 54px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-controls button {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.section {
  padding: 72px 0;
}

.section.alt {
  background: var(--white);
}

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

.section-head h2,
.page-hero h1,
.detail-section h2 {
  margin: 0;
  color: var(--stone-900);
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.15;
}

.section-head p,
.page-hero p {
  margin: 8px 0 0;
  color: var(--stone-500);
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, var(--stone-200), var(--amber-100));
}

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

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

.play-dot {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--stone-950);
  background: var(--amber-300);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-dot {
  opacity: 1;
  transform: translateY(0);
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-600), #ef4444);
  font-size: 12px;
  font-weight: 900;
}

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

.movie-card h3 {
  margin: 0 0 7px;
  color: var(--stone-900);
  font-size: 16px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.movie-card p {
  min-height: 42px;
  margin: 0 0 10px;
  color: var(--stone-500);
  font-size: 13px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--stone-500);
  font-size: 12px;
}

.meta-row span {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--stone-100);
}

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

.category-card,
.ranking-row,
.info-card {
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.category-card {
  padding: 22px;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card h3 {
  margin: 0 0 10px;
  color: var(--stone-900);
  font-size: 21px;
}

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

.category-card strong {
  margin-top: 18px;
  color: var(--amber-700);
}

.page-hero {
  padding: 70px 0 42px;
  background:
    radial-gradient(circle at 85% 20%, rgba(245, 158, 11, 0.22), transparent 28%),
    linear-gradient(135deg, var(--white), var(--orange-50));
}

.filter-panel {
  position: sticky;
  top: 72px;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr 180px 180px auto;
  align-items: end;
  gap: 14px;
  margin: 0 0 28px;
  padding: 18px;
  border: 1px solid rgba(120, 113, 108, 0.16);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}

.filter-panel label {
  display: grid;
  gap: 6px;
  color: var(--stone-700);
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--stone-200);
  border-radius: 12px;
  padding: 0 13px;
  color: var(--stone-900);
  background: var(--white);
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--amber-500);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.filter-panel strong {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 12px;
  color: var(--amber-700);
  background: var(--amber-100);
  white-space: nowrap;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 56px 74px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px 16px;
}

.ranking-row .rank-num {
  color: var(--amber-700);
  font-size: 24px;
  font-weight: 900;
}

.ranking-row img {
  width: 74px;
  height: 96px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--stone-100);
}

.ranking-row h3 {
  margin: 0 0 6px;
  color: var(--stone-900);
}

.ranking-row p {
  margin: 0;
  color: var(--stone-500);
}

.heat {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-600), #ef4444);
  font-weight: 900;
}

.detail-hero {
  padding: 54px 0;
  color: var(--white);
  background:
    linear-gradient(120deg, rgba(28, 25, 23, 0.95), rgba(68, 64, 60, 0.78)),
    radial-gradient(circle at 90% 15%, rgba(245, 158, 11, 0.3), transparent 32%);
}

.detail-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 38px;
  align-items: center;
}

.detail-poster {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
  background: var(--stone-800);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-title p {
  max-width: 880px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 19px;
}

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

.detail-meta span,
.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-weight: 800;
}

.detail-meta span {
  padding: 8px 12px;
  color: var(--stone-950);
  background: var(--amber-100);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag {
  padding: 6px 10px;
  color: var(--amber-700);
  background: rgba(254, 243, 199, 0.16);
  border: 1px solid rgba(254, 243, 199, 0.28);
}

.player-section {
  padding: 44px 0 24px;
  background: var(--stone-950);
}

.player-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #000000;
  box-shadow: var(--shadow-md);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.16));
  cursor: pointer;
}

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

.play-overlay button {
  width: 92px;
  height: 92px;
  border: 0;
  border-radius: 999px;
  color: var(--stone-950);
  background: linear-gradient(135deg, var(--amber-100), var(--amber-500));
  font-size: 34px;
  box-shadow: 0 20px 50px rgba(245, 158, 11, 0.3);
  cursor: pointer;
}

.player-status {
  padding: 14px 2px 0;
  color: rgba(255, 255, 255, 0.74);
}

.detail-section {
  padding: 52px 0;
}

.detail-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 26px;
  align-items: start;
}

.info-card {
  padding: 26px;
}

.info-card + .info-card {
  margin-top: 22px;
}

.info-card h2,
.info-card h3 {
  margin: 0 0 14px;
  color: var(--stone-900);
}

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

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

.side-link {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: var(--stone-50);
}

.side-link img {
  width: 56px;
  height: 74px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--stone-100);
}

.side-link strong {
  display: block;
  color: var(--stone-900);
  line-height: 1.3;
}

.side-link span {
  color: var(--stone-500);
  font-size: 12px;
}

.site-footer {
  padding: 48px 0;
  color: rgba(255, 255, 255, 0.82);
  background: var(--stone-950);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 30px;
}

.site-footer h2,
.site-footer h3 {
  margin: 0 0 12px;
  color: var(--white);
}

.site-footer p {
  margin: 0;
  max-width: 620px;
}

.site-footer a {
  display: block;
  margin-top: 8px;
  color: var(--amber-100);
}

.empty-state {
  display: none;
  padding: 32px;
  border-radius: var(--radius-md);
  text-align: center;
  color: var(--stone-500);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

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

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

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

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 70px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border-radius: 16px;
    background: var(--stone-900);
    box-shadow: var(--shadow-md);
  }

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

  .main-nav a {
    padding: 12px;
  }

  .hero,
  .hero-content {
    min-height: 76vh;
  }

  .hero-controls {
    left: 16px;
    right: auto;
    bottom: 22px;
  }

  .section-head {
    display: block;
  }

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

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

  .filter-panel {
    position: static;
    grid-template-columns: 1fr;
  }

  .ranking-row {
    grid-template-columns: 42px 64px 1fr;
  }

  .ranking-row .heat {
    grid-column: 3;
    justify-self: start;
  }

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

  .detail-poster {
    max-width: 260px;
  }
}

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

  .brand {
    min-width: 0;
  }

  .brand-text small {
    display: none;
  }

  .movie-grid,
  .movie-grid.wide {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

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

  .movie-card h3 {
    font-size: 14px;
  }

  .movie-card p {
    display: none;
  }
}
