/* Mobile-first and custom animations for Nutrition Diary */
:root {
  --primary: #10b981;
  --primary-hover: #059669;
  --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

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

html, body {
  height: 100%;
  height: 100dvh;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overscroll-behavior-y: none;
}

#app {
  height: 100%;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
}

/* Custom smooth scrollbar */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.5);
}

/* Audio wave pulse animation */
@keyframes audio-pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  70% {
    transform: scale(1.08);
    box-shadow: 0 0 0 12px rgba(239, 68, 68, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

.recording-pulse {
  animation: audio-pulse 1.4s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes wave-bars {
  0%, 100% { height: 6px; }
  50% { height: 22px; }
}

.wave-bar {
  animation: wave-bars 1s infinite ease-in-out;
  display: inline-block;
  width: 3px;
  background-color: #ef4444;
  border-radius: 9999px;
  margin: 0 1.5px;
}

.wave-bar:nth-child(2) { animation-delay: 0.15s; }
.wave-bar:nth-child(3) { animation-delay: 0.3s; }
.wave-bar:nth-child(4) { animation-delay: 0.45s; }
.wave-bar:nth-child(5) { animation-delay: 0.6s; }

/* Message entrance animation */
@keyframes slide-in-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-message {
  animation: slide-in-up 0.25s ease-out forwards;
}

/* Glass effect */
.glass {
  background: rgba(30, 41, 59, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-card {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Mobile Safe Areas for Notch / Navigation bars */
.safe-pb {
  padding-bottom: max(0.375rem, env(safe-area-inset-bottom, 0px));
}
.safe-pt {
  padding-top: max(0.5rem, env(safe-area-inset-top, 0px));
}

/* Desktop Responsive Utilities */
@media (min-width: 768px) {
  .desktop-content-scroll {
    scrollbar-gutter: stable;
  }
}

kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
