/* app.css — Dark theme + glassmorphism utilities. Tailwind (CDN) does the rest. */

:root {
  --brand: #8b5cf6;
  --bg: #07070d;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: #e2e8f0;
}

/* Ambient gradient glow behind everything */
.app-bg {
  position: fixed;
  inset: 0;
  z-index: -10;
  overflow: hidden;
  pointer-events: none;
}
.app-bg::before,
.app-bg::after {
  content: "";
  position: absolute;
  width: 60vw;
  height: 60vw;
  border-radius: 9999px;
  filter: blur(120px);
  opacity: 0.35;
}
.app-bg::before {
  top: -20vw; left: -15vw;
  background: radial-gradient(circle, #6d28d9, transparent 70%);
}
.app-bg::after {
  bottom: -25vw; right: -15vw;
  background: radial-gradient(circle, #db2777, transparent 70%);
}

/* ---------- Glass surfaces ---------- */
.glass {
  background: rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.glass-strong {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.10);
}
.glass-hover { transition: background .2s, border-color .2s, transform .2s; }
.glass-hover:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(139, 92, 246, 0.4);
}

/* ---------- Scrollbars ---------- */
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: rgba(139, 92, 246, 0.35); border-radius: 9999px; }
*::-webkit-scrollbar-thumb:hover { background: rgba(139, 92, 246, 0.55); }
*::-webkit-scrollbar-track { background: transparent; }

/* ---------- Animations ---------- */
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.animate-fade-in { animation: fadeIn .25s ease-out; }

@keyframes modalIn { from { opacity: 0; transform: scale(.96) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-panel { animation: modalIn .18s cubic-bezier(.2,.8,.2,1); }

.tab-btn { position: relative; transition: color .15s ease; }

@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  border-radius: 9999px;
  animation: spin .6s linear infinite;
  display: inline-block;
  width: 1rem; height: 1rem;
  vertical-align: -0.15em;
}

/* ---------- Toggle switch (dark) ---------- */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; cursor: pointer; inset: 0;
  background: rgba(255,255,255,0.12);
  border-radius: 9999px; transition: .2s;
}
.switch .slider::before {
  content: ""; position: absolute; height: 20px; width: 20px; left: 3px; bottom: 3px;
  background: #fff; border-radius: 9999px; transition: .2s;
}
.switch input:checked + .slider {
  background: linear-gradient(135deg, #8b5cf6, #d946ef);
}
.switch input:checked + .slider::before { transform: translateX(20px); }

/* ---------- Form controls (dark) ---------- */
input, select, textarea { color-scheme: dark; }

/* Hide number spinners */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; }

/* Month/date picker icon visible on dark */
input[type="month"]::-webkit-calendar-picker-indicator,
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.8);
  cursor: pointer;
}

/* ---------- Safe area (notch / Dynamic Island) ---------- */
.safe-t { padding-top: env(safe-area-inset-top); }
.safe-b { padding-bottom: env(safe-area-inset-bottom); }
.safe-l { padding-left: env(safe-area-inset-left); }
.safe-r { padding-right: env(safe-area-inset-right); }

/* When installed as PWA, keep content clear of system bars. */
@media (display-mode: standalone), (display-mode: window-controls-overlay) {
  body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
}

/* ---------- DISABLE ALL ZOOM ---------- */
/* 1) Kill double-tap zoom; 2) Prevent iOS auto-focus zoom: inputs must be >=16px on small screens. */
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (max-width: 1024px) {
  input, select, textarea { font-size: 16px !important; }
}

