html, body { 
  margin:0; 
  height:100%; 
  background:#0b0f17; 
  overflow:hidden; 
  font-family:system-ui, -apple-system, Segoe UI, Roboto, Arial; 
}

canvas { 
  display:block; 
  width:100vw; 
  height:100vh; 
}

.hud{
  position:fixed; 
  left:0; 
  top:0; 
  right:0; 
  padding:14px 14px 0 14px; 
  pointer-events:none;
  color:#e9f0ff; 
  text-shadow:0 2px 12px rgba(0,0,0,.6);
  display:flex; 
  justify-content:space-between; 
  align-items:flex-start; 
  gap:10px;
}

.panel { 
  pointer-events:none; 
  display:flex; 
  gap:14px; 
  align-items:baseline; 
  flex-wrap:wrap; 
}

.big { 
  font-weight:800; 
  font-size:22px; 
  letter-spacing:.3px; 
}

.small { 
  opacity:.85; 
  font-size:13px; 
}

.badge{
  padding:6px 10px; 
  border-radius:999px; 
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(6px);
}

.center{
  position:fixed; 
  inset:0; 
  display:flex; 
  align-items:center; 
  justify-content:center; 
  pointer-events:none;
}

.card{
  width:min(520px, 92vw); 
  border-radius:20px; 
  padding:18px 18px 16px 18px;
  background:rgba(255,255,255,.06); 
  border:1px solid rgba(255,255,255,.12);
  box-shadow:0 20px 80px rgba(0,0,0,.55);
  color:#e9f0ff;
  backdrop-filter: blur(10px);
}

.title{ 
  font-size:20px; 
  font-weight:850; 
  margin:0 0 8px 0; 
}

.desc{ 
  margin:0 0 10px 0; 
  opacity:.9; 
  line-height:1.35; 
}

.kbd{
  display:inline-flex; 
  gap:8px; 
  flex-wrap:wrap; 
  margin-top:8px; 
  opacity:.95;
}

.key{
  border:1px solid rgba(255,255,255,.18);
  background:rgba(0,0,0,.18);
  padding:4px 8px; 
  border-radius:10px; 
  font-size:12px;
  cursor: pointer;
  transition: all 0.2s ease;
  pointer-events: all;
}

.key:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.3);
}

.hint{ 
  margin-top:10px; 
  opacity:.8; 
  font-size:12px; 
}

.hide{ 
  display:none; 
}

.settings-card {
  max-width: 500px;
  width: 90vw;
}

.ball-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 12px;
  margin: 16px 0;
  pointer-events: all;
}

.ball-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px;
  border: 2px solid rgba(255,255,255,.12);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(255,255,255,.03);
  min-height: 70px;
}

.ball-option:hover {
  border-color: rgba(255,255,255,.3);
  background: rgba(255,255,255,.08);
  transform: translateY(-2px);
}

.ball-option.selected {
  border-color: rgba(100,200,255,.6);
  background: rgba(100,200,255,.15);
  box-shadow: 0 0 20px rgba(100,200,255,.3);
}

.ball-preview {
  border-radius: 50%;
  background: rgba(0,0,0,.2);
  width: 40px;
  height: 40px;
}

.ball-name {
  font-size: 12px;
  opacity: 0.9;
  font-weight: 600;
}

.settings-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

.difficulty-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 16px 0;
  pointer-events: all;
}

.difficulty-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  border: 2px solid rgba(255,255,255,.12);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(255,255,255,.03);
  min-height: 80px;
}

.difficulty-option:hover {
  border-color: rgba(255,255,255,.3);
  background: rgba(255,255,255,.08);
  transform: translateY(-2px);
}

.difficulty-option.selected {
  border-color: rgba(255,140,0,.6);
  background: rgba(255,140,0,.15);
  box-shadow: 0 0 20px rgba(255,140,0,.3);
}

.difficulty-icon {
  font-size: 20px;
  margin-bottom: 4px;
}

.difficulty-name {
  font-size: 13px;
  font-weight: 600;
  opacity: 0.95;
}

.difficulty-desc {
  font-size: 10px;
  opacity: 0.7;
  text-align: center;
}