/* ===== Self Development — shared base (tokens, reset, utilities) ===== */
:root {
  --bg: #0d1421;
  --bg-2: #101a2c;
  --surface: #141f33;
  --surface-2: #1a2740;
  --card: rgba(255, 255, 255, 0.045);
  --card-hover: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.09);
  --text: #e9eef7;
  --muted: #93a1b8;
  --faint: #64748b;
  --accent: #34d399;
  --accent-2: #2dd4bf;
  --accent-soft: rgba(52, 211, 153, 0.14);
  --warn: #fbbf24;
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.12);
  --must: #f59e0b;
  --want: #34d399;
  --neutral: #64748b;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; scrollbar-gutter: stable; }

body {
  overflow-x: hidden;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

::selection { background: rgba(52, 211, 153, 0.3); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 14px;
  padding: 13px 22px;
  font-size: 15.5px; font-weight: 600; color: #06281c;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  transition: transform 0.12s ease, filter 0.15s ease;
  user-select: none;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; pointer-events: none; }

.btn.ghost {
  background: var(--card); color: var(--text);
  border: 1px solid var(--line);
}
.btn.ghost:hover { background: var(--card-hover); }

.btn.danger-soft {
  background: var(--danger-soft); color: var(--danger);
  border: 1px solid rgba(248, 113, 113, 0.25);
}

.btn.sm { padding: 8px 14px; font-size: 13.5px; border-radius: 11px; }
.btn.block { width: 100%; }

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600;
  padding: 4px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
}
.chip.warn { background: rgba(251, 191, 36, 0.13); color: var(--warn); }
.chip.danger { background: var(--danger-soft); color: var(--danger); }
.chip.muted { background: rgba(255,255,255,0.06); color: var(--muted); }

.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent);
}

.grad-text {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* Modal windows */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(5, 10, 20, 0.72);
  backdrop-filter: blur(6px);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn 0.18s ease;
}
.modal {
  width: 100%; max-width: 560px;
  max-height: 92vh; overflow-y: auto;
  background: var(--bg-2);
  border: 1px solid var(--line); border-bottom: none;
  border-radius: 24px 24px 0 0;
  padding: 22px 20px calc(22px + env(safe-area-inset-bottom, 0px));
  animation: slideUp 0.22s ease;
}
@media (min-width: 640px) {
  .modal-backdrop { align-items: center; padding: 24px; }
  .modal { border-radius: 24px; border-bottom: 1px solid var(--line); }
}
.modal h3 { font-size: 19px; margin-bottom: 6px; }
.modal .sub { color: var(--muted); font-size: 14px; margin-bottom: 16px; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(36px); opacity: 0.6; } to { transform: none; opacity: 1; } }

/* Toast */
#toast {
  position: fixed; left: 50%; bottom: 96px; z-index: 120;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 14px;
  padding: 11px 18px; font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow);
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  max-width: min(92vw, 480px); text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* The embedded Netlify badge iframe must not overlap the interface */
#nl-badge-frame { display: none !important; }
