@import url(https://fonts.onboard.org/roboto.400,500.css);

/* =========================
   TOKENS / BASE
   ========================= */
:root{
  --bg:#111635;
  --panel:#131621;
  --line:#2a2f45;
  --fg:#eef3ff;

  /* theme from design */
  --teal:#23c0ab;        /* labels + input outline */
  --orange:#f28b54;      /* primary button bg */
  --blue:#154065;        /* button text */
  --shadow:0 10px 30px rgba(0,0,0,.25);
  --gold:#ffd37a;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: Roboto, system-ui, -apple-system, Segoe UI, Arial, sans-serif;
  background:var(--bg);
  color:var(--fg);
  line-height:1.3;
}
.hidden{ display:none !important; }

/* Container nutzt volle Höhe und zentriert seine Kinder */
.container{
  min-height:100vh;
  max-width:960px;
  margin:0 auto;
  padding:16px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
}

/* =========================
   START SCREEN
   ========================= */
.view-start{
  position:relative;
  width:100%;
  height:min(100vh, 680px);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  padding:0;
}
.start-stage{
  position:absolute; inset:0;
  background:url("../img/onboom-start.png") center / min(100vw,1180px) auto no-repeat;
  background-color:var(--bg);
  margin-inline:auto;
  filter:none;
}
.btn-enter{
  background:var(--orange);
  color:var(--blue);
  font-weight:800;
  text-transform:uppercase;
  border:0;
  border-radius:50px;
  box-shadow: var(--shadow);
  letter-spacing:.5px;
  font-size:clamp(18px, 2.2vw, 36px);
  padding: clamp(10px,1.4vw,18px) clamp(28px,3.5vw,56px);
  cursor:pointer;
}
.btn-start{
  position:absolute; left:50%; bottom: 32%;
  transform:translateX(-50%);
}
.blink{ animation:blink 1.15s steps(2, jump-none) infinite; }
@keyframes blink{ 50%{ opacity:.6; } }

/* =========================
   GENERIC VIEW LAYOUT
   (name/email/company/privacy/character/game/gameover)
   ========================= */
.view{
  width:100%;
  min-height:min(100vh, 680px);
  display:flex; flex-direction:column;
  align-items:center; justify-content:center;
  text-align:center;
  padding:0 16px;
}

/* =========================
   WIZARD FORMS
   ========================= */
.view h2{
  margin:0 0 14px;
  color:var(--teal);
  font-weight:800;
  font-size: clamp(20px, 2.2vw, 32px);
}
.wizard-form{
  display:grid;
  justify-items:center;
  gap: clamp(14px, 2.2vh, 20px);
  width:min(880px, 92vw);
}
.inp{
  width:100%;
  height: clamp(48px, 7.2vh, 62px);
  padding: 0 20px;
  background:#f2f6f8;
  color:#0b1930;
  border:2px solid var(--teal);
  border-radius: clamp(20px, 6vh, 28px);
  outline:none;
  font-size: clamp(18px, 1.8vw, 24px);
  box-shadow: 0 6px 0 rgba(0,0,0,.08) inset;
  text-align:left;
}
.inp::placeholder{ color:#8aa3b8; opacity:.9; }
.inp:focus{ box-shadow:0 0 0 3px rgba(35,192,171,.25); }

/* Primärer Button im Wizard */
.btn{
  appearance:none; border:0; cursor:pointer;
  background:var(--orange); color:var(--blue);
  font-weight:800; text-transform:uppercase;
  border-radius:50px; box-shadow: var(--shadow);
  letter-spacing:.5px;
  font-size: clamp(16px, 1.6vw, 24px);
  padding: clamp(8px, 1.2vw, 14px) clamp(24px, 2.8vw, 40px);
}
.btn:hover{ filter:brightness(1.04); }
.btn:active{ transform:translateY(1px); }

/* Privacy QR */
.qr-wrap{
  width: clamp(140px, 18vw, 220px);
  height: clamp(140px, 18vw, 220px);
  border-radius: 12px;
  background:#fff;
  display:flex; align-items:center; justify-content:center;
  margin: clamp(10px, 2vh, 18px) 0 clamp(14px, 2.6vh, 22px);
  box-shadow: var(--shadow);
}
.qr-wrap img{
  width: 82%; height: 82%; object-fit:contain;
}

/* Character select */
.character-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap:16px;
  align-items:center; justify-items:center;
  width:min(520px, 100%);
}
.character-card{
  display:flex; flex-direction:column; align-items:center; gap:8px;
  width:100%;
  padding:16px 12px;
  background:var(--orange);
  border:2px solid var(--line);
  border-radius:14px;
  transition:transform .08s ease, border-color .08s ease, box-shadow .08s ease;
}
.character-card img{
  width:120px; height:120px; object-fit:contain;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.3));
}
.character-card.is-selected{
  border-color:var(--teal);
  box-shadow:0 0 0 3px rgba(35,192,171,.22);
  transform:translateY(-1px);
}
.character-choose-note { 
  font-size:14px; 
  opacity:.8;
  padding-top: 16px;
}

/* Game */
canvas{
  display:block; margin:0 auto;
  background:transparent;
  border-radius:16px;
  margin-bottom: 6px;
}

/* =========================
   GAME OVER VIEW
   ========================= */
#view-gameover .result-line{
  margin: 6px 0 2px;
  font-weight: 700;
  color: var(--gold);
}
#view-gameover h3{
  margin: 14px 0 8px;
  color: var(--teal);
  font-weight: 800;
}

.leaderboard{
  list-style: none;
  padding-left: 0;
  width: 200px;
  margin: 10px auto 16px;
}
.lb-item{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 6px 0;
}
.lb-left{
  display: flex;
  align-items: center;
  gap: 10px;
}
.lb-rank{
  min-width: 2.6em;
  text-align: right;
  font-weight: 800;
  color: var(--orange);
}
.lb-badge{
  display: inline-block;
  min-width: 3.2em;
  text-align: center;
  font-weight: 800;
  color: #ffd5bd;
  background: rgba(242,139,84,.15);
  border: 1px solid rgba(242,139,84,.35);
  padding: .2em .55em;
  border-radius: .6em;
}
.lb-score{
  font-weight: 700;
  color: var(--gold);
}

/* Misc */
a{ color:#8ab4ff; }

/* Responsive Tweaks */
@media (max-width:640px){
  .btn-start{ bottom:10%; }
  .inp{ text-align:center; }
}

/* Bottom HUD (Lives + Score unter dem Canvas) */
#hud-bottom{
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 24px;
  margin-top: 10px;
}
#hud-bottom .lives{ display:flex; gap: 8px; }
#hud-bottom .life{ width: 28px; height: auto; display:block; }
#hud-bottom .score{ font-weight: 700; color: #cde4ff; opacity: .95; }
