:root {
  --bg: #fff7ed;
  --paper: #ffffff;
  --paper-soft: #fffbeb;
  --text: #111827;
  --muted: #6b7280;
  --line: #fde68a;
  --brand: #d97706;
  --brand-dark: #b45309;
  --brand-soft: #fef3c7;
  --shadow: 0 22px 60px rgba(120, 53, 15, 0.16);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(251, 191, 36, 0.24), transparent 30%),
    linear-gradient(135deg, #f8fafc 0%, #fff7ed 48%, #ffedd5 100%);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(251, 191, 36, 0.26);
  box-shadow: 0 10px 30px rgba(120, 53, 15, 0.08);
}

.nav-shell {
  height: 70px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  color: var(--brand);
  white-space: nowrap;
}

.brand span:last-child,
.footer-brand span:last-child {
  background: linear-gradient(90deg, #d97706, #ea580c);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  box-shadow: 0 10px 22px rgba(217, 119, 6, 0.3);
  font-size: 14px;
}

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

.desktop-nav a,
.nav-dropdown button {
  border: 0;
  background: transparent;
  color: #374151;
  font-weight: 700;
  padding: 10px 0;
  cursor: pointer;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.nav-dropdown:hover button {
  color: var(--brand);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-panel {
  position: absolute;
  left: 0;
  top: 100%;
  width: 180px;
  padding: 10px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
}

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

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.top-search input,
.hero-search input,
.filter-panel input,
.filter-panel select {
  border: 1px solid #fcd34d;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  padding: 12px 16px;
  min-width: 0;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

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

.top-search button,
.hero-search button,
.filter-panel button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  color: #ffffff;
  background: linear-gradient(135deg, #d97706, #ea580c);
  font-weight: 800;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 14px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  width: 44px;
  height: 44px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

.mobile-nav.is-open {
  display: grid;
  gap: 12px;
}

.mobile-nav a {
  padding: 11px 14px;
  border-radius: 12px;
  background: rgba(254, 243, 199, 0.5);
  font-weight: 700;
}

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

.mobile-nav input {
  flex: 1;
  border: 1px solid #fcd34d;
  border-radius: 999px;
  padding: 12px 16px;
}

.mobile-nav button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  color: #ffffff;
  background: var(--brand);
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.8fr);
  gap: 28px;
  padding: 34px 0 20px;
}

.hero-carousel {
  position: relative;
  height: min(600px, 62vw);
  min-height: 500px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease, transform 1.5s ease;
  transform: scale(1.04);
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.36) 55%, rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: absolute;
  left: clamp(24px, 5vw, 52px);
  right: clamp(24px, 5vw, 52px);
  bottom: clamp(30px, 7vw, 72px);
  color: #ffffff;
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fbbf24;
  font-weight: 900;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.eyebrow.dark {
  color: var(--brand);
}

.hero-content h2,
.page-hero h1,
.detail-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(36px, 6vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-meta,
.detail-meta {
  color: #fde68a;
  font-weight: 700;
  margin: 0 0 12px;
}

.hero-desc {
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.75;
  max-width: 660px;
  margin: 0 0 26px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px) scale(1.02);
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #d97706, #ea580c);
  box-shadow: 0 18px 34px rgba(217, 119, 6, 0.28);
}

.btn-soft {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(12px);
}

.hero-control {
  position: absolute;
  bottom: 28px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

.hero-control:hover {
  background: rgba(255, 255, 255, 0.32);
}

.hero-control.prev {
  right: 84px;
}

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

.hero-dots {
  position: absolute;
  left: 52px;
  bottom: 28px;
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  cursor: pointer;
}

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

.hero-side-panel {
  align-self: stretch;
  padding: 34px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  border: 1px solid rgba(251, 191, 36, 0.28);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-side-panel h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-side-panel p,
.page-hero p {
  color: var(--muted);
  line-height: 1.8;
  margin: 0 0 24px;
}

.hero-search {
  display: flex;
  gap: 10px;
  margin: 8px 0 20px;
}

.hero-search input {
  flex: 1;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-links a,
.pill a,
.detail-tags a,
.tag-cloud a,
.footer-tags a {
  display: inline-flex;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  padding: 8px 12px;
  font-weight: 800;
  font-size: 14px;
}

.section {
  padding: 46px 0;
}

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

.section-title-row h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

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

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

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

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(120, 53, 15, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: 1px solid rgba(251, 191, 36, 0.2);
}

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

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #1f2937, #92400e);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), transparent 54%);
}

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

.movie-card-body {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.movie-card-body strong {
  font-size: 17px;
  line-height: 1.35;
}

.movie-meta,
.movie-desc,
.rank-copy em {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  font-style: normal;
}

.movie-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.movie-card-tags em {
  font-style: normal;
  color: var(--brand-dark);
  background: var(--brand-soft);
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

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

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

.compact-list .movie-card {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
}

.compact-list .poster-frame {
  aspect-ratio: 3 / 4;
  height: 100%;
}

.ranking-panel,
.ranking-page-list {
  display: grid;
  gap: 12px;
}

.ranking-item {
  display: grid;
  grid-template-columns: 42px 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(251, 191, 36, 0.2);
  box-shadow: 0 10px 28px rgba(120, 53, 15, 0.08);
}

.ranking-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.rank-number {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: var(--brand);
  font-weight: 900;
}

.rank-poster {
  width: 58px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 12px;
  background: #111827;
}

.rank-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-copy {
  display: grid;
  gap: 4px;
}

.rank-action {
  color: var(--brand);
  font-weight: 900;
}

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

.category-tile {
  display: grid;
  gap: 8px;
  padding: 22px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(251, 191, 36, 0.28);
  box-shadow: 0 10px 30px rgba(120, 53, 15, 0.08);
}

.category-tile:hover {
  color: var(--brand);
  transform: translateY(-3px);
}

.category-tile strong {
  font-size: 22px;
}

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

.page-hero {
  margin-top: 34px;
  padding: 46px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(251, 191, 36, 0.28);
  box-shadow: var(--shadow);
}

.filter-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.filter-panel input {
  min-width: min(100%, 360px);
  flex: 1;
}

.filter-panel select {
  min-width: 160px;
}

.search-count {
  margin-bottom: 18px;
  color: var(--muted);
  font-weight: 800;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: #111827;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  filter: blur(18px);
  transform: scale(1.08);
  opacity: 0.4;
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.95), rgba(17, 24, 39, 0.72));
}

.detail-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 34px;
  padding: 50px 0;
  align-items: center;
}

.detail-poster {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  background: #111827;
}

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

.detail-copy p {
  max-width: 820px;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.8;
  font-size: 18px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 26px;
}

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

.detail-main {
  display: grid;
  gap: 24px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.32);
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
  width: 76px;
  height: 76px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #d97706, #ea580c);
  box-shadow: 0 18px 44px rgba(217, 119, 6, 0.35);
  font-size: 28px;
}

.play-overlay strong {
  font-size: 20px;
}

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

.content-card {
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(251, 191, 36, 0.28);
  box-shadow: 0 12px 34px rgba(120, 53, 15, 0.08);
  padding: 26px;
}

.content-card h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.content-card p {
  color: #374151;
  line-height: 1.9;
  margin: 0;
}

.side-card dl {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 12px;
  margin: 0;
}

.side-card dt {
  color: var(--muted);
}

.side-card dd {
  margin: 0;
  font-weight: 800;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.site-footer {
  margin-top: 42px;
  padding: 46px 0 0;
  color: #d1d5db;
  background: #111827;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr 1fr 1fr;
  gap: 34px;
}

.site-footer p {
  color: #9ca3af;
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 18px;
}

.site-footer a {
  display: block;
  color: #d1d5db;
  margin: 9px 0;
}

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

.footer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-tags a {
  display: inline-flex;
  margin: 0;
  color: #92400e;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 34px;
  padding: 18px 16px;
  text-align: center;
  color: #9ca3af;
}

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

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

  .hero-carousel {
    height: 560px;
  }
}

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

  .hero-section {
    padding-top: 20px;
  }

  .hero-carousel {
    min-height: 460px;
    height: 520px;
  }

  .hero-side-panel,
  .page-hero {
    padding: 26px;
  }

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

  .compact-list {
    grid-template-columns: 1fr;
  }

  .detail-hero-inner {
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 20px;
  }
}

@media (max-width: 580px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .brand {
    font-size: 20px;
  }

  .hero-carousel {
    min-height: 430px;
    height: 430px;
    border-radius: 22px;
  }

  .hero-content {
    left: 20px;
    right: 20px;
    bottom: 62px;
  }

  .hero-desc {
    font-size: 15px;
  }

  .hero-dots {
    left: 20px;
    bottom: 24px;
  }

  .hero-control {
    bottom: 20px;
  }

  .hero-control.prev {
    right: 72px;
  }

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

  .hero-search,
  .mobile-nav form,
  .filter-panel {
    flex-direction: column;
  }

  .movie-grid,
  .full-grid,
  .category-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .ranking-item {
    grid-template-columns: 38px 54px minmax(0, 1fr);
  }

  .rank-action {
    display: none;
  }

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

  .detail-poster {
    width: 180px;
  }
}
