:root {
  --bg: #fbf7ef;
  --paper: #ffffff;
  --ink: #1c1917;
  --muted: #78716c;
  --line: rgba(120, 113, 108, 0.18);
  --amber: #b45309;
  --amber-soft: #fef3c7;
  --green: #166534;
  --green-soft: #dcfce7;
  --shadow: 0 24px 70px rgba(28, 25, 23, 0.14);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, rgba(245, 158, 11, 0.14), transparent 34%),
    radial-gradient(circle at 90% 10%, rgba(22, 101, 52, 0.13), transparent 30%),
    linear-gradient(180deg, #fff7ed 0%, var(--bg) 42%, #f5f5f4 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(180, 83, 9, 0.18);
  background: rgba(255, 251, 235, 0.84);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 40px rgba(120, 53, 15, 0.08);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  color: #78350f;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--green));
  box-shadow: 0 14px 36px rgba(120, 53, 15, 0.25);
}

.brand-text {
  font-size: clamp(18px, 2vw, 25px);
  background: linear-gradient(90deg, #92400e, #166534);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

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

.main-nav a {
  position: relative;
  color: #44403c;
  font-weight: 700;
  padding: 26px 0;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 20px;
  height: 3px;
  border-radius: 99px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: #92400e;
}

.main-nav a:hover::after,
.main-nav a.active::after {
  transform: scaleX(1);
}

.header-search,
.inline-search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(180, 83, 9, 0.22);
  background: rgba(255, 255, 255, 0.76);
  padding: 6px;
  border-radius: 999px;
}

.header-search input,
.inline-search input,
.filter-row input,
.filter-row select {
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.header-search input {
  width: 190px;
  padding: 9px 8px 9px 14px;
}

.header-search button,
.inline-search button,
.primary-btn,
.ghost-btn,
.card-link,
.panel-link {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.inline-search button,
.primary-btn,
.card-link,
.panel-link {
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--green));
  box-shadow: 0 12px 28px rgba(120, 53, 15, 0.2);
}

.header-search button {
  padding: 9px 16px;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: #78350f;
  background: transparent;
  font-size: 28px;
}

.hero {
  position: relative;
  overflow: hidden;
}

.hero-slider {
  position: relative;
  min-height: clamp(620px, 82vh, 860px);
  background: #1c1917;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(28, 25, 23, 0.94) 0%, rgba(28, 25, 23, 0.78) 38%, rgba(28, 25, 23, 0.22) 100%),
    radial-gradient(circle at 18% 38%, rgba(245, 158, 11, 0.36), transparent 32%);
}

.hero-content {
  position: absolute;
  left: max(5vw, calc((100vw - 1240px) / 2));
  top: 52%;
  transform: translateY(-50%);
  width: min(720px, calc(100% - 48px));
  color: #fff7ed;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: #f59e0b;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 14px;
  max-width: 820px;
  font-size: clamp(38px, 6vw, 74px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero h2 {
  margin: 0 0 12px;
  font-size: clamp(26px, 3.2vw, 42px);
  color: #fde68a;
}

.hero p {
  max-width: 680px;
  margin: 0 0 22px;
  color: rgba(255, 247, 237, 0.84);
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags span,
.tag-list span,
.detail-meta span,
.card-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span {
  color: #fff7ed;
  border: 1px solid rgba(253, 230, 138, 0.35);
  background: rgba(120, 53, 15, 0.34);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.primary-btn,
.ghost-btn,
.panel-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
}

.ghost-btn {
  color: #fff7ed;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
}

.primary-btn:hover,
.ghost-btn:hover,
.card-link:hover,
.panel-link:hover,
.header-search button:hover,
.inline-search button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(120, 53, 15, 0.25);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(28, 25, 23, 0.38);
  cursor: pointer;
  font-size: 38px;
  line-height: 1;
  transform: translateY(-50%);
}

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

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

.section-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 44px auto 0;
}

.quick-search {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-top: -56px;
  position: relative;
  z-index: 8;
  border: 1px solid rgba(180, 83, 9, 0.14);
  border-radius: var(--radius);
  padding: 26px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.quick-search h2,
.section-head h2,
.hot-panel h2,
.page-hero h1,
.detail-info h1,
.text-section h2 {
  margin: 0;
}

.inline-search {
  min-width: min(480px, 100%);
}

.inline-search input {
  flex: 1;
  padding: 13px 14px;
}

.inline-search button {
  padding: 13px 22px;
}

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

.section-head h2,
.hot-panel h2,
.page-hero h1,
.text-section h2 {
  font-size: clamp(26px, 3vw, 42px);
  letter-spacing: -0.03em;
}

.section-head a,
.text-section a {
  color: #92400e;
  font-weight: 900;
}

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

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  border-radius: 26px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff7ed;
  box-shadow: 0 18px 52px rgba(28, 25, 23, 0.15);
  isolation: isolate;
}

.category-card img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(28, 25, 23, 0.15), rgba(28, 25, 23, 0.86));
}

.category-card:hover img {
  transform: scale(1.08);
}

.category-card span {
  font-size: 22px;
  font-weight: 900;
}

.category-card p {
  margin: 8px 0 0;
  color: rgba(255, 247, 237, 0.82);
  line-height: 1.7;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(120, 113, 108, 0.14);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 46px rgba(28, 25, 23, 0.09);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(180, 83, 9, 0.28);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #fef3c7, #dcfce7);
}

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

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

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  border-radius: 999px;
  padding: 7px 11px;
  color: #fff7ed;
  background: rgba(120, 53, 15, 0.8);
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(12px);
}

