:root {
  --page-bg: #fff7ed;
  --text-main: #1f2937;
  --text-soft: #6b7280;
  --brand-deep: #78350f;
  --brand: #d97706;
  --brand-hot: #ea580c;
  --brand-light: #fef3c7;
  --card: #ffffff;
  --line: rgba(120, 53, 15, 0.14);
  --shadow: 0 18px 55px rgba(120, 53, 15, 0.16);
  --shadow-soft: 0 10px 30px rgba(120, 53, 15, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-main);
  background:
    radial-gradient(circle at 12% 0%, rgba(251, 191, 36, 0.28), transparent 28rem),
    linear-gradient(180deg, #fff7ed 0%, #ffffff 45%, #fff7ed 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
}

.site-container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(90deg, #78350f 0%, #92400e 48%, #7c2d12 100%);
  box-shadow: 0 12px 36px rgba(69, 26, 3, 0.22);
}

.header-row {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.logo-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), 0 8px 24px rgba(249, 115, 22, 0.28);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.main-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: rgba(255,255,255,0.86);
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
  color: #fff;
  background: rgba(255,255,255,0.16);
  transform: translateY(-1px);
}

.header-search {
  width: min(270px, 32vw);
  position: relative;
}

.header-search input,
.hero-search input,
.filter-input,
.search-input {
  width: 100%;
  height: 42px;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 999px;
  outline: 0;
  padding: 0 46px 0 16px;
  color: #fff;
  background: rgba(255,255,255,0.14);
  backdrop-filter: blur(8px);
}

.header-search input::placeholder,
.hero-search input::placeholder {
  color: rgba(255,255,255,0.72);
}

.header-search button,
.hero-search button {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  color: #7c2d12;
  background: #fbbf24;
  cursor: pointer;
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 12px;
  color: #fff;
  background: rgba(255,255,255,0.12);
}

.mobile-panel {
  display: none;
  padding: 0 0 18px;
}

.mobile-panel.is-open {
  display: block;
}

.mobile-panel nav {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.mobile-panel a {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.10);
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: #fff;
  background: #451a03;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(69, 26, 3, 0.95) 0%, rgba(69, 26, 3, 0.72) 42%, rgba(69, 26, 3, 0.22) 100%),
    linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(69,26,3,0.92) 100%);
}

.hero-content {
  position: relative;
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.88fr);
  align-items: center;
  gap: 40px;
  padding: 84px 0 92px;
}

.hero-copy {
  max-width: 680px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(255,255,255,0.10);
  backdrop-filter: blur(8px);
  font-size: 14px;
  font-weight: 700;
}

.hero h1 {
  margin: 22px 0 18px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-desc {
  max-width: 640px;
  color: rgba(255,255,255,0.90);
  font-size: 19px;
  line-height: 1.8;
}

.hero-meta,
.detail-meta,
.card-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: #92400e;
  background: #fef3c7;
}

.badge.soft {
  color: #fff;
  background: rgba(255,255,255,0.16);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #7c2d12;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: 0 14px 32px rgba(245, 158, 11, 0.34);
}

.btn-ghost {
  color: #fff;
  border: 1px solid rgba(255,255,255,0.24);
  background: rgba(255,255,255,0.14);
}

.hero-search {
  position: relative;
  width: min(520px, 100%);
  margin-top: 24px;
}

.hero-search input {
  height: 54px;
  padding-left: 20px;
  padding-right: 58px;
}

.hero-search button {
  top: 7px;
  right: 7px;
  width: 40px;
  height: 40px;
}

.hero-poster {
  position: relative;
  width: min(390px, 100%);
  justify-self: end;
  border-radius: 32px;
  padding: 12px;
  background: rgba(255,255,255,0.14);
  box-shadow: 0 30px 80px rgba(0,0,0,0.35);
  backdrop-filter: blur(10px);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4.15;
  object-fit: cover;
  border-radius: 24px;
}

.hero-poster .poster-caption {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 28px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(0,0,0,0.46);
  backdrop-filter: blur(8px);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 4;
}

.hero-dot {
  width: 42px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.35);
}

.hero-dot.is-active {
  background: #fbbf24;
}

.section {
  padding: 56px 0;
}

.section.tight {
  padding: 34px 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.section-kicker {
  margin-bottom: 8px;
  color: var(--brand-hot);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-title {
  margin: 0;
  color: #111827;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.2;
  font-weight: 900;
}

.section-desc {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--text-soft);
  line-height: 1.8;
}

.more-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand-hot);
  font-weight: 800;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.movie-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  border-color: rgba(234, 88, 12, 0.30);
  box-shadow: var(--shadow);
}

.card-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #fde68a;
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.36s ease;
}

.movie-card:hover .card-cover img {
  transform: scale(1.07);
}

.card-cover::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.72));
}

.card-score {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 4px 9px;
  border-radius: 999px;
  color: #78350f;
  background: #fbbf24;
  font-size: 13px;
  font-weight: 900;
}

.card-play {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(0,0,0,0.54);
  font-size: 13px;
  font-weight: 800;
}

.card-body {
  padding: 16px;
}

.card-title {
  margin: 0 0 8px;
  color: #111827;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
}

.card-text {
  min-height: 48px;
  margin: 10px 0 12px;
  color: var(--text-soft);
  line-height: 1.65;
  font-size: 14px;
}

.card-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #92400e;
  background: #fffbeb;
  font-size: 12px;
  font-weight: 700;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 178px;
  padding: 22px;
  border-radius: 28px;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  box-shadow: var(--shadow-soft);
  isolation: isolate;
}

