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

:root {
  --bg-color: #06060c;
  --panel-bg: rgba(12, 12, 22, 0.65);
  --glass-border: rgba(255, 255, 255, 0.08);
  --text-primary: #f5f5fa;
  --text-secondary: rgba(245, 245, 250, 0.6);
  --retro-pink: #ff2e93;
  --mint-green: #00f5d4;
  --electric-lime: #ccff00;
  --neon-red: #ff3366;
  --goldman: 'Goldman', sans-serif;
  --outfit: 'Outfit', sans-serif;
  --shadow-pink: 0 0 20px rgba(255, 46, 147, 0.35);
  --shadow-green: 0 0 20px rgba(0, 245, 212, 0.35);
  --shadow-lime: 0 0 20px rgba(204, 255, 0, 0.35);
}

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

body {
  font-family: var(--outfit);
  background-color: var(--bg-color);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(255, 46, 147, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(0, 245, 212, 0.08) 0%, transparent 40%);
  background-attachment: fixed;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--retro-pink);
}

/* Core Layout */
header {
  height: 70px;
  background: rgba(6, 6, 12, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1.5px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--goldman);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 1.5px;
}

.logo-badge {
  background: linear-gradient(135deg, var(--retro-pink), var(--mint-green));
  color: #06060c;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 900;
  box-shadow: 0 0 10px rgba(0, 245, 212, 0.5);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.user-badge {
  font-family: var(--goldman);
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  padding: 6px 14px;
  border-radius: 20px;
  color: var(--mint-green);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Glassmorphic Panel/Card */
.glass-panel {
  background: var(--panel-bg);
  border: 1.5px solid var(--glass-border);
  border-radius: 20px;
  padding: 24px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.glass-panel:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

/* Dashboard Container */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  max-width: 1400px;
  margin: 30px auto;
  padding: 0 20px 60px 20px;
}

.col-12 { grid-column: span 12; }
.col-8 { grid-column: span 8; }
.col-4 { grid-column: span 4; }
.col-6 { grid-column: span 6; }
.col-3 { grid-column: span 3; }

@media (max-width: 1024px) {
  .col-8, .col-4, .col-6, .col-3 {
    grid-column: span 12;
  }
}

/* Buttons */
.btn {
  font-family: var(--goldman);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 12px 24px;
  border-radius: 12px;
  border: 1.5px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease-in-out;
  text-decoration: none;
}

.btn-pink {
  background: var(--retro-pink);
  color: #06060c;
  box-shadow: 0 0 10px rgba(255, 46, 147, 0.2);
}
.btn-pink:hover {
  background: #ff55ab;
  box-shadow: var(--shadow-pink);
  transform: translateY(-2px);
}

.btn-green {
  background: var(--mint-green);
  color: #06060c;
  box-shadow: 0 0 10px rgba(0, 245, 212, 0.2);
}
.btn-green:hover {
  background: #33ffd8;
  box-shadow: var(--shadow-green);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border-color: var(--glass-border);
  color: var(--text-primary);
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--text-secondary);
}

/* Circle Gauges & Macros */
.macros-container {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 15px;
}

.macro-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  width: 100px;
}

.gauge-svg {
  width: 90px;
  height: 90px;
  transform: rotate(-90deg);
}

.gauge-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 8;
}

.gauge-fill {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 251.2;
  stroke-dashoffset: 251.2;
  transition: stroke-dashoffset 0.8s ease-out;
}

.macro-box.carbs .gauge-fill { stroke: var(--retro-pink); filter: drop-shadow(0 0 3px var(--retro-pink)); }
.macro-box.protein .gauge-fill { stroke: var(--mint-green); filter: drop-shadow(0 0 3px var(--mint-green)); }
.macro-box.fat .gauge-fill { stroke: var(--electric-lime); filter: drop-shadow(0 0 3px var(--electric-lime)); }

.macro-value {
  position: absolute;
  top: 30px;
  font-family: var(--goldman);
  font-size: 1rem;
  font-weight: 700;
}

.macro-label {
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Calories Card */
.calories-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 20px;
  margin-bottom: 20px;
}

