:root {
  --bg: #f5f5f4;
  --panel: #ffffff;
  --ink: #1c1917;
  --muted: #78716c;
  --line: #e7e5e4;
  --stone: #292524;
  --stone-2: #44403c;
  --accent: #d97706;
  --accent-dark: #92400e;
  --accent-soft: #fef3c7;
  --shadow: 0 18px 45px rgba(28, 25, 23, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(28, 25, 23, 0.94);
  color: #fafaf9;
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-wrap {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #92400e);
  color: #fff7ed;
  box-shadow: 0 10px 30px rgba(217, 119, 6, 0.34);
}

.brand-text {
  font-size: 19px;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
  font-size: 15px;
  color: #d6d3d1;
}

.nav-links a:hover {
  color: #fbbf24;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  padding: 9px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 999px;
  background: #fafaf9;
}

.hero {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  background: linear-gradient(135deg, #292524, #44403c 45%, #78350f);
  color: #fff;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s ease;
  background-size: cover;
  background-position: center;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(28, 25, 23, 0.92), rgba(28, 25, 23, 0.72) 45%, rgba(28, 25, 23, 0.24));
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 520px;
  display: flex;
  align-items: center;
  max-width: 690px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.16);
  color: #fcd34d;
  font-size: 13px;
  font-weight: 700;
}

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

.hero p {
  max-width: 620px;
  margin: 0 0 28px;
  color: #e7e5e4;
  font-size: clamp(17px, 2vw, 22px);
}

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

.btn-primary,
.btn-secondary,
.btn-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  padding: 13px 24px;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 14px 34px rgba(217, 119, 6, 0.35);
}

.btn-secondary {
  padding: 12px 22px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.08);
}

.btn-text {
  color: var(--accent-dark);
  font-size: 15px;
}

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

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

.hero-dots button {
  width: 34px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
}

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

.search-hero {
  padding: 34px 0;
  background: #1c1917;
  color: #fafaf9;
}

.search-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  padding: 14px 18px;
  font-size: 16px;
}

.search-box button {
  border: 0;
  padding: 13px 24px;
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
  font-weight: 800;
}

.search-results {
  display: none;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.search-results.is-open {
  display: grid;
}

.section {
  padding: 66px 0;
}

.section.alt {
  background: #e7e5e4;
}

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

.section-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.section-desc {
  max-width: 660px;
  margin: 10px 0 0;
  color: var(--muted);
}

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

.movie-card {
  overflow: hidden;
  border-radius: 20px;
  background: var(--panel);
  box-shadow: 0 12px 30px rgba(28, 25, 23, 0.08);
  border: 1px solid rgba(231, 229, 228, 0.9);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #292524;
}

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

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

.poster-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 9px;
  border-radius: 999px;
  color: #fff;
  background: rgba(28, 25, 23, 0.78);
  font-size: 12px;
  font-weight: 800;
}

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

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
}

.movie-card h3 {
  min-height: 50px;
  margin: 9px 0 8px;
  color: #292524;
  font-size: 17px;
  line-height: 1.35;
}

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

.movie-card p {
  display: -webkit-box;
  min-height: 66px;
  margin: 0;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  color: var(--muted);
  font-size: 14px;
}

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

.tag-row span {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
}

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

.category-card {
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(135deg, #44403c, #78350f);
  box-shadow: var(--shadow);
}

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

.category-card p {
  margin: 0;
  color: #e7e5e4;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 56px 74px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
}

.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
  font-weight: 900;
}

.rank-item img {
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  object-fit: cover;
}

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

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

.page-hero {
  padding: 70px 0 46px;
  color: #fff;
  background: radial-gradient(circle at 20% 0%, rgba(217, 119, 6, 0.36), transparent 34%), linear-gradient(135deg, #1c1917, #44403c 58%, #78350f);
}

.page-hero h1 {
  max-width: 820px;
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.1;
}

.page-hero p {
  max-width: 720px;
  margin: 0;
  color: #e7e5e4;
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: #fbbf24;
  font-size: 14px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 14px;
  margin-bottom: 28px;
  padding: 16px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 26px rgba(28, 25, 23, 0.06);
}

.search-field,
.select-field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.search-field input,
.select-field select {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
  padding: 0 14px;
  color: var(--ink);
  background: #fafaf9;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 30px;
  align-items: start;
}

.player-shell {
  overflow: hidden;
  border-radius: 26px;
  background: #000;
  box-shadow: var(--shadow);
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.62));
  cursor: pointer;
}

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

.play-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  border-radius: 999px;
  background: rgba(217, 119, 6, 0.92);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.36);
  font-size: 34px;
  padding-left: 5px;
}

.detail-panel,
.side-panel {
  padding: 26px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 34px rgba(28, 25, 23, 0.08);
}

.detail-panel h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
}

.detail-panel h2,
.side-panel h2 {
  margin: 26px 0 12px;
  font-size: 24px;
}

.detail-panel p {
  margin: 0 0 14px;
  color: #44403c;
}

.detail-cover {
  overflow: hidden;
  margin-bottom: 18px;
  border-radius: 18px;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 16px;
  background: #fafaf9;
  border: 1px solid var(--line);
}

.compact-card:hover {
  border-color: #f59e0b;
}

.compact-card img {
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  object-fit: cover;
}

.compact-card strong,
.compact-card em {
  display: block;
}

.compact-card strong {
  color: #292524;
  line-height: 1.35;
}

.compact-card em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.site-footer {
  padding: 42px 0 22px;
  background: #1c1917;
  color: #d6d3d1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 30px;
  align-items: start;
}

.footer-brand {
  margin-bottom: 12px;
  color: #fff;
  font-size: 22px;
}

.site-footer p {
  max-width: 520px;
  margin: 0;
  color: #a8a29e;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 18px;
}

.footer-links a:hover {
  color: #fbbf24;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #a8a29e;
  font-size: 14px;
}

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

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

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

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

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

  .nav-links {
    position: absolute;
    left: 0;
    right: 0;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 12px 24px 22px;
    background: #1c1917;
  }

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

  .nav-links a {
    width: 100%;
    padding: 12px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

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

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

  .category-grid,
  .rank-list,
  .footer-grid,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

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

  .section {
    padding: 46px 0;
  }

  .section-head,
  .hero-actions,
  .section-actions {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .movie-grid,
  .search-results {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 42px 62px 1fr;
  }

  .detail-panel,
  .side-panel {
    padding: 20px;
  }
}
