/* FitCoach AI - Custom Styles */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: #030712;
  color: #f1f5f9;
  -webkit-font-smoothing: antialiased;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #111827; }
::-webkit-scrollbar-thumb { background: #374151; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #4b5563; }

/* ── INPUT FIELDS ── */
.input-field {
  background: #111827;
  border: 1px solid #374151;
  color: #f1f5f9;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  font-family: inherit;
}
.input-field:focus {
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34,197,94,0.15);
}
.input-field::placeholder { color: #4b5563; }
select.input-field { cursor: pointer; }

/* ── BUTTONS ── */
.btn-primary {
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(34,197,94,0.3);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ── NAV BUTTONS ── */
.nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: #9ca3af;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
  font-family: inherit;
}
.nav-btn:hover { background: #1f2937; color: #f1f5f9; }
.nav-btn.active { background: rgba(34,197,94,0.15); color: #4ade80; }
.nav-btn i { width: 18px; text-align: center; flex-shrink: 0; }

/* ── QUICK CARDS ── */
.quick-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 12px;
  border-radius: 12px;
  border: 1px solid;
  cursor: pointer;
  transition: all 0.2s;
  background: transparent;
  font-family: inherit;
}
.quick-card:hover { transform: translateY(-2px); }

/* ── STAT CARDS ── */
.stat-card {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  transition: border-color 0.2s;
}
.stat-card:hover { border-color: #374151; }

/* ── AI CARD ── */
.ai-card {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 16px;
  overflow: hidden;
}
.ai-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #1f2937;
  background: #0f172a;
  font-size: 0.875rem;
  color: #9ca3af;
  font-weight: 500;
}
.ai-content {
  padding: 20px;
  min-height: 150px;
}

/* ── EMPTY STATE ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

/* ── SECTION HEADER ── */
.section-header { margin-bottom: 20px; }
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #f9fafb;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.section-subtitle { color: #6b7280; font-size: 0.9rem; }

/* ── MARKDOWN RENDERING ── */
.markdown-body { line-height: 1.7; color: #e5e7eb; }
.markdown-body h1 { font-size: 1.5rem; font-weight: 700; color: #f9fafb; margin: 20px 0 10px; border-bottom: 1px solid #1f2937; padding-bottom: 8px; }
.markdown-body h2 { font-size: 1.25rem; font-weight: 700; color: #4ade80; margin: 18px 0 8px; }
.markdown-body h3 { font-size: 1.05rem; font-weight: 600; color: #86efac; margin: 14px 0 6px; }
.markdown-body h4 { font-size: 0.95rem; font-weight: 600; color: #bbf7d0; margin: 10px 0 5px; }
.markdown-body p { margin: 8px 0; }
.markdown-body ul, .markdown-body ol { padding-left: 20px; margin: 8px 0; }
.markdown-body li { margin: 4px 0; }
.markdown-body strong { color: #f9fafb; font-weight: 600; }
.markdown-body em { color: #a3e635; font-style: italic; }
.markdown-body code {
  background: #1e293b;
  color: #4ade80;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
  font-family: 'Courier New', monospace;
}
.markdown-body pre {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 10px;
  padding: 16px;
  overflow-x: auto;
  margin: 12px 0;
}
.markdown-body pre code { background: none; padding: 0; color: #4ade80; }
.markdown-body blockquote {
  border-left: 3px solid #22c55e;
  padding-left: 16px;
  color: #9ca3af;
  font-style: italic;
  margin: 10px 0;
  background: rgba(34,197,94,0.05);
  border-radius: 0 8px 8px 0;
  padding: 10px 16px;
}
.markdown-body table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 0.875rem; }
.markdown-body th {
  background: #1e293b;
  color: #4ade80;
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  border: 1px solid #374151;
}
.markdown-body td { padding: 9px 12px; border: 1px solid #1f2937; color: #d1d5db; }
.markdown-body tr:nth-child(even) td { background: #0f172a; }
.markdown-body hr { border: none; border-top: 1px solid #1f2937; margin: 16px 0; }
.markdown-body a { color: #4ade80; text-decoration: underline; }

/* ── SLIDER ── */
.slider-range {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: #1f2937;
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}
.slider-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #22c55e;
  cursor: pointer;
  box-shadow: 0 0 0 3px rgba(34,197,94,0.2);
  transition: box-shadow 0.2s;
}
.slider-range::-webkit-slider-thumb:hover { box-shadow: 0 0 0 5px rgba(34,197,94,0.3); }

/* ── TOAST ── */
#toast { animation: slideIn 0.3s ease; }
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ── SIDEBAR OVERLAY (mobile) ── */
#sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 39;
}
#sidebar-overlay.active { display: block; }

/* ── ANIMATIONS ── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-in { animation: fadeIn 0.4s ease; }

/* ── SECTION TRANSITIONS ── */
section { animation: fadeIn 0.3s ease; }

/* ── STREAK FLAME ── */
.streak-flame { display: inline-block; animation: flicker 1.5s infinite alternate; }
@keyframes flicker {
  from { transform: scale(1); }
  to   { transform: scale(1.1) rotate(3deg); }
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .section-title { font-size: 1.25rem; }
  .ai-card-header { flex-direction: column; gap: 10px; align-items: flex-start; }
}
