:root {
  color-scheme: light;
  --bg: #f7f5ef;
  --card: #ffffff;
  --text: #1c1917;
  --muted: #6b635c;
  --line: #e7e1d8;
  --green: #168044;
  --green-dark: #0f6735;
  --amber: #b7791f;
  --amber-soft: #f8e6bc;
  --stone: #292524;
  --shadow: 0 18px 45px rgba(41, 37, 36, 0.14);
  --soft-shadow: 0 10px 25px rgba(41, 37, 36, 0.10);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 20px rgba(41, 37, 36, 0.06);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  font-weight: 800;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--green-dark));
  box-shadow: 0 10px 20px rgba(22, 128, 68, 0.25);
  transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.05) rotate(-3deg);
}

.brand-text {
  font-size: 22px;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #9a5f13, var(--green-dark));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-link {
  color: #514940;
  border-radius: 12px;
  transition: all 0.2s ease;
}

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

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--green-dark);
  background: #ecfdf3;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: #f4f1ea;
  border: 1px solid #e4ddd1;
}

.header-search input {
  width: 150px;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 8px 10px;
}

.header-search button,
.large-search button,
.btn-primary {
  border: 0;
  color: #fff;
  background: linear-gradient(90deg, var(--green), var(--green-dark));
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(22, 128, 68, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 24px;
  font-weight: 750;
}

.header-search button:hover,
.large-search button:hover,
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(22, 128, 68, 0.28);
}

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

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: #514940;
}

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

.mobile-nav.open {
  display: grid;
  gap: 6px;
}

.mobile-link {
  display: block;
  padding: 10px 12px;
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: #111;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #1c1917, #14532d);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.12));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 70vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 1180px;
}

.hero-content h1 {
  max-width: 720px;
  margin: 16px 0;
  color: #fff;
  font-size: clamp(42px, 6vw, 74px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 690px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 2vw, 21px);
}

.hero-labels,
.hero-tags,
.tag-row,
.card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-labels span,
.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  white-space: nowrap;
}

.hero-labels span {
  padding: 6px 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.hero-labels span:first-child {
  background: var(--green);
}

.tag {
  padding: 4px 10px;
  color: #31533c;
  background: #eaf8ef;
  font-size: 13px;
}

.hero-tags .tag {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

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

.btn-glass {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 24px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(12px);
  font-weight: 750;
}

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

.hero-dots button {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: all 0.2s ease;
}

.hero-dots button.active {
  width: 34px;
  background: #fff;
}

.search-hero {
  width: min(1180px, calc(100% - 32px));
  margin: -54px auto 0;
  position: relative;
  z-index: 6;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 440px);
  gap: 22px;
  align-items: center;
  padding: 26px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.68);
}

.search-hero h2,
.section-head h2,
.page-hero h1,
.story-card h2 {
  margin: 0;
  color: var(--text);
  line-height: 1.2;
}

.search-hero h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.search-hero p,
.section-head p,
.page-hero p,
.footer-inner p {
  margin: 8px 0 0;
  color: var(--muted);
}

.large-search {
  display: flex;
  gap: 8px;
  padding: 6px;
  background: #f4f1ea;
  border: 1px solid #e4ddd1;
  border-radius: 999px;
}

.large-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 12px 16px;
}

.large-search button {
  padding: 12px 20px;
}

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

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

.content-section {
  margin-bottom: 58px;
}

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

.section-head h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.section-more {
  color: var(--green);
  font-weight: 750;
}

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

.movie-card {
  min-width: 0;
}

.card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--soft-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #1c1917, #14532d);
}

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

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

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

.card-body {
  display: block;
  padding: 14px;
}

.card-meta {
  margin-bottom: 8px;
  color: var(--amber);
  font-size: 12px;
  font-weight: 700;
}

.card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 3.2em;
  overflow: hidden;
  font-size: 16px;
  line-height: 1.55;
}

.card-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 3.2em;
  overflow: hidden;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

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

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

