/* Trashy Bird - full viewport game */
:root {
  --bg: #0b0f14;
  --fg: #e9eef6;
  --muted: #9fb0c5;
  --border: rgba(255,255,255,.08);
  --accent: #f4c84a;
  --accent2: #ff7a59;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--fg);
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}

/* Full-screen game viewport */
.viewport {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

/* Canvas fills viewport while keeping 360:640 aspect */
.canvas-wrap {
  width: min(100vw, 100vh * 360 / 640);
  height: min(100vh, 100vw * 640 / 360);
  position: relative;
  flex-shrink: 0;
}
.viewport canvas {
  width: 100%;
  height: 100%;
  display: block;
  background: #0c121b;
}

/* Minimal top bar overlay */
.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: linear-gradient(180deg, rgba(0,0,0,.5), transparent);
  pointer-events: none;
}
.topbar .controls { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 8px; }
.logo { font-size: 20px; }
.title { font-weight: 800; letter-spacing: -0.02em; font-size: 16px; }
.controls { display: flex; gap: 6px; }
.btn.icon-btn {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,.35);
  color: var(--fg);
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn.icon-btn:hover { background: rgba(255,255,255,.1); }
.btn.icon-btn .icon { font-size: 16px; }

/* HUD overlay */
.hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 48px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.scoreline { display: flex; gap: 8px; }
.chip {
  background: rgba(0,0,0,.4);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 12px;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}
.chipLabel { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.chipValue { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.hint {
  font-size: 14px;
  color: rgba(233,238,246,.9);
  text-shadow: 0 2px 12px rgba(0,0,0,.5);
}

/* Game over overlay: tap anywhere (except buttons) to restart */
.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.65);
  padding: 20px;
  cursor: pointer;
}
.overlay[hidden] {
  display: none;
}
.card {
  width: min(320px, 100%);
  background: linear-gradient(180deg, rgba(255,255,255,.1), rgba(255,255,255,.04));
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 24px 64px rgba(0,0,0,.6);
}
.cardTitle { font-size: 24px; font-weight: 900; letter-spacing: -0.03em; text-align: center; }
.cardScore {
  margin-top: 16px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,.3);
}
.row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; }
.row strong { font-size: 18px; }
.cardActions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; justify-content: center; }
.tiny { margin-top: 12px; color: var(--muted); font-size: 12px; text-align: center; }

.btn.big {
  padding: 14px 20px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.08);
  color: var(--fg);
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
}
.btn.big:hover { background: rgba(255,255,255,.14); }
.btn.big.secondary { background: rgba(255,255,255,.04); }

/* Footer */
.footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px;
  text-align: center;
  pointer-events: none;
}
.footer-link {
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  pointer-events: auto;
}
.footer-link:hover { color: var(--fg); }
