:root {
  --bg: #fff8ed;
  --paper: rgba(255, 255, 255, 0.88);
  --paper-solid: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --soft: #f8ead5;
  --line: rgba(146, 64, 14, 0.16);
  --brand: #b45309;
  --brand-strong: #7c2d12;
  --brand-light: #fbbf24;
  --brand-soft: rgba(251, 191, 36, 0.16);
  --shadow: 0 18px 45px rgba(124, 45, 18, 0.14);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(251, 191, 36, 0.28), transparent 34rem),
    linear-gradient(180deg, #fff7ed 0%, #ffffff 42%, #fff8ed 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(120, 53, 15, 0.86), rgba(154, 52, 18, 0.86));
  color: #fff7ed;
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(253, 230, 138, 0.22);
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

.site-header.is-scrolled {
  background: linear-gradient(90deg, rgba(120, 53, 15, 0.97), rgba(154, 52, 18, 0.97));
  box-shadow: 0 12px 34px rgba(67, 20, 7, 0.18);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #78350f;
  font-weight: 900;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 10px 22px rgba(0, 0, 0, 0.16);
}

.brand-name {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.06em;
}

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

.nav-link {
  color: rgba(255, 251, 235, 0.86);
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #ffffff;
  transform: translateY(-1px);
}

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

.header-search input,
.mobile-search input {
  width: 100%;
  border: 1px solid rgba(253, 230, 138, 0.34);
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border-radius: 999px;
  padding: 10px 16px;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.header-search input::placeholder,
.mobile-search input::placeholder {
  color: rgba(254, 243, 199, 0.72);
}

.header-search input:focus,
.mobile-search input:focus {
  border-color: rgba(253, 230, 138, 0.8);
  background: rgba(255, 255, 255, 0.25);
}

.header-search button,
.mobile-search button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: #78350f;
  font-weight: 800;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  cursor: pointer;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 21px;
  height: 2px;
  margin: 5px auto;
  border-radius: 10px;
  background: #fff7ed;
}

.mobile-panel {
  display: none;
}

main {
  min-height: 70vh;
}

.hero-section {
  position: relative;
  min-height: 76vh;
  margin-bottom: 26px;
  overflow: hidden;
  background: #431407;
}

.hero-slider,
.hero-slide {
  position: relative;
  min-height: 76vh;
}

.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-image {
  width: 100%;
  height: 100%;
  min-height: 76vh;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.06) contrast(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 40%, rgba(251, 191, 36, 0.16), transparent 24rem),
    linear-gradient(90deg, rgba(67, 20, 7, 0.92) 0%, rgba(67, 20, 7, 0.70) 42%, rgba(67, 20, 7, 0.38) 70%, rgba(67, 20, 7, 0.74) 100%),
    linear-gradient(180deg, rgba(67, 20, 7, 0.42), rgba(67, 20, 7, 0.96));
}

.hero-content {
  position: absolute;
  z-index: 2;
  left: max(24px, calc((100% - 1280px) / 2 + 24px));
  bottom: 13vh;
  width: min(720px, calc(100% - 48px));
  color: #fff7ed;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(253, 230, 138, 0.42);
  border-radius: 999px;
  padding: 7px 13px;
  color: #fde68a;
  background: rgba(120, 53, 15, 0.46);
  backdrop-filter: blur(12px);
  font-weight: 800;
}

.hero-content h1,
.hero-content h2 {
  margin: 18px 0 12px;
  font-size: clamp(2.6rem, 7vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
  text-shadow: 0 14px 34px rgba(0, 0, 0, 0.32);
}

.hero-content h2 + p,
.hero-content h1 + h2 + p {
  max-width: 650px;
}

.hero-content p {
  color: rgba(255, 247, 237, 0.86);
  font-size: clamp(1rem, 2vw, 1.2rem);
}

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

.hero-tags span,
.tag-list span,
.genre-row span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 4px 10px;
  color: #92400e;
  background: #fef3c7;
  font-size: 0.84rem;
  font-weight: 800;
}

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

.primary-btn,
.secondary-btn,
.text-btn,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 0 18px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #78350f;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: 0 16px 30px rgba(245, 158, 11, 0.26);
}

.secondary-btn {
  color: #fff7ed;
  border: 1px solid rgba(253, 230, 138, 0.42);
  background: rgba(255, 255, 255, 0.12);
}

.text-btn {
  color: #fde68a;
  padding-inline: 4px;
}