.category-tile,
.category-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 132px;
  padding: 20px;
  border-radius: 20px;
  background: linear-gradient(135deg, #fff, #f8f1e3);
  border: 1px solid #eadfce;
  box-shadow: var(--soft-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-tile span,
.category-name {
  color: var(--green-dark);
  font-weight: 850;
  font-size: 20px;
}

.category-tile strong,
.category-card strong {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.category-card em {
  margin-top: 18px;
  color: var(--amber);
  font-style: normal;
  font-size: 13px;
}

.page-hero {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: center;
  margin-bottom: 30px;
  padding: 34px;
  border-radius: 28px;
  background: radial-gradient(circle at 20% 0%, #fff7db, transparent 34%), linear-gradient(135deg, #fff, #edf8f0);
  border: 1px solid #eadfce;
  box-shadow: var(--soft-shadow);
}

.page-hero h1 {
  font-size: clamp(32px, 4vw, 48px);
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 5px 11px;
  border-radius: 999px;
  background: #eaf8ef;
  color: var(--green-dark);
  font-weight: 750;
}

.filter-panel {
  margin-bottom: 28px;
  padding: 18px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--soft-shadow);
}

.filter-title {
  margin-bottom: 12px;
  font-weight: 800;
  color: var(--text);
}

.filter-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px 170px;
  gap: 12px;
}

.filter-controls input,
.filter-controls select {
  width: 100%;
  border: 1px solid #ddd4c7;
  border-radius: 14px;
  outline: 0;
  background: #fbfaf7;
  padding: 12px 14px;
}

.empty-state {
  padding: 32px;
  text-align: center;
  color: var(--muted);
  background: #fff;
  border-radius: 18px;
  border: 1px dashed #d8cfc2;
}

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

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

.wide-card .card-link {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
}

.wide-card .poster-frame {
  aspect-ratio: 3 / 4;
}

.wide-card .card-title {
  font-size: 18px;
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 9px;
  border-radius: 999px;
  color: #fff;
  font-weight: 850;
  background: linear-gradient(135deg, var(--amber), var(--green));
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.detail-page {
  background: var(--bg);
}

.detail-hero {
  position: relative;
  min-height: 74vh;
  overflow: hidden;
  background: #111;
}

.detail-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(2px) saturate(1.08);
  transform: scale(1.03);
  background: linear-gradient(135deg, #1c1917, #14532d);
}

.detail-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.56), rgba(0, 0, 0, 0.2));
}

.detail-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 72px;
}

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

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

.detail-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  margin-top: 42px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: linear-gradient(135deg, #1c1917, #14532d);
}

.detail-info h1 {
  margin: 18px 0 14px;
  color: #fff;
  font-size: clamp(40px, 6vw, 74px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.detail-one-line {
  max-width: 760px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 20px;
}

.detail-content {
  margin-top: -64px;
  position: relative;
  z-index: 4;
}

.player-card,
.story-card {
  overflow: hidden;
  margin-bottom: 30px;
  border-radius: 26px;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
}

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

.video-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.46));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay span {
  width: 88px;
  height: 88px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  font-size: 34px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

.play-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.story-card {
  padding: 30px;
}

.story-card h2 {
  margin-top: 0;
  font-size: 26px;
}

.story-card p {
  color: #4d463f;
  font-size: 17px;
}

.meta-table {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 26px 0 0;
}

.meta-table div {
  padding: 14px;
  border-radius: 16px;
  background: #f7f4ee;
}

.meta-table dt {
  color: var(--muted);
  font-size: 13px;
}

.meta-table dd {
  margin: 4px 0 0;
  font-weight: 800;
}

.site-footer {
  background: linear-gradient(90deg, #1c1917, #292524);
  color: #d6d3d1;
  padding: 42px 0 22px;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
}

.footer-inner h2,
.footer-inner h3 {
  margin: 0 0 12px;
  color: #fff;
}

.footer-links div {
  display: grid;
  gap: 8px;
}

.footer-links a:hover {
  color: #86efac;
}

.footer-copy {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #a8a29e;
  text-align: center;
  font-size: 13px;
}

[hidden] {
  display: none !important;
}

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

  .menu-toggle {
    display: inline-block;
  }

  .header-search {
    margin-left: auto;
  }

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

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

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

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

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .header-search {
    display: none;
  }

  .hero,
  .hero-content {
    min-height: 72vh;
  }

  .hero-content {
    justify-content: flex-end;
    padding-bottom: 90px;
  }

  .hero-overlay {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.28));
  }

  .search-hero,
  .page-hero,
  .detail-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .search-hero,
  .page-hero {
    padding: 22px;
  }

  .large-search {
    border-radius: 18px;
    flex-direction: column;
  }

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

  .category-grid,
  .category-overview-grid,
  .rank-list,
  .full-rank,
  .filter-controls,
  .meta-table {
    grid-template-columns: 1fr;
  }

  .wide-card .card-link {
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .wide-card .card-title {
    font-size: 16px;
  }

  .detail-grid {
    gap: 24px;
  }

  .detail-poster {
    width: min(260px, 72vw);
  }

  .detail-info h1 {
    font-size: 40px;
  }

  .detail-one-line {
    font-size: 17px;
  }

  .story-card {
    padding: 22px;
  }

  .play-overlay span {
    width: 70px;
    height: 70px;
    font-size: 28px;
  }
}

@media (max-width: 430px) {
  .main-shell,
  .header-inner,
  .mobile-nav,
  .search-hero,
  .hero-content,
  .detail-inner,
  .footer-inner,
  .footer-copy {
    width: min(100% - 22px, 1180px);
  }

  .card-body {
    padding: 12px;
  }

  .card-title {
    font-size: 15px;
  }
}
