:root{
  --bg:#0f1720;
  --panel:#0b1220;
  --accent:#ff4081;
  --muted:#9aa4b2;
  --glass: rgba(255,255,255,0.03);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:Inter,system-ui,Arial,sans-serif;
  background: radial-gradient(circle at 20% 10%, #0f2638 0%, var(--bg) 40%, #000 100%);
  color:#e6eef6;
  -webkit-font-smoothing:antialiased;
  display:flex;
  justify-content:center;
  align-items:flex-start;
  padding:18px;
}

#app{
  width:100%;
  max-width:520px;
  margin:18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border-radius:14px;
  padding:14px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
}

header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:8px;
}
header h1{
  font-size:20px;
  margin:0;
  letter-spacing:0.2px;
}
.scoreboard{display:flex;gap:12px;font-size:14px;color:var(--muted)}

#canvasWrap{
  display:flex;
  justify-content:center;
  align-items:center;
  position:relative;
  margin:12px 0;
}

canvas{
  width:100%;
  max-width:420px;
  height:auto;
  border-radius:50%;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6), inset 0 -6px 20px rgba(0,0,0,0.6);
  display:block;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

#overlay{
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  pointer-events:none;
  gap:10px;
}
#overlay .btn{pointer-events:auto;}

.btn{
  background:linear-gradient(180deg,var(--accent), #e22a6a);
  color:white;
  border:0;
  padding:10px 14px;
  border-radius:10px;
  font-weight:600;
  cursor:pointer;
  box-shadow: 0 8px 18px rgba(255,64,129,0.12);
}
.btn.ghost{
  background:transparent;
  color:var(--muted);
  border:1px solid rgba(255,255,255,0.04);
  box-shadow:none;
}
.controls{
  display:flex;
  gap:8px;
  justify-content:center;
  margin-bottom:12px;
  flex-wrap:wrap;
}

.info{
  background:var(--glass);
  padding:10px;
  border-radius:8px;
  color:var(--muted);
  font-size:14px;
}

footer{text-align:center;color:var(--muted);margin-top:10px;font-size:13px}

/* smaller screens */
@media (max-width:420px){
  #app{padding:12px}
  .btn{padding:9px 12px;font-size:14px}
  canvas{max-width:90vw;max-height:90vw}
}

/* Mobile landscape */
@media (max-width:768px) and (orientation: landscape){
  body{padding:8px}
  #app{margin:8px;padding:8px}
  header{margin-bottom:4px}
  .scoreboard{font-size:12px}
  canvas{max-width:60vh;max-height:60vh}
}

/* Prevent zoom on input focus (iOS) */
@media screen and (-webkit-min-device-pixel-ratio:0){
  input, select, textarea{
    font-size:16px;
  }
}

/* Hide scrollbars on mobile */
@media (max-width:768px){
  body{
    overflow-x:hidden;
    -webkit-overflow-scrolling:touch;
  }
}
