:root {
  /* Deep Juniper — dark focus-mode palette */
  --bg: #2D3A3A;            /* Deep Juniper — primary background */
  --text-primary: #EBF0F2;  /* Sky White — active text/input */
  --text-muted: #94A3A2;     /* Mist — labels, recedes so words pop */
  --frame-line: #455453;     /* Slate — empty slot borders */
  --reveal: #E28D77;         /* Warm Terracotta — correctly guessed letters */
}

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

body {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: "Times New Roman", Georgia, serif;
}

main {
  max-width: 520px;
  width: 100%;
  padding: 2.5rem 1.5rem 3rem;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 4rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--reveal);
  text-align: center;
}

.game-area {
  position: relative;
  margin-bottom: 3rem;
}

.tokens {
  position: absolute;
  top: -0.5rem;
  right: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

.theme {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  font-weight: 400;
}

.slots {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 0;
}

.slot {
  width: 2.5rem;
  min-width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  padding: 0;
  border-bottom: 2px solid var(--frame-line);
  color: var(--text-primary);
}

.slot.revealed {
  color: var(--reveal);
  opacity: 0;
  animation: fade-in 0.3s ease forwards;
}

.slots.won .slot.revealed {
  background-color: rgba(226, 141, 119, 0.12);
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

#guess-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

#guess-input {
  border: 1px solid var(--frame-line);
  padding: 0.5rem 0.75rem;
  font-size: 1.1rem;
  font-family: inherit;
  background-color: rgba(226, 141, 119, 0.05);
  color: var(--text-primary);
  text-align: center;
  min-width: 200px;
}

#guess-input:focus {
  outline: 2px solid var(--reveal);
  outline-offset: 2px;
}

button[type="submit"] {
  border: 1px solid var(--frame-line);
  background-color: transparent;
  padding: 0.4rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-primary);
  cursor: pointer;
}

button[type="submit"]:focus {
  outline: 2px solid var(--reveal);
  outline-offset: 2px;
}

button[type="submit"]:hover {
  border-color: var(--reveal);
}

.status {
  margin-top: 1.5rem;
  font-size: 1rem;
  color: var(--text-muted);
  text-align: center;
}

@media (min-width: 768px) {
  main {
    padding: 3rem 2rem 3.5rem;
  }

  h1 {
    font-size: 3rem;
    margin-bottom: 5rem;
  }
  
  .theme {
    font-size: 1.25rem;
  }
  
  .slot {
    width: 3rem;
    min-width: 3rem;
    height: 2.75rem;
    font-size: 2rem;
  }
  
  #guess-input {
    font-size: 1.2rem;
    min-width: 240px;
  }
  
  button[type="submit"] {
    font-size: 1.1rem;
    padding: 0.5rem 1.25rem;
  }
}