.primary-btn:hover,
.secondary-btn:hover,
.section-more:hover {
  transform: translateY(-2px);
}

.hero-controls {
  position: absolute;
  z-index: 5;
  right: max(24px, calc((100% - 1280px) / 2 + 24px));
  bottom: 34px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-arrow,
.hero-dots button {
  border: 0;
  cursor: pointer;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #fff7ed;
  background: rgba(120, 53, 15, 0.62);
  backdrop-filter: blur(12px);
  font-size: 2rem;
  line-height: 1;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  background: rgba(254, 243, 199, 0.46);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
  width: 32px;
  background: #fbbf24;
}

.content-section,
.page-hero,
.detail-layout,
.player-section,
.related-section,
.category-directory,
.filter-panel {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.content-section {
  padding: 48px 0;
}

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

.section-heading h2,
.filter-panel h2,
.category-directory h2,
.related-section h2,
.player-section h2,
.detail-text h2 {
  margin: 0;
  color: #1f2937;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1.08;
}

.section-heading p,
.filter-panel p,
.page-hero p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more {
  color: var(--brand-strong);
  background: var(--brand-soft);
}

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 12px 26px rgba(124, 45, 18, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

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

.card-poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #78350f, #f59e0b);
}

.card-poster.small {
  width: 96px;
  min-width: 96px;
  aspect-ratio: 3 / 4;
  border-radius: 16px;
}

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

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

.play-chip,
.type-chip {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  padding: 5px 9px;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 900;
  background: rgba(180, 83, 9, 0.88);
  backdrop-filter: blur(8px);
}

.play-chip {
  right: 10px;
  bottom: 10px;
}

.type-chip {
  top: 10px;
  left: 10px;
}

.card-body {
  padding: 16px;
}

.card-meta {
  color: #b45309;
  font-size: 0.82rem;
  font-weight: 800;
}

.card-body h3 {
  margin: 7px 0;
  color: #111827;
  font-size: 1.06rem;
  line-height: 1.25;
}

.card-body h3 a:hover {
  color: var(--brand);
}

.card-body p {
  margin: 0 0 12px;
  color: var(--muted);
  display: -webkit-box;
  min-height: 3.1em;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.movie-card-horizontal {
  display: flex;
  gap: 16px;
  padding: 12px;
}

.movie-card-horizontal .card-body {
  padding: 4px 0;
}

.movie-card-horizontal .card-body p {
  min-height: 0;
}

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

.category-tile,
.directory-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 140px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 247, 237, 0.84)),
    radial-gradient(circle at top right, rgba(251, 191, 36, 0.22), transparent 10rem);
  box-shadow: 0 12px 26px rgba(124, 45, 18, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-tile span,
.directory-card span {
  color: #b45309;
  font-weight: 900;
}

.category-tile strong,
.directory-card strong {
  color: #111827;
  font-size: 1.45rem;
  line-height: 1.1;
}

.category-tile em,
.directory-card em {
  margin-top: auto;
  color: var(--muted);
  font-style: normal;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
}

.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  color: #ffffff;
  font-size: 1.45rem;
  font-weight: 900;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 12px 26px rgba(180, 83, 9, 0.22);
}

.filter-panel {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  background: var(--paper);
  box-shadow: 0 12px 26px rgba(124, 45, 18, 0.08);
}

.filter-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 14px;
}

.filter-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #92400e;
  font-weight: 900;
}

.filter-grid input,
.filter-grid select {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(146, 64, 14, 0.2);
  border-radius: 14px;
  padding: 0 14px;
  color: #1f2937;
  background: #ffffff;
  outline: none;
}

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

.empty-state {
  display: none;
  border: 1px dashed rgba(146, 64, 14, 0.25);
  border-radius: var(--radius);
  padding: 34px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.68);
}

.page-hero {
  padding: 136px 0 42px;
}

.page-hero h1 {
  max-width: 940px;
  margin: 0;
  color: #111827;
  font-size: clamp(2.4rem, 6vw, 4.7rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 780px;
  font-size: 1.08rem;
}

.category-directory {
  padding: 10px 0 54px;
}

.category-directory h2 {
  margin-bottom: 20px;
}

.directory-card small {
  color: #92400e;
  font-weight: 900;
}

.detail-hero {
  position: relative;
  padding: 128px 0 54px;
  overflow: hidden;
  color: #fff7ed;
  background: #431407;
}

.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  filter: blur(8px) saturate(1.12);
  transform: scale(1.08);
}

