:root {
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-400: #f59e0b;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-400: #a8a29e;
  --stone-500: #78716c;
  --stone-600: #57534e;
  --stone-700: #44403c;
  --stone-800: #292524;
  --stone-900: #1c1917;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(41, 37, 36, 0.12);
  --shadow-soft: 0 10px 28px rgba(41, 37, 36, 0.08);
  --radius: 22px;
}

* {
  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", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--stone-800);
  background: linear-gradient(180deg, var(--amber-50), var(--stone-50) 34%, var(--white));
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(231, 229, 228, 0.88);
  backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 16px;
  background: linear-gradient(135deg, var(--amber-500), var(--stone-700));
  box-shadow: 0 12px 26px rgba(217, 119, 6, 0.24);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.18;
}

.brand-copy strong,
.footer-brand strong {
  font-size: 20px;
  letter-spacing: 0.02em;
}

.brand-copy small {
  color: var(--stone-500);
  font-size: 12px;
  margin-top: 3px;
}

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

.nav-link,
.mobile-nav-link {
  padding: 10px 16px;
  color: var(--stone-600);
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: var(--amber-600);
  background: var(--amber-50);
}

.menu-toggle {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: var(--amber-50);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: var(--stone-700);
  border-radius: 3px;
}

.mobile-nav {
  display: none;
  padding: 0 16px 18px;
}

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

.hero {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  color: var(--white);
  background: var(--stone-900);
}

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

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

.hero-shade {
  background: linear-gradient(90deg, rgba(28, 25, 23, 0.9), rgba(28, 25, 23, 0.62) 42%, rgba(28, 25, 23, 0.1)), linear-gradient(0deg, rgba(28, 25, 23, 0.84), rgba(28, 25, 23, 0.08) 48%);
}

.hero-glow {
  background: radial-gradient(circle at 20% 78%, rgba(245, 158, 11, 0.34), transparent 34%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 520px;
  display: flex;
  align-items: flex-end;
  padding: 72px 0;
}

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

.eyebrow {
  margin: 0 0 12px;
  color: var(--amber-500);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-intro {
  max-width: 650px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

.hero-feature {
  margin-top: 28px;
  padding: 24px;
  width: min(660px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(28, 25, 23, 0.52);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero-feature h2 {
  margin: 10px 0 10px;
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1.12;
}

.hero-feature p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
}

.hero-actions,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
}

.button,
.search-panel button,
.pagination-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  color: var(--white);
  background: var(--amber-500);
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.28);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.button:hover,
.search-panel button:hover,
.pagination-link:hover {
  transform: translateY(-1px);
  background: var(--amber-600);
  box-shadow: 0 18px 32px rgba(245, 158, 11, 0.34);
}

.button.is-ghost {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

.button.is-light {
  color: var(--stone-800);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.section,
.page-hero,
.detail-wrap {
  padding: 64px 0;
}

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

.section-head h2,
.page-hero h1,
.detail-title {
  margin: 0;
  color: var(--stone-800);
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

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

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

.movie-card {
  min-width: 0;
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--stone-800), var(--amber-600));
  box-shadow: var(--shadow-soft);
}

.movie-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.25s ease;
}

.movie-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(28, 25, 23, 0.54), transparent 48%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.movie-card:hover .movie-poster::after {
  opacity: 1;
}

.poster-badge,
.rank-badge,
.meta-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.poster-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  max-width: calc(100% - 20px);
  padding: 5px 9px;
  color: var(--white);
  background: rgba(245, 158, 11, 0.94);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.movie-title {
  display: -webkit-box;
  min-height: 44px;
  color: var(--stone-800);
  font-weight: 800;
  line-height: 1.38;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  transition: color 0.2s ease;
}

.movie-title:hover,
.rank-item:hover h3,
.category-card:hover h2 {
  color: var(--amber-600);
}

.movie-meta,
.movie-line {
  margin: 5px 0 0;
  color: var(--stone-500);
  font-size: 13px;
}

.movie-line {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.category-card,
.info-card,
.detail-card,
.search-panel,
.rank-item,
.player-shell {
  border: 1px solid rgba(231, 229, 228, 0.9);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
}

.category-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  min-height: 200px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card::before {
  content: "";
  position: absolute;
  width: 140px;
  height: 140px;
  right: -60px;
  top: -50px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
}

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

.category-card h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

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

.search-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px auto;
  gap: 12px;
  align-items: end;
  padding: 18px;
  margin: 0 0 30px;
}

.search-panel label {
  display: grid;
  gap: 7px;
  color: var(--stone-600);
  font-size: 13px;
  font-weight: 700;
}

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

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

.page-hero {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(68, 64, 60, 0.08));
  border-bottom: 1px solid var(--stone-200);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 74px 86px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.rank-badge {
  width: 52px;
  height: 52px;
  color: var(--white);
  font-size: 20px;
  background: linear-gradient(135deg, var(--amber-500), var(--stone-700));
}

.rank-cover {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--stone-800), var(--amber-600));
}

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

