:root {
  color-scheme: light;
  --bg: #f8fafc;
  --bg-soft: #f3f4f6;
  --surface: #ffffff;
  --surface-strong: #f9fafb;
  --text: #111827;
  --muted: #6b7280;
  --muted-strong: #4b5563;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --brand: #111827;
  --brand-soft: #374151;
  --accent: #f59e0b;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow-soft: 0 18px 55px rgba(15, 23, 42, 0.10);
  --shadow-card: 0 12px 35px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.12), transparent 28%),
    radial-gradient(circle at 90% 10%, rgba(17, 24, 39, 0.08), transparent 25%),
    linear-gradient(135deg, #f8fafc 0%, #f4f4f5 48%, #f5f5f4 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

body.menu-open {
  overflow: hidden;
}

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

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

img.is-missing {
  opacity: 0;
}

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.84);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
  backdrop-filter: blur(18px);
}

.site-header__inner {
  width: min(1180px, calc(100% - 32px));
  height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand__mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #111827, #4b5563);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.18);
  font-weight: 900;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand__text strong {
  font-size: 18px;
  letter-spacing: -0.02em;
}

.brand__text em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

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

.nav-link {
  position: relative;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted-strong);
  font-weight: 700;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  background: #111827;
  color: #ffffff;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: #111827;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.mobile-nav a {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--muted-strong);
  font-weight: 700;
}

.mobile-nav a:hover {
  background: #f3f4f6;
  color: var(--text);
}

.hero {
  position: relative;
  min-height: 78vh;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 60px;
  align-items: center;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
}

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

.hero-slide__bg {
  position: absolute;
  top: 0;
  left: 50%;
  width: 100vw;
  height: 100%;
  object-fit: cover;
  filter: blur(18px) saturate(1.1);
  transform: translateX(-50%) scale(1.08);
  opacity: 0.42;
  z-index: -3;
}

.hero-slide__shade {
  position: absolute;
  top: 0;
  left: 50%;
  width: 100vw;
  height: 100%;
  transform: translateX(-50%);
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.78) 48%, rgba(17, 24, 39, 0.92)),
    radial-gradient(circle at 75% 45%, rgba(245, 158, 11, 0.28), transparent 34%);
}

.hero-slide__content,
.hero-poster {
  position: relative;
  z-index: 1;
}

.hero-slide__content {
  padding: 120px 0 110px;
  color: #ffffff;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-slide h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(42px, 6vw, 86px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-summary {
  max-width: 680px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.80);
  font-size: 18px;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button--primary {
  color: #ffffff;
  background: linear-gradient(135deg, #111827, #374151);
  box-shadow: 0 16px 32px rgba(17, 24, 39, 0.24);
}

.button--ghost {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04)),
    linear-gradient(135deg, #334155, #111827);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
}

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

.hero-controls {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 36px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
  color: #ffffff;
}

.hero-controls button {
  border: 0;
  color: inherit;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  cursor: pointer;
}

.hero-controls > button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
}

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

.hero-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border-radius: 999px;
  opacity: 0.55;
  transition: width 0.2s ease, opacity 0.2s ease;
}

.hero-dots button.is-active {
  width: 28px;
  opacity: 1;
  background: var(--accent);
}

.content-section {
  padding: 70px 0 0;
}

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

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

.section-heading h2,
.page-hero h1,
.home-search h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p,
.home-search p {
  margin: 10px 0 0;
  color: var(--muted);
}

.section-heading a {
  flex: 0 0 auto;
  color: var(--muted-strong);
  font-weight: 900;
}

.home-search {
  margin-top: -54px;
  position: relative;
  z-index: 10;
}

.home-search__box,
.search-panel,
.ranking-card,
.article-card,
.info-card,
.player-card {
  border: 1px solid rgba(229, 231, 235, 0.88);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
}

.home-search__box {
  padding: clamp(22px, 4vw, 42px);
}

.home-search__bar,
.search-panel__bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-top: 22px;
}

.search-panel__bar {
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(150px, 190px));
  margin: 0;
}

.home-search input,
.search-panel input,
.search-panel select {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text);
  outline: 0;
}

.home-search input,
.search-panel input {
  padding: 0 18px;
}

.search-panel select {
  padding: 0 16px;
}

.home-search input:focus,
.search-panel input:focus,
.search-panel select:focus {
  border-color: #9ca3af;
  box-shadow: 0 0 0 4px rgba(17, 24, 39, 0.08);
}

.search-panel {
  padding: 18px;
  margin-bottom: 26px;
}

.search-panel__count {
  min-height: 24px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
}

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

.mini-results {
  margin-top: 24px;
}

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(156, 163, 175, 0.85);
  box-shadow: var(--shadow-soft);
}

.movie-card[hidden],
.ranking-row[hidden] {
  display: none;
}