.category-card::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -56px;
  bottom: -70px;
  border-radius: 50%;
  background: rgba(255,255,255,0.16);
  z-index: -1;
}

.category-card strong {
  display: block;
  margin: 12px 0 8px;
  font-size: 24px;
  font-weight: 900;
}

.category-card p {
  margin: 0;
  color: rgba(255,255,255,0.86);
  line-height: 1.65;
}

.category-icon {
  font-size: 34px;
}

.rank-list {
  display: grid;
  gap: 14px;
}

.rank-item {
  display: grid;
  grid-template-columns: 64px 86px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.rank-num {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #78350f;
  background: #fef3c7;
  font-weight: 900;
}

.rank-cover {
  width: 86px;
  height: 112px;
  border-radius: 14px;
  object-fit: cover;
}

.rank-title {
  margin: 0 0 8px;
  color: #111827;
  font-size: 20px;
  font-weight: 900;
}

.rank-desc {
  margin: 8px 0 0;
  color: var(--text-soft);
  line-height: 1.65;
}

.sub-hero {
  padding: 72px 0 42px;
  color: #fff;
  background:
    radial-gradient(circle at 80% 30%, rgba(251, 191, 36, 0.32), transparent 24rem),
    linear-gradient(135deg, #78350f, #92400e 52%, #7c2d12);
}

.sub-hero h1 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.1;
  font-weight: 900;
}

.sub-hero p {
  max-width: 820px;
  margin: 16px 0 0;
  color: rgba(255,255,255,0.88);
  font-size: 18px;
  line-height: 1.8;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255,255,255,0.76);
  font-size: 14px;
}

.breadcrumb a {
  color: #fde68a;
  font-weight: 700;
}

.filter-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 26px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.filter-input,
.search-input {
  height: 48px;
  color: #111827;
  border-color: rgba(146, 64, 14, 0.18);
  background: #fff7ed;
}

.filter-input::placeholder,
.search-input::placeholder {
  color: #9ca3af;
}

.detail-hero {
  padding: 46px 0;
  color: #fff;
  background:
    radial-gradient(circle at 78% 26%, rgba(251, 191, 36, 0.28), transparent 22rem),
    linear-gradient(135deg, #451a03, #78350f 48%, #7c2d12);
}

.detail-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 30px;
  box-shadow: 0 26px 70px rgba(0,0,0,0.34);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4.1;
  object-fit: cover;
}

.detail-info h1 {
  margin: 16px 0 14px;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.08;
  font-weight: 900;
}

.detail-lead {
  max-width: 790px;
  color: rgba(255,255,255,0.90);
  font-size: 18px;
  line-height: 1.85;
}

.player-section {
  padding: 42px 0 24px;
}

.player-panel {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #111827;
  box-shadow: var(--shadow);
}

.movie-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(0,0,0,0.08), rgba(0,0,0,0.58));
  cursor: pointer;
}

.player-panel.is-playing .play-cover {
  display: none;
}

.play-button {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #7c2d12;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: 0 18px 40px rgba(245, 158, 11, 0.38);
  font-size: 34px;
  transform: translateX(2px);
}

.content-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.content-card h2 {
  margin: 0 0 14px;
  color: #111827;
  font-size: 26px;
  font-weight: 900;
}

.content-card p {
  margin: 0 0 18px;
  color: #374151;
  font-size: 17px;
  line-height: 1.9;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.search-panel {
  max-width: 780px;
  margin-bottom: 28px;
}

.search-form-main {
  display: flex;
  gap: 12px;
}

.search-form-main .search-input {
  flex: 1;
}

.search-form-main .btn {
  min-width: 118px;
}

.empty-state {
  display: none;
  padding: 24px;
  border: 1px dashed rgba(146, 64, 14, 0.28);
  border-radius: 22px;
  color: var(--text-soft);
  background: #fff;
}

.empty-state.is-visible {
  display: block;
}

.site-footer {
  margin-top: 42px;
  color: rgba(255,255,255,0.78);
  background: #451a03;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 24px;
  padding: 42px 0;
}

.footer-grid h3,
.footer-grid h4 {
  margin: 0 0 12px;
  color: #fff;
}

.footer-grid p,
.footer-grid li {
  color: rgba(255,255,255,0.72);
  line-height: 1.8;
}

.footer-grid ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-grid a:hover {
  color: #fbbf24;
}

.copyright {
  padding: 18px 0 24px;
  border-top: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.60);
  font-size: 14px;
}

@media (max-width: 1024px) {
  .main-nav,
  .header-search {
    display: none;
  }

  .mobile-toggle {
    display: inline-grid;
    place-items: center;
  }

  .hero-content,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    justify-self: start;
    max-width: 320px;
  }

  .movie-grid,
  .category-grid,
  .related-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .site-container {
    width: min(100% - 22px, 1180px);
  }

  .header-row {
    height: 64px;
  }

  .logo {
    font-size: 18px;
  }

  .logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }

  .hero,
  .hero-content {
    min-height: 660px;
  }

  .hero-content {
    padding: 68px 0 96px;
  }

  .hero-desc,
  .detail-lead,
  .sub-hero p {
    font-size: 16px;
  }

  .hero-poster {
    display: none;
  }

  .hero-actions,
  .search-form-main,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .movie-grid,
  .category-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .rank-item {
    grid-template-columns: 42px 70px minmax(0, 1fr);
  }

  .rank-item .btn {
    grid-column: 1 / -1;
  }

  .rank-cover {
    width: 70px;
    height: 92px;
  }

  .detail-layout {
    gap: 22px;
  }

  .detail-poster {
    max-width: 230px;
  }

  .content-card {
    padding: 20px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 460px) {
  .movie-grid,
  .category-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }
}
