:root{
  --bg:#0f1115;
  --accent:#ff5c57;
  --muted:#b3b5b8;
  --panel: rgba(255,255,255,0.02);
}

*{box-sizing:border-box; -webkit-tap-highlight-color: transparent;}
html,body{height:100%; margin:0; background:var(--bg); font-family:system-ui,-apple-system,Segoe UI,Roboto,"Helvetica Neue",Arial;}
#game{height:100vh; width:100vw; display:flex; align-items:center; justify-content:center; position:relative; overflow:hidden;}

canvas#playfield{
  width:100vmin;
  height:100vmin;
  max-width:100%;
  max-height:100%;
  background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border-radius:12px;
  box-shadow: 0 6px 30px rgba(0,0,0,0.6);
  touch-action: none;
  display:block;
}

/* HUD */
#hud{
  position:absolute; top:12px; left:12px; display:flex; gap:10px; align-items:center;
  background:var(--panel); padding:8px; border-radius:10px; backdrop-filter: blur(6px);
}
#score{color:#fff; font-weight:600; font-size:16px;}
#combo{color:var(--muted); font-size:14px;}
#tagToggle{
  background:transparent; border:1px solid rgba(255,255,255,0.06); color:var(--muted);
  font-weight:600; padding:6px 8px; border-radius:8px; font-size:12px;
}
#tagToggle[aria-pressed="true"]{
  background: linear-gradient(90deg, rgba(255,92,87,0.12), rgba(46,204,113,0.06));
  color: #fff;
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 4px 14px rgba(0,0,0,0.45);
}
#restart{background:transparent; border:0; color:var(--muted); font-size:18px; padding:6px; border-radius:8px;}
#restart:active{transform:scale(0.96);}

/* Controls (on-screen left/right for mobile) */
#controls{ position:absolute; bottom:12px; left:50%; transform:translateX(-50%); display:flex; gap:18px;}
.control{
  width:72px; height:52px; border-radius:10px; background:rgba(255,255,255,0.03); color:#fff; border:0; font-size:20px;
  display:flex; align-items:center; justify-content:center; touch-action:none;
  box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.control:active{transform:scale(0.98);}

/* Small screens: larger controls */
@media (max-height:640px) {
  .control{ width:86px; height:64px; font-size:24px; }
  canvas#playfield{ width:96vmin; height:96vmin; }
}