:root {
  color-scheme: light;
  --tea-50: #fdf8f3;
  --tea-100: #fbeee0;
  --tea-200: #f7dbbf;
  --tea-400: #eca368;
  --tea-600: #d9703c;
  --tea-700: #bd5c2e;
  --warm-50: #faf5f0;
  --warm-100: #f5ebe0;
  --warm-200: #ead8c6;
  --warm-500: #a86d44;
  --warm-600: #8f5d3a;
  --warm-700: #714834;
  --warm-800: #5d3d2d;
  --warm-900: #3b241b;
  --paper: #fffaf5;
  --white: #ffffff;
  --ink: #2f1d15;
  --muted: #7b6254;
  --line: rgba(113, 72, 52, 0.14);
  --shadow: 0 18px 55px rgba(61, 38, 27, 0.11);
  --shadow-soft: 0 8px 28px rgba(61, 38, 27, 0.08);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --container: min(1180px, calc(100vw - 32px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(217, 112, 60, 0.13), transparent 32vw),
    linear-gradient(180deg, var(--tea-50), var(--warm-50) 52%, #fffaf6);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.7;
}

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: rgba(255, 250, 245, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: var(--container);
  height: 70px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  font-weight: 800;
  color: var(--warm-900);
  letter-spacing: 0.02em;
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--tea-600), var(--warm-600));
  box-shadow: 0 10px 24px rgba(217, 112, 60, 0.25);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--warm-700);
  font-weight: 650;
}

.nav-links a {
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--tea-700);
  border-color: var(--tea-600);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 280px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
}

.header-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  padding: 8px 12px;
}

.header-search button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, var(--tea-600), var(--warm-600));
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 750;
  box-shadow: 0 14px 26px rgba(217, 112, 60, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button {
  padding: 8px 14px;
}

.btn:hover,
.header-search button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(217, 112, 60, 0.28);
}

.btn.secondary {
  color: var(--warm-800);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(217, 112, 60, 0.22);
  box-shadow: var(--shadow-soft);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  color: var(--warm-800);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.mobile-panel {
  display: none;
  width: var(--container);
  margin: 0 auto 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
}

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

.mobile-panel a {
  display: block;
  padding: 12px 10px;
  color: var(--warm-700);
  border-bottom: 1px solid var(--line);
  font-weight: 650;
}

.mobile-panel a:last-child {
  border-bottom: 0;
}

main {
  min-height: 70vh;
}

.container {
  width: var(--container);
  margin: 0 auto;
}

.hero {
  position: relative;
  width: var(--container);
  min-height: 620px;
  margin: 34px auto 56px;
  overflow: hidden;
  border-radius: 34px;
  color: #fff;
  background: var(--warm-900);
  box-shadow: var(--shadow);
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  filter: saturate(0.92) brightness(0.72);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(35, 20, 14, 0.92), rgba(35, 20, 14, 0.52) 48%, rgba(35, 20, 14, 0.12)),
    linear-gradient(0deg, rgba(35, 20, 14, 0.72), transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
  padding: 90px 70px 80px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ffe7d5;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 14px;
  font-weight: 750;
  backdrop-filter: blur(10px);
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 18px 0 14px;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 0 0 26px;
  color: rgba(255, 247, 238, 0.9);
  font-size: 18px;
  line-height: 1.85;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 28px;
}

.chip,
.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--warm-700);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(217, 112, 60, 0.18);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
}

.hero .chip {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
}

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

