/* Light-mode UI; cute, rounded. */
:root {
  --bg: #f7f7fb;
  --card: #ffffff;
  --ink: #223;
  --muted: #5a6473;
  --accent: #2b7fff;
  --shadow: 0 10px 30px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: linear-gradient(#fdfdff, #f5f7fb);
  color: var(--ink);
  font: 16px/1.5 "Work Sans", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  display: grid;
  grid-template-rows: auto 1fr;
  place-items: center;
}

#game {
  width: 96vw;
  max-width: 1100px;
  aspect-ratio: 16/9;
  background: #bde6ff; /* sky base; will be painted over */
  border-radius: 16px;
  box-shadow: var(--shadow);
  image-rendering: pixelated;
}

/* HUD */
#hud {
  width: 96vw;
  max-width: 1100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0 8px;
}
#instructions {
  font-weight: 600;
  color: var(--muted);
}
.cycles {
  position: relative;
  height: 48px;
  width: 240px;
  display: grid;
  grid-auto-flow: column;
  gap: 12px;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  z-index: 10;
}
.modal.hidden { display: none; }
.modal-card {
  background: var(--card);
  color: var(--ink);
  width: 60vw;
  border-radius: 18px;
  padding: 22px 22px 18px;
  box-shadow: var(--shadow);
}
.modal-card h1 {
  margin: 0 0 6px;
  font-size: 28px;
}
.modal-card p { margin: 0 0 18px; color: var(--muted); }
.modal-card .primary {
  border: 0;
  background: var(--accent);
  color: white;
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(43,127,255,0.35);
}
.modal-card .primary:active { transform: translateY(1px); }
