@font-face {
  font-family: "Anton Local";
  src: url("/fonts/Anton-Regular.woff2") format("woff2");
  font-display: swap;
}

html, body {
  margin: 0;
  height: 100%;
  background: #07080c;
  color: #f4f1ea;
  font-family: "Segoe UI", sans-serif;
  overflow: hidden;
  touch-action: none;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: #071018;
}

button, input { font: inherit; color: inherit; }

#menu, #fin {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  background: rgba(7, 8, 12, 0.9);
  text-align: center;
}

#menu[hidden], #fin[hidden], #hud[hidden] { display: none; }

.marca, h1, h2, #marca {
  font-family: "Anton Local", Impact, sans-serif;
  letter-spacing: 0.08em;
  margin: 0;
}

h1 { font-size: clamp(48px, 10vw, 92px); line-height: 0.9; }
h2 { font-size: clamp(36px, 8vw, 72px); }
.marca { color: #e10600; }

#resumen, #fin-texto, .nota {
  max-width: 38rem;
  margin: 0;
  line-height: 1.45;
}

.dificultades { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }

button {
  background: #14161c;
  border: 1px solid #3a3d46;
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
}

button.activa, button.jugar { background: #e10600; border-color: #e10600; color: #fff; }
button.texto { background: transparent; }

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

#barra, #mando, #lado { pointer-events: auto; }

#barra {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  background: linear-gradient(#07080c, rgba(7, 8, 12, 0));
}

#recursos { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
#marca { color: #e10600; }

#lado {
  position: absolute;
  top: 64px;
  right: 8px;
  width: min(220px, 46vw);
  max-height: calc(100% - 150px);
  overflow: auto;
  background: rgba(7, 8, 12, 0.82);
  border: 1px solid #2a2d34;
  border-radius: 12px;
  padding: 8px;
}

#lado button { display: block; width: 100%; margin-top: 6px; text-align: left; }

#mando {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px;
  background: linear-gradient(rgba(7, 8, 12, 0), #07080c 28%);
}

#obras { display: flex; flex-wrap: wrap; gap: 6px; }
#ataque { width: 120px; }
.aviso { color: #ffb020; }

@media (max-width: 720px) {
  #lado { top: auto; bottom: 108px; max-height: 28vh; }
}