.cal-number {
  font-family: var(--goldman);
  font-size: 2.2rem;
  font-weight: 700;
  background: linear-gradient(135deg, #fff, var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.cal-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Water & Streaks Widgets */
.stat-widget {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  margin-bottom: 16px;
}

.stat-icon {
  font-size: 2rem;
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-info h4 {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-info span {
  font-family: var(--goldman);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--electric-lime);
}

.water-controls {
  display: flex;
  gap: 8px;
}

.water-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.15s ease;
}

.water-btn:hover {
  background: var(--mint-green);
  color: #06060c;
  border-color: var(--mint-green);
  box-shadow: 0 0 10px rgba(0, 245, 212, 0.3);
}

/* Mascot Panel & Animated Veggies */
.mascot-container {
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg, rgba(255, 46, 147, 0.08), rgba(0, 245, 212, 0.08));
  border: 1.5px solid var(--glass-border);
  border-radius: 20px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

@media (max-width: 768px) {
  .mascot-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
  }
  .mascot-selector {
    margin-left: 0 !important;
    margin-top: 10px;
  }
  .speech-bubble::before {
    display: none;
  }
}

.mascot-avatar-wrapper {
  position: relative;
  width: 85px;
  height: 85px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mascot-avatar-wrapper:hover {
  transform: scale(1.1) rotate(3deg);
}

.mascot-avatar-wrapper svg {
  width: 100%;
  height: 100%;
}

.speech-bubble {
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid var(--glass-border);
  border-radius: 16px;
  padding: 16px;
  font-size: 0.9rem;
  line-height: 1.5;
  position: relative;
  flex: 1;
}

.speech-bubble::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 30px;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 10px solid var(--glass-border);
}

.mascot-selector {
  display: flex;
  gap: 8px;
  margin-left: auto;
  background: rgba(6, 6, 12, 0.6);
  border: 1px solid var(--glass-border);
  border-radius: 30px;
  padding: 5px;
  align-items: center;
}

.selector-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--glass-border);
  background: rgba(12, 12, 22, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.selector-btn:hover {
  transform: scale(1.15);
  border-color: var(--mint-green);
  box-shadow: 0 0 10px rgba(0, 245, 212, 0.4);
}

.selector-btn.active {
  border-color: var(--retro-pink);
  box-shadow: 0 0 12px rgba(255, 46, 147, 0.6);
  background: rgba(255, 46, 147, 0.15);
  transform: scale(1.1);
}

/* --- SVG ANIMATIONS --- */

/* Universal Eye Blink */
@keyframes veggie-blink {
  0%, 90%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.1); }
}
.veggie-eye {
  transform-origin: center;
  animation: veggie-blink 4.2s infinite;
}

/* Universal Mouth Talk/Wiggle */
@keyframes veggie-talk {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.4); }
}
.veggie-mouth.talking {
  transform-origin: center;
  animation: veggie-talk 0.15s ease-in-out infinite;
}

/* 1. Broccoli Bob Animations */
@keyframes bob-idle {
  0%, 100% { transform: translateY(0) scale(1); }
  45% { transform: translateY(-7px) scaleY(1.04) scaleX(0.97); }
  90% { transform: translateY(0) scale(1.02, 0.98); }
}
.animate-bob {
  transform-origin: bottom center;
  animation: bob-idle 2.4s ease-in-out infinite;
}

/* 2. Avocado Annie Animations */
@keyframes annie-idle {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-9px) rotate(4deg); }
}
@keyframes seed-pulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 2px rgba(255, 46, 147, 0.3)); }
  50% { transform: scale(1.08); filter: drop-shadow(0 0 8px rgba(255, 46, 147, 0.7)); }
}
.animate-annie {
  transform-origin: bottom center;
  animation: annie-idle 3.5s ease-in-out infinite;
}
.annie-seed {
  transform-origin: center;
  animation: seed-pulse 1.8s ease-in-out infinite;
}