.detail-mask {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 22%, rgba(251, 191, 36, 0.22), transparent 24rem),
    linear-gradient(90deg, rgba(67, 20, 7, 0.98), rgba(67, 20, 7, 0.72));
}

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 34px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(253, 230, 138, 0.28);
  border-radius: 28px;
  background: linear-gradient(135deg, #78350f, #f59e0b);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
}

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

.detail-info h1 {
  margin: 12px 0 16px;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.detail-info p {
  max-width: 850px;
  color: rgba(255, 247, 237, 0.86);
  font-size: 1.08rem;
}

.detail-meta {
  color: #fde68a;
  font-weight: 900;
}

.player-section {
  padding: 44px 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #111827;
  box-shadow: 0 24px 70px rgba(17, 24, 39, 0.26);
}

.player-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0f172a;
  cursor: pointer;
}

.player-start {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.15), rgba(17, 24, 39, 0.48));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-start span {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #78350f;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  font-size: 2rem;
  box-shadow: 0 18px 42px rgba(245, 158, 11, 0.28);
}

.player-start strong {
  font-size: 1.2rem;
}

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

.detail-text {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  background: var(--paper-solid);
  box-shadow: 0 12px 26px rgba(124, 45, 18, 0.08);
}

.detail-text h2 {
  margin: 0 0 14px;
  font-size: 2rem;
}

.detail-text p {
  color: #374151;
  font-size: 1.05rem;
}

.related-section {
  padding: 28px 0 58px;
}

.hidden-card {
  display: none !important;
}

.site-footer {
  margin-top: 44px;
  color: rgba(255, 247, 237, 0.86);
  background:
    radial-gradient(circle at 18% 0%, rgba(251, 191, 36, 0.18), transparent 24rem),
    linear-gradient(135deg, #431407, #78350f 52%, #9a3412);
}

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(260px, 1.3fr) minmax(360px, 1fr);
  gap: 36px;
  padding: 46px 0;
}

.footer-brand p {
  max-width: 560px;
  color: rgba(255, 247, 237, 0.74);
}

.footer-logo {
  color: #fff7ed;
}

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

.site-footer h2 {
  margin: 0 0 12px;
  color: #fde68a;
  font-size: 1.05rem;
}

.site-footer ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: rgba(255, 247, 237, 0.78);
}

.site-footer a:hover {
  color: #ffffff;
}

.footer-bottom {
  border-top: 1px solid rgba(253, 230, 138, 0.18);
  padding: 16px;
  text-align: center;
  color: rgba(255, 247, 237, 0.68);
}

.player-section h2 {
  margin-bottom: 16px;
}

@media (max-width: 1160px) {
  .movie-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .mobile-panel {
    position: fixed;
    top: 78px;
    right: 0;
    left: 0;
    display: none;
    padding: 20px;
    background: rgba(120, 53, 15, 0.98);
    border-top: 1px solid rgba(253, 230, 138, 0.22);
  }

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

  .mobile-search {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
  }

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

  .mobile-link {
    display: block;
    border-radius: 14px;
    padding: 13px 14px;
    color: #fff7ed;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.08);
  }

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

  .movie-list,
  .rank-grid,
  .filter-panel,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

  .detail-layout {
    align-items: start;
  }

  .detail-poster {
    width: min(280px, 100%);
  }
}

@media (max-width: 760px) {
  .footer-inner,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .header-inner {
    width: min(100% - 24px, 1280px);
    height: 68px;
  }

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

  .brand-name {
    font-size: 1.05rem;
  }

  .mobile-panel {
    top: 68px;
  }

  .hero-section,
  .hero-slider,
  .hero-slide,
  .hero-image {
    min-height: 82vh;
  }

  .hero-content {
    bottom: 110px;
  }

  .hero-controls {
    right: 20px;
    left: 20px;
    justify-content: space-between;
  }

  .hero-dots {
    order: 2;
  }

  .content-section {
    padding: 34px 0;
  }

  .section-heading {
    display: block;
  }

  .section-more {
    margin-top: 12px;
  }

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

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

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

  .movie-card-horizontal {
    gap: 12px;
  }

  .card-poster.small {
    width: 84px;
    min-width: 84px;
  }

  .detail-hero {
    padding-top: 108px;
  }

  .detail-text {
    padding: 22px;
  }
}

@media (max-width: 430px) {
  .movie-grid {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .rank-number {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 1.05rem;
  }
}
