*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0b1220;
  color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto,
    "Helvetica Neue", Arial, sans-serif;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  overscroll-behavior: none;
  touch-action: manipulation;
}

#game {
  position: fixed;
  inset: 0;
}

#phaser-host {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#word-input {
  position: fixed;
  bottom: 8%;
  left: 50%;
  transform: translateX(-50%);
  width: min(560px, 84%);
  font-size: 28px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  padding: 14px 20px;
  border: 3px solid #4d9bff;
  border-radius: 10px;
  background: rgba(11, 18, 32, 0.92);
  color: #ffffff;
  text-align: center;
  outline: none;
  display: none;
  z-index: 5;
  letter-spacing: 1px;
}

#word-input::placeholder {
  color: #5a6680;
}

#word-input:focus {
  border-color: #4dff8a;
  box-shadow: 0 0 0 4px rgba(77, 255, 138, 0.2);
}

#word-input.show-error {
  border-color: #ff4d5a;
  animation: shake 0.18s linear 1;
}

@keyframes shake {
  0%, 100% { transform: translateX(-50%); }
  25%      { transform: translateX(calc(-50% + 8px)); }
  75%      { transform: translateX(calc(-50% - 8px)); }
}
