:root {
  --bg: #fff8ed;
  --paper: #ffffff;
  --paper-soft: #fffaf2;
  --text: #35210c;
  --muted: #765b3a;
  --line: #f0d7ad;
  --brand: #d97706;
  --brand-dark: #92400e;
  --brand-soft: #fef3c7;
  --shadow: 0 18px 45px rgba(146, 64, 14, 0.14);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #fff7ed 0%, #ffffff 42%, #fff7ed 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 247, 237, 0.94);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(146, 64, 14, 0.08);
  backdrop-filter: blur(18px);
}

.header-inner,
.footer-inner,
.container,
.hero-content,
.hero-dots,
.hero-arrow-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: max-content;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-radius: 14px;
  box-shadow: 0 12px 24px rgba(217, 119, 6, 0.28);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 20px;
  color: var(--brand-dark);
}

.brand-text small {
  margin-top: 3px;
  color: var(--brand);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  justify-content: center;
}

.nav-link {
  padding: 8px 2px;
  color: #7c4a12;
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--brand);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.header-search input,
.mobile-search input,
.search-panel input,
.local-filter input {
  width: 235px;
  border: 1px solid #e7bf80;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  outline: none;
  padding: 10px 16px;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.search-panel input:focus,
.local-filter input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18);
}

.header-search button,
.mobile-search button,
.search-panel button,
.primary-button,
.secondary-button {
  border: 0;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(217, 119, 6, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.search-panel button:hover,
.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(217, 119, 6, 0.28);
}

.secondary-button {
  color: var(--brand-dark);
  background: rgba(255, 255, 255, 0.9);
}

.menu-toggle {
  display: none;
  border: 0;
  background: #fff1d6;
  color: var(--brand-dark);
  border-radius: 12px;
  padding: 9px 12px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  padding: 16px;
}

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

.mobile-panel nav {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.mobile-panel a {
  padding: 10px 12px;
  color: var(--brand-dark);
  border-radius: 12px;
  font-weight: 700;
}

.mobile-panel a:hover {
  background: var(--brand-soft);
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
  background: #1f1307;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 0.9s ease, transform 1.1s ease;
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.14) 0%, rgba(19, 12, 7, 0.62) 48%, rgba(0, 0, 0, 0.92) 100%);
}

.hero-glow {
  position: absolute;
  width: 48vw;
  height: 48vw;
  right: -14vw;
  top: 12vh;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.42), transparent 62%);
  filter: blur(12px);
}

.hero-content {
  position: absolute;
  inset: auto 0 64px 0;
  color: #ffffff;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border-radius: 999px;
  color: #fff7ed;
  background: rgba(245, 158, 11, 0.86);
  font-weight: 800;
  font-size: 14px;
  backdrop-filter: blur(12px);
}

.hero h1,
.hero h2 {
  margin: 20px 0 16px;
  font-size: clamp(40px, 7vw, 78px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 720px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(17px, 2vw, 21px);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.22);
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.38);
  transform: translateY(-1px);
}

.hero-arrow.prev {
  left: max(18px, calc((100vw - 1180px) / 2 - 70px));
}

.hero-arrow.next {
  right: max(18px, calc((100vw - 1180px) / 2 - 70px));
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 26px;
  z-index: 4;
  display: flex;
  gap: 9px;
  transform: translateX(-50%);
  justify-content: center;
}

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

.hero-dot.is-active {
  width: 58px;
  background: #f59e0b;
}

.container {
  padding: 54px 0;
}

.section {
  margin: 0 0 72px;
}

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

.section-heading h2,
.page-title h1 {
  margin: 0;
  color: var(--brand-dark);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
}

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

.section-more {
  color: var(--brand);
  font-weight: 800;
}

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

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

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

.movie-card {
  min-width: 0;
  background: var(--paper);
  border: 1px solid rgba(240, 215, 173, 0.9);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(146, 64, 14, 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(245, 158, 11, 0.58);
  box-shadow: var(--shadow);
}

.movie-card a {
  display: block;
  height: 100%;
}

.poster-frame {
  position: relative;
  aspect-ratio: 3 / 2;
  margin: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #fff2d7, #fef9f1);
}

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

.movie-card:hover .poster-frame img,
.rank-item:hover img,
.related-card:hover img,
.category-card:hover img {
  transform: scale(1.08);
}

.poster-frame figcaption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 5px 10px;
  color: #ffffff;
  background: rgba(217, 119, 6, 0.92);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.card-content {
  padding: 16px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #8a6b43;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.card-content h3 {
  display: -webkit-box;
  min-height: 50px;
  margin: 0 0 8px;
  color: var(--brand-dark);
  font-size: 18px;
  line-height: 1.38;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.card-content p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 12px;
  color: #6b5a45;
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

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

.tag-row span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #a15c05;
  background: #fff4db;
  font-size: 12px;
  font-weight: 700;
}

.movie-card-wide a {
  display: grid;
  grid-template-columns: 190px 1fr;
}

.poster-wide {
  height: 100%;
  aspect-ratio: auto;
}

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

.category-card {
  position: relative;
  min-height: 245px;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadow);
  background: #2c1808;
}

.category-card img {
  width: 100%;
  height: 100%;
  min-height: 245px;
  object-fit: cover;
  opacity: 0.64;
  transition: transform 0.5s ease;
}

.category-card-content {
  position: absolute;
  inset: auto 0 0;
  padding: 24px;
  color: #ffffff;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.82));
}

.category-card h3 {
  margin: 0 0 8px;
  font-size: 24px;
}

.category-card p {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.84);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 68px 140px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 28px rgba(146, 64, 14, 0.07);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  font-weight: 900;
}

.rank-poster {
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #fff4db;
}

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

.rank-main h3 {
  margin: 0 0 7px;
  color: var(--brand-dark);
  font-size: 19px;
}

.rank-main p {
  margin: 0;
  color: #6b5a45;
}

.rank-meta {
  color: var(--brand);
  font-weight: 800;
  white-space: nowrap;
}

.page-hero {
  padding: 64px 0 34px;
  background: radial-gradient(circle at 20% 10%, rgba(245, 158, 11, 0.22), transparent 26%), linear-gradient(135deg, #fff7ed, #ffffff);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
  color: #8a6b43;
  font-size: 14px;
  font-weight: 700;
}

.breadcrumb a:hover {
  color: var(--brand);
}

.local-filter {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 24px;
}

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

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000000;
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.24);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0.58));
  cursor: pointer;
  border: 0;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 18px 40px rgba(217, 119, 6, 0.4);
  font-size: 38px;
}

.detail-panel {
  margin-top: 28px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.detail-panel h1 {
  margin: 10px 0 14px;
  color: var(--brand-dark);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.18;
}

.detail-intro {
  color: #7c4a12;
  font-size: 18px;
  font-weight: 750;
}

.detail-text {
  color: #4b3a27;
  white-space: pre-line;
}

.info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.info-row span {
  padding: 6px 12px;
  border-radius: 999px;
  color: #9a5b06;
  background: #fff2d4;
  font-weight: 800;
  font-size: 13px;
}

.review-box {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid #f2d7a7;
  border-radius: 20px;
  background: linear-gradient(135deg, #fff8eb, #fffdf9);
}

.review-box h2,
.related-aside h2 {
  margin: 0 0 14px;
  color: var(--brand-dark);
}

.related-aside {
  position: sticky;
  top: 96px;
}

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

.related-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(146, 64, 14, 0.07);
}

.related-card figure {
  margin: 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

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

.related-card div {
  padding: 14px;
}

.related-card h3 {
  margin: 0 0 6px;
  color: var(--brand-dark);
  font-size: 16px;
}

.related-card p {
  margin: 0;
  color: #7c6a55;
  font-size: 13px;
}

.search-box {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.search-panel input {
  flex: 1;
  width: auto;
}

.search-summary {
  margin: 18px 0 0;
  color: var(--muted);
}

.empty-state {
  padding: 48px;
  text-align: center;
  color: #7c6a55;
  border: 1px dashed #e7bf80;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
}

.site-footer {
  margin-top: 70px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #fffaf2, #fff0d9);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  padding: 42px 0 24px;
}

.footer-brand p {
  max-width: 560px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  align-content: start;
}

.footer-links a {
  color: var(--brand-dark);
  font-weight: 800;
}

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 32px;
  color: #9a6b32;
  border-top: 1px solid rgba(240, 215, 173, 0.78);
  text-align: center;
  font-size: 14px;
}

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

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

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

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

  .related-aside {
    position: static;
  }
}

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

  .header-inner,
  .footer-inner,
  .container,
  .page-title {
    width: min(100% - 24px, 1180px);
  }

  .hero {
    height: 76vh;
    min-height: 520px;
  }

  .hero-content {
    bottom: 72px;
  }

  .hero-arrow {
    display: none;
  }

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

  .primary-button,
  .secondary-button {
    text-align: center;
  }

  .section-heading,
  .footer-inner {
    align-items: flex-start;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

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

  .movie-card-wide a {
    grid-template-columns: 1fr;
  }

  .poster-wide {
    aspect-ratio: 3 / 2;
  }

  .rank-item {
    grid-template-columns: 48px 96px 1fr;
  }

  .rank-meta {
    grid-column: 2 / -1;
  }

  .detail-panel {
    padding: 20px;
  }

  .search-panel {
    align-items: stretch;
    flex-direction: column;
  }
}