.poster-shell {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background:
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.20), transparent 32%),
    linear-gradient(135deg, #4b5563, #111827);
}

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

.movie-card:hover .poster-shell img {
  transform: scale(1.05);
}

.poster-rank {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(17, 24, 39, 0.72);
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.movie-card__body {
  padding: 16px;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.movie-meta span {
  padding: 3px 8px;
  border-radius: 999px;
  background: #f3f4f6;
}

.movie-card h2 {
  margin: 10px 0 8px;
  font-size: 18px;
  line-height: 1.28;
  letter-spacing: -0.02em;
}

.movie-card p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 9px;
  border: 1px solid rgba(209, 213, 219, 0.9);
  border-radius: 999px;
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 800;
}

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

.category-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 86px;
  padding: 18px;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(245, 158, 11, 0.14), transparent 36%),
    #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-chip:hover {
  transform: translateY(-4px);
  border-color: rgba(156, 163, 175, 0.9);
}

.category-chip strong {
  font-size: 18px;
  letter-spacing: -0.02em;
}

.category-chip span {
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.ranking-card {
  position: sticky;
  top: 96px;
  padding: 22px;
}

.ranking-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.ranking-card h2,
.info-card h2,
.article-card h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.ranking-card__head a {
  color: var(--muted);
  font-weight: 900;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 10px;
  border-radius: 16px;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.ranking-row:hover {
  background: #f3f4f6;
  transform: translateX(3px);
}

.ranking-row__number {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #111827, #4b5563);
  font-weight: 900;
}

.ranking-row__title {
  overflow: hidden;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-row__meta {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.page-hero {
  padding: 70px 0 16px;
}

.page-hero h1 {
  max-width: 820px;
}

.page-hero p {
  max-width: 780px;
  font-size: 18px;
}

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

.detail-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(18px) saturate(1.08);
  transform: scale(1.08);
  opacity: 0.38;
}

.detail-hero__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.95), rgba(17, 24, 39, 0.78)),
    radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.24), transparent 32%);
}

.detail-hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  min-height: 540px;
  padding: 64px 0;
}

.detail-cover {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  background:
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.20), transparent 32%),
    linear-gradient(135deg, #475569, #111827);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.32);
}

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

.detail-meta span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.detail-info h1 {
  margin: 14px 0 0;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.detail-one-line {
  max-width: 820px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

.detail-actions a:not(.button) {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.10);
  font-weight: 900;
}

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

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

.player-card {
  padding: 14px;
}

.player-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  background: #050505;
}

.player-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #050505;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background:
    radial-gradient(circle at 50% 40%, rgba(245, 158, 11, 0.18), transparent 28%),
    rgba(0, 0, 0, 0.48);
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-overlay__icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  color: #111827;
  background: #ffffff;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
  font-size: 30px;
}

.article-card,
.info-card {
  padding: 26px;
}

.article-card p {
  margin: 14px 0 0;
  color: var(--muted-strong);
  font-size: 17px;
}

.detail-side {
  display: grid;
  gap: 18px;
  align-content: start;
}

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

.info-card dl div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

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

.info-card dd {
  margin: 0;
  color: var(--text);
  font-weight: 800;
}

.site-footer {
  margin-top: 90px;
  color: #d1d5db;
  background: linear-gradient(135deg, #111827, #1f2937 58%, #0f172a);
}

.site-footer__inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(180px, 0.7fr) minmax(180px, 0.7fr);
  gap: 32px;
  padding: 48px 0;
}

.brand--footer .brand__mark {
  color: #111827;
  background: #ffffff;
}

.brand--footer .brand__text strong {
  color: #ffffff;
}

.footer-brand p {
  max-width: 520px;
  margin: 18px 0 0;
  color: #9ca3af;
}

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

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

.footer-links a {
  color: #d1d5db;
  font-weight: 800;
}

.footer-links a:hover {
  color: #ffffff;
}

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

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

  .ranking-card {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

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

  .hero {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 24px;
    align-content: center;
  }

  .hero-slide__content {
    padding: 96px 0 0;
  }

  .hero-poster {
    width: min(260px, 72vw);
    justify-self: center;
  }

  .home-search__bar,
  .search-panel__bar {
    grid-template-columns: 1fr;
  }

  .detail-hero__inner {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .detail-cover {
    width: min(280px, 74vw);
  }

  .site-footer__inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .site-header__inner {
    height: 66px;
  }

  .brand__text strong {
    font-size: 16px;
  }

  .brand__text em {
    display: none;
  }

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

  .movie-card__body {
    padding: 13px;
  }

  .movie-card h2 {
    font-size: 16px;
  }

  .ranking-row {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .ranking-row__meta {
    grid-column: 2;
  }

  .article-card,
  .info-card,
  .home-search__box {
    padding: 20px;
  }
}
