:root {
  --bg: #fff8e6;
  --panel: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: rgba(31, 41, 55, 0.12);
  --brand: #f59e0b;
  --brand-2: #ef4444;
  --brand-3: #facc15;
  --shadow: 0 18px 48px rgba(31, 41, 55, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(251, 191, 36, 0.28), transparent 34rem),
    linear-gradient(180deg, #fff7db 0%, #fffdf8 42%, #fff8e6 100%);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.55);
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.92), rgba(251, 191, 36, 0.86));
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.18);
}

.site-header__inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-logo,
.site-footer__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.site-logo__mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 24px rgba(239, 68, 68, 0.24);
}

.site-logo__text {
  font-size: 1.25rem;
}

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

.main-nav a,
.header-search button,
.btn,
.hero-control,
.rank-item__link,
.category-card__button {
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.main-nav a {
  padding: 10px 16px;
  color: #374151;
}

.main-nav a:hover,
.main-nav a.is-active {
  background: rgba(255, 255, 255, 0.7);
  color: #b45309;
  box-shadow: 0 10px 24px rgba(180, 83, 9, 0.12);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.header-search input,
.filter-panel input,
.filter-panel select,
.search-main input {
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 999px;
  outline: none;
  background: #ffffff;
  color: var(--ink);
}

.header-search input {
  width: 180px;
  padding: 10px 14px;
}

.header-search button {
  padding: 10px 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.page-main {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 72px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.65s ease, transform 0.65s ease;
  transform: scale(1.02);
}

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

.hero-slide__bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  filter: saturate(1.08);
}

.hero-slide__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.95) 0%, rgba(17, 24, 39, 0.78) 42%, rgba(17, 24, 39, 0.32) 100%),
    linear-gradient(0deg, rgba(17, 24, 39, 0.82), rgba(17, 24, 39, 0.08));
}

.hero-slide__content {
  position: relative;
  z-index: 1;
  min-height: 590px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: center;
  gap: 42px;
  padding: 58px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.18);
  border: 1px solid rgba(250, 204, 21, 0.32);
  color: #fde68a;
  font-weight: 800;
}

.hero h1,
.hero h2 {
  margin: 18px 0 14px;
  font-size: clamp(2.55rem, 6vw, 5.3rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.08rem;
  line-height: 1.9;
}

.hero-actions,
.section-head,
.card-grid,
.tag-row,
.breadcrumbs,
.site-footer__links,
.detail-meta,
.hero-dots {
  display: flex;
  align-items: center;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand-3), var(--brand), var(--brand-2));
  box-shadow: 0 18px 36px rgba(239, 68, 68, 0.28);
}

.btn:hover,
.header-search button:hover,
.hero-control:hover,
.rank-item__link:hover,
.category-card__button:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 38px rgba(245, 158, 11, 0.26);
}

.btn--ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: none;
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.hero-poster {
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
  transform: rotate(2.5deg);
}

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

.hero-ui {
  position: absolute;
  left: 58px;
  right: 58px;
  bottom: 28px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hero-dots {
  gap: 8px;
}

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

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

.hero-control {
  width: 44px;
  height: 44px;
  color: #111827;
  background: #ffffff;
}

.quick-search {
  margin: -42px auto 44px;
  width: min(1000px, calc(100% - 42px));
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 14px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.quick-search input {
  border: 0;
  outline: none;
  padding: 18px 22px;
  border-radius: 20px;
  background: #fff7ed;
  font-size: 1rem;
}

.quick-search button,
.search-main button {
  border: 0;
  border-radius: 20px;
  padding: 0 28px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  cursor: pointer;
}

.section {
  margin: 58px 0;
}

.section-head {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.section-head h2,
.page-title h1,
.detail-copy h2 {
  margin: 0;
  color: #1f2937;
  letter-spacing: -0.04em;
}

.section-head h2 {
  font-size: clamp(1.65rem, 3vw, 2.45rem);
}

.section-head p,
.page-title p,
.category-card p,
.detail-copy p,
.search-hint {
  color: var(--muted);
  line-height: 1.85;
}

.card-grid {
  align-items: stretch;
  flex-wrap: wrap;
  gap: 22px;
}

.card-grid .movie-card {
  width: calc((100% - 66px) / 4);
}

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: var(--panel);
  box-shadow: 0 14px 38px rgba(31, 41, 55, 0.10);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

.movie-card__cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: #111827;
}

.movie-card__cover img {
  width: 100%;
  aspect-ratio: 2 / 2.78;
  object-fit: cover;
  transition: transform 0.45s ease, opacity 0.3s ease;
}

.movie-card:hover .movie-card__cover img {
  transform: scale(1.08);
  opacity: 0.84;
}

.movie-card__play {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%) scale(0.92);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(250, 204, 21, 0.88);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .movie-card__play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  min-width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #facc15, #f97316, #ef4444);
  font-style: normal;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(239, 68, 68, 0.22);
}

.movie-card__body {
  padding: 18px;
}

.movie-card__meta,
.rank-item__meta,
.detail-meta,
.breadcrumbs {
  color: #92400e;
  font-size: 0.88rem;
  font-weight: 700;
}

.movie-card h3 {
  margin: 8px 0 8px;
  font-size: 1.12rem;
  line-height: 1.35;
}

.movie-card p {
  min-height: 52px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.7;
}

.tag-row {
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #9a3412;
  background: #ffedd5;
  font-size: 0.78rem;
  font-weight: 800;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 245px;
  border-radius: 28px;
  padding: 24px;
  background: linear-gradient(135deg, #ffffff, #fff7ed);
  border: 1px solid rgba(245, 158, 11, 0.16);
  box-shadow: 0 16px 42px rgba(31, 41, 55, 0.09);
}

.category-card::after {
  content: "";
  position: absolute;
  width: 130px;
  height: 130px;
  right: -50px;
  top: -40px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.46), rgba(239, 68, 68, 0.24));
}

