:root {
  color-scheme: light;
  --bg: #fff7ed;
  --surface: #ffffff;
  --surface-soft: #fffbeb;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #fde68a;
  --brand: #d97706;
  --brand-dark: #92400e;
  --rose: #be123c;
  --shadow: 0 16px 40px rgba(146, 64, 14, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: linear-gradient(180deg, #ffffff 0%, #fffbeb 48%, #fff7ed 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #fffbeb, rgba(255, 255, 255, 0.96), #fffbeb);
  border-bottom: 1px solid #fde68a;
  box-shadow: 0 6px 24px rgba(146, 64, 14, 0.08);
  backdrop-filter: blur(14px);
}

.site-nav {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, #d97706, #e11d48);
  box-shadow: 0 12px 22px rgba(217, 119, 6, 0.28);
}

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

.brand-text strong,
.footer-brand strong {
  font-size: 20px;
  color: #78350f;
}

.brand-text small {
  margin-top: 5px;
  color: #d97706;
  font-size: 12px;
  font-weight: 700;
}

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

.nav-link,
.mobile-link {
  color: #4b5563;
  font-weight: 700;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link {
  padding: 10px 14px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: #92400e;
  background: #fef3c7;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #fef3c7;
  color: #92400e;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

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

.mobile-link {
  padding: 12px 14px;
}

.hero-carousel {
  position: relative;
  height: 560px;
  overflow: hidden;
  background: linear-gradient(135deg, #fef3c7, #fed7aa);
}

.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-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.46), rgba(0, 0, 0, 0.05));
}

.hero-content {
  position: absolute;
  inset: 0;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: #ffffff;
  max-width: 1180px;
}

.hero-content h1 {
  max-width: 720px;
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 700px;
  margin: 0 0 22px;
  color: #e5e7eb;
  font-size: 18px;
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-kicker,
.page-hero span {
  display: inline-flex;
  align-items: center;
  margin-bottom: 16px;
  padding: 7px 14px;
  border-radius: 999px;
  color: #ffffff;
  background: #d97706;
  font-size: 14px;
  font-weight: 800;
}

.hero-meta,
.detail-metas {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.hero-meta span,
.detail-metas span {
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  backdrop-filter: blur(12px);
  font-weight: 700;
}

.hero-actions,
.quick-links,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-primary,
.btn-ghost,
.search-form button,
.inline-filter button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 12px;
  border: 0;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary,
.search-form button,
.inline-filter button {
  color: #ffffff;
  background: #d97706;
  box-shadow: 0 14px 26px rgba(217, 119, 6, 0.28);
}

.btn-primary:hover,
.search-form button:hover,
.inline-filter button:hover {
  background: #b45309;
  transform: translateY(-1px);
}

.btn-primary.full {
  width: 100%;
  margin-top: 14px;
}

.btn-ghost {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.28);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(12px);
  transform: translateY(-50%);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

.hero-control.prev {
  left: 18px;
}

.hero-control.next {
  right: 18px;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: #ffffff;
}

.search-hero {
  width: min(1060px, calc(100% - 32px));
  margin: -34px auto 0;
  position: relative;
  z-index: 6;
  padding: 22px;
  border: 1px solid #fde68a;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.search-form,
.inline-filter {
  display: flex;
  gap: 12px;
}

.search-form input,
.inline-filter input,
.inline-filter select {
  width: 100%;
  min-height: 48px;
  border: 1px solid #fde68a;
  border-radius: 13px;
  padding: 0 16px;
  color: #1f2937;
  background: #ffffff;
  outline: none;
}

.search-form input:focus,
.inline-filter input:focus,
.inline-filter select:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.quick-links {
  margin-top: 14px;
}

.quick-links a,
.section-more,
.footer-links a {
  color: #b45309;
  font-weight: 800;
}

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

.page-top {
  padding-top: 34px;
}

.content-section {
  margin: 54px 0;
}

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

.section-head h2,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  color: #111827;
  letter-spacing: -0.03em;
}

.section-head h2 {
  font-size: clamp(26px, 4vw, 38px);
}

.section-head p,
.page-hero p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

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

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

.movie-card {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(253, 230, 138, 0.78);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(146, 64, 14, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: #f59e0b;
  box-shadow: 0 18px 40px rgba(146, 64, 14, 0.18);
}

.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #fef3c7;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card:hover .card-media img,
.category-tile:hover img,
.mini-card:hover img,
.category-panel:hover img {
  transform: scale(1.08);
}

.duration-pill,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.72);
}

.duration-pill {
  right: 10px;
  bottom: 10px;
  padding: 5px 8px;
}

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #eab308, #e11d48);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 17px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s ease;
}

.movie-card:hover .card-body h3 {
  color: #b45309;
}

.card-body p {
  margin: 0 0 12px;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.7;
  min-height: 48px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.card-meta {
  align-items: center;
  justify-content: space-between;
  color: #6b7280;
  font-size: 12px;
}

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

.tag-row {
  margin-top: 12px;
}

.tag-row span,
.detail-tags span {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  color: #92400e;
  background: #fef3c7;
  font-size: 12px;
  font-weight: 700;
}

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

.mini-card {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid #fde68a;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(146, 64, 14, 0.08);
}

.mini-card img {
  width: 104px;
  height: 70px;
  border-radius: 12px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.mini-card span {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.mini-card strong {
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-card em {
  color: #6b7280;
  font-size: 13px;
  font-style: normal;
}

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

.category-tile,
.category-panel {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  min-height: 180px;
  color: #ffffff;
  box-shadow: var(--shadow);
  background: #92400e;
}

.category-tile img,
.category-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  transition: transform 0.4s ease;
}

.category-tile::after,
.category-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.72));
}

.category-tile span,
.category-copy {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 2;
  display: grid;
  gap: 8px;
}

.category-tile strong,
.category-copy h2 {
  margin: 0;
  font-size: 23px;
}

.category-tile em,
.category-copy p {
  color: #f3f4f6;
  font-style: normal;
  line-height: 1.6;
  font-size: 14px;
}

.category-panels {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-bottom: 30px;
}

.category-panel {
  min-height: 250px;
}

.category-covers {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.category-covers img {
  min-width: 0;
  opacity: 0.62;
}

.category-copy span {
  display: inline-flex;
  color: #fbbf24;
  font-weight: 900;
}

.page-hero {
  margin-bottom: 28px;
  padding: clamp(28px, 5vw, 52px);
  border: 1px solid #fde68a;
  border-radius: 28px;
  background: linear-gradient(135deg, #fff7ed, #ffffff 45%, #fef3c7);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  font-size: clamp(34px, 5vw, 54px);
}

.small-hero,
.category-hero,
.ranking-hero {
  overflow: hidden;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  color: #6b7280;
  font-size: 14px;
}

.breadcrumb a {
  color: #b45309;
  font-weight: 800;
}

.inline-filter {
  margin-top: 24px;
  max-width: 760px;
}

.inline-filter select {
  max-width: 180px;
}

.category-list {
  padding-bottom: 30px;
}

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

.detail-main {
  display: grid;
  gap: 22px;
}

.player-card,
.detail-copy,
.poster-card,
.related-card {
  border: 1px solid rgba(253, 230, 138, 0.85);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.player-card {
  overflow: hidden;
  background: #111827;
}

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

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

.player-start {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: rgba(0, 0, 0, 0.46);
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-start span {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: #d97706;
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.28);
  font-size: 38px;
  transform: translateX(3px);
}

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

.detail-copy {
  padding: clamp(22px, 4vw, 34px);
}

.detail-copy h1 {
  margin-bottom: 18px;
  font-size: clamp(30px, 5vw, 46px);
}

.detail-metas span {
  color: #78350f;
  background: #fef3c7;
}

.lead-text {
  padding: 18px 20px;
  border-left: 4px solid #d97706;
  border-radius: 14px;
  color: #78350f;
  background: #fffbeb;
  font-weight: 700;
}

.detail-copy h2 {
  margin: 28px 0 10px;
  color: #111827;
  font-size: 24px;
}

.detail-copy p {
  color: #4b5563;
  line-height: 2;
}

.detail-tags {
  margin-top: 20px;
}

.genre-tags span {
  color: #be123c;
  background: #ffe4e6;
}

.detail-side {
  display: grid;
  gap: 20px;
  position: sticky;
  top: 96px;
}

.poster-card,
.related-card {
  padding: 18px;
}

.poster-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 16px;
}

.related-card h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

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

.site-footer {
  margin-top: 64px;
  border-top: 1px solid #fde68a;
  background: linear-gradient(180deg, #fffbeb, #fef3c7);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

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

.footer-brand p {
  margin: 6px 0 0;
  color: #6b7280;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid #fde68a;
  color: #6b7280;
  text-align: center;
  font-size: 14px;
}

.search-results:empty::before {
  content: "请输入关键词搜索影片";
  grid-column: 1 / -1;
  padding: 34px;
  border-radius: 20px;
  color: #6b7280;
  background: #ffffff;
  text-align: center;
}

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero-carousel {
    height: 520px;
  }

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

  .category-panels,
  .detail-layout,
  .update-list {
    grid-template-columns: 1fr;
  }

  .detail-side {
    position: static;
  }
}

@media (max-width: 640px) {
  .site-nav,
  .page-wrap,
  .mobile-panel,
  .footer-inner,
  .footer-bottom,
  .hero-content,
  .search-hero {
    width: min(100% - 24px, 1180px);
  }

  .hero-carousel {
    height: 560px;
  }

  .hero-content h1 {
    font-size: 36px;
  }

  .hero-content p {
    font-size: 15px;
  }

  .hero-control {
    display: none;
  }

  .search-form,
  .inline-filter,
  .footer-inner {
    flex-direction: column;
  }

  .inline-filter select {
    max-width: none;
  }

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

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

  .card-body p {
    min-height: auto;
  }
}
