:root {
  --bg: #f8f5ee;
  --surface: #ffffff;
  --surface-soft: #fffbf3;
  --text: #292524;
  --muted: #78716c;
  --line: #e7e0d4;
  --amber: #d97706;
  --amber-dark: #92400e;
  --stone: #44403c;
  --shadow: 0 18px 45px rgba(68, 64, 60, 0.12);
  --shadow-soft: 0 12px 30px rgba(68, 64, 60, 0.08);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(251, 191, 36, 0.18), transparent 34rem),
    linear-gradient(180deg, #fffaf0 0%, var(--bg) 42%, #f3eee5 100%);
}

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

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

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

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

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 74px;
}

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

.brand-mark,
.footer-logo span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, #f59e0b, #92400e 80%);
  box-shadow: 0 12px 26px rgba(217, 119, 6, 0.3);
}

.brand-text {
  display: grid;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 1.18rem;
  letter-spacing: 0.02em;
}

.brand-text small {
  color: var(--muted);
  font-size: 0.78rem;
}

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

.nav-link,
.mobile-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--stone);
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--amber-dark);
  background: rgba(245, 158, 11, 0.12);
}

.header-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  width: min(310px, 28vw);
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.header-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select,
.search-panel input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.header-search input {
  padding: 0 12px;
}

.header-search button,
.mobile-search button,
.search-panel button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 800;
  background: linear-gradient(135deg, #f59e0b, #b45309);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(245, 158, 11, 0.12);
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 10px;
  background: var(--amber-dark);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.mobile-search {
  display: flex;
  margin-top: 10px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 640px;
  margin: 26px auto 30px;
  border-radius: 34px;
  color: #ffffff;
  background:
    radial-gradient(circle at 70% 18%, rgba(251, 191, 36, 0.45), transparent 24rem),
    linear-gradient(135deg, #1c1917 0%, #44403c 48%, #92400e 100%);
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  align-items: stretch;
  gap: 20px;
  padding: 58px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.hero-copy {
  position: relative;
  z-index: 2;
  align-self: center;
  max-width: 650px;
}

.hero-copy .eyebrow,
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: #fbbf24;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.45rem, 7vw, 5.2rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.hero-copy p {
  max-width: 640px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.08rem;
  line-height: 1.9;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.hero-tags span {
  color: #fffbeb;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

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

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

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 18px 26px rgba(180, 83, 9, 0.25);
}

.btn-ghost {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
}

.hero-visual {
  position: relative;
  min-height: 510px;
  align-self: center;
}

.hero-poster {
  position: absolute;
  inset: 0;
  border-radius: 34px;
  overflow: hidden;
  background-position: center;
  background-size: cover;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
}

.hero-poster::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(28, 25, 23, 0.08), rgba(28, 25, 23, 0.42)),
    linear-gradient(180deg, transparent 30%, rgba(28, 25, 23, 0.75));
}

.hero-stat {
  position: absolute;
  right: 24px;
  bottom: 24px;
  left: 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  z-index: 2;
}

.hero-stat span {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: rgba(28, 25, 23, 0.5);
  backdrop-filter: blur(12px);
}

.hero-stat b {
  display: block;
  font-size: 1.2rem;
}

.hero-stat small {
  color: rgba(255, 255, 255, 0.68);
}

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

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

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

.section {
  padding: 36px 0;
}

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

.section-heading h2,
.page-title h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.section-heading p,
.page-title p {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-more {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--amber-dark);
  font-weight: 900;
  background: rgba(245, 158, 11, 0.12);
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(217, 119, 6, 0.32);
  box-shadow: var(--shadow);
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, rgba(251, 191, 36, 0.35), transparent 40%),
    linear-gradient(135deg, #57534e, #1c1917);
  background-position: center;
  background-size: cover;
}

.movie-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(28, 25, 23, 0.76));
}

.play-dot {
  position: absolute;
  z-index: 2;
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(245, 158, 11, 0.94);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.22);
}

.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #b45309);
}

.movie-info {
  padding: 15px;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.movie-info h3 {
  margin: 0;
  font-size: 1.04rem;
  line-height: 1.35;
}

.movie-info h3 a:hover {
  color: var(--amber-dark);
}

.movie-info p {
  display: -webkit-box;
  min-height: 3.25em;
  margin: 8px 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.62;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-row span {
  color: var(--amber-dark);
  background: rgba(245, 158, 11, 0.12);
}

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

.category-card {
  display: grid;
  grid-template-columns: 160px 1fr;
  overflow: hidden;
  min-height: 205px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow-soft);
}

.category-cover {
  background:
    radial-gradient(circle at 35% 25%, rgba(251, 191, 36, 0.34), transparent 38%),
    linear-gradient(135deg, #57534e, #1c1917);
  background-position: center;
  background-size: cover;
}

.category-body {
  padding: 22px;
}

.category-body span {
  color: var(--amber);
  font-weight: 900;
}

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

.category-body p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.7;
}

.category-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-mini a {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--stone);
  background: #f4eee2;
  font-size: 0.86rem;
  font-weight: 800;
}

.rank-panel,
.page-panel,
.detail-card,
.search-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
}

.rank-panel {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 22px;
  padding: 22px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  background: #fff8eb;
}

.rank-num {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, #f59e0b, #b45309);
}

.rank-title strong {
  display: block;
  margin-bottom: 4px;
}

.rank-title span,
.rank-score {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.page-hero {
  margin: 26px auto 22px;
  padding: 46px;
  border-radius: 32px;
  color: #ffffff;
  background:
    radial-gradient(circle at 82% 22%, rgba(251, 191, 36, 0.42), transparent 25rem),
    linear-gradient(135deg, #292524, #57534e 54%, #92400e);
  box-shadow: var(--shadow);
}

.page-title h1 {
  color: #ffffff;
}

.page-title p {
  color: rgba(255, 255, 255, 0.82);
}

.page-panel {
  padding: 22px;
}

.filter-bar,
.search-panel {
  display: grid;
  grid-template-columns: 1fr 170px 170px;
  gap: 12px;
  margin-bottom: 22px;
}

.filter-bar input,
.filter-bar select,
.search-panel input {
  min-height: 46px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
}

.search-panel {
  grid-template-columns: 1fr auto;
  padding: 10px;
}

.search-panel input {
  border: 0;
}

.search-panel button {
  min-height: 46px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
  margin: 26px auto;
  align-items: stretch;
}

.detail-poster {
  min-height: 560px;
  border-radius: 32px;
  background:
    radial-gradient(circle at 35% 20%, rgba(251, 191, 36, 0.35), transparent 38%),
    linear-gradient(135deg, #57534e, #1c1917);
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow);
}

.detail-card {
  padding: 38px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

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

.detail-card h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.detail-intro {
  margin: 18px 0 20px;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.85;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.detail-meta span {
  padding: 14px;
  border-radius: 16px;
  background: #fff7e6;
  color: var(--muted);
  font-weight: 800;
}

.detail-meta b {
  color: var(--text);
}

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

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

.player-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(28, 25, 23, 0.2), rgba(28, 25, 23, 0.82)),
    var(--cover-bg);
  background-position: center;
  background-size: cover;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.player-button {
  display: grid;
  place-items: center;
  width: 94px;
  height: 94px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 2rem;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 24px 45px rgba(0, 0, 0, 0.32);
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}

.article-block,
.side-box {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
}

.article-block h2,
.side-box h2 {
  margin: 0 0 14px;
  font-size: 1.5rem;
}

.article-block p {
  margin: 0 0 18px;
  color: var(--stone);
  line-height: 1.92;
}

.side-links {
  display: grid;
  gap: 10px;
}

.side-links a {
  display: block;
  padding: 12px;
  border-radius: 16px;
  background: #fff8eb;
  font-weight: 800;
}

.side-links a:hover {
  color: var(--amber-dark);
}

.search-results-empty {
  padding: 34px;
  text-align: center;
  color: var(--muted);
}

.site-footer {
  margin-top: 56px;
  padding: 46px 0 0;
  color: #d6d3d1;
  background: #1c1917;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.7fr 1.1fr;
  gap: 32px;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  color: #ffffff;
}

.footer-brand p {
  max-width: 440px;
  margin: 0;
  color: #a8a29e;
  line-height: 1.8;
}

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

.footer-links {
  display: grid;
  gap: 10px;
}

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

.footer-links a {
  color: #a8a29e;
}

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

.footer-bottom {
  margin-top: 34px;
  padding: 18px;
  text-align: center;
  color: #a8a29e;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 1040px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .menu-button {
    display: block;
    margin-left: auto;
  }

  .mobile-nav.is-open {
    display: block;
  }

  .hero-slide,
  .detail-hero,
  .content-grid,
  .rank-panel {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 860px;
  }

  .hero-visual {
    min-height: 360px;
  }

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

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

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

  .brand-text small {
    display: none;
  }

  .hero {
    min-height: 760px;
    border-radius: 26px;
  }

  .hero-slide {
    gap: 16px;
    padding: 28px;
  }

  .hero h1 {
    font-size: 2.45rem;
  }

  .hero-copy p {
    font-size: 0.98rem;
  }

  .hero-dots {
    left: 28px;
    bottom: 22px;
  }

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

  .section-heading,
  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .section-more,
  .btn {
    width: 100%;
  }

  .movie-grid,
  .category-grid,
  .footer-grid,
  .filter-bar,
  .search-panel,
  .detail-meta {
    grid-template-columns: 1fr;
  }

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

  .category-cover {
    min-height: 220px;
  }

  .detail-card,
  .page-hero,
  .article-block,
  .side-box {
    padding: 24px;
  }

  .detail-poster {
    min-height: 420px;
  }

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

@media (max-width: 520px) {
  .movie-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .movie-info {
    padding: 12px;
  }

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

  .movie-meta {
    font-size: 0.74rem;
  }

  .movie-info h3 {
    font-size: 0.92rem;
  }
}

.search-panel form {
  display: contents;
}