.category-card h2,
.category-card h3 {
  position: relative;
  margin: 0 0 12px;
  font-size: 1.45rem;
}

.category-card p,
.category-card ul,
.category-card__button {
  position: relative;
}

.category-card ul {
  list-style: none;
  padding: 0;
  margin: 16px 0 20px;
  display: grid;
  gap: 8px;
}

.category-card li a {
  color: #78350f;
  font-weight: 700;
}

.category-card__button {
  display: inline-flex;
  padding: 11px 17px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.page-title {
  margin: 12px 0 32px;
  padding: 34px;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 38px rgba(31, 41, 55, 0.08);
}

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

.breadcrumbs {
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 24px;
  padding: 18px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 30px rgba(31, 41, 55, 0.08);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: #92400e;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  padding: 13px 15px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 94px 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 34px rgba(31, 41, 55, 0.08);
}

.rank-item__cover {
  overflow: hidden;
  border-radius: 16px;
}

.rank-item__cover img {
  width: 94px;
  aspect-ratio: 2 / 2.8;
  object-fit: cover;
}

.rank-item__number strong {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #facc15, #f97316, #ef4444);
}

.rank-item h3 {
  margin: 0 0 6px;
  font-size: 1.18rem;
}

.rank-item p {
  margin: 0 0 8px;
  color: var(--muted);
  line-height: 1.65;
}

.rank-item__link {
  padding: 11px 18px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) 360px;
  gap: 30px;
  align-items: start;
}

.player-card,
.detail-sidebar,
.detail-copy {
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.player-card {
  overflow: hidden;
}

.player-shell {
  position: relative;
  background: #020617;
}

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

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background:
    radial-gradient(circle at center, rgba(250, 204, 21, 0.30), transparent 16rem),
    linear-gradient(180deg, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.58));
  cursor: pointer;
}

.player-start span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  padding-left: 6px;
  color: #111827;
  background: linear-gradient(135deg, #fef3c7, #facc15, #f97316);
  box-shadow: 0 22px 54px rgba(249, 115, 22, 0.38);
  font-size: 2rem;
}

.player-start.is-hidden {
  display: none;
}

.player-info {
  padding: 24px;
}

.player-info h1 {
  margin: 0 0 12px;
  font-size: clamp(1.9rem, 4vw, 3.3rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-meta {
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.detail-copy {
  margin-top: 28px;
  padding: 28px;
}

.detail-copy h2 {
  margin-top: 0;
  font-size: 1.6rem;
}

.detail-sidebar {
  overflow: hidden;
}

.detail-sidebar img {
  width: 100%;
  aspect-ratio: 2 / 2.8;
  object-fit: cover;
}

.detail-sidebar__body {
  padding: 22px;
}

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

.search-main {
  display: grid;
  gap: 18px;
}

.search-box-large {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 16px;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.search-main input {
  padding: 16px 18px;
  font-size: 1rem;
}

.search-main button {
  padding: 0 26px;
}

.empty-state {
  display: none;
  padding: 24px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--muted);
  text-align: center;
}

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

.site-footer {
  background: #111827;
  color: rgba(255, 255, 255, 0.72);
}

.site-footer__inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0;
  display: grid;
  gap: 18px;
}

.site-footer__logo {
  color: #ffffff;
  font-size: 1.2rem;
}

.site-footer__links {
  gap: 18px;
  flex-wrap: wrap;
}

.hidden-by-filter {
  display: none !important;
}

@media (max-width: 980px) {
  .site-header__inner {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 0;
  }

  .main-nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
  }

  .header-search {
    margin-left: auto;
  }

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

  .hero-poster {
    display: none;
  }

  .card-grid .movie-card,
  .related-grid .movie-card {
    width: calc((100% - 22px) / 2);
  }

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

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

@media (max-width: 640px) {
  .site-header__inner,
  .page-main,
  .site-footer__inner {
    width: min(100% - 22px, 1200px);
  }

  .site-logo__text {
    font-size: 1.05rem;
  }

  .main-nav {
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 2px;
  }

  .main-nav a {
    white-space: nowrap;
    padding: 9px 12px;
  }

  .header-search {
    width: 100%;
  }

  .header-search input {
    width: 100%;
  }

  .hero {
    min-height: 560px;
    border-radius: 24px;
  }

  .hero-slide__content {
    min-height: 560px;
    padding: 30px 24px 76px;
  }

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

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

  .quick-search,
  .search-box-large {
    grid-template-columns: 1fr;
  }

  .quick-search button,
  .search-main button {
    min-height: 52px;
  }

  .card-grid .movie-card,
  .related-grid .movie-card,
  .category-grid {
    width: 100%;
    grid-template-columns: 1fr;
  }

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

  .rank-item {
    grid-template-columns: 72px 44px minmax(0, 1fr);
  }

  .rank-item__cover img {
    width: 72px;
  }

  .rank-item__link {
    grid-column: 1 / -1;
    text-align: center;
  }
}
