*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: system-ui, -apple-system, sans-serif;
  background: #0a0a0a;
  color: #fafafa;
  overflow: hidden;
}

canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#overlay {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 20px 28px;
  gap: 10px;
  background: linear-gradient(transparent, rgba(0, 0, 10, 0.85));
  z-index: 10;
}

#display-text {
  font-size: clamp(18px, 4vw, 34px);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-shadow: 0 0 24px rgba(0, 210, 255, 0.9);
  min-height: 1.2em;
  text-align: center;
  color: #e8f8ff;
}

#morse-display {
  font-family: monospace;
  font-size: clamp(14px, 2.5vw, 18px);
  letter-spacing: 4px;
  color: #00ffcc;
  text-shadow: 0 0 12px #00ffcc;
  min-height: 1.4em;
  text-align: center;
  word-break: break-all;
  max-width: 90vw;
}

#text-input {
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(0, 200, 255, 0.45);
  border-radius: 30px;
  padding: 11px 28px;
  font-size: 18px;
  color: #fff;
  outline: none;
  width: min(440px, 90vw);
  text-align: center;
  transition: border-color 0.25s, box-shadow 0.25s;
}

#text-input:focus {
  border-color: rgba(0, 210, 255, 0.9);
  box-shadow: 0 0 22px rgba(0, 210, 255, 0.18);
}

#text-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

#hint {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.03em;
}
