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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0a1a2a;
  font-family: 'Baloo 2', 'Trebuchet MS', sans-serif;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

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

#game-container canvas {
  display: block;
  width: 100%;
  height: 100%;
}

#ui-root {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

#ui-root > * {
  pointer-events: auto;
}

.hidden {
  display: none !important;
}

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  background: rgba(20, 40, 20, 0.45);
  gap: 16px;
  padding: 24px;
}

.screen h1 {
  font-size: 3rem;
  margin: 0;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.25);
}

.screen h2 {
  font-size: 2.2rem;
  margin: 0;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.25);
}

.screen p {
  font-size: 1.2rem;
  margin: 0;
  max-width: 600px;
}

.screen button {
  font-family: inherit;
  font-size: 1.3rem;
  font-weight: 700;
  padding: 12px 32px;
  border-radius: 999px;
  border: none;
  background: #ffb703;
  color: #432a00;
  cursor: pointer;
  box-shadow: 0 4px 0 #b8780a;
}

.screen button:hover {
  background: #ffc73d;
}

.screen button:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #b8780a;
}

#hud {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: space-between;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

#hud > div {
  background: rgba(0, 0, 0, 0.35);
  padding: 8px 16px;
  border-radius: 12px;
}

#hud-pause-btn {
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 12px;
  border: none;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  cursor: pointer;
  pointer-events: auto;
}

#hud-pause-btn:hover {
  background: rgba(0, 0, 0, 0.5);
}

#breed-grid, #level-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  max-width: 900px;
}

.breed-card {
  background: rgba(0, 0, 0, 0.35);
  border: 3px solid transparent;
  border-radius: 16px;
  padding: 16px 20px;
  width: 200px;
  cursor: pointer;
  transition: transform 0.1s, border-color 0.15s, background 0.15s;
  text-align: left;
}

.breed-card:hover {
  background: rgba(0, 0, 0, 0.5);
  transform: translateY(-2px);
}

.breed-card.selected {
  border-color: #ffb703;
  background: rgba(0, 0, 0, 0.55);
}

.breed-card h3 {
  font-size: 1.3rem;
  margin: 0 0 6px;
}

.breed-card p {
  font-size: 0.95rem;
  margin: 0 0 10px;
  max-width: none;
  min-height: 3.4em;
}

.breed-stat {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  letter-spacing: 1px;
}

.breed-stat span {
  letter-spacing: normal;
  opacity: 0.85;
}

#btn-breed-confirm:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.level-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: #8a8a8a;
  box-shadow: 0 4px 0 #5a5a5a;
}
