:root {
  --sand-1: #c98f56;
  --sand-2: #9f6f43;
  --dust: #e0c08d;
  --ink: #27170e;
  --panel: rgba(48, 30, 20, 0.58);
  --panel-border: rgba(255, 231, 191, 0.32);
  --accent: #ffd07b;
}

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

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: "Avenir Next Condensed", "DIN Condensed", "Trebuchet MS", sans-serif;
  color: #fff9eb;
  background:
    radial-gradient(circle at 20% 12%, rgba(255, 220, 160, 0.34), transparent 38%),
    radial-gradient(circle at 83% 16%, rgba(181, 109, 54, 0.34), transparent 42%),
    linear-gradient(170deg, var(--sand-1), var(--sand-2));
}

canvas {
  display: block;
}

#ui {
  position: fixed;
  inset: 0;
  pointer-events: none;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.hud {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 220px;
}

.hud.left,
.hud.right {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 12px 14px;
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 24px rgba(28, 13, 6, 0.22);
}

.hud.center {
  align-items: center;
  margin-top: 8px;
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
  font-size: 17px;
  letter-spacing: 0.2px;
}

.row span {
  color: rgba(255, 241, 214, 0.82);
}

.row strong {
  color: #fff9ea;
  text-shadow: 0 0 12px rgba(255, 208, 123, 0.34);
}

#countdown {
  min-width: 100px;
  text-align: center;
  font-size: clamp(38px, 6.5vw, 84px);
  font-weight: 800;
  letter-spacing: 1px;
  color: #fff5df;
  text-shadow:
    0 0 22px rgba(255, 210, 134, 0.65),
    0 0 42px rgba(128, 67, 26, 0.45);
  animation: pulse 1.1s ease-in-out infinite;
}

#message {
  margin-top: 8px;
  font-size: clamp(16px, 2vw, 25px);
  font-weight: 650;
  text-align: center;
  color: #fff8e8;
  text-shadow: 0 0 18px rgba(124, 61, 23, 0.6);
}

#help {
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  pointer-events: none;
  background: rgba(38, 23, 15, 0.62);
  border: 1px solid rgba(255, 228, 183, 0.26);
  border-radius: 100px;
  padding: 10px 16px;
  font-size: 13px;
  letter-spacing: 0.25px;
  box-shadow: 0 10px 24px rgba(23, 11, 7, 0.25);
}

#help span {
  white-space: nowrap;
  color: rgba(255, 243, 220, 0.92);
}

@keyframes pulse {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-1px);
  }
}

@media (max-width: 920px) {
  #ui {
    padding: 10px;
    gap: 9px;
    flex-direction: column;
    align-items: stretch;
  }

  .hud {
    min-width: 0;
  }

  .hud.center {
    align-items: flex-start;
    margin-top: 0;
  }

  #countdown {
    text-align: left;
  }

  #help {
    width: calc(100vw - 20px);
    border-radius: 12px;
  }
}
