:root {
  --bg: #fff7ed;
  --bg-soft: #fffbeb;
  --text: #1f2937;
  --muted: #6b7280;
  --brand: #ea580c;
  --brand-dark: #9a3412;
  --brand-soft: #fed7aa;
  --card: #ffffff;
  --line: rgba(154, 52, 18, 0.16);
  --shadow: 0 18px 45px rgba(124, 45, 18, 0.16);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(251, 146, 60, 0.22), transparent 32rem),
    linear-gradient(180deg, var(--bg-soft), var(--bg));
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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, 247, 237, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.site-header__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #7c2d12;
}

.site-logo__mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #92400e);
  box-shadow: 0 10px 22px rgba(234, 88, 12, 0.28);
}

.site-logo__text {
  font-size: 20px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 10px 16px;
  border-radius: 999px;
  color: #7c2d12;
  font-weight: 700;
  transition: 0.2s ease;
}

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

.mobile-nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.mobile-nav-toggle span {
  width: 20px;
  height: 2px;
  background: #9a3412;
  border-radius: 999px;
}

.main-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 20px 72px;
}

.hero-carousel {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  border-radius: 34px;
  background: #111827;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: 30px;
  align-items: center;
  padding: 58px;
  opacity: 0;
  transform: scale(1.015);
  pointer-events: none;
  transition: opacity 0.65s ease, transform 0.65s ease;
  background-image:
    linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(124, 45, 18, 0.74), rgba(15, 23, 42, 0.32)),
    var(--hero-image);
  background-size: cover;
  background-position: center;
}

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

.hero-slide__content {
  color: #ffffff;
  max-width: 660px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.16);
  color: #fde68a;
  border: 1px solid rgba(253, 230, 138, 0.26);
  font-weight: 700;
}

.hero-slide h1 {
  margin: 18px 0 14px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-slide p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn-primary,
.btn-ghost,
.section-link,
.rank-row__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: 0.22s ease;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #c2410c);
  box-shadow: 0 14px 26px rgba(234, 88, 12, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(234, 88, 12, 0.36);
}

.btn-ghost {
  color: #fff7ed;
  border: 1px solid rgba(255, 237, 213, 0.36);
  background: rgba(255, 255, 255, 0.08);
}

.hero-poster {
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-poster a {
  width: min(320px, 100%);
  aspect-ratio: 2 / 3;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
  transform: rotate(2deg);
}

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

.hero-controls {
  position: absolute;
  left: 46px;
  bottom: 34px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-control,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-control {
  width: 42px;
  height: 42px;
  color: #ffffff;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
}

.hero-dot.is-active {
  width: 28px;
  background: #fb923c;
}

.hero-search {
  margin-top: -36px;
  position: relative;
  z-index: 8;
  padding: 0 32px;
}

.hero-search__box {
  max-width: 920px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 14px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  box-shadow: 0 18px 42px rgba(124, 45, 18, 0.16);
}

.hero-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid rgba(234, 88, 12, 0.18);
  outline: none;
  border-radius: 16px;
  background: #fff7ed;
  padding: 12px 14px;
  color: #7c2d12;
}

.hero-search button,
.filter-bar button {
  border: 0;
  cursor: pointer;
}

.content-section {
  margin-top: 46px;
}

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

.section-heading h2 {
  margin: 0;
  color: #431407;
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 6px 0 0;
  color: var(--muted);
}

.section-link {
  color: #9a3412;
  background: #ffedd5;
}

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

.category-tile {
  min-height: 150px;
  padding: 22px;
  border-radius: 24px;
  background: linear-gradient(135deg, #ffffff, #ffedd5);
  border: 1px solid var(--line);
  box-shadow: 0 12px 28px rgba(124, 45, 18, 0.08);
  transition: 0.22s ease;
}

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

.category-tile strong {
  display: block;
  color: #7c2d12;
  font-size: 22px;
  margin-bottom: 8px;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 12px 28px rgba(124, 45, 18, 0.08);
  transition: 0.22s ease;
}

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

.movie-card__poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #7c2d12, #f97316);
}

.movie-card__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.movie-card:hover .movie-card__poster img {
  transform: scale(1.06);
}

.movie-card__play,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 800;
}

.movie-card__play {
  right: 12px;
  bottom: 12px;
  padding: 7px 12px;
  background: rgba(234, 88, 12, 0.92);
}

.rank-badge {
  left: 12px;
  top: 12px;
  padding: 7px 10px;
  background: rgba(15, 23, 42, 0.75);
}

.movie-card__body {
  padding: 16px;
}

.movie-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 850;
  color: #431407;
}

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

.movie-card__meta {
  margin: 8px 0 0;
  color: #9a3412;
  font-size: 13px;
  font-weight: 700;
}

