* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #1a1a2e;
  color: #eee;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

#app {
  text-align: center;
  padding: 2rem;
  max-width: 500px;
  width: 100%;
}

h1 {
  font-size: 1.6rem;
  margin-bottom: 2rem;
  color: #a0c4ff;
  letter-spacing: 0.05em;
}

#puzzle-area {
  margin-bottom: 2rem;
}

#tiles {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tile {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  background: #16213e;
  border: 2px solid #0f3460;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: bold;
  text-transform: uppercase;
  color: #e0e0e0;
  transition: transform 0.15s ease;
}

.tile.missing {
  color: #ff6b6b;
  border-color: #ff6b6b;
  background: #2a0a0a;
}

#input-area {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1rem;
}

#guess-input {
  padding: 0.6rem 1rem;
  font-size: 1.1rem;
  border-radius: 6px;
  border: 2px solid #0f3460;
  background: #16213e;
  color: #eee;
  width: 200px;
  text-transform: uppercase;
  outline: none;
  transition: border-color 0.2s;
}

#guess-input:focus {
  border-color: #a0c4ff;
}

button {
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

button:active {
  transform: scale(0.97);
}

#submit-btn {
  background: #0f3460;
  color: #eee;
}

#submit-btn:hover {
  background: #1a5276;
}

.hidden {
  display: none;
}

#giveup-btn {
  background: #5a2d2d;
  color: #eee;
  margin-top: 0.5rem;
}

#giveup-btn:hover {
  background: #7a3d3d;
}

#next-btn {
  background: #2d6a4f;
  color: #eee;
  margin-top: 0.5rem;
}

#next-btn:hover {
  background: #40916c;
}

#feedback {
  min-height: 2rem;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  font-weight: bold;
  transition: color 0.2s;
}

#feedback.correct {
  color: #52b788;
}

#feedback.wrong {
  color: #ff6b6b;
}

#score-area {
  margin-top: 1.5rem;
  color: #a0c4ff;
  font-size: 0.95rem;
}

#streak {
  font-weight: bold;
  font-size: 1.1rem;
}
