:root {
  --bg: #fff8ec;
  --surface: #ffffff;
  --surface-soft: #fff3d7;
  --text: #1f1a16;
  --muted: #70675b;
  --brand: #b7791f;
  --brand-2: #d69e2e;
  --brand-3: #f6ad55;
  --line: rgba(120, 83, 24, 0.16);
  --shadow: 0 24px 70px rgba(120, 83, 24, 0.18);
  --shadow-soft: 0 14px 36px rgba(120, 83, 24, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #fff8ec 0%, #ffffff 38%, #fffaf0 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(77, 45, 8, 0.82);
  backdrop-filter: blur(18px);
  color: #fff;
}

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

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(135deg, #f6d365 0%, #d69e2e 46%, #7b3f00 100%);
  color: #fff;
  box-shadow: 0 12px 30px rgba(214, 158, 46, 0.32);
}

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

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.main-nav a {
  padding: 10px 13px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.88);
  transition: background 0.2s ease, color 0.2s ease;
}

.main-nav a:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.quick-search {
  display: flex;
  align-items: center;
  width: min(300px, 30vw);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  overflow: hidden;
}

.quick-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  padding: 10px 12px;
  color: #fff;
  background: transparent;
}

.quick-search input::placeholder {
  color: rgba(255, 255, 255, 0.62);
}

.quick-search button {
  border: 0;
  padding: 10px 16px;
  color: #3f2608;
  background: #ffd36a;
  font-weight: 700;
  cursor: pointer;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}

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

.hero-slider {
  position: relative;
  min-height: 650px;
  color: #fff;
  background: #3d2207;
  overflow: hidden;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  filter: saturate(1.12);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 20%, rgba(246, 173, 85, 0.3), transparent 33%),
    linear-gradient(90deg, rgba(32, 18, 4, 0.92) 0%, rgba(57, 32, 6, 0.72) 44%, rgba(0, 0, 0, 0.38) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.74) 0%, transparent 42%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  align-items: end;
  gap: 54px;
  min-height: 650px;
  padding: 112px 0 72px;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 211, 106, 0.18);
  color: #ffd36a;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero-copy h1 {
  max-width: 780px;
  margin: 18px 0 18px;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 660px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

.hero-meta,
.detail-meta,
.movie-meta,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta {
  margin: 24px 0;
}

.hero-meta span,
.card-tags span,
.detail-meta span,
.movie-meta span,
.movie-meta a {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(120, 83, 24, 0.1);
  color: #7a4a0c;
  font-size: 13px;
  font-weight: 700;
}

.hero-meta span {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  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:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #3f2608;
  background: linear-gradient(135deg, #ffe29a, #f6ad55);
  box-shadow: 0 18px 42px rgba(214, 158, 46, 0.32);
}

.btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(10px);
}

.hero-poster {
  position: relative;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.11);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-poster img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 22px;
}

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

.hero-dot {
  width: 34px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  cursor: pointer;
}

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

.page-section {
  padding: 70px 0;
}

.section-soft {
  background: linear-gradient(180deg, rgba(255, 243, 215, 0.7), rgba(255, 255, 255, 0));
}

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

.section-heading h2 {
  margin: 12px 0 0;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.2;
}

.section-more {
  color: var(--brand);
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  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(-6px);
  border-color: rgba(214, 158, 46, 0.42);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #fbd38d, #7b3f00);
}

.poster-link img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover img,
.compact-card:hover img {
  transform: scale(1.06);
}

.duration-badge,
.rating-badge {
  position: absolute;
  top: 12px;
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 800;
}

.duration-badge {
  right: 12px;
}

.rating-badge {
  left: 12px;
  color: #ffd36a;
}

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

.movie-title {
  display: -webkit-box;
  overflow: hidden;
  margin-bottom: 8px;
  color: #1f1a16;
  font-size: 18px;
  font-weight: 850;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

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

.category-tile {
  position: relative;
  min-height: 155px;
  overflow: hidden;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 26px;
  color: #fff;
  background: linear-gradient(135deg, #7b3f00, #d69e2e 62%, #f6ad55);
  box-shadow: var(--shadow-soft);
}

.category-tile::after {
  content: "";
  position: absolute;
  right: -46px;
  bottom: -46px;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.category-tile strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-bottom: 8px;
  font-size: 23px;
}

.category-tile span {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(120, 83, 24, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.compact-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
}

.compact-thumb {
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  background: linear-gradient(135deg, #fbd38d, #7b3f00);
}

.compact-thumb img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.compact-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
}

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

.compact-info small {
  color: var(--brand);
  font-weight: 800;
}

.rank-number {
  position: absolute;
  left: 8px;
  top: 8px;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: #ffd36a;
  color: #3f2608;
  font-weight: 900;
}

.page-hero {
  padding: 76px 0 38px;
  color: #fff;
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 211, 106, 0.28), transparent 33%),
    linear-gradient(135deg, #3d2207, #7b3f00 58%, #b7791f);
}

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

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 18px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 14px;
  margin: 28px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(120, 83, 24, 0.2);
  border-radius: 15px;
  outline: none;
  padding: 0 14px;
  background: #fffaf0;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.player-card,
.content-card,
.side-card {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.player-card {
  overflow: hidden;
}

.player-shell {
  position: relative;
  background: #090604;
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.32);
}

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

.play-cover img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}

.play-button {
  position: relative;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 999px;
  color: #3f2608;
  background: linear-gradient(135deg, #ffe29a, #f6ad55);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  cursor: pointer;
}

.play-button svg {
  width: 34px;
  height: 34px;
  margin-left: 5px;
}

.content-card,
.side-card {
  padding: 24px;
}

.content-card h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.15;
}

.content-card h2,
.side-card h2 {
  margin: 24px 0 12px;
  font-size: 24px;
}

.content-card p {
  color: #4b4037;
}

.detail-poster {
  overflow: hidden;
  margin-bottom: 16px;
  border-radius: 22px;
  background: linear-gradient(135deg, #fbd38d, #7b3f00);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #ffd36a;
}

.site-footer {
  margin-top: 70px;
  color: #fff;
  background: #2d1a05;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  padding: 46px 0;
}

.footer-brand {
  margin-bottom: 14px;
}

.footer-grid p {
  max-width: 620px;
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
}

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

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

.footer-bottom {
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: rgba(255, 255, 255, 0.58);
  font-size: 14px;
}

.empty-state {
  display: none;
  padding: 46px 18px;
  border: 1px dashed rgba(120, 83, 24, 0.28);
  border-radius: 24px;
  text-align: center;
  color: var(--muted);
}

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

@media (max-width: 980px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .nav-toggle {
    display: block;
  }

  .main-nav,
  .quick-search {
    display: none;
    width: 100%;
    margin-left: 0;
  }

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

  .main-nav.is-open {
    order: 3;
    justify-content: center;
  }

  .quick-search.is-open {
    order: 4;
  }

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

  .hero-poster {
    display: none;
  }

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

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

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

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

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

  .movie-grid,
  .compact-list,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .compact-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .page-section {
    padding: 48px 0;
  }

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