:root {
  --page-bg: #fff7ed;
  --surface: #ffffff;
  --surface-soft: #fffbeb;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #fde68a;
  --brand: #b45309;
  --brand-dark: #78350f;
  --brand-soft: #f59e0b;
  --shadow: 0 22px 50px rgba(120, 53, 15, 0.14);
  --radius: 24px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #ffffff 0%, var(--page-bg) 48%, #fff 100%);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
}

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--brand-dark);
  font-weight: 900;
  letter-spacing: -0.04em;
  font-size: 1.35rem;
}

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

.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: #4b5563;
  font-weight: 700;
}

.main-nav a,
.mobile-nav a,
.footer-links a {
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.footer-links a:hover {
  color: var(--brand);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: #fff7ed;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: var(--brand-dark);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 10px;
  border-radius: 18px;
  background: #fff7ed;
}

.mobile-nav a {
  display: block;
  padding: 11px 12px;
  border-radius: 12px;
  color: #4b5563;
  font-weight: 700;
}

.mobile-nav a:hover {
  color: var(--brand-dark);
  background: #ffedd5;
}

.hero-carousel {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  background: radial-gradient(circle at 20% 20%, rgba(251, 191, 36, 0.45), transparent 32%), linear-gradient(135deg, #fffbeb, #fed7aa);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.62fr);
  align-items: center;
  gap: 48px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
  padding: 56px 0 74px;
}

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

.hero-bg {
  position: fixed;
  inset: 0;
  opacity: 0.18;
  filter: blur(18px) saturate(1.1);
  transform: scale(1.08);
}

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

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.hero-kicker,
.section-heading span,
.page-hero span,
.category-card-large span {
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 900;
}

.hero-content h1 {
  margin: 16px 0 18px;
  color: var(--brand-dark);
  font-size: clamp(2.35rem, 6vw, 5.5rem);
  line-height: 0.96;
  letter-spacing: -0.08em;
}

.hero-content p {
  max-width: 680px;
  margin: 0;
  color: #4b5563;
  font-size: 1.1rem;
  line-height: 1.9;
}

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

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #92400e;
  background: #ffedd5;
  font-size: 0.78rem;
  font-weight: 800;
}

.hero-tags span,
.detail-tags span {
  padding: 8px 12px;
}

.tag-row span {
  padding: 5px 9px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.primary-btn,
.ghost-btn,
.home-search button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.primary-btn,
.home-search button {
  min-height: 48px;
  padding: 0 24px;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 14px 32px rgba(217, 119, 6, 0.28);
}

.primary-btn:hover,
.home-search button:hover,
.ghost-btn:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.ghost-btn {
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid rgba(180, 83, 9, 0.25);
  color: var(--brand-dark);
  background: rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(10px);
}

.hero-cover {
  position: relative;
  z-index: 2;
  overflow: hidden;
  border: 10px solid rgba(255, 255, 255, 0.62);
  border-radius: 34px;
  box-shadow: var(--shadow);
  aspect-ratio: 3 / 4;
  transform: rotate(2deg);
}

.hero-cover img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hero-cover:hover img {
  transform: scale(1.06);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 10;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: var(--brand-dark);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 14px 30px rgba(120, 53, 15, 0.15);
  backdrop-filter: blur(10px);
  cursor: pointer;
  font-size: 2rem;
  transform: translateY(-50%);
}

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

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

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(146, 64, 14, 0.32);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 28px;
  background: var(--brand);
}

.quick-search-section,
.section-block,
.split-section,
.category-overview,
.detail-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.quick-search-section {
  margin-top: -32px;
  position: relative;
  z-index: 16;
}

.section-inner,
.home-search,
.filter-panel,
.category-tile,
.movie-card,
.ranking-panel,
.category-card-large,
.detail-info-card,
.player-wrap,
.detail-content {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(251, 191, 36, 0.38);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.section-inner {
  border-radius: 28px;
  padding: 18px;
}

.home-search {
  display: flex;
  gap: 12px;
  border-radius: 22px;
  padding: 10px;
}

.home-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  padding: 0 14px;
  color: var(--ink);
  font-size: 1rem;
}

.home-search button {
  border: 0;
  cursor: pointer;
}

.section-block,
.split-section,
.category-overview,
.detail-shell {
  padding: 72px 0 0;
}

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

.section-heading h2,
.page-hero h1,
.category-card-large h2,
.detail-content h1 {
  margin: 6px 0 0;
  color: var(--brand-dark);
  letter-spacing: -0.05em;
}

.section-heading h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.section-heading a,
.text-link {
  color: var(--brand);
  font-weight: 900;
}

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

.category-tile {
  min-height: 154px;
  padding: 24px;
  border-radius: 26px;
  overflow: hidden;
  position: relative;
}

.category-tile::after {
  content: "";
  position: absolute;
  right: -20px;
  bottom: -28px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.24), transparent 64%);
}

