:root {
  color-scheme: light;
  --bg: #ffffff;
  --soft: #fff7ed;
  --soft-2: #fffbeb;
  --ink: #111827;
  --muted: #6b7280;
  --line: #f3e4d2;
  --amber: #f59e0b;
  --orange: #f97316;
  --deep: #78350f;
  --card: #ffffff;
  --shadow: 0 18px 45px rgba(120, 53, 15, 0.12);
  --shadow-soft: 0 12px 30px rgba(17, 24, 39, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #fffaf0 0%, #ffffff 34%, #fff7ed 100%);
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid rgba(245, 158, 11, 0.18);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 28px rgba(120, 53, 15, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 76px;
}

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

.logo-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 10px 22px rgba(249, 115, 22, 0.26);
}

.logo-text {
  background: linear-gradient(90deg, #d97706, #ea580c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav,
.footer-links,
.mobile-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.desktop-nav a,
.mobile-nav a,
.footer-links a {
  font-weight: 700;
  color: #374151;
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover {
  color: #d97706;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-box {
  position: relative;
}

.search-box input,
.filter-input,
.sort-select {
  width: 250px;
  border: 2px solid #fde68a;
  border-radius: 999px;
  background: #ffffff;
  color: #111827;
  outline: none;
  padding: 11px 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-box input:focus,
.filter-input:focus,
.sort-select:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.search-button,
.primary-button,
.secondary-button,
.hero-button,
.player-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.search-button,
.primary-button,
.hero-button {
  color: #ffffff;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  box-shadow: 0 12px 26px rgba(249, 115, 22, 0.24);
}

.search-button {
  padding: 11px 22px;
}

.primary-button,
.secondary-button,
.hero-button {
  padding: 13px 24px;
}

.secondary-button {
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fcd34d;
}

.search-button:hover,
.primary-button:hover,
.secondary-button:hover,
.hero-button:hover,
.player-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px rgba(249, 115, 22, 0.28);
}

.menu-button {
  display: none;
  border: 0;
  background: transparent;
  color: #92400e;
  font-size: 30px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  padding: 0 0 18px;
}

.mobile-panel.active {
  display: block;
}

.mobile-nav {
  align-items: flex-start;
  flex-direction: column;
  padding: 14px 0;
}

.mobile-panel .header-search {
  width: 100%;
}

.mobile-panel .search-box,
.mobile-panel .search-box input {
  width: 100%;
}

.hero {
  position: relative;
  height: 540px;
  overflow: hidden;
  background: #1f2937;
}

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

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: radial-gradient(circle at 20% 20%, #f59e0b 0%, #111827 52%, #000000 100%);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.54) 48%, rgba(0, 0, 0, 0.1) 100%);
}

.hero-content {
  max-width: 690px;
  color: #ffffff;
}

.hero-kicker,
.section-kicker,
.detail-chip,
.card-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  font-weight: 800;
}

.hero-kicker {
  padding: 7px 14px;
  color: #ffffff;
  background: rgba(245, 158, 11, 0.94);
  margin-bottom: 18px;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 66px);
  line-height: 1.03;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 620px;
  margin: 0 0 28px;
  color: #f3f4f6;
  font-size: 18px;
  line-height: 1.8;
}

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

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

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

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

.hero-side-card {
  position: absolute;
  right: max(28px, calc((100% - 1180px) / 2));
  bottom: 72px;
  width: min(360px, 32vw);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 26px;
  padding: 18px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.2);
}

.hero-side-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.hero-side-card span {
  color: #fde68a;
  font-size: 14px;
  line-height: 1.7;
}

.page-hero {
  padding: 58px 0 36px;
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.24), transparent 36%), linear-gradient(180deg, #fff7ed, #ffffff);
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.12;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #6b7280;
  font-size: 17px;
  line-height: 1.8;
}

.section {
  padding: 58px 0;
}

.section.alt {
  background: linear-gradient(90deg, rgba(255, 247, 237, 0.78), rgba(255, 251, 235, 0.88));
}

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

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

.section-title p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-kicker {
  padding: 6px 13px;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  margin-bottom: 10px;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.16);
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: rgba(245, 158, 11, 0.42);
  box-shadow: var(--shadow);
}

.poster-link,
.poster-frame {
  position: relative;
  display: block;
}

.poster-frame {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #fde68a, #f97316 48%, #111827);
}

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

