/* ═══════════════════════════════════════
   components.css — Buttons · Inputs · Nav · Modals · Toast · Shared
═══════════════════════════════════════ */

/* ── BOTTOM NAV ── */
#bot-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(10,8,30,.94);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: none; z-index: 200; flex-direction: row;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.nav-btn {
  flex: 1; padding: 11px 6px;
  background: none; border: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: rgba(255,255,255,.35);
  font-family: 'Nunito', sans-serif;
  transition: color .2s;
}
.nav-btn.active { color: var(--accent); }
.nav-btn .ni { font-size: 22px; }
.nav-btn .nl { font-size: 10px; font-weight: 800; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px; border-radius: 50px; border: none; cursor: pointer;
  font-family: 'Nunito', sans-serif; font-size: 16px; font-weight: 800;
  transition: all .18s cubic-bezier(.34,1.56,.64,1);
  user-select: none;
}
.btn:active { transform: scale(.94); }

.btn-primary { background:linear-gradient(135deg,#7C3AED,#5B21B6); color:#fff; box-shadow:0 4px 20px rgba(124,58,237,.45); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(124,58,237,.55); }
.btn-success  { background:linear-gradient(135deg,#10B981,#059669); color:#fff; box-shadow:0 4px 16px rgba(16,185,129,.4); }
.btn-accent   { background:linear-gradient(135deg,#F59E0B,#D97706); color:#fff; box-shadow:0 4px 16px rgba(245,158,11,.4); }
.btn-speed    { background:linear-gradient(135deg,#EF4444,#DC2626); color:#fff; box-shadow:0 4px 16px rgba(239,68,68,.45); }
.btn-outline  { background:transparent; color:#fff; border:2px solid rgba(255,255,255,.3); }

.btn-lg   { padding: 17px 32px; font-size: 18px; }
.btn-full { width: 100%; }
.btn-sm   { padding: 9px 18px; font-size: 14px; }

/* ── INPUTS ── */
.form-input {
  width: 100%; padding: 14px 18px;
  border-radius: var(--r-sm);
  border: 2px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.1); color: #fff;
  font-family: 'Nunito', sans-serif; font-size: 16px; font-weight: 700;
  outline: none; transition: border-color .2s;
}
.form-input::placeholder { color: rgba(255,255,255,.35); }
.form-input:focus { border-color: var(--accent); background: rgba(255,255,255,.15); }
.form-label {
  color: #fff; font-weight: 800; font-size: 14px;
  margin-bottom: 6px; display: block; padding-left: 2px;
}

/* ── CHIP ── */
.chip {
  display: flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,.1); border-radius: 20px;
  padding: 5px 10px; color: #fff; font-size: 13px; font-weight: 800;
}

/* ── MODALS ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(0,0,0,.75); backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.active { display: flex; animation: fade-in .25s ease; }

.modal-box {
  background: linear-gradient(160deg,#2D1B69,#1E1B4B);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--r); padding: 28px 24px;
  width: 100%; max-width: 360px; text-align: center;
  animation: bounce-in .4s ease;
}
.modal-em    { font-size: 52px; margin-bottom: 12px; }
.modal-title { color: #fff; font-size: 22px; font-weight: 900; margin-bottom: 8px; }
.modal-sub   { color: rgba(255,255,255,.55); font-size: 14px; font-weight: 600; margin-bottom: 20px; line-height: 1.5; }
.modal-btns  { display: flex; flex-direction: column; gap: 10px; }

.modal-code-display {
  background: rgba(0,0,0,.4); border: 2px solid var(--accent);
  border-radius: var(--r-sm); padding: 14px; margin-bottom: 20px;
}
.modal-code-val { font-family:'Fredoka One',cursive; font-size: 32px; color: var(--accent-l); letter-spacing: 3px; }
.modal-code-lbl { color: rgba(255,255,255,.4); font-size: 12px; font-weight: 700; margin-top: 4px; }

#modal-speed-gate .modal-box {
  background: linear-gradient(160deg,#450A0A,#1E1B4B);
  border-color: rgba(239,68,68,.4);
}

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%);
  background: rgba(15,12,41,.96); backdrop-filter: blur(20px);
  color: #fff; padding: 11px 20px; border-radius: 50px;
  font-weight: 700; font-size: 14px; z-index: 999;
  border: 1px solid rgba(255,255,255,.12);
  white-space: nowrap; max-width: 90vw; overflow: hidden; text-overflow: ellipsis;
  animation: slide-up .3s ease;
}

.streak-toast {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%);
  background: linear-gradient(135deg,#F59E0B,#D97706);
  color: #fff; padding: 22px 36px; border-radius: var(--r);
  font-size: 22px; font-weight: 900; text-align: center;
  z-index: 800; box-shadow: 0 20px 60px rgba(0,0,0,.55);
  animation: bounce-in .5s ease;
}

/* ── XP FLOAT ── */
.xp-float {
  position: fixed; pointer-events: none;
  font-family: 'Fredoka One', cursive; font-size: 21px;
  color: var(--accent-l); z-index: 500;
  animation: float-up 1s ease-out forwards;
}

/* ── EMPTY STATE ── */
.empty-state { text-align: center; padding: 44px 24px; color: rgba(255,255,255,.35); }
.empty-state .ei { font-size: 50px; margin-bottom: 12px; }
.empty-state .et { font-weight: 800; font-size: 16px; margin-bottom: 8px; color: rgba(255,255,255,.5); }
.empty-state .ed { font-size: 13px; line-height: 1.5; }

/* ── COUNTDOWN OVERLAY ── */
#countdown-overlay {
  position: fixed; inset: 0; z-index: 800;
  background: rgba(0,0,0,.8); backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
}
#countdown-overlay.active { display: flex; }
.countdown-num {
  font-family: 'Fredoka One', cursive;
  font-size: 120px; color: #fff;
  text-shadow: 0 0 40px var(--accent);
}
