.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(8px);
  z-index: 200;
  align-items: center;
  justify-content: center;
}
.modal-overlay.show { display: flex; }
.modal {
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(40px);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 32px;
  width: 90%;
  max-width: 360px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.12);
  animation: modalIn 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal h3 { margin-bottom: 20px; font-size: 1.15rem; font-weight: 600; }
.modal input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
  font-size: 14px;
  margin-bottom: 10px;
  outline: none;
  transition: border-color 0.2s;
}
.modal input:focus { border-color: var(--accent); }
.modal-actions { display: flex; gap: 8px; margin-top: 12px; }
.modal-actions button {
  flex: 1;
  padding: 11px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.modal-actions button:hover { opacity: 0.85; }
.btn-primary { background: var(--accent); color: #fff; font-weight: 600; }
.btn-secondary { background: var(--card); color: var(--text2); }
.auth-switch { margin-top: 14px; text-align: center; font-size: 13px; color: var(--text2); }
.auth-switch a { color: var(--accent); text-decoration: none; }
#captchaRow { display: none; align-items: center; gap: 8px; margin-bottom: 10px; }
#captchaRow input { width: 100px; margin-bottom: 0; }
#captchaRow span { font-weight: 600; white-space: nowrap; font-size: 14px; }
.btn-sm {
  padding: 6px 10px;
  font-size: 12px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background: var(--card);
  color: var(--text2);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .modal-overlay { background: rgba(0,0,0,0.6); }
  :root:not([data-theme="light"]) .modal { background: rgba(30,30,30,0.95); border-color: rgba(255,255,255,0.1); }
}