.movie-card:hover .poster-frame img {
  transform: scale(1.06);
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(245, 158, 11, 0.92);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .play-badge {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

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

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  color: #9a3412;
  font-size: 13px;
  font-weight: 800;
}

.card-chip {
  padding: 5px 9px;
  color: #92400e;
  background: #fffbeb;
}

.movie-card h3 {
  margin: 0 0 8px;
  color: #1f2937;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: #d97706;
}

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

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

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

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

.category-card {
  min-height: 170px;
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 24px;
  padding: 22px;
  background: linear-gradient(135deg, #ffffff, #fff7ed);
  box-shadow: var(--shadow-soft);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.category-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 21px;
}

.category-card p {
  margin: 0 0 16px;
  color: #6b7280;
  line-height: 1.7;
}

.category-card span {
  color: #d97706;
  font-weight: 800;
}

.filter-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 26px;
  border: 1px solid rgba(245, 158, 11, 0.16);
  border-radius: 22px;
  padding: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.filter-input {
  width: min(520px, 100%);
}

.sort-select {
  width: 180px;
  padding-right: 18px;
}

.empty-state {
  display: none;
  border: 1px dashed #fbbf24;
  border-radius: 22px;
  padding: 32px;
  color: #92400e;
  text-align: center;
  background: #fffbeb;
}

.empty-state.active {
  display: block;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 54px 96px 1fr;
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(245, 158, 11, 0.16);
  border-radius: 18px;
  padding: 12px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.ranking-number {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

.ranking-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, #fde68a, #f97316, #111827);
}

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

.ranking-item h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.ranking-item p {
  margin: 0;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.6;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0;
  color: #92400e;
  font-weight: 700;
}

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

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

.detail-main,
.detail-side,
.content-card {
  border: 1px solid rgba(245, 158, 11, 0.16);
  border-radius: 26px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.detail-main {
  overflow: hidden;
}

.video-shell {
  position: relative;
  overflow: hidden;
  background: #000000;
}

.player-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #000000;
}

.player-button {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 82px;
  height: 82px;
  color: #ffffff;
  font-size: 31px;
  background: rgba(245, 158, 11, 0.94);
  transform: translate(-50%, -50%);
  z-index: 4;
}

.video-shell.playing .player-button {
  opacity: 0;
  pointer-events: none;
}

.detail-body {
  padding: 28px;
}

.detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.detail-title-row h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.18;
}

.detail-chip {
  flex-shrink: 0;
  padding: 8px 13px;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
}

.detail-lead {
  margin: 0 0 20px;
  color: #4b5563;
  font-size: 17px;
  line-height: 1.85;
}

.detail-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 0;
  margin: 18px 0 24px;
  border-top: 1px solid #f3e4d2;
  border-bottom: 1px solid #f3e4d2;
}

.detail-stats span {
  border-radius: 14px;
  padding: 9px 12px;
  color: #374151;
  background: #fff7ed;
  font-weight: 800;
}

.content-card {
  margin-top: 18px;
  padding: 22px;
}

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

.content-card p {
  margin: 0;
  color: #374151;
  line-height: 1.9;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 16px;
}

.detail-side {
  position: sticky;
  top: 100px;
  padding: 18px;
}

.detail-side h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

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

.related-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: center;
}

.related-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, #fde68a, #f97316, #111827);
}

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

.related-card strong {
  display: block;
  margin-bottom: 5px;
  line-height: 1.35;
}

.related-card span {
  color: #6b7280;
  font-size: 13px;
}

.prev-next {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.prev-next a {
  flex: 1;
  border: 1px solid #fde68a;
  border-radius: 16px;
  padding: 12px;
  color: #92400e;
  background: #fffbeb;
  font-weight: 800;
}

.prev-next a:last-child {
  text-align: right;
}

.site-footer {
  margin-top: 70px;
  color: #fffbeb;
  background: linear-gradient(90deg, #78350f, #9a3412);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 30px;
  padding: 42px 0;
}

.footer-brand p {
  max-width: 560px;
  margin: 12px 0 0;
  color: #fde68a;
  line-height: 1.8;
}

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

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

.footer-bottom {
  border-top: 1px solid rgba(255, 251, 235, 0.18);
  padding: 18px 0;
  color: #fde68a;
  text-align: center;
}

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

  .menu-button {
    display: inline-flex;
  }

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

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

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

  .detail-side {
    position: static;
  }

  .hero-side-card {
    display: none;
  }
}

@media (max-width: 760px) {
  .header-inner {
    min-height: 68px;
  }

  .logo {
    font-size: 20px;
  }

  .logo-mark {
    width: 38px;
    height: 38px;
  }

  .hero {
    height: 560px;
  }

  .hero-overlay {
    align-items: flex-end;
    padding-bottom: 86px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.56) 58%, rgba(0, 0, 0, 0.18) 100%);
  }

  .hero p {
    font-size: 16px;
  }

  .section-header,
  .filter-panel,
  .footer-inner,
  .detail-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .filter-input,
  .sort-select {
    width: 100%;
  }

  .ranking-item {
    grid-template-columns: 46px 86px 1fr;
  }

  .footer-links {
    align-items: flex-start;
    flex-direction: column;
    justify-content: flex-start;
  }

  .prev-next {
    flex-direction: column;
  }

  .prev-next a:last-child {
    text-align: left;
  }
}

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

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

  .related-card {
    grid-template-columns: 82px 1fr;
  }
}