.card-body {
  padding: 18px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}

.card-meta span {
  color: #166534;
  background: var(--green-soft);
}

.movie-card h3 {
  margin: 0 0 10px;
  color: #292524;
  font-size: 20px;
  line-height: 1.35;
}

.movie-card p {
  min-height: 64px;
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-list span {
  color: #92400e;
  background: var(--amber-soft);
}

.card-link {
  display: inline-flex;
  margin-top: 14px;
  padding: 10px 15px;
  font-size: 13px;
}

.hot-panel {
  position: sticky;
  top: 98px;
  border: 1px solid rgba(180, 83, 9, 0.16);
  border-radius: var(--radius);
  padding: 24px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
}

.rank-list {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.rank-item {
  display: grid;
  grid-template-columns: auto 58px 1fr;
  gap: 12px;
  align-items: center;
  border-radius: 18px;
  padding: 10px;
  background: rgba(254, 243, 199, 0.48);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  background: rgba(220, 252, 231, 0.9);
}

.small-rank {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--green));
  font-size: 12px;
  font-weight: 900;
}

.rank-item img {
  width: 58px;
  height: 78px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-text {
  min-width: 0;
}

.rank-text strong,
.rank-text em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-text em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.panel-link {
  width: 100%;
}

.page-hero,
.detail-hero {
  width: min(1240px, calc(100% - 32px));
  margin: 34px auto 0;
  border: 1px solid rgba(180, 83, 9, 0.16);
  border-radius: 34px;
  padding: clamp(30px, 5vw, 64px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(254, 243, 199, 0.72)),
    radial-gradient(circle at 85% 20%, rgba(22, 101, 52, 0.16), transparent 35%);
  box-shadow: var(--shadow);
}

.page-hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.filter-panel {
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(180, 83, 9, 0.14);
}

.filter-row {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 14px;
}

.filter-row input,
.filter-row select {
  width: 100%;
  border: 1px solid rgba(120, 113, 108, 0.2);
  border-radius: 18px;
  padding: 13px 14px;
  background: #ffffff;
}

.empty-state {
  display: none;
  margin: 28px 0 0;
  border-radius: 22px;
  padding: 22px;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.8);
}

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

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
  color: #92400e;
  font-weight: 800;
}

.detail-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: clamp(24px, 5vw, 54px);
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(28, 25, 23, 0.2);
}

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

.detail-info h1 {
  font-size: clamp(38px, 5vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.lead {
  margin: 18px 0;
  color: #57534e;
  font-size: 20px;
  line-height: 1.8;
}

.detail-meta span {
  color: #166534;
  background: var(--green-soft);
}

.detail-tags {
  margin: 16px 0 24px;
}

.player-section {
  scroll-margin-top: 96px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  background: #0c0a09;
  box-shadow: 0 30px 80px rgba(28, 25, 23, 0.24);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(120, 53, 15, 0.12), rgba(12, 10, 9, 0.42));
  cursor: pointer;
}

.play-overlay span {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  padding-left: 6px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--green));
  font-size: 38px;
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.32);
}

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

.text-section {
  border-radius: 30px;
  padding: clamp(26px, 4vw, 46px);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 52px rgba(28, 25, 23, 0.08);
}

.text-section h2 + p {
  margin-top: 12px;
}

.text-section p {
  color: #57534e;
  font-size: 18px;
  line-height: 2;
}

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

.site-footer {
  margin-top: 70px;
  border-top: 1px solid rgba(180, 83, 9, 0.15);
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.6), rgba(231, 229, 228, 0.88));
}

.footer-grid {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 32px;
}

.footer-grid h3 {
  margin: 0 0 14px;
  color: #292524;
}

.footer-grid p,
.footer-grid a {
  color: #57534e;
  line-height: 1.8;
}

.footer-grid a {
  display: block;
  margin: 8px 0;
}

.footer-bottom {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 34px;
  color: #78716c;
  font-size: 14px;
}

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

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

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

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

  .hot-panel {
    position: static;
  }
}

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

  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 78px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-radius: 24px;
    padding: 12px;
    background: rgba(255, 251, 235, 0.96);
    box-shadow: var(--shadow);
  }

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

  .main-nav a {
    padding: 13px 14px;
  }

  .main-nav a::after {
    display: none;
  }

  .hero-slider {
    min-height: 720px;
  }

  .hero-content {
    left: 24px;
    top: 56%;
  }

  .hero-control {
    display: none;
  }

  .quick-search,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .inline-search {
    min-width: 0;
    width: 100%;
  }

  .category-grid,
  .category-grid.large,
  .movie-grid,
  .feature-grid,
  .library-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .detail-poster {
    max-width: 320px;
  }

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

@media (max-width: 560px) {
  .section-shell,
  .page-hero,
  .detail-hero,
  .header-inner,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 22px, 1240px);
  }

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

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

  .hero-slider {
    min-height: 670px;
  }

  .hero-content {
    width: calc(100% - 32px);
    left: 16px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-btn,
  .ghost-btn {
    width: 100%;
  }

  .category-grid,
  .category-grid.large,
  .movie-grid,
  .feature-grid,
  .library-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

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

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