.category-tile strong {
  display: block;
  color: var(--brand-dark);
  font-size: 1.28rem;
  margin-bottom: 10px;
}

.category-tile span {
  color: var(--muted);
  line-height: 1.75;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 26px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 60px rgba(120, 53, 15, 0.2);
}

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

.movie-poster img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, filter 0.5s ease;
}

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

.poster-mask {
  position: absolute;
  inset: auto 14px 14px 14px;
  display: grid;
  place-items: center;
  min-height: 40px;
  border-radius: 999px;
  color: #fff;
  background: rgba(120, 53, 15, 0.82);
  font-weight: 900;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .poster-mask {
  opacity: 1;
  transform: translateY(0);
}

.movie-card-body {
  padding: 18px;
}

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 900;
}

.movie-card h3 {
  margin: 10px 0 8px;
  color: var(--brand-dark);
  font-size: 1.12rem;
  line-height: 1.35;
}

.movie-card p {
  min-height: 3.9em;
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 0.93rem;
}

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

.split-left {
  width: 100%;
  padding-top: 0;
}

.ranking-panel {
  position: sticky;
  top: 96px;
  border-radius: 28px;
  padding: 24px;
}

.compact-heading {
  margin-bottom: 14px;
}

.ranking-list {
  display: grid;
  gap: 10px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  color: #4b5563;
  background: #fffbeb;
  transition: background 0.2s ease, transform 0.2s ease;
}

.ranking-row:hover {
  color: var(--brand-dark);
  background: #ffedd5;
  transform: translateX(4px);
}

.ranking-row span,
.rank-badge {
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  font-weight: 900;
}

.ranking-row span {
  width: 30px;
  height: 30px;
  border-radius: 10px;
}

.ranking-row strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ranking-row em {
  color: var(--brand);
  font-style: normal;
  font-weight: 900;
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  min-width: 36px;
  height: 36px;
  border-radius: 12px;
  font-style: normal;
  z-index: 2;
  padding: 0 8px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin: 0 auto;
  width: min(1180px, calc(100% - 32px));
  border-radius: 0 0 38px 38px;
  padding: 72px 34px 58px;
  color: var(--brand-dark);
  background: radial-gradient(circle at 78% 24%, rgba(245, 158, 11, 0.28), transparent 26%), linear-gradient(135deg, #fff7ed, #fed7aa);
}

.page-hero h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
}

.page-hero p {
  max-width: 680px;
  color: #4b5563;
  line-height: 1.85;
  font-size: 1.06rem;
}

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

.category-card-large {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 22px;
  border-radius: 30px;
  padding: 18px;
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  overflow: hidden;
  border-radius: 22px;
}

.category-covers img {
  height: 126px;
  object-fit: cover;
}

.category-card-large h2 {
  font-size: 1.6rem;
}

.category-card-large p {
  color: var(--muted);
  line-height: 1.75;
}

