:root {
  --bg: #fff8eb;
  --bg-soft: #fff2d8;
  --card: #ffffff;
  --ink: #3f2408;
  --muted: #8a5d23;
  --line: rgba(180, 118, 36, 0.22);
  --brand: #d97706;
  --brand-dark: #92400e;
  --brand-soft: #fef3c7;
  --shadow: 0 18px 50px rgba(120, 53, 15, 0.14);
  --shadow-soft: 0 12px 28px rgba(120, 53, 15, 0.1);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(251, 191, 36, 0.24), transparent 34rem),
    linear-gradient(180deg, #fff8ec 0%, #fff6e6 42%, #fffdf7 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "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, 248, 235, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--brand-dark);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 38px;
  padding: 0 0.55rem;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 10px 24px rgba(180, 83, 9, 0.28);
}

.brand-text {
  font-size: 1.25rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-left: 0.6rem;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 700;
  color: #7c4a0d;
  transition: color 0.2s ease, transform 0.2s ease;
}

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

.nav-link:hover {
  transform: translateY(-1px);
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.header-search input,
.mobile-search input,
.filter-form input,
.filter-form select {
  width: 100%;
  border: 1px solid rgba(217, 119, 6, 0.28);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.84);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 230px;
  padding: 0.62rem 1rem;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-form input:focus,
.filter-form select:focus {
  border-color: rgba(217, 119, 6, 0.72);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.15);
}

.header-search button,
.mobile-search button,
.primary-button,
.secondary-button,
.filter-form button,
.play-button {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.header-search button,
.mobile-search button,
.primary-button,
.filter-form button,
.play-button {
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 12px 26px rgba(180, 83, 9, 0.22);
}

.header-search button,
.mobile-search button {
  padding: 0.62rem 1.05rem;
}

.primary-button,
.secondary-button,
.filter-form button,
.play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.76rem 1.35rem;
}

.secondary-button {
  color: var(--brand-dark);
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(217, 119, 6, 0.28);
  box-shadow: none;
}

.primary-button:hover,
.secondary-button:hover,
.header-search button:hover,
.mobile-search button:hover,
.filter-form button:hover,
.play-button:hover {
  transform: translateY(-2px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: var(--brand-dark);
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-soft);
}

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

.mobile-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.site-main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.hero-carousel {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 1.4rem auto 2.2rem;
  overflow: hidden;
  border-radius: 34px;
  background: #2a1605;
  box-shadow: var(--shadow);
}

.hero-stage {
  position: relative;
  min-height: 570px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: stretch;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.75s ease, visibility 0.75s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 38%, rgba(245, 158, 11, 0.28), transparent 18rem),
    linear-gradient(90deg, rgba(43, 23, 5, 0.95) 0%, rgba(58, 29, 6, 0.74) 42%, rgba(92, 48, 11, 0.16) 100%),
    linear-gradient(0deg, rgba(19, 9, 2, 0.62), rgba(19, 9, 2, 0.1));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: center;
  gap: 2rem;
  padding: 4rem;
}

.eyebrow {
  display: inline-flex;
  width: max-content;
  margin-bottom: 1rem;
  padding: 0.35rem 0.8rem;
  border: 1px solid rgba(251, 191, 36, 0.32);
  border-radius: 999px;
  color: #fef3c7;
  background: rgba(120, 53, 15, 0.32);
  font-size: 0.9rem;
  font-weight: 800;
}

.hero-copy h1,
.hero-copy h2 {
  max-width: 780px;
  margin: 0;
  color: #fff8e6;
  font-size: clamp(2.3rem, 6vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.06em;
  font-weight: 950;
}

.hero-subtitle {
  margin: 1rem 0 0;
  color: #fde68a;
  font-size: clamp(1.05rem, 1.8vw, 1.5rem);
  font-weight: 800;
}

.hero-text {
  max-width: 700px;
  margin: 1rem 0 0;
  color: rgba(255, 251, 235, 0.9);
  font-size: 1.06rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.7rem;
}

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.24), rgba(146, 64, 14, 0.45));
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.28);
}

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

.hero-poster span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.1rem;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent);
}

.hero-dots {
  position: absolute;
  z-index: 4;
  left: 4rem;
  bottom: 2rem;
  display: flex;
  gap: 0.55rem;
}

