:root {
  --top-bg: #07111f;
  --top-panel: #111f35;
  --top-line: #26344a;
  --top-muted: #aeb8c9;
  --top-gold: #f5c851;
}

.category-bar {
  position: relative;
  z-index: 3;
  width: 100%;
  border-top: 1px solid var(--top-line);
  border-bottom: 1px solid var(--top-line);
  background: #0c1829;
}

.category-scroll {
  display: flex;
  gap: .65rem;
  max-width: 1720px;
  margin: 0 auto;
  padding: .85rem clamp(1rem, 5vw, 6rem);
  overflow-x: auto;
  scrollbar-width: thin;
}

.category {
  flex: 0 0 auto;
  min-height: 46px;
  padding: .65rem 1.15rem;
  border: 1px solid #334158;
  border-radius: 999px;
  color: var(--top-muted);
  background: transparent;
  font: inherit;
  font-size: .95rem;
  font-weight: 800;
  cursor: pointer;
  transition: color .18s ease, background .18s ease, border-color .18s ease;
}

.category:hover,
.category:focus-visible {
  color: #fff;
  border-color: #758198;
  outline: none;
}

.category.active {
  color: #0a1423;
  background: var(--top-gold);
  border-color: var(--top-gold);
}

.top-page {
  box-sizing: border-box;
  width: min(1180px, calc(100% - 2rem));
  min-height: calc(100vh - 190px);
  margin: 0 auto;
  padding: clamp(2.5rem, 5vw, 5.5rem) 0 5rem;
}

.top-heading {
  margin-bottom: 2rem;
}

.top-heading .eyebrow {
  margin: 0 0 .8rem;
  color: var(--top-gold);
  font-size: .82rem;
  font-weight: 900;
  letter-spacing: .15em;
}

.top-heading h1 {
  margin: 0;
  color: #fff;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(2.6rem, 6vw, 5.4rem);
  line-height: .95;
}

.top-heading h1 em {
  color: var(--top-gold);
  font-weight: 400;
}

.top-subtitle {
  margin: 1rem 0 0;
  color: var(--top-muted);
  font-size: 1rem;
}

.top-list {
  display: grid;
  gap: .75rem;
}

.top-card {
  display: grid;
  grid-template-columns: 56px 92px minmax(0, 1fr) 150px;
  align-items: center;
  min-height: 138px;
  overflow: hidden;
  border: 1px solid var(--top-line);
  border-radius: 18px;
  background: var(--top-panel);
}

.rank {
  color: var(--top-gold);
  text-align: center;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.8rem;
  font-weight: 700;
}

.poster-link,
.poster-link img,
.poster-placeholder {
  display: block;
  width: 92px;
  height: 138px;
}

.poster-link img {
  object-fit: cover;
}

.poster-placeholder {
  display: grid;
  place-items: center;
  background: #091426;
  font-size: 1.8rem;
}

.movie-info {
  min-width: 0;
  padding: 1rem 1.4rem;
}

.movie-kicker,
.vote-count {
  margin: 0;
  color: var(--top-muted);
  font-size: .8rem;
  font-weight: 700;
}

.movie-kicker {
  margin-bottom: .45rem;
  color: #ff696f;
  letter-spacing: .08em;
}

.movie-info h2 {
  margin: 0 0 .65rem;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(1.3rem, 2.4vw, 2rem);
  line-height: 1.05;
}

.movie-info h2 a {
  color: #fff;
  text-decoration: none;
}

.movie-info h2 a:hover,
.movie-info h2 a:focus-visible {
  color: var(--top-gold);
}

.movie-score {
  display: grid;
  justify-items: end;
  padding: 1rem 1.4rem 1rem .5rem;
  color: var(--top-muted);
  text-align: right;
  font-size: .78rem;
}

.movie-score strong {
  color: var(--top-gold);
  font-size: 1.75rem;
  line-height: 1;
}

.top-status {
  padding: 2rem;
  border: 1px solid var(--top-line);
  border-radius: 18px;
  color: var(--top-muted);
  background: var(--top-panel);
  text-align: center;
}

.top-status.error { color: #ff8589; }

@media (max-width: 680px) {
  .category-scroll { padding-inline: 1rem; }
  .category { min-height: 42px; padding: .55rem .9rem; }
  .top-page { width: min(100% - 1.25rem, 1180px); padding-top: 2.25rem; }
  .top-card { grid-template-columns: 38px 72px minmax(0, 1fr); min-height: 108px; border-radius: 14px; }
  .rank { font-size: 1.35rem; }
  .poster-link, .poster-link img, .poster-placeholder { width: 72px; height: 108px; }
  .movie-info { padding: .8rem 1rem; }
  .movie-info h2 { font-size: 1.2rem; }
  .movie-score { display: none; }
}
