/* ── Search screen ───────────────────────────── */
#screen-search { flex-direction: column; gap: 28px; padding: 0 32px; }

.search-heading h1 { font-size: 26px; font-weight: 700; text-align: center; color: var(--text); margin-bottom: 8px; }
.search-heading p { color: var(--muted); font-size: 14px; text-align: center; }

.search-box { position: relative; width: 380px; }
.search-input {
  width: 100%; padding: 13px 50px 13px 18px;
  background: #0e0e0e; border: 1px solid var(--border); border-radius: 40px;
  color: var(--text); font-family: inherit; font-size: 15px;
  outline: none; transition: border-color 0.15s;
}
.search-input:focus { border-color: var(--accent); }
.search-input::placeholder { color: var(--muted); }
.search-go {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: 50%; border: none;
  background: var(--text); color: var(--bg); font-size: 17px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.search-go:hover { opacity: 0.85; }

.suggest-drop {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--surface2); border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden; box-shadow: 0 12px 40px rgba(0,0,0,0.5); display: none; z-index: 50;
}
.suggest-drop.open { display: block; }
.suggest-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; cursor: pointer;
  border-bottom: 1px solid var(--border); transition: background 0.1s;
}
.suggest-item:last-child { border-bottom: none; }
.suggest-item:hover, .suggest-item.hi { background: rgba(3,209,183,0.1); }
.suggest-pic { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.suggest-ph {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--border); display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.suggest-name { font-weight: 600; font-size: 13px; }
.suggest-fans { font-size: 11px; color: var(--muted); }
.suggest-empty { padding: 12px 14px; color: var(--muted); font-size: 13px; text-align: center; }

/* ── Loading screen ──────────────────────────── */
#screen-loading { flex-direction: column; gap: 20px; text-align: center; }
.load-icon { font-size: 48px; animation: rock 2.5s ease-in-out infinite; display: block; }
@keyframes rock {
  0%, 100% { transform: rotate(-8deg); }
  50% { transform: rotate(8deg); }
}
.load-msg { font-size: 16px; font-weight: 500; min-height: 24px; }
.load-sub { font-size: 12px; color: var(--muted); }

/* ── Game screen ─────────────────────────────── */
#screen-game { padding: 0 32px; }

.game-card { width: 440px; background: var(--surface); border: 1px solid var(--border); border-radius: 22px; }
.art-banner { position: relative; height: 130px; overflow: hidden; border-radius: 22px 22px 0 0; }
.art-bg { width: 100%; height: 100%; object-fit: cover; filter: blur(16px) brightness(0.4) saturate(1.4); transform: scale(1.15); }
.art-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.art-thumb {
  width: 76px; height: 76px; border-radius: 11px; object-fit: cover;
  box-shadow: 0 4px 20px rgba(0,0,0,0.6); filter: blur(14px); transition: filter 0.6s;
}
.art-thumb.revealed { filter: blur(0); }
.art-question { font-size: 32px; position: absolute; }
.card-body { padding: 20px 20px 18px; }

.level-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.level-badge {
  font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent2); background: rgba(3,209,183,0.12);
  border: 1px solid rgba(3,209,183,0.2); border-radius: 20px; padding: 3px 10px;
}
.pts-badge { font-size: 13px; font-weight: 700; color: var(--accent2); }
.new-game-btn {
  margin-left: auto; background: none; border: 1px solid var(--border); border-radius: 8px;
  color: var(--muted); font-family: inherit; font-size: 11px; font-weight: 600;
  padding: 4px 10px; cursor: pointer; letter-spacing: 0.04em;
}
.new-game-btn:hover { border-color: var(--text); color: var(--text); }

.pips { display: flex; gap: 5px; margin-bottom: 16px; }
.pip { flex: 1; height: 3px; border-radius: 2px; background: var(--border); transition: background 0.3s; }
.pip.done { background: rgba(3,209,183,0.4); }
.pip.active { background: var(--accent); }

.stems { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 16px; }
.stem-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 7px 12px; border-radius: 9px;
  border: 1px solid var(--border); background: var(--surface2);
  color: var(--muted); font-family: inherit; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
}
.stem-btn.on { background: rgba(3,209,183,0.15); border-color: var(--accent); color: var(--accent2); }
.stem-btn.locked { opacity: 0.2; cursor: not-allowed; pointer-events: none; }
.stem-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--border); }
.stem-btn.on .stem-dot { background: var(--accent); }

.waveform { display: flex; align-items: center; gap: 2px; height: 30px; margin-bottom: 14px; }
.wbar { width: 3px; border-radius: 2px; background: var(--border); }
.waveform.playing .wbar { background: var(--accent); animation: wav 1s ease-in-out infinite; }
@keyframes wav {
  0%, 100% { height: 3px; }
  50% { height: 26px; }
}
.waveform.playing .wbar:nth-child(2) { animation-delay: 0.07s; }
.waveform.playing .wbar:nth-child(3) { animation-delay: 0.15s; }
.waveform.playing .wbar:nth-child(4) { animation-delay: 0.22s; }
.waveform.playing .wbar:nth-child(5) { animation-delay: 0.11s; }
.waveform.playing .wbar:nth-child(6) { animation-delay: 0.19s; }
.waveform.playing .wbar:nth-child(7) { animation-delay: 0.04s; }
.waveform.playing .wbar:nth-child(8) { animation-delay: 0.26s; }
.waveform.playing .wbar:nth-child(9) { animation-delay: 0.09s; }
.waveform.playing .wbar:nth-child(10) { animation-delay: 0.17s; }

.transport { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.play-btn {
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: var(--accent); color: #fff; font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; box-shadow: 0 0 16px rgba(3,209,183,0.3);
  touch-action: manipulation;
}
.play-btn:hover { transform: scale(1.08); }
.prog-wrap { flex: 1; height: 3px; background: var(--border); border-radius: 2px; cursor: pointer; overflow: hidden; }
.prog-fill { height: 100%; background: var(--accent); border-radius: 2px; }
.time-lbl { font-size: 11px; color: var(--muted); min-width: 28px; text-align: right; }

.feedback {
  display: none; align-items: center;
  padding: 9px 13px; border-radius: 9px; margin-bottom: 12px;
  font-size: 13px; font-weight: 500;
}
.feedback.show { display: flex; }
.feedback.wrong { background: rgba(248,113,113,0.1); color: var(--red); border: 1px solid rgba(248,113,113,0.2); }
.feedback.correct { background: rgba(34,211,165,0.1); color: var(--green); border: 1px solid rgba(34,211,165,0.2); }

.result-banner {
  display: none; flex-direction: column; align-items: center; gap: 5px;
  padding: 14px; text-align: center; border-radius: 12px;
  background: var(--surface2); border: 1px solid var(--border); margin-bottom: 12px;
}
.result-banner.show { display: flex; }
.result-title { font-size: 16px; font-weight: 700; }
.result-artist { font-size: 12px; color: var(--muted); }
.result-score { font-size: 12px; color: var(--accent2); font-weight: 600; margin-top: 2px; }

.guess-wrap { display: flex; align-items: center; gap: 7px; }
.guess-suggest-wrap { flex: 1; min-width: 0; position: relative; }
.guess-drop {
  position: absolute; bottom: calc(100% + 6px); left: 0; right: 0;
  background: var(--surface2); border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; box-shadow: 0 -10px 28px rgba(0,0,0,0.5); display: none; z-index: 50;
}
.guess-drop.open { display: block; }
.guess-drop-item {
  padding: 9px 14px; cursor: pointer; border-bottom: 1px solid var(--border);
  font-size: 13px; transition: background 0.1s;
}
.guess-drop-item:last-child { border-bottom: none; }
.guess-drop-item:hover, .guess-drop-item.hi { background: rgba(3,209,183,0.1); }
.guess-drop-item span { color: var(--muted); font-size: 11px; margin-left: 6px; }
.guess-input {
  width: 100%; padding: 10px 14px; background: #0e0e0e;
  border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); font-family: inherit; font-size: 13px;
  outline: none; transition: border-color 0.15s;
}
.guess-input:focus { border-color: var(--accent); }
.guess-input::placeholder { color: var(--muted); }
.guess-btn {
  padding: 10px 16px; background: var(--accent); border: none; border-radius: 10px;
  color: #fff; font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
}
.guess-btn:hover { background: #6b4de8; }
.hint-btn {
  padding: 10px 12px; background: transparent;
  border: 1px solid var(--border); border-radius: 10px;
  color: var(--muted); font-family: inherit; font-size: 12px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
}
.hint-btn:hover { border-color: var(--accent2); color: var(--accent2); }
.hint-btn:disabled { opacity: 0.2; cursor: not-allowed; }

.play-again-btn {
  width: 100%; padding: 11px; background: transparent;
  border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.play-again-btn:hover { border-color: var(--accent); color: var(--accent2); }

/* ── Responsive ──────────────────────────────── */
@media (max-width: 680px) {
  #screen-search { padding: 0 20px; }
  .search-box { width: 100%; }
  .search-input { font-size: 14px; padding: 12px 48px 12px 16px; }
  #screen-game { padding: 0 16px; }
}