.text-link {
  margin-top: 8px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(150px, 180px));
  gap: 14px;
  border-radius: 28px;
  padding: 16px;
  margin-bottom: 26px;
}

.filter-panel label {
  display: grid;
  gap: 7px;
  color: var(--brand-dark);
  font-size: 0.84rem;
  font-weight: 900;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #fde68a;
  border-radius: 16px;
  outline: none;
  color: var(--ink);
  background: #fff;
  padding: 0 14px;
}

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

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

.empty-state {
  display: none;
  margin-top: 18px;
  padding: 24px;
  border-radius: 22px;
  color: var(--muted);
  background: #fff;
  text-align: center;
  border: 1px solid #fde68a;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  color: var(--muted);
  font-weight: 700;
}

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

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

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #111827;
}

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

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.36));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-start span {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 18px 40px rgba(217, 119, 6, 0.35);
  font-size: 2rem;
  padding-left: 5px;
}

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

.detail-content {
  border-radius: 30px;
  padding: 30px;
  margin-top: 24px;
}

.detail-content h1 {
  font-size: clamp(2rem, 4vw, 3.3rem);
}

.detail-one-line {
  color: #4b5563;
  font-size: 1.12rem;
  line-height: 1.9;
}

.detail-tags {
  margin: 20px 0 28px;
}

.prose-block {
  margin-top: 28px;
  border-top: 1px solid #fde68a;
  padding-top: 24px;
}

.prose-block h2 {
  margin: 0 0 12px;
  color: var(--brand-dark);
  font-size: 1.35rem;
}

.prose-block p {
  margin: 0;
  color: #374151;
  font-size: 1.02rem;
  line-height: 2;
}

.detail-side {
  position: sticky;
  top: 96px;
}

.detail-cover {
  overflow: hidden;
  border-radius: 28px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.detail-info-card {
  border-radius: 28px;
  padding: 22px;
  margin-top: 18px;
}

.detail-info-card h2 {
  margin: 0 0 14px;
  color: var(--brand-dark);
}

.detail-info-card dl {
  margin: 0;
  display: grid;
  gap: 12px;
}

.detail-info-card div {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  color: #4b5563;
}

.detail-info-card dt {
  color: var(--brand);
  font-weight: 900;
}

.detail-info-card dd {
  margin: 0;
}

.related-section {
  padding-bottom: 50px;
}

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

.compact-card .movie-card-body {
  padding: 14px;
}

.compact-card p {
  display: none;
}

.site-footer {
  margin-top: 72px;
  padding: 36px 0;
  border-top: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(255, 251, 235, 0.72);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 18px;
  font-weight: 800;
}

.footer-inner p {
  margin: 0;
}

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

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

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

  .ranking-panel,
  .detail-side {
    position: static;
  }

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

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

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

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

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

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

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 32px;
  }

  .hero-cover {
    width: min(320px, 76vw);
    margin: 0 auto;
    transform: rotate(0);
  }

  .hero-arrow {
    top: auto;
    bottom: 86px;
    transform: none;
  }

  .hero-prev {
    left: 20px;
  }

  .hero-next {
    right: 20px;
  }

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

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

  .category-covers img {
    height: 160px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

  .site-logo {
    font-size: 1.08rem;
  }

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

  .hero-carousel {
    min-height: 760px;
  }

  .hero-content h1 {
    font-size: clamp(2.15rem, 15vw, 3.8rem);
  }

  .hero-content p {
    font-size: 0.98rem;
  }

  .home-search,
  .section-heading,
  .footer-links {
    flex-direction: column;
    align-items: stretch;
  }

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

  .movie-card-body {
    padding: 13px;
  }

  .movie-card p {
    display: none;
  }

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

  .page-hero {
    padding: 52px 22px 42px;
  }

  .detail-shell {
    padding-top: 34px;
  }

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

@media (max-width: 420px) {
  .movie-grid,
  .all-cards,
  .related-grid {
    grid-template-columns: 1fr;
  }
}
