:root {
  --mint: #2DD4A8;
  --mint-dark: #1A9B7A;
  --bg-dark: #111827;
  --panel: #1F2937;
  --streak: #F59E0B;
  --gold: #FBBF24;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Assistant', sans-serif;
  background: var(--bg-dark);
  min-height: 100dvh;
}

.app-shell {
  max-width: 28rem;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
  position: relative;
}

.app-header {
  padding: 1rem 1.25rem 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(17,24,39,0.95);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 40;
}

.app-main {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem 6rem;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 28rem;
  display: flex;
  justify-content: space-around;
  padding: 0.5rem 0.25rem calc(0.5rem + env(safe-area-inset-bottom));
  background: rgba(31,41,55,0.98);
  border-top: 1px solid rgba(255,255,255,0.08);
  z-index: 50;
}

.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.35rem 0.5rem;
  border: none;
  background: none;
  color: #9ca3af;
  font-size: 0.65rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s;
}
.nav-btn.active { color: var(--mint); }
.nav-btn .icon { font-size: 1.25rem; }

.legal-banner {
  background: rgba(245,158,11,0.12);
  border-bottom: 1px solid rgba(245,158,11,0.25);
  padding: 0.5rem 1rem;
  font-size: 0.7rem;
  line-height: 1.4;
  color: #fcd34d;
  text-align: center;
}

.card {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 1rem;
  padding: 1rem;
  margin-bottom: 0.75rem;
}

.btn-mint {
  background: var(--mint);
  color: #0f172a;
  font-weight: 700;
  border: none;
  border-radius: 0.75rem;
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  width: 100%;
}
.btn-mint:hover { background: var(--mint-dark); color: #fff; }
.btn-mint:active { transform: scale(0.98); }
.btn-mint:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-outline {
  background: transparent;
  border: 2px solid rgba(45,212,168,0.4);
  color: var(--mint);
  font-weight: 600;
  border-radius: 0.75rem;
  padding: 0.65rem 1rem;
  cursor: pointer;
  width: 100%;
}

.route-card {
  border: 2px solid rgba(255,255,255,0.08);
  border-radius: 1rem;
  padding: 1rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  margin-bottom: 0.5rem;
}
.route-card.selected {
  border-color: var(--mint);
  background: rgba(45,212,168,0.08);
}

.input-field {
  width: 100%;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  color: #f3f4f6;
  font-size: 1rem;
  margin-bottom: 0.75rem;
}
.input-field:focus {
  outline: none;
  border-color: var(--mint);
}

.streak-badge {
  background: linear-gradient(135deg, var(--streak), var(--gold));
  color: #1f2937;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  animation: streak-glow 2s ease-in-out infinite;
}

@keyframes streak-glow {
  0%, 100% { box-shadow: 0 0 8px rgba(245,158,11,0.4); }
  50% { box-shadow: 0 0 16px rgba(251,191,36,0.6); }
}

@keyframes point-pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}
.point-pop { animation: point-pop 0.4s ease; }

@keyframes slide-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.slide-up { animation: slide-up 0.35s ease; }

.chat-bubble {
  max-width: 85%;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  margin-bottom: 0.5rem;
  line-height: 1.5;
  font-size: 0.9rem;
}
.chat-user {
  background: var(--mint);
  color: #0f172a;
  margin-right: auto;
  border-bottom-right-radius: 0.25rem;
}
.chat-ai {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,0.08);
  margin-left: auto;
  border-bottom-left-radius: 0.25rem;
}

.chat-input-row {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 0;
  margin-top: 0.5rem;
}

.progress-bar {
  height: 0.5rem;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--mint-dark), var(--mint));
  border-radius: 999px;
  transition: width 0.5s ease;
}

.group-ring {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: conic-gradient(var(--mint) calc(var(--score) * 1%), rgba(255,255,255,0.08) 0);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}
.group-ring-inner {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.partner-locked { filter: blur(4px); user-select: none; }

.toast {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--panel);
  border: 1px solid var(--mint);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  z-index: 100;
  font-size: 0.85rem;
  max-width: 90%;
  text-align: center;
}
.toast.hidden { display: none; }

.calorie-badge {
  background: rgba(45,212,168,0.15);
  color: var(--mint);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 0.5rem;
}

.ai-typing span {
  width: 6px; height: 6px; background: var(--mint); border-radius: 50%;
  display: inline-block; margin: 0 2px;
  animation: bounce 1.2s infinite;
}
.ai-typing span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-6px); }
}

.onboarding-progress { display: flex; gap: 0.35rem; margin-bottom: 1.5rem; }
.onboarding-dot { flex: 1; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.1); }
.onboarding-dot.done { background: var(--mint); }
.onboarding-dot.active { background: var(--gold); }

.feed-post { margin-bottom: 1rem; }
.comment-box {
  background: rgba(0,0,0,0.2);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  margin-top: 0.35rem;
  color: #d1d5db;
}