.hero-dot {
  width: 2.1rem;
  height: 0.45rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.hero-dot.is-active {
  background: #fbbf24;
}

.section-block {
  margin-top: 2.6rem;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.section-heading h2,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  color: var(--brand-dark);
  font-size: clamp(1.55rem, 3.5vw, 2.55rem);
  line-height: 1.15;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.section-heading p,
.page-hero p,
.detail-title p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.section-heading a {
  flex-shrink: 0;
  color: var(--brand);
  font-weight: 900;
}

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

.movie-card {
  overflow: hidden;
  min-width: 0;
  border: 1px solid rgba(217, 119, 6, 0.16);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(217, 119, 6, 0.34);
  box-shadow: 0 18px 42px rgba(120, 53, 15, 0.16);
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #fde68a, #fed7aa);
}

.poster-wrap img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.card-score {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  color: #78350f;
  background: rgba(254, 243, 199, 0.93);
  font-size: 0.78rem;
  font-weight: 900;
}

.card-content {
  padding: 0.9rem;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  color: #9a6a2b;
  font-size: 0.78rem;
  font-weight: 800;
}

.card-content h3 {
  display: -webkit-box;
  margin: 0.35rem 0;
  min-height: 3.1em;
  overflow: hidden;
  color: #4b2a06;
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 950;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.card-content p {
  display: -webkit-box;
  min-height: 3.2em;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.36rem;
  margin-top: 0.7rem;
}

.tag-row span,
.detail-chip,
.meta-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.52rem;
  border-radius: 999px;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid rgba(217, 119, 6, 0.18);
  font-size: 0.76rem;
  font-weight: 800;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 1.35rem;
  border: 1px solid rgba(217, 119, 6, 0.18);
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(255, 251, 235, 0.96), rgba(254, 243, 199, 0.82)),
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.2), transparent 12rem);
  box-shadow: var(--shadow-soft);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.category-card h2,
.category-card h3 {
  margin: 0;
  color: var(--brand-dark);
  font-size: 1.35rem;
  font-weight: 950;
}

.category-card p {
  margin: 0.55rem 0 1rem;
  color: var(--muted);
  font-size: 0.94rem;
}

.category-card span {
  color: var(--brand);
  font-weight: 900;
}

.rank-panel {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.2rem;
}

.rank-list,
.detail-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-list li + li {
  margin-top: 0.6rem;
}

.rank-list a {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.82rem 0.95rem;
  border: 1px solid rgba(217, 119, 6, 0.15);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 22px rgba(120, 53, 15, 0.06);
}

.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  font-weight: 950;
}

.rank-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 900;
}

.rank-type {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 2rem;
  padding: clamp(1.7rem, 4vw, 3rem);
  border: 1px solid rgba(217, 119, 6, 0.18);
  border-radius: 30px;
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.22), transparent 18rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(254, 243, 199, 0.84));
  box-shadow: var(--shadow-soft);
}

.filter-panel {
  margin: 1.4rem 0 2rem;
  padding: 1rem;
  border: 1px solid rgba(217, 119, 6, 0.15);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow-soft);
}

.filter-form {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(130px, 0.7fr)) auto;
  gap: 0.75rem;
}

.filter-form input,
.filter-form select {
  min-height: 44px;
  padding: 0.65rem 0.9rem;
}

.filter-empty {
  display: none;
  padding: 1.4rem;
  color: var(--muted);
  text-align: center;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.8);
}

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

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 1.4rem;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #170d05;
  box-shadow: var(--shadow);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    linear-gradient(90deg, rgba(20, 10, 2, 0.7), rgba(20, 10, 2, 0.2)),
    radial-gradient(circle at center, rgba(245, 158, 11, 0.18), transparent 16rem);
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-button {
  gap: 0.55rem;
  min-width: 150px;
  min-height: 52px;
  font-size: 1.02rem;
}

.player-status {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.9rem;
}

.detail-title {
  margin: 1.4rem 0;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.content-card,
.side-card {
  padding: 1.25rem;
  border: 1px solid rgba(217, 119, 6, 0.15);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-soft);
}

.content-card + .content-card,
.side-card + .side-card {
  margin-top: 1rem;
}

.content-card h2,
.side-card h2 {
  margin: 0 0 0.75rem;
  color: var(--brand-dark);
  font-size: 1.35rem;
  font-weight: 950;
}

.content-card p {
  margin: 0;
  color: #5f3b0d;
  white-space: pre-line;
}

.content-card p + p {
  margin-top: 0.9rem;
}

.detail-list li + li {
  border-top: 1px solid rgba(217, 119, 6, 0.12);
}

.detail-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.7rem 0;
}

.detail-list strong {
  display: -webkit-box;
  overflow: hidden;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.detail-list span {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--line);
  background: rgba(255, 248, 235, 0.8);
}

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

.footer-inner p {
  max-width: 650px;
  margin: 0.45rem 0 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 0.65rem 1rem;
  max-width: 420px;
  color: var(--brand-dark);
  font-weight: 800;
}

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

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

  .hero-content,
  .detail-layout,
  .rank-panel {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }
}

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

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

  .hero-stage {
    min-height: 560px;
  }

  .hero-content {
    padding: 2rem;
  }

  .hero-dots {
    left: 2rem;
  }

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

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

  .filter-form input,
  .filter-form button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .header-inner,
  .site-main,
  .hero-carousel,
  .footer-inner,
  .mobile-panel {
    width: min(100% - 22px, 1180px);
  }

  .hero-carousel {
    border-radius: 24px;
  }

  .hero-stage {
    min-height: 540px;
  }

  .hero-content {
    padding: 1.35rem;
  }

  .hero-copy h1,
  .hero-copy h2 {
    font-size: 2.35rem;
  }

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

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

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

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

  .rank-list a {
    grid-template-columns: 42px 1fr;
  }

  .rank-type {
    display: none;
  }

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

  .footer-links {
    justify-content: start;
  }
}