.movie-card__desc {
  min-height: 44px;
  margin: 9px 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.movie-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.movie-card__tags span,
.detail-tags span,
.info-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  background: #ffedd5;
  color: #9a3412;
  font-size: 12px;
  font-weight: 700;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 64px 84px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 22px rgba(124, 45, 18, 0.07);
}

.rank-row__number {
  display: inline-flex;
  justify-content: center;
  color: #ea580c;
  font-size: 24px;
  font-weight: 950;
}

.rank-row__poster {
  aspect-ratio: 2 / 3;
  border-radius: 16px;
  overflow: hidden;
  background: #fed7aa;
}

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

.rank-row__content h3 {
  margin: 0 0 6px;
  color: #431407;
  font-size: 20px;
  font-weight: 850;
}

.rank-row__content p {
  margin: 0;
  color: var(--muted);
}

.rank-row__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  color: #9a3412;
  font-size: 13px;
  font-weight: 700;
}

.rank-row__action {
  color: #ffffff;
  background: var(--brand);
}

.page-hero {
  padding: 46px;
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(67, 20, 7, 0.94), rgba(154, 52, 18, 0.88)),
    radial-gradient(circle at top right, rgba(251, 146, 60, 0.6), transparent 24rem);
  color: #ffffff;
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 950;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 820px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.8;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #9a3412;
  font-size: 14px;
  font-weight: 700;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, minmax(150px, 0.5fr));
  gap: 12px;
  margin: 24px 0;
  padding: 16px;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid var(--line);
}

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

.player-panel,
.detail-side,
.detail-section {
  border-radius: 26px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 28px rgba(124, 45, 18, 0.08);
  overflow: hidden;
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #111827;
}

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

.play-trigger {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: 96px;
  height: 96px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  color: #ffffff;
  background: rgba(234, 88, 12, 0.92);
  font-weight: 900;
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.34);
}

.player-box.is-playing .play-trigger {
  opacity: 0;
  pointer-events: none;
}

.player-status {
  min-height: 24px;
  margin: 0;
  padding: 12px 16px 16px;
  color: #9a3412;
  font-size: 14px;
}

.detail-title {
  padding: 24px;
}

.detail-title h1 {
  margin: 0 0 12px;
  color: #431407;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.15;
  font-weight: 950;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-side {
  padding: 20px;
}

.detail-side__poster {
  aspect-ratio: 2 / 3;
  border-radius: 22px;
  overflow: hidden;
  background: #fed7aa;
}

.detail-side__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-side dl {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
}

.detail-side div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
}

.detail-side dt {
  color: #9a3412;
  font-weight: 800;
}

.detail-side dd {
  margin: 0;
  color: var(--muted);
}

.detail-section {
  margin-top: 24px;
  padding: 24px;
}

.detail-section h2 {
  margin: 0 0 14px;
  color: #431407;
  font-size: 26px;
  font-weight: 900;
}

.detail-section p {
  color: #374151;
  line-height: 1.95;
}

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

.search-results-note {
  margin: 16px 0;
  color: #9a3412;
  font-weight: 800;
}

.empty-state {
  display: none;
  padding: 26px;
  border-radius: 22px;
  color: var(--muted);
  background: #ffffff;
  border: 1px dashed var(--line);
}

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

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(255, 237, 213, 0.62);
}

.site-footer__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 20px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  color: #7c2d12;
}

.site-footer__logo {
  display: inline-block;
  margin-bottom: 8px;
  font-weight: 900;
  font-size: 20px;
}

.site-footer p {
  margin: 0;
  color: #9a3412;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-content: start;
  justify-content: flex-end;
}

.site-footer__links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: #ffffff;
}

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

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 38px;
  }

  .hero-poster {
    display: none;
  }

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

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

@media (max-width: 720px) {
  .site-header__inner {
    padding: 12px 16px;
  }

  .mobile-nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 68px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .nav-link {
    text-align: center;
  }

  .main-wrap {
    padding: 20px 14px 48px;
  }

  .hero-carousel {
    min-height: 520px;
    border-radius: 26px;
  }

  .hero-slide {
    padding: 30px 24px 82px;
  }

  .hero-search {
    margin-top: 16px;
    padding: 0;
  }

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

  .hero-controls {
    left: 24px;
    bottom: 24px;
  }

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

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

  .rank-row {
    grid-template-columns: 44px 70px 1fr;
  }

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

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

  .page-hero {
    padding: 30px 22px;
    border-radius: 24px;
  }

  .site-footer__inner {
    flex-direction: column;
  }

  .site-footer__links {
    justify-content: flex-start;
  }
}

@media (max-width: 430px) {
  .movie-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }
}
