/* main.css */
/* High-contrast, kiosk-friendly styles */

:root {
  --bg: #0b0f1a;
  --panel: #12182a;
  --text: #e8ecf3;
  --muted: #8f9bb3;
  --accent: #4da3ff;
  --danger: #ff4d4d;
  --good: #36d97c;
}

html,
body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
}

#app {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.screen {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
}

.screen.active {
  display: flex;
}

.center {
  text-align: center;
  padding: 2rem;
}

.logo {
  width: 96px;
  height: auto;
  margin: 0 auto 1.5rem;
  border-radius: 12px;
}

h1 {
  font-size: 2.25rem;
  margin-bottom: 0.5rem;
}

h2 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

.primary {
  font-size: 1.25rem;
  padding: 1rem 2.5rem;
  border-radius: 999px;
  background: var(--accent);
  color: #000;
}

.primary:active {
  transform: scale(0.97);
}

.hud {
  position: absolute;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  z-index: 10;
}

.hud-item {
  background: var(--panel);
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  min-width: 92px;
  text-align: center;
}

.hud-item .label {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.hud-item .value {
  font-size: 1.25rem;
}

.meter {
  width: 120px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin: 0 auto;
  transform-origin: center;
}

.meter-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 80ms linear;
}

/* Feedback flashes driven by ui.js */
.meter.flash-good {
  box-shadow: 0 0 24px rgba(54, 217, 124, 0.35);
}
.meter.flash-good .meter-fill {
  background: var(--good);
}

.meter.flash-bad {
  box-shadow: 0 0 24px rgba(255, 77, 77, 0.35);
}
.meter.flash-bad .meter-fill {
  background: var(--danger);
}

.stage {
  width: 100%;
  height: 100%;
  position: relative;
}

#gameCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.instruction {
  position: relative;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.05rem;
  color: var(--muted);
  text-align: center;
  padding: 0 1rem;
}

@media (min-width: 900px) {
  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 4rem;
  }

  .primary {
    font-size: 1.5rem;
  }
}
