/* ─── Layout ─────────────────────────────────────────────────── */
.zoom-wrap {
  max-width: 560px;
  margin: 2rem auto;
  padding: 0 1rem 4rem;
  text-align: center;
}

.zoom-header-section {
  margin-bottom: 1.8rem;
}

.zoom-title {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  padding-bottom: 0.12em;
}

.zoom-subtitle {
  color: var(--text-muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: 0.35rem;
}

/* ─── Sprite container ───────────────────────────────────────── */
.zoom-card {
  display: inline-block;
  width: 270px;
  height: 270px;
  overflow: hidden;
  border-radius: 20px;
  background: var(--surface);
  border: 2px solid var(--border);
  margin-bottom: 1rem;
  position: relative;
}

#zoom-sprite {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  transform-origin: center 75%;
  transform: scale(5);
  opacity: 0;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}

#zoom-sprite.ready {
  opacity: 1;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ─── Progress dots ──────────────────────────────────────────── */
.zoom-steps {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 1.2rem;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

.zoom-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.3s;
  flex-shrink: 0;
}

.zoom-dot-done {
  background: #38bdf8;
}

/* ─── Input & autocomplete ───────────────────────────────────── */
.zoom-input-wrap {
  position: relative;
  max-width: 360px;
  margin: 0 auto 0.75rem;
}

#zoom-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.15s;
}

#zoom-input:focus    { border-color: #38bdf8; }
#zoom-input:disabled { opacity: 0.45; cursor: not-allowed; }

#zoom-autocomplete {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  list-style: none;
  overflow: hidden;
  z-index: 50;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  text-align: left;
}

#zoom-autocomplete li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.1s;
}

#zoom-autocomplete li:hover { background: var(--surface2); }

#zoom-autocomplete li img {
  width: 45px;
  height: 45px;
  object-fit: contain;
  image-rendering: pixelated;
  flex-shrink: 0;
}

/* ─── Feedback & counter ─────────────────────────────────────── */
#zoom-feedback {
  font-size: 0.85rem;
  color: var(--text-muted);
  min-height: 1.2rem;
  margin-bottom: 0.5rem;
}

#zoom-counter {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

/* ─── Wrong guesses ──────────────────────────────────────────── */
.wrong-guesses {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  min-height: 1rem;
  margin-bottom: 0.75rem;
}

.wrong-tag {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.7rem;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 20px;
  font-size: 0.8rem;
  color: #f87171;
}

.wrong-tag img {
  width: 27px;
  height: 27px;
  object-fit: contain;
  image-rendering: pixelated;
}

/* ─── Replay ─────────────────────────────────────────────────── */
.replay-btn {
  display: block;
  margin: 0 auto 1.5rem;
  padding: 0.4rem 1rem;
  font-size: 0.78rem;
  border: 1px dashed var(--text-muted);
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.15s;
}
.replay-btn:hover { opacity: 1; }

/* ─── Result ─────────────────────────────────────────────────── */
#zoom-result {
  padding: 1.5rem 2rem;
  background: var(--surface);
  border-radius: 14px;
  border: 1px solid var(--border);
  text-align: left;
}

.result-header {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 1.2rem;
}

.result-sprite {
  width: 90px;
  height: 90px;
  object-fit: contain;
  image-rendering: pixelated;
  flex-shrink: 0;
}

.result-win  { font-size: 1.4rem; font-weight: 800; color: #4ade80; }
.result-lose { font-size: 1.2rem; font-weight: 800; color: #f87171; }

.result-pokemon-name { font-size: 1.1rem; font-weight: 700; margin-top: 0.15rem; }
.result-rank, .result-attempts { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.25rem; }

.result-countdown-section {
  text-align: center;
  border-top: 1px solid var(--border);
  padding-top: 1.2rem;
}

.result-countdown-section > p { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 0.4rem; }

.result-countdown {
  font-size: 2.2rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  color: #38bdf8;
}

.result-timezone { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.6rem; opacity: 0.65; }
