:root {
  color-scheme: dark;
  --text: #fff8e8;
  --muted: rgba(255, 248, 232, 0.72);
  --faint: rgba(255, 248, 232, 0.46);
  --line: rgba(255, 255, 255, 0.16);
  --panel: rgba(10, 10, 12, 0.56);
  --panel-strong: rgba(14, 14, 18, 0.78);
  --gold: #e5a00d;
  --gold-bright: #ffc751;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: #050505;
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.page {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 100vh;
  place-items: center;
  isolation: isolate;
  padding: 24px;
}

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(circle at 70% 25%, rgba(229, 160, 13, 0.22), transparent 28rem),
    linear-gradient(135deg, #1c1710, #050505 62%);
  background-position: center;
  background-size: cover;
  transform: scale(1.04);
  filter: saturate(1.12) contrast(1.05);
  transition: background-image 420ms ease, opacity 420ms ease, transform 900ms ease;
}

.backdrop::after {
  content: "";
  position: absolute;
  inset: -1px;
  background:
    radial-gradient(circle at 50% 50%, transparent 0%, rgba(0, 0, 0, 0.35) 52%, rgba(0, 0, 0, 0.74) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.78));
}

.shade {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.70), rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.70)),
    radial-gradient(circle at 50% 45%, rgba(229, 160, 13, 0.12), transparent 30rem);
  backdrop-filter: blur(1px);
}

.search-shell {
  width: min(760px, 100%);
  text-align: center;
  transform: translateY(-18px);
}

.kicker {
  margin: 0 0 12px;
  color: var(--gold-bright);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.72);
}

h1 {
  margin: 0 0 28px;
  font-size: clamp(2.2rem, 8vw, 5.7rem);
  font-weight: 900;
  letter-spacing: -0.075em;
  line-height: 0.92;
  text-wrap: balance;
  text-shadow: 0 18px 70px rgba(0, 0, 0, 0.9);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 10px 12px 10px 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  box-shadow:
    0 28px 100px rgba(0, 0, 0, 0.62),
    inset 0 1px 0 rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(24px) saturate(1.35);
}

.search-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--gold-bright);
  font-size: 1.75rem;
  font-weight: 900;
  line-height: 1;
}

#searchInput {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: clamp(1.05rem, 2.6vw, 1.45rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

#searchInput::placeholder {
  color: rgba(255, 248, 232, 0.52);
}

#shuffleButton {
  flex: 0 0 auto;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 900;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

#shuffleButton:hover,
#shuffleButton:focus-visible {
  transform: rotate(18deg) scale(1.04);
  border-color: rgba(229, 160, 13, 0.48);
  background: rgba(229, 160, 13, 0.22);
}

.results {
  width: min(700px, calc(100% - 22px));
  max-height: min(420px, 42vh);
  margin: 14px auto 0;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 26px;
  background: var(--panel-strong);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(26px) saturate(1.35);
  text-align: left;
}

.result-item {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 14px;
  width: 100%;
  padding: 12px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  background: transparent;
  color: var(--text);
  text-align: left;
}

.result-item:last-child {
  border-bottom: 0;
}

.result-item:hover,
.result-item:focus-visible {
  outline: 0;
  background: rgba(255, 255, 255, 0.08);
}

.result-poster {
  width: 58px;
  height: 84px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12) center / cover no-repeat;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
}

.result-title {
  display: block;
  margin-top: 4px;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.result-meta {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.empty {
  padding: 18px 20px;
  color: var(--muted);
  font-weight: 700;
  text-align: center;
}

.stats-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 34px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
  gap: 28px;
  width: 100%;
  padding: 0 clamp(34px, 7vw, 112px);
  pointer-events: none;
}

.stat-card {
  min-width: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  text-shadow: 0 18px 60px rgba(0, 0, 0, 0.95);
}

.stat-card--movies {
  text-align: left;
}

.stat-card--shows {
  text-align: right;
}

.stat-value {
  display: block;
  color: var(--text);
  font-size: clamp(2.8rem, 7.4vw, 7.4rem);
  font-weight: 900;
  letter-spacing: -0.085em;
  line-height: 0.82;
}

.stat-label {
  display: block;
  margin-top: 10px;
  color: var(--gold-bright);
  font-size: clamp(0.72rem, 1.1vw, 0.98rem);
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
}

.spotlight {
  position: fixed;
  right: 24px;
  bottom: 20px;
  max-width: min(520px, calc(100vw - 48px));
  margin: 0;
  color: var(--faint);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-align: right;
  text-shadow: 0 6px 22px rgba(0, 0, 0, 0.8);
}

.stats-bar:not([hidden]) + .spotlight {
  display: none;
}

@media (max-width: 760px) {
  body {
    overflow-y: auto;
  }

  .page {
    align-items: start;
    min-height: 100svh;
    padding: 18px;
  }

  .search-shell {
    width: 100%;
    margin-top: 12svh;
    transform: none;
  }

  h1 {
    margin-bottom: 22px;
    font-size: clamp(2.45rem, 15vw, 4.4rem);
  }

  .search-box {
    min-height: 66px;
    padding-left: 18px;
  }

  #shuffleButton {
    width: 48px;
    height: 48px;
  }

  .results {
    max-height: 38vh;
  }

  .stats-bar {
    bottom: 18px;
    gap: 16px;
    padding: 0 18px;
  }

  .stat-value {
    font-size: clamp(2.25rem, 14vw, 4rem);
  }

  .stat-label {
    margin-top: 7px;
    font-size: 0.62rem;
    letter-spacing: 0.16em;
  }

  .spotlight {
    display: none;
  }
}

@media (max-height: 700px) and (min-width: 761px) {
  .search-shell {
    transform: translateY(-54px);
  }

  h1 {
    font-size: clamp(2.2rem, 7vw, 4.8rem);
  }

  .stats-bar {
    bottom: 18px;
  }

}


.request-card {
  padding: 24px;
  color: var(--text);
  text-align: center;
}

.request-card strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(1.2rem, 3vw, 1.65rem);
  font-weight: 900;
  letter-spacing: -0.045em;
}

.request-card p {
  max-width: 520px;
  margin: 10px auto 0;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 650;
  line-height: 1.45;
}

.request-eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-bright);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