/* 3. Cauliflower Carl Animations */
@keyframes carl-idle {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33% { transform: translate(5px, -2px) rotate(2.5deg); }
  66% { transform: translate(-5px, -1px) rotate(-2.5deg); }
}
.animate-carl {
  transform-origin: bottom center;
  animation: carl-idle 3.2s ease-in-out infinite;
}
.carl-sunglasses {
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.mascot-avatar-wrapper:hover .carl-sunglasses {
  transform: translateY(3px);
}

/* 4. Mushroom Max Animations */
@keyframes max-idle {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-5px) scale(0.97, 1.03); }
}
@keyframes max-glow-pulse {
  0%, 100% { fill: #ccff00; filter: drop-shadow(0 0 3px var(--electric-lime)); }
  50% { fill: #e5ff80; filter: drop-shadow(0 0 10px var(--electric-lime)); }
}
.animate-max {
  transform-origin: bottom center;
  animation: max-idle 2.8s ease-in-out infinite;
}
.max-cap {
  animation: max-glow-pulse 2.2s ease-in-out infinite;
}

/* Interactive entrance triggers */
.happy-spin {
  animation: spin-entrance 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important;
}
.happy-jump {
  animation: jump-entrance 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important;
}

@keyframes spin-entrance {
  0% { transform: scale(0.2) rotate(-180deg); }
  100% { transform: scale(1) rotate(0); }
}
@keyframes jump-entrance {
  0% { transform: translateY(20px) scaleY(0.7); }
  50% { transform: translateY(-15px) scaleY(1.1); }
  100% { transform: translateY(0) scaleY(1); }
}


/* Food Logging & Search */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.input-group label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

.form-control {
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid var(--glass-border);
  border-radius: 12px;
  color: var(--text-primary);
  padding: 12px 16px;
  font-size: 0.95rem;
  outline: none;
  font-family: var(--outfit);
  transition: all 0.2s ease;
}

.form-control:focus {
  border-color: var(--retro-pink);
  box-shadow: 0 0 10px rgba(255, 46, 147, 0.25);
  background: rgba(255, 255, 255, 0.07);
}

.search-results {
  background: #0d0d18;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  max-height: 250px;
  overflow-y: auto;
  margin-top: 4px;
  display: none;
}

.search-item {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.15s ease;
}

.search-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.search-item .verified-badge {
  background: rgba(0, 245, 212, 0.15);
  color: var(--mint-green);
  font-size: 0.7rem;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Diary Table List */
.diary-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 15px;
}

.diary-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1.5px solid var(--glass-border);
  border-radius: 14px;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  animation: slideIn 0.3s ease-out;
}

.diary-item-info h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.diary-item-info span {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.diary-item-macros {
  display: flex;
  gap: 16px;
  font-size: 0.8rem;
}

.macro-pill {
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
}

.macro-pill.c { color: var(--retro-pink); }
.macro-pill.p { color: var(--mint-green); }
.macro-pill.f { color: var(--electric-lime); }

.delete-btn {
  background: transparent;
  border: none;
  color: var(--neon-red);
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0.6;
  padding: 4px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.delete-btn:hover {
  opacity: 1;
  background: rgba(255, 51, 102, 0.1);
}

/* Forms & Dialogs */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 70px);
  padding: 40px 20px;
}

.auth-card {
  width: 100%;
  max-width: 460px;
}

.auth-header {
  text-align: center;
  margin-bottom: 24px;
}

.auth-header h2 {
  font-family: var(--goldman);
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
}

.auth-header p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 8px;
}

.auth-error {
  background: rgba(255, 51, 102, 0.1);
  border: 1px solid var(--neon-red);
  color: #ff5580;
  padding: 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 16px;
  display: none;
}

/* OIDC Developer Console Component */
.console-box {
  background: #05050a;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 16px;
  font-family: monospace;
  font-size: 0.75rem;
  height: 200px;
  overflow-y: auto;
  margin-top: 15px;
}

.console-line {
  margin-bottom: 6px;
  line-height: 1.4;
}

.console-line.client { color: var(--text-primary); }
.console-line.server { color: var(--retro-pink); }
.console-line.system { color: var(--electric-lime); }

/* Animations */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
  100% { transform: translateY(0px); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top: 4px solid var(--retro-pink);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: inline-block;
}

/* Utilities */
.text-center { text-align: center; }
.mt-4 { margin-top: 24px; }
.mb-4 { margin-bottom: 24px; }
.w-full { width: 100%; }

/* Alert Banner & Google Sign-In */
.alert-banner {
  background: rgba(255, 46, 147, 0.15);
  border: 1px solid var(--retro-pink);
  color: var(--text-primary);
  box-shadow: var(--shadow-pink);
  animation: slideIn 0.3s ease-out;
}

.alert-banner.success {
  background: rgba(0, 245, 212, 0.15);
  border: 1px solid var(--mint-green);
  box-shadow: var(--shadow-green);
}

.alert-banner.info {
  background: rgba(204, 255, 0, 0.15);
  border: 1px solid var(--electric-lime);
  box-shadow: var(--shadow-lime);
}

#btnGoogleLogin:hover {
  background: rgba(255, 255, 255, 0.9) !important;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

/* Modal Overlay for Legal Info */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(6, 6, 12, 0.85);
  backdrop-filter: blur(15px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
}

.modal-content-scroll {
  flex: 1;
  overflow-y: auto;
  font-size: 0.9rem;
  line-height: 1.6;
  padding-right: 8px;
  color: var(--text-primary);
  text-align: left;
  max-height: calc(80vh - 100px);
}

.modal-content-scroll h4 {
  font-family: var(--goldman);
  letter-spacing: 0.5px;
}

/* Premium Subscription Classes */
.premium-glow-text {
  text-shadow: 0 0 8px rgba(0, 245, 212, 0.6);
  color: var(--mint-green);
  font-weight: bold;
}


