/* spel-tips.nl shared game template - matches homepage palette
   primary #1e3a8a (dark blue), accent #f59e0b (amber) */
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: #f3f4f6;
  color: #111827;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Top bar */
.topbar {
  background: #1e3a8a;
  color: #fff;
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.brand {
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  opacity: 0.85;
  font-size: 0.9rem;
}
.brand:hover { opacity: 1; }
.game-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  flex: 1 1 auto;
  text-align: center;
}
.hud {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
}
.hud-item {
  background: rgba(255, 255, 255, 0.12);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
}

/* Mute toggle */
.mute-btn {
  background: #f59e0b;
  color: #1f2937;
  border: 0;
  padding: 0.35rem 0.7rem;
  border-radius: 4px;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  font-weight: 600;
}
.mute-btn:hover { background: #fbbf24; }
.mute-btn .mute-off { display: none; }
.mute-btn[aria-pressed="true"] { background: #6b7280; color: #fff; }
.mute-btn[aria-pressed="true"] .mute-on { display: none; }
.mute-btn[aria-pressed="true"] .mute-off { display: inline; }

/* Stage / canvas */
.stage {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  position: relative;
}
#gameCanvas {
  background: #fff;
  border: 2px solid #1e3a8a;
  border-radius: 6px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
  max-width: 100%;
  height: auto;
  touch-action: none;
}

/* Overlays */
.overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
}
.overlay[hidden] { display: none; }
.overlay-card {
  background: #fff;
  padding: 1.5rem 2rem;
  border-radius: 8px;
  text-align: center;
  min-width: 240px;
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.4);
}
.overlay-card h2 { margin-top: 0; color: #1e3a8a; }
.btn-primary {
  background: #f59e0b;
  color: #1f2937;
  border: 0;
  padding: 0.6rem 1.2rem;
  border-radius: 4px;
  font-weight: 700;
  cursor: pointer;
  font-size: 1rem;
  margin-top: 0.6rem;
}
.btn-primary:hover { background: #fbbf24; }

/* Touch pad - hidden on desktop */
.touchpad {
  display: none;
  padding: 0.5rem;
  background: #e5e7eb;
  user-select: none;
}
.touchpad .tbtn-row {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 0.4rem;
}
.tbtn {
  background: #1e3a8a;
  color: #fff;
  border: 0;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  font-size: 1.2rem;
  margin: 0 auto;
  display: block;
  cursor: pointer;
  touch-action: manipulation;
}
.tbtn:active { background: #f59e0b; color: #1f2937; }

/* Bottom bar */
.bottombar {
  background: #e5e7eb;
  color: #4b5563;
  font-size: 0.8rem;
  padding: 0.6rem 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  border-top: 1px solid #d1d5db;
}
.link {
  color: #1e3a8a;
  text-decoration: none;
  background: none;
  border: 0;
  font: inherit;
  cursor: pointer;
  padding: 0;
}
.link:hover { text-decoration: underline; }

/* Mobile breakpoint - show touch pad */
@media (max-width: 768px) {
  .touchpad { display: block; }
  .game-title { font-size: 1rem; flex-basis: 100%; order: -1; }
  .hud { font-size: 0.8rem; }
  #gameCanvas { width: 100%; }
}