.rank-item h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.rank-item p {
  margin: 0;
  color: var(--stone-500);
  font-size: 14px;
}

.detail-wrap {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.86fr);
  gap: 28px;
}

.breadcrumb {
  margin: 28px auto 0;
  color: var(--stone-500);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--amber-600);
}

.player-shell {
  position: relative;
  overflow: hidden;
  background: var(--stone-900);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--stone-900);
}

.player-cover {
  position: absolute;
  inset: 0;
  cursor: pointer;
  background: var(--stone-900);
  z-index: 2;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.64;
}

.play-button {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 78px;
  height: 78px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-500), var(--amber-600));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  transform: translate(-50%, -50%);
}

.play-button::before {
  content: "";
  position: absolute;
  left: 32px;
  top: 25px;
  border-left: 20px solid var(--white);
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
}

.detail-card {
  padding: 28px;
  margin-top: 24px;
}

.detail-title {
  margin-top: 12px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.meta-pill {
  padding: 7px 12px;
  color: var(--stone-700);
  background: var(--stone-100);
}

.meta-pill.is-primary {
  color: var(--white);
  background: var(--amber-500);
}

.detail-card h2,
.sidebar h2 {
  margin: 24px 0 12px;
  font-size: 22px;
}

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

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

.tag-list span {
  padding: 7px 11px;
  border-radius: 10px;
  color: var(--stone-700);
  background: var(--amber-50);
}

.sidebar {
  display: grid;
  gap: 20px;
  align-content: start;
}

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

.info-card {
  padding: 24px;
}

.info-card h2 {
  margin-top: 0;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.empty-state {
  display: none;
  padding: 18px;
  text-align: center;
  color: var(--stone-500);
  border: 1px dashed var(--stone-200);
  border-radius: 16px;
}

.empty-state.is-visible {
  display: block;
}

.is-hidden {
  display: none !important;
}

.site-footer {
  color: var(--stone-200);
  background: linear-gradient(135deg, var(--stone-900), var(--stone-800) 55%, #78350f);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 28px;
  padding: 54px 0 38px;
}

.footer-grid h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 18px;
}

.footer-grid p,
.footer-grid a {
  color: var(--stone-400);
  font-size: 14px;
}

.footer-grid a {
  display: block;
  margin: 8px 0;
}

.footer-grid a:hover {
  color: var(--amber-400);
}

.footer-bottom {
  padding: 18px 0;
  text-align: center;
  color: var(--stone-400);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

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

  .detail-wrap {
    grid-template-columns: 1fr;
  }

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

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

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

  .header-inner {
    min-height: 68px;
  }

  .brand-copy small {
    display: none;
  }

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

  .hero-content {
    padding: 48px 0;
  }

  .hero-shade {
    background: linear-gradient(0deg, rgba(28, 25, 23, 0.92), rgba(28, 25, 23, 0.34));
  }

  .hero-feature {
    padding: 20px;
  }

  .section,
  .page-hero,
  .detail-wrap {
    padding: 44px 0;
  }

  .section-head {
    display: block;
  }

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

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

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

  .rank-item {
    grid-template-columns: 46px 66px 1fr;
  }

  .rank-item .button {
    grid-column: 2 / -1;
  }

  .rank-badge {
    width: 42px;
    height: 42px;
    font-size: 16px;
  }

  .detail-card {
    padding: 22px;
  }

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

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