* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body {
  background: radial-gradient(circle at 50% 0%, #2a2150, #12101f 70%);
  color: #f3f1ff;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
}
#app {
  width: 100vw; height: 100vh; max-width: 640px; margin: 0 auto;
  padding: min(4vh, 20px) min(5vw, 24px);
  display: flex; flex-direction: column; justify-content: center; gap: min(2.2vh, 14px);
}
header { display: flex; justify-content: space-between; align-items: center; }
.head-right { display: flex; align-items: center; gap: 8px; }
h1 { font-size: clamp(16px, 4.5vw, 22px); letter-spacing: .5px; }
#tries { display: flex; gap: 6px; font-size: clamp(16px, 4.5vw, 20px); }
#tries span { transition: opacity .3s, transform .3s; }
#tries span.lost { opacity: .2; transform: scale(.8); filter: grayscale(1); }
#emojis {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: min(2vw, 10px); padding: min(3vh, 18px) 10px;
  background: #ffffff10; border: 1px solid #ffffff22; border-radius: 20px;
  font-size: clamp(34px, min(13vw, 11vh), 76px); line-height: 1.15;
}
#emojis span { animation: pop .4s backwards; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } }
#hints { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; min-height: 0; }
#hints:empty { display: none; }
.chip { background: #6c5ce733; border: 1px solid #8f82ff; padding: 4px 12px; border-radius: 99px; font-size: clamp(13px, 3.6vw, 15px); }
#msg { text-align: center; min-height: 1.4em; color: #c9c3f0; font-size: clamp(14px, 4vw, 16px); }
#msg.bad { color: #ff8b8b; }
#msg.good { color: #7dffa8; font-weight: 700; }
#msg.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
#form { display: flex; gap: 8px; }
input {
  flex: 1; min-width: 0; padding: 12px 14px; font-size: 16px; color: #fff;
  background: #0d0b1a; border: 2px solid #4a4280; border-radius: 12px; outline: none;
}
input:focus { border-color: #8f82ff; }
button { font: inherit; cursor: pointer; border: 0; border-radius: 12px; touch-action: manipulation; }
#go { padding: 0 20px; background: #6c5ce7; color: #fff; font-weight: 700; }
#go:hover { background: #7d6ff0; }
#past { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
#past span { text-decoration: line-through; color: #ff8b8b; background: #ff8b8b18; padding: 3px 10px; border-radius: 99px; font-size: 14px; }
.row { display: flex; gap: 8px; justify-content: center; }
.ghost { background: #ffffff12; color: #ddd8ff; padding: 10px 16px; font-size: clamp(13px, 3.6vw, 15px); border: 1px solid #ffffff25; }
.ghost:hover { background: #ffffff22; }
button:disabled, input:disabled { opacity: .45; cursor: default; }
#reveal {
  text-align: center; padding: 12px 14px; border-radius: 14px; background: #ffffff10;
  border: 1px solid #ffffff22; font-size: clamp(13px, 3.6vw, 15px); line-height: 1.4;
}
#reveal b { display: block; font-size: clamp(18px, 5.5vw, 24px); margin-bottom: 4px; color: #ffd86b; }
#reveal.win b { color: #7dffa8; }
[hidden] { display: none !important; }
@media (max-height: 520px) { #emojis { padding: 8px; } #app { gap: 8px; } }
