* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, #0f172a, #020617);
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Inter', system-ui, sans-serif;
  color: #e5e7eb;
}

.app {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 16px;
}

.game-card {
  width: 100%;
  max-width: 520px;
  background: linear-gradient(180deg, #020617, #020617);
  border-radius: 20px;
  padding: 28px;
  box-shadow:
    0 0 0 1px rgba(56, 189, 248, 0.18),
    0 30px 70px rgba(0, 0, 0, 0.7);
  text-align: center;
}

/* HEADER */
.game-header h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 1px;
}

.category {
  margin-top: 6px;
  font-size: 14px;
  color: #94a3b8;
}

/* CANVAS */
.canvas-wrapper {
  margin: 22px auto;
  width: 260px;
  height: 260px;
  border-radius: 16px;
  background: radial-gradient(circle at top, #020617, #020617);
  box-shadow:
    inset 0 0 0 1px rgba(56, 189, 248, 0.25),
    0 0 30px rgba(56, 189, 248, 0.08);
}

canvas {
  width: 100%;
  height: 100%;
}

/* SHAKE EFFECT */
canvas.shake {
  animation: shake 0.3s;
}

@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  50% { transform: translateX(6px); }
  75% { transform: translateX(-4px); }
  100% { transform: translateX(0); }
}

/* WORD */
.word {
  margin: 20px 0;
  font-size: 28px;
  letter-spacing: 12px;
  font-weight: 800;
}

/* ATTEMPTS */
.attempts {
  font-size: 15px;
  margin-bottom: 12px;
  color: #f87171;
}

/* HINT */
.hint {
  font-size: 14px;
  color: #cbd5f5;
  margin-bottom: 12px;
}

.hidden {
  display: none;
}

/* KEYBOARD */
.keyboard {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 24px 0;
}

.keyboard-row {
  display: flex;
  gap: 10px;
}

.keyboard-row:nth-child(2) {
  margin-left: 22px;
}

.keyboard-row:nth-child(3) {
  margin-left: 44px;
}

/* KEYS */
.key {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #020617;
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #e5e7eb;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.key:hover {
  background: #38bdf8;
  color: #020617;
  transform: translateY(-2px);
}

.key:active {
  transform: scale(0.95);
}

.key.disabled {
  opacity: 0.35;
  pointer-events: none;
  box-shadow: none;
}

/* ACTION BUTTONS */
.actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 16px;
}

.btn {
  border: none;
  border-radius: 12px;
  padding: 11px 22px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
}

.btn.primary {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  color: #020617;
}

.btn.primary:hover {
  transform: translateY(-2px);
}

.btn.secondary {
  background: linear-gradient(135deg, #facc15, #eab308);
  color: #020617;
}

.btn.secondary:hover {
  transform: translateY(-2px);
}