.hero-control {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 46px;
  height: 46px;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

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

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

.hero-dots {
  position: absolute;
  z-index: 3;
  left: 70px;
  bottom: 36px;
  display: flex;
  gap: 10px;
}

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

.hero-dot.active {
  background: #fff;
}

.hero-side {
  position: absolute;
  z-index: 3;
  right: 38px;
  bottom: 38px;
  display: grid;
  width: 345px;
  gap: 12px;
}

.hero-mini {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  padding: 10px;
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  backdrop-filter: blur(12px);
}

.hero-mini img {
  width: 76px;
  height: 54px;
  object-fit: cover;
  border-radius: 12px;
}

.hero-mini strong {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-mini span {
  display: block;
  color: rgba(255, 247, 238, 0.78);
  font-size: 13px;
}

.section {
  width: var(--container);
  margin: 0 auto 54px;
}

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

.section-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  color: var(--warm-900);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-desc {
  margin: 8px 0 0;
  color: var(--muted);
  max-width: 720px;
}

.more-link {
  color: var(--tea-700);
  font-weight: 750;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  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(217, 112, 60, 0.3);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(217, 112, 60, 0.22), rgba(113, 72, 52, 0.26));
}

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

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

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  color: #fff;
  background: rgba(35, 20, 14, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 750;
  backdrop-filter: blur(8px);
}

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

.card-body h3 {
  margin: 0 0 8px;
  color: var(--warm-900);
  font-size: 19px;
  line-height: 1.35;
  font-weight: 850;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.card-body p {
  margin: 0;
  min-height: 3.2em;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

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

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

.category-card {
  min-height: 178px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card h3 {
  margin: 0 0 10px;
  color: var(--warm-900);
  font-size: 21px;
  font-weight: 850;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.page-hero {
  width: var(--container);
  margin: 34px auto 36px;
  padding: 54px;
  color: var(--warm-900);
  background:
    radial-gradient(circle at right top, rgba(217, 112, 60, 0.18), transparent 34%),
    rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 32px;
  box-shadow: var(--shadow-soft);
}

.page-hero p {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.filter-panel {
  width: var(--container);
  margin: 0 auto 30px;
  display: grid;
  grid-template-columns: 1fr 180px 180px auto;
  gap: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  color: var(--ink);
  background: #fff;
  padding: 11px 15px;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 56px 150px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
}

.rank-index {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--tea-600), var(--warm-600));
  font-weight: 900;
}

.rank-card img {
  width: 150px;
  height: 86px;
  object-fit: cover;
  border-radius: 16px;
}

.rank-card h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 850;
}

.rank-card p {
  margin: 0;
  color: var(--muted);
}

.detail-layout {
  width: var(--container);
  margin: 34px auto 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 26px;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--tea-700);
  font-weight: 700;
}

.player-card {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

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

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

.play-mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: rgba(35, 20, 14, 0.28);
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-mask span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  padding-left: 4px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--tea-600), var(--warm-600));
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.32);
  font-size: 32px;
}

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

.detail-title {
  padding: 28px;
}

.detail-title h1 {
  color: var(--warm-900);
  font-size: clamp(34px, 5vw, 56px);
}

.detail-title p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.info-panel {
  padding: 26px;
}

.info-panel h2,
.detail-side h2 {
  margin: 0 0 14px;
  color: var(--warm-900);
  font-size: 24px;
  font-weight: 850;
}

.info-panel p {
  margin: 0 0 14px;
  color: var(--muted);
}

.meta-list {
  display: grid;
  gap: 10px;
}

.meta-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  color: var(--muted);
}

.meta-row strong {
  color: var(--warm-800);
}

.side-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
}

.side-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

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

.related-item {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}

.related-item img {
  width: 88px;
  height: 62px;
  object-fit: cover;
  border-radius: 12px;
}

.related-item strong {
  display: block;
  color: var(--warm-900);
  line-height: 1.35;
}

.related-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.site-footer {
  margin-top: 70px;
  padding: 36px 0;
  color: var(--warm-200);
  background: var(--warm-900);
}

.footer-inner {
  width: var(--container);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  color: var(--warm-100);
}

.empty-state {
  display: none;
  padding: 30px;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line);
  border-radius: 22px;
}

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

@media (max-width: 1060px) {
  .header-search {
    display: none;
  }

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

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

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

  .hero-side {
    display: none;
  }
}

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

  .mobile-toggle {
    display: inline-grid;
    place-items: center;
  }

  .header-inner {
    height: 64px;
  }

  .hero {
    min-height: 590px;
    border-radius: 24px;
  }

  .hero-content {
    padding: 78px 28px 94px;
  }

  .hero-control {
    top: auto;
    bottom: 24px;
    transform: none;
  }

  .hero-control.prev {
    left: auto;
    right: 86px;
  }

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

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

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

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

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

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

  .rank-card {
    grid-template-columns: 44px 105px 1fr;
  }

  .rank-card .btn {
    grid-column: 2 / -1;
    justify-self: start;
  }

  .rank-card img {
    width: 105px;
    height: 72px;
  }
}

@media (max-width: 560px) {
  :root {
    --container: min(100vw - 22px, 1180px);
  }

  .logo {
    font-size: 22px;
  }

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

  .page-hero {
    padding: 32px 24px;
    border-radius: 24px;
  }

  .hero h1,
  .page-hero h1,
  .detail-title h1 {
    letter-spacing: -0.02em;
  }

  .detail-title,
  .info-panel {
    padding: 22px;
  }

  .meta-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}
