.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 20px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 1.5px;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, #00e5ff, #ff2fd0);
  color: #05060f;
  box-shadow: 0 8px 24px rgba(0, 229, 255, 0.35);
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.14); }
.btn-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
}
.btn-small {
  padding: 10px 16px;
  font-size: 12px;
  border-radius: 8px;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 3, 10, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 16px;
}
.modal {
  background: var(--panel, rgba(14,16,34,0.96));
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 16px;
  width: 100%;
  max-width: 420px;
  max-height: 84vh;
  overflow-y: auto;
  padding: 22px;
  position: relative;
}
.modal h2 {
  font-size: 18px;
  letter-spacing: 2px;
  margin-bottom: 14px;
  color: #fff;
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 20px;
  color: var(--muted, #9aa3c7);
  background: none;
}

.lb-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.lb-tab {
  flex: 1;
  padding: 8px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  color: var(--muted, #9aa3c7);
  font-size: 12px;
  letter-spacing: 1px;
  font-weight: 700;
}
.lb-tab.active { background: linear-gradient(135deg, #00e5ff, #ff2fd0); color: #05060f; }

#leaderboard-list { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; }
.lb-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  font-size: 13px;
}
.lb-rank { color: var(--muted, #9aa3c7); font-weight: 700; }
.lb-name { color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-score { color: #ffd93c; font-weight: 700; }
.lb-empty { text-align: center; color: var(--muted, #9aa3c7); padding: 20px 0; font-size: 13px; }

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 14px;
  color: #fff;
}
.settings-row:last-child { border-bottom: none; }
.switch { position: relative; width: 42px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; inset: 0; background: rgba(255,255,255,0.15);
  border-radius: 24px; transition: 0.2s;
}
.switch .slider::before {
  content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: 0.2s;
}
.switch input:checked + .slider { background: linear-gradient(135deg, #00e5ff, #ff2fd0); }
.switch input:checked + .slider::before { transform: translateX(18px); }

.howto-list { color: var(--muted, #9aa3c7); font-size: 13px; line-height: 1.8; }
.howto-list strong { color: #fff; }
