:root {
  --bg: #faf7ef;
  --bg-soft: #fff7ed;
  --text: #1c1917;
  --muted: #78716c;
  --line: #e7d9c5;
  --card: rgba(255, 255, 255, 0.9);
  --accent: #d97706;
  --accent-dark: #92400e;
  --accent-soft: #fef3c7;
  --shadow: 0 20px 55px rgba(120, 53, 15, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, #fffaf0 0%, #faf7ef 42%, #f5efe4 100%);
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(180, 83, 9, 0.18);
  background: rgba(255, 251, 235, 0.9);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  color: #78350f;
  white-space: nowrap;
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 14px 32px rgba(180, 83, 9, 0.34);
}

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

.nav-links a {
  padding: 10px 12px;
  border-radius: 999px;
  color: #57534e;
  font-size: 14px;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover {
  color: #7c2d12;
  background: #ffedd5;
  transform: translateY(-1px);
}

.nav-search {
  width: min(320px, 34vw);
  display: flex;
  align-items: center;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 24px rgba(180, 83, 9, 0.08);
}

.nav-search input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 10px 14px;
  color: var(--text);
  background: transparent;
}

.nav-search button,
.primary-btn,
.secondary-btn,
.filter-btn,
.play-overlay {
  border: 0;
  cursor: pointer;
}

.nav-search button {
  padding: 10px 16px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, #f59e0b, #b45309);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #ffedd5;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 99px;
  background: #78350f;
}

main {
  min-height: 70vh;
}

.hero-carousel {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  background: #1c1917;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

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

.hero-mask {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 25%, rgba(245, 158, 11, 0.24), transparent 38%),
    linear-gradient(90deg, rgba(12, 10, 9, 0.92) 0%, rgba(12, 10, 9, 0.66) 45%, rgba(12, 10, 9, 0.28) 100%),
    linear-gradient(0deg, rgba(12, 10, 9, 0.86), transparent 48%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  gap: 44px;
  align-items: center;
  color: #fff;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border: 1px solid rgba(251, 191, 36, 0.32);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(120, 53, 15, 0.38);
  backdrop-filter: blur(12px);
  font-size: 14px;
  font-weight: 800;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.96;
  letter-spacing: -0.06em;
  font-weight: 950;
}

.hero-copy p {
  max-width: 650px;
  margin: 0 0 26px;
  color: #f5f5f4;
  font-size: 18px;
  line-height: 1.8;
}

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

.primary-btn,
.secondary-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;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 18px 36px rgba(217, 119, 6, 0.34);
}

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

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

.hero-panel {
  padding: 18px;
  border: 1px solid rgba(255, 237, 213, 0.22);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.hero-panel img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.42);
}

.hero-panel h3 {
  margin: 18px 0 8px;
  font-size: 22px;
  font-weight: 900;
}

.hero-panel p {
  margin: 0;
  color: #fef3c7;
  line-height: 1.7;
}

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 28px;
  width: min(1240px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.hero-arrow {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 237, 213, 0.26);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  font-size: 22px;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

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

.section,
.page-hero,
.detail-page,
.search-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.section {
  padding: 56px 0 0;
}

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

.section-title,
.page-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.08;
  font-weight: 950;
  letter-spacing: -0.04em;
  color: #1c1917;
}

.section-subtitle,
.page-desc {
  margin: 10px 0 0;
  max-width: 760px;
  color: #78716c;
  line-height: 1.8;
}

.view-more {
  color: #b45309;
  font-weight: 900;
}

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(180, 83, 9, 0.14);
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 16px 40px rgba(120, 53, 15, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

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

.poster-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #fde68a, #fed7aa);
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.movie-card:hover .poster-wrap img {
  transform: scale(1.05);
  filter: saturate(1.08) contrast(1.05);
}

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

.poster-play {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 7px 11px;
  border-radius: 999px;
  color: #fff;
  background: rgba(217, 119, 6, 0.92);
  font-size: 12px;
  font-weight: 900;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 12px 24px rgba(120, 53, 15, 0.26);
}

.card-body {
  padding: 14px;
}

.card-title {
  display: block;
  overflow: hidden;
  color: #1c1917;
  font-size: 16px;
  font-weight: 900;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.card-desc {
  height: 44px;
  margin: 8px 0 10px;
  overflow: hidden;
  color: #78716c;
  font-size: 13px;
  line-height: 1.7;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: #92400e;
  font-size: 12px;
  font-weight: 800;
}

.card-meta span,
.tag-row span,
.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: #ffedd5;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  color: #78350f;
  font-size: 12px;
}

.tag-row span {
  background: #fef3c7;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 24px;
  border-radius: 26px;
  color: #fff;
  background: linear-gradient(135deg, #92400e, #f59e0b);
  box-shadow: var(--shadow);
}

.category-card:nth-child(2n) {
  background: linear-gradient(135deg, #1c1917, #b45309);
}

.category-card:nth-child(3n) {
  background: linear-gradient(135deg, #78350f, #ea580c);
}

.category-card:before {
  content: "";
  position: absolute;
  right: -70px;
  top: -70px;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.category-card h2,
.category-card h3 {
  position: relative;
  margin: 0 0 10px;
  font-size: 26px;
  font-weight: 950;
}

.category-card p {
  position: relative;
  margin: 0 0 24px;
  color: #fffbeb;
  line-height: 1.7;
}

.category-card span {
  position: relative;
  font-weight: 900;
}

.page-hero {
  padding: 64px 0 28px;
}

.page-panel {
  padding: clamp(28px, 5vw, 58px);
  border: 1px solid rgba(180, 83, 9, 0.14);
  border-radius: 34px;
  background:
    radial-gradient(circle at 86% 20%, rgba(245, 158, 11, 0.22), transparent 36%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 247, 237, 0.9));
  box-shadow: var(--shadow);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #92400e;
  font-size: 14px;
  font-weight: 800;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  margin: 26px 0;
  padding: 16px;
  border: 1px solid rgba(180, 83, 9, 0.14);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
}

.filter-input {
  width: 100%;
  min-height: 46px;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  outline: 0;
  padding: 0 16px;
  background: #fff;
}

.filter-btn {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, #f59e0b, #b45309);
}

.ranking-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ranking-item {
  display: grid;
  grid-template-columns: 74px 96px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(180, 83, 9, 0.14);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 34px rgba(120, 53, 15, 0.07);
}

.ranking-number {
  font-size: 28px;
  font-weight: 950;
  color: #d97706;
  text-align: center;
}

.ranking-cover {
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 2 / 3;
  background: #fed7aa;
}

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

.ranking-info h2,
.ranking-info h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 950;
}

.ranking-info p {
  margin: 0 0 10px;
  color: #78716c;
  line-height: 1.7;
}

.detail-page {
  padding: 36px 0 64px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 32px;
  align-items: stretch;
  padding: 26px;
  border: 1px solid rgba(180, 83, 9, 0.14);
  border-radius: 34px;
  background:
    radial-gradient(circle at 80% 12%, rgba(245, 158, 11, 0.2), transparent 34%),
    rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  aspect-ratio: 2 / 3;
  background: #fed7aa;
  box-shadow: 0 18px 42px rgba(120, 53, 15, 0.18);
}

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

.detail-info h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.02;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.detail-lead {
  margin: 0 0 20px;
  color: #57534e;
  font-size: 18px;
  line-height: 1.85;
}

.detail-meta-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.meta-pill {
  color: #78350f;
  font-size: 13px;
  font-weight: 900;
}

.player-card,
.text-card,
.related-card {
  margin-top: 28px;
  padding: 22px;
  border: 1px solid rgba(180, 83, 9, 0.14);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 44px rgba(120, 53, 15, 0.08);
}

.player-card h2,
.text-card h2,
.related-card h2 {
  margin: 0 0 18px;
  font-size: 26px;
  font-weight: 950;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.video-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.18));
}

.play-overlay span {
  width: 84px;
  height: 84px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.38);
  font-size: 18px;
  font-weight: 950;
}

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

.text-card p {
  margin: 0 0 18px;
  color: #44403c;
  font-size: 17px;
  line-height: 1.92;
}

.text-card p:last-child {
  margin-bottom: 0;
}

.search-box-large {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin-top: 24px;
}

.search-box-large input {
  min-height: 54px;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  padding: 0 20px;
  outline: 0;
  background: #fff;
}

.search-results {
  min-height: 180px;
}

.empty-state {
  padding: 50px 18px;
  border: 1px dashed #fdba74;
  border-radius: 24px;
  color: #78716c;
  text-align: center;
  background: rgba(255, 255, 255, 0.7);
}

.site-footer {
  margin-top: 72px;
  border-top: 1px solid rgba(180, 83, 9, 0.18);
  background: #1c1917;
  color: #fef3c7;
}

.footer-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 36px;
}

.footer-logo {
  color: #fff7ed;
}

.footer-shell p {
  max-width: 520px;
  color: #d6d3d1;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-content: flex-start;
  justify-content: flex-end;
}

.footer-links a {
  padding: 9px 12px;
  border-radius: 999px;
  color: #fef3c7;
  background: rgba(255, 255, 255, 0.08);
}

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

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

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

  .hero-inner {
    grid-template-columns: 1fr 280px;
  }
}

@media (max-width: 860px) {
  .nav-shell {
    min-height: auto;
    padding: 14px 0;
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: block;
    margin-left: auto;
  }

  .nav-links {
    order: 4;
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border-radius: 18px;
    background: #fff7ed;
  }

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

  .nav-search {
    order: 3;
    width: 100%;
  }

  .hero-carousel,
  .hero-inner {
    min-height: 720px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 24px;
    padding: 42px 0 90px;
  }

  .hero-panel {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 14px;
    align-items: center;
  }

  .hero-panel img {
    border-radius: 16px;
  }

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

  .category-grid,
  .ranking-list,
  .footer-shell,
  .detail-hero {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 620px) {
  .section,
  .page-hero,
  .detail-page {
    width: min(100% - 22px, 1240px);
  }

  .section-head,
  .page-head {
    display: block;
  }

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

  .card-body {
    padding: 12px;
  }

  .card-desc {
    display: none;
  }

  .filter-panel,
  .search-box-large {
    grid-template-columns: 1fr;
  }

  .ranking-item {
    grid-template-columns: 48px 76px 1fr;
    gap: 10px;
  }

  .detail-hero,
  .player-card,
  .text-card,
  .related-card,
  .page-panel {
    border-radius: 22px;
    padding: 16px;
  }

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

  .play-overlay span {
    width: 68px;
    height: 68px;
  }
}
