/* ================= MACROSNAP AI DESIGN SYSTEM & STYLES ================= */

:root {
  /* Color Palette */
  --bg-main: #0b0b0f;
  --bg-card: rgba(22, 22, 29, 0.65);
  --bg-card-hover: rgba(30, 30, 41, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-active: rgba(139, 92, 246, 0.4);
  
  --text-primary: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  
  --accent-primary: #8b5cf6; /* Violet */
  --accent-primary-glow: rgba(139, 92, 246, 0.15);
  --accent-success: #10b981; /* Emerald */
  
  /* Macros Colors */
  --color-calories: #f59e0b; /* Amber */
  --color-protein: #f43f5e;  /* Rose */
  --color-carbs: #06b6d4;    /* Cyan */
  --color-fats: #d946ef;     /* Magenta/Fuchsia */
  --color-fiber: #10b981;    /* Emerald */
  
  /* Gradients */
  --grad-calories: linear-gradient(135deg, #f59e0b, #ef4444);
  --grad-protein: linear-gradient(135deg, #f43f5e, #be123c);
  --grad-carbs: linear-gradient(135deg, #06b6d4, #0369a1);
  --grad-fats: linear-gradient(135deg, #d946ef, #86198f);
  --grad-fiber: linear-gradient(135deg, #10b981, #047857);
  --grad-logo: linear-gradient(135deg, #a78bfa, #8b5cf6);
  --grad-laser: linear-gradient(90deg, transparent, #22c55e, transparent);
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Shadows & Blurs */
  --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
  --card-blur: blur(16px);
  --glow-shadow: 0 0 25px rgba(139, 92, 246, 0.25);
}

/* ================= RESET & GENERAL ================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
  background-image: 
    radial-gradient(at 0% 0%, rgba(139, 92, 246, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(244, 63, 94, 0.05) 0px, transparent 50%);
  background-attachment: fixed;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* App Container */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ================= HEADER ================= */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  border-bottom: 1px solid var(--border-color);
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--grad-logo);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
  color: white;
}

.logo-text {
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.accent-text {
  background: var(--grad-logo);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.app-nav {
  display: flex;
  background: rgba(255, 255, 255, 0.03);
  padding: 6px;
  border-radius: 30px;
  border: 1px solid var(--border-color);
  gap: 4px;
}

.nav-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 8px 20px;
  border-radius: 20px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-fast);
}

.nav-btn i {
  width: 16px;
  height: 16px;
}

.nav-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-btn.active {
  color: white;
  background: var(--accent-primary);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.streak-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  padding: 8px 16px;
  border-radius: 30px;
  color: var(--color-calories);
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.05);
}

.streak-icon {
  width: 16px;
  height: 16px;
  animation: pulse-fire 1.5s infinite alternate;
}

@keyframes pulse-fire {
  0% { transform: scale(1); filter: drop-shadow(0 0 2px var(--color-calories)); }
  100% { transform: scale(1.15); filter: drop-shadow(0 0 6px var(--color-calories)); }
}

/* ================= CONTENT & TABS ================= */
.app-content {
  flex: 1;
  padding: 32px 0 60px 0;
}

.tab-content {
  display: none;
}

.tab-content.active-tab {
  display: block;
  animation: fadeIn 0.4s ease-out;
}

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

/* ================= CARDS & LAYOUT ================= */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 28px;
  backdrop-filter: var(--card-blur);
  -webkit-backdrop-filter: var(--card-blur);
  box-shadow: var(--card-shadow);
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.card-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% -20%, rgba(139, 92, 246, 0.15), transparent 60%);
  pointer-events: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 16px;
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
  line-height: normal;
}

.btn i, .btn svg {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin: 0;
}

.btn-primary {
  background: var(--accent-primary);
  color: white;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
  background: #9d76fa;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-small {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: 12px;
}

.w-full {
  width: 100%;
}

/* ================= DASHBOARD TAB STYLES ================= */
.dashboard-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.calorie-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  min-height: 380px;
}

.calorie-progress-container {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 20px 0;
}

.progress-ring {
  transform: rotate(-90deg);
}

.progress-ring__circle-bg {
  stroke-dasharray: 565.48;
  stroke-dashoffset: 0;
}

.progress-ring__circle {
  stroke-dasharray: 565.48;
  stroke-dashoffset: 565.48;
  transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1);
  stroke-linecap: round;
}

.calorie-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  display: flex;
  flex-direction: column;
}

.calorie-text .val {
  font-family: 'Outfit', sans-serif;
  font-size: 40px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
}

.calorie-text .sep {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin: 2px 0;
}

.calorie-text .target {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.calorie-stats {
  display: flex;
  width: 100%;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
  margin-top: 10px;
}

.calorie-stats .stat-item {
  flex: 1;
  text-align: center;
}

.calorie-stats .stat-item:first-child {
  border-right: 1px solid var(--border-color);
}

.stat-item .label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.stat-item .value {
  font-size: 16px;
  font-weight: 700;
}

.value.positive {
  color: var(--color-calories);
}

/* Macros Cards Grid */
.macros-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.macro-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
}

.macro-icon-wrapper {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.macro-info {
  flex: 1;
}

.macro-title {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  display: block;
  margin-bottom: 8px;
}

.macro-bar-container {
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.macro-bar {
  height: 100%;
  border-radius: 4px;
  width: 0;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.macro-values {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.macro-values span:first-child {
  color: var(--text-primary);
  font-weight: 700;
}

/* Color codes for macros */
.protein .macro-icon-wrapper {
  background: rgba(244, 63, 94, 0.1);
  color: var(--color-protein);
  border: 1px solid rgba(244, 63, 94, 0.2);
}
.protein .macro-bar { background: var(--grad-protein); }

.carbs .macro-icon-wrapper {
  background: rgba(6, 182, 212, 0.1);
  color: var(--color-carbs);
  border: 1px solid rgba(6, 182, 212, 0.2);
}
.carbs .macro-bar { background: var(--grad-carbs); }

.fats .macro-icon-wrapper {
  background: rgba(217, 70, 239, 0.1);
  color: var(--color-fats);
  border: 1px solid rgba(217, 70, 239, 0.2);
}
.fats .macro-bar { background: var(--grad-fats); }

.fiber .macro-icon-wrapper {
  background: rgba(16, 185, 129, 0.1);
  color: var(--color-fiber);
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.fiber .macro-bar { background: var(--grad-fiber); }

/* Daily Meal Log List */
.log-card {
  margin-top: 24px;
}

.log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.meal-log-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.empty-log-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 0;
  text-align: center;
  color: var(--text-muted);
}

.empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.empty-icon i {
  width: 28px;
  height: 28px;
}

.empty-log-state p {
  margin-bottom: 20px;
  font-size: 15px;
}

.logged-meal-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  transition: var(--transition-fast);
}

.logged-meal-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateX(4px);
}

.meal-left-col {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.meal-thumb-wrapper {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: #18181b;
}

.meal-thumb-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.meal-title-block {
  display: flex;
  flex-direction: column;
}

.meal-title-block .meal-name {
  font-weight: 600;
  font-size: 15px;
}

.meal-title-block .meal-time {
  font-size: 12px;
  color: var(--text-muted);
}

.meal-right-col {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-shrink: 0;
}

.meal-macros-pills {
  display: flex;
  gap: 8px;
}

.macro-pill {
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-color);
}

.macro-pill.p { color: var(--color-protein); border-color: rgba(244, 63, 94, 0.15); }
.macro-pill.c { color: var(--color-carbs); border-color: rgba(6, 182, 212, 0.15); }
.macro-pill.f { color: var(--color-fats); border-color: rgba(217, 70, 239, 0.15); }

.meal-cal-pill {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--color-calories);
  font-size: 16px;
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.meal-cal-pill span {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.btn-delete-meal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  transition: var(--transition-fast);
}

.btn-delete-meal:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

/* ================= SCAN TAB STYLES ================= */
.scan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.capture-card h3, .analysis-card h3 {
  margin-bottom: 20px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
}

/* Demo Section */
.demo-section {
  margin-bottom: 24px;
}

.demo-section-title {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.demo-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.demo-item-card {
  position: relative;
  border-radius: 16px;
  height: 100px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border-color);
  transition: var(--transition-normal);
}

.demo-item-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-normal);
}

.demo-item-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 12px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 20%, transparent);
  display: flex;
  flex-direction: column;
}

.demo-item-info .title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.demo-item-info .subtitle {
  font-size: 10px;
  color: var(--text-muted);
}

.demo-item-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-primary);
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.2);
}

.demo-item-card:hover img {
  transform: scale(1.08);
}

/* Upload zone */
.divider-text {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 20px 0;
}

.divider-text::before, .divider-text::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}

.divider-text::before { margin-right: 15px; }
.divider-text::after { margin-left: 15px; }

.drop-zone {
  border: 2px dashed rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.01);
  border-radius: 20px;
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 16px;
}

.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--accent-primary);
  background: rgba(139, 92, 246, 0.03);
}

.drop-icon {
  width: 40px;
  height: 40px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  transition: var(--transition-fast);
}

.drop-zone:hover .drop-icon {
  color: var(--accent-primary);
  transform: translateY(-2px);
}

.drop-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.drop-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

/* Camera Stream Viewport */
.camera-container {
  margin-top: 16px;
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: black;
  aspect-ratio: 4/3;
}

#webcam-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-overlay-frame {
  position: absolute;
  top: 15%;
  left: 15%;
  right: 15%;
  bottom: 15%;
  border: 2px dashed rgba(255, 255, 255, 0.4);
  border-radius: 16px;
  pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
}

.camera-controls {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 10;
  width: calc(100% - 32px);
  justify-content: center;
}

/* ================= ANALYSIS CARD STYLES ================= */
.analysis-card {
  min-height: 420px;
  display: flex;
  flex-direction: column;
}

.analysis-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.placeholder-icon {
  width: 72px;
  height: 72px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--text-secondary);
}

.placeholder-icon i {
  width: 32px;
  height: 32px;
}

.analysis-placeholder h4 {
  color: var(--text-primary);
  font-size: 18px;
  margin-bottom: 8px;
}

.analysis-placeholder p {
  font-size: 14px;
  max-width: 340px;
  margin-bottom: 24px;
}

.model-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot.yellow { background: var(--color-calories); box-shadow: 0 0 8px var(--color-calories); }
.status-dot.green { background: var(--color-fiber); box-shadow: 0 0 8px var(--color-fiber); }

/* Pulse animation helper */
.loading-pulse-slow {
  animation: pulse-op 2s infinite alternate;
}
@keyframes pulse-op {
  0% { opacity: 0.4; }
  100% { opacity: 1; }
}

/* ================= SCANNING SCREEN STYLES ================= */
.scanning-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.scan-image-preview-container {
  position: relative;
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  aspect-ratio: 4/3;
  background: #000;
}

.scan-image-preview-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scan-laser-line {
  position: absolute;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--grad-laser);
  z-index: 5;
  box-shadow: 0 0 15px #22c55e, 0 0 5px #22c55e;
  animation: sweep-laser 2s infinite ease-in-out;
}

@keyframes sweep-laser {
  0% { top: 0%; }
  50% { top: 100%; }
  100% { top: 0%; }
}

.scan-grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(34, 197, 94, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 197, 94, 0.04) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
  z-index: 4;
}

/* Simulated AI Bounding Boxes */
.scan-bbox {
  position: absolute;
  border: 2px solid #22c55e;
  border-radius: 4px;
  background: rgba(34, 197, 94, 0.15);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
  z-index: 6;
  pointer-events: none;
  animation: bbox-fade-in 0.4s ease-out forwards;
}

.scan-bbox-label {
  position: absolute;
  top: -24px;
  left: -2px;
  background: #22c55e;
  color: black;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px 4px 0 0;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

@keyframes bbox-fade-in {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.result-bbox {
  position: absolute;
  border: 2px solid var(--accent-primary);
  border-radius: 4px;
  background: rgba(139, 92, 246, 0.15);
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.4);
  z-index: 6;
  pointer-events: none;
  animation: bbox-fade-in 0.4s ease-out forwards;
}

.result-bbox-label {
  position: absolute;
  top: -24px;
  left: -2px;
  background: var(--accent-primary);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px 4px 0 0;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.ai-raw-outputs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: -12px;
  margin-bottom: 20px;
}

.ai-tag {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}

.ai-tag.matched {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.05);
  color: var(--color-fiber);
}

.scanning-status {
  padding: 20px 0;
  text-align: center;
}

.scanning-status h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}

.loading-bar-container {
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}

.loading-bar {
  height: 100%;
  background: #22c55e;
  width: 0;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
  transition: width 0.1s linear;
}

.scanning-status p {
  font-size: 13px;
  color: var(--text-muted);
}

/* ================= RESULTS PANEL STYLES ================= */
.analysis-result {
  animation: fadeIn 0.4s ease-out;
}

.result-image-header {
  position: relative;
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  aspect-ratio: 16/9;
  background: #000;
  margin-bottom: 24px;
}

.result-image-header img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.result-image-badge {
  position: absolute;
  bottom: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: 30px;
  color: white;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.analysis-details-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.result-macros-summary {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: rgba(255,255,255,0.01);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 16px;
}

.total-calories-display {
  text-align: center;
  padding: 12px 0 20px 0;
  border-bottom: 1px solid var(--border-color);
}

.total-calories-display .kcal-number {
  font-family: 'Outfit', sans-serif;
  font-size: 36px;
  font-weight: 800;
  color: var(--color-calories);
  display: block;
  line-height: 1;
}

.total-calories-display .kcal-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  margin-top: 4px;
  display: block;
}

.macros-mini-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 16px;
}

.mini-bar-item .bar-header {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin-bottom: 4px;
  font-weight: 600;
}

.mini-bar-item .bar-header span:first-child {
  color: var(--text-secondary);
}

.mini-bar-item .bar-header span:last-child {
  color: var(--text-primary);
  font-weight: 700;
}

.mini-bar-item .bar-bg {
  height: 5px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
}

.mini-bar-item .bar-fill {
  height: 100%;
  border-radius: 3px;
  width: 0%;
  transition: width 0.3s ease;
}

.mini-bar-item.protein .bar-fill { background: var(--color-protein); }
.mini-bar-item.carbs .bar-fill { background: var(--color-carbs); }
.mini-bar-item.fats .bar-fill { background: var(--color-fats); }
.mini-bar-item.fiber .bar-fill { background: var(--color-fiber); }

/* Bounding box and Ingredient list editing */
.ingredients-list-panel h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.ingredients-list-panel .section-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.ingredients-editor-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.ingredient-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 10px 14px;
}

.ingredient-row .ing-name-block {
  flex: 1.2;
  display: flex;
  flex-direction: column;
}

.ingredient-row .ing-name {
  font-size: 14px;
  font-weight: 600;
}

.ingredient-row .ing-cal {
  font-size: 11px;
  color: var(--text-muted);
}

.ingredient-row .slider-container {
  flex: 2;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ingredient-row .weight-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.ingredient-row .weight-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 6px var(--accent-primary);
  border: none;
  transition: transform 0.1s;
}

.ingredient-row .weight-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.ingredient-row .weight-val {
  font-size: 12px;
  font-weight: 700;
  width: 42px;
  text-align: right;
  color: var(--text-primary);
}

.btn-remove-ing {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  border-radius: 6px;
  transition: var(--transition-fast);
}

.btn-remove-ing:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.btn-remove-ing i {
  width: 14px;
  height: 14px;
}

/* Autocomplete & Add Product manual input */
.add-ingredient-section {
  position: relative;
}

.input-autocomplete-wrapper {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 8px 12px;
  gap: 10px;
}

.input-autocomplete-wrapper .add-icon {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.input-autocomplete-wrapper input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  width: 100%;
}

.input-autocomplete-wrapper input::placeholder {
  color: var(--text-muted);
}

.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 6px;
  background: #18181b;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  max-height: 180px;
  overflow-y: auto;
  z-index: 50;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  backdrop-filter: blur(10px);
}

.autocomplete-item {
  padding: 10px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.autocomplete-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

.autocomplete-item .cal-preview {
  font-size: 11px;
  color: var(--text-muted);
}

/* Recommendation card output styling */
.coach-recommendation-card {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(20, 20, 25, 0.8) 100%);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 24px;
  position: relative;
}

.coach-recommendation-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139,92,246,0.3), transparent);
}

.recommendation-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.coach-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
}

.coach-avatar i {
  width: 18px;
  height: 18px;
  animation: spin-sparkle 4s linear infinite;
}

@keyframes spin-sparkle {
  0% { transform: rotate(0); }
  50% { transform: scale(1.1) rotate(180deg); }
  100% { transform: rotate(360deg); }
}

.coach-meta {
  display: flex;
  flex-direction: column;
}

.coach-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 14px;
}

.coach-tag {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-primary);
  font-weight: 700;
}

.recommendation-body {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.6;
}

.result-actions {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 12px;
}

/* ================= TOASTS & NOTIFICATIONS ================= */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 100;
}

.toast {
  background: rgba(20, 20, 25, 0.85);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  animation: toast-slide-in 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  min-width: 250px;
  max-width: 320px;
  font-size: 13px;
  font-weight: 600;
}

.toast.success { border-color: rgba(16,185,129,0.3); }
.toast.success i { color: var(--color-fiber); }

.toast.info { border-color: rgba(6,182,212,0.3); }
.toast.info i { color: var(--color-carbs); }

@keyframes toast-slide-in {
  from { opacity: 0; transform: translateY(10px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.toast.fade-out {
  animation: toast-fade-out 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes toast-fade-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-10px); }
}

/* ================= RESPONSIVE ================= */
@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .scan-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  body {
    padding: 0;
  }
  .app-container {
    padding: 0 12px calc(80px + env(safe-area-inset-bottom)) 12px;
  }
  .nav-btn span {
    font-size: 10px;
    font-weight: 500;
  }
  .nav-btn i {
    width: 20px;
    height: 20px;
  }
  .app-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: calc(16px + env(safe-area-inset-top)) 12px 12px 12px;
    margin: 0 -12px;
    background: #0b0b0f;
    border-bottom: 1px solid var(--border-color);
  }
  .app-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: rgba(11, 11, 15, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    border-left: none;
    border-right: none;
    border-bottom: none;
    border-radius: 0;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom)) 16px;
    z-index: 999;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
    gap: 8px;
    display: flex;
    justify-content: space-around;
    box-sizing: border-box;
  }
  .nav-btn {
    flex: 1;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 6px 0;
    gap: 4px;
    font-size: 10px;
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 8px;
    color: var(--text-secondary);
  }
  .nav-btn:hover {
    background: transparent;
    color: var(--text-primary);
  }
  .nav-btn.active {
    background: transparent;
    color: var(--accent-primary);
    box-shadow: none;
  }
  .nav-btn.active i {
    filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.6));
  }
  .macros-summary-grid {
    grid-template-columns: 1fr;
  }
  .analysis-details-grid {
    grid-template-columns: 1fr;
  }
  .demo-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
  .result-actions {
    grid-template-columns: 1fr;
  }
}

/* ================= SETTINGS BUTTON & MODAL ================= */
.settings-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.settings-btn:hover {
  color: white;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: rotate(45deg);
}

.settings-btn i {
  width: 18px;
  height: 18px;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  animation: modal-fade-in 0.25s ease-out forwards;
}

.modal-card {
  background: rgba(22, 22, 29, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  animation: modal-slide-up 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes modal-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modal-slide-up {
  from { transform: scale(0.9) translateY(20px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.settings-modal-icon {
  color: var(--accent-primary);
  width: 22px;
  height: 22px;
}

.close-modal-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  transition: var(--transition-fast);
}

.close-modal-btn:hover {
  color: white;
  background: rgba(255, 255, 255, 0.05);
}

.close-modal-btn i {
  width: 18px;
  height: 18px;
}

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.input-password-wrapper:focus-within {
  border-color: var(--accent-primary);
}

.input-password-wrapper input {
  width: 100%;
  background: transparent;
  border: none;
  padding: 12px 14px;
  color: white;
  font-family: inherit;
  font-size: 14px;
  outline: none;
}

.toggle-password-btn {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 4px;
}

.toggle-password-btn:hover {
  color: var(--text-secondary);
}

.toggle-password-btn i {
  width: 16px;
  height: 16px;
}

.help-text {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

.help-text a {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.help-text a:hover {
  text-decoration: underline;
}

.inline-icon {
  width: 10px;
  height: 10px;
}

/* Switch styling */
.toggle-group {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-color);
  padding: 14px 16px;
  border-radius: 16px;
}

.toggle-label-desc {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toggle-title {
  font-size: 13.5px;
  font-weight: 600;
}

.toggle-desc {
  font-size: 11px;
  color: var(--text-muted);
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch .slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: .3s;
  border: 1px solid var(--border-color);
}

.switch .slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-secondary);
  transition: .3s;
}

.switch input:checked + .slider {
  background-color: var(--accent-primary);
}

.switch input:checked + .slider:before {
  transform: translateX(20px);
  background-color: white;
}

.switch .slider.round {
  border-radius: 24px;
}

.switch .slider.round:before {
  border-radius: 50%;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.15);
}

/* Prompt Banner styling */
.gemini-promo-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(139, 92, 246, 0.06);
  border: 1px solid rgba(139, 92, 246, 0.15);
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 12px;
}

.gemini-promo-banner i {
  color: var(--accent-primary);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.gemini-promo-banner a {
  color: var(--accent-primary);
  font-weight: 600;
  text-decoration: none;
}

.gemini-promo-banner a:hover {
  text-decoration: underline;
}

/* Authentication Code Verification Styling */
.code-box-input {
  width: 50px;
  height: 55px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: white;
  font-size: 24px;
  font-weight: bold;
  text-align: center;
  outline: none;
  transition: all 0.2s ease;
}

.code-box-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
  background: rgba(0, 0, 0, 0.1);
}

.auth-modal-card {
  max-width: 420px;
}

.auth-screen {
  padding: 20px 24px 24px;
}

/* Professional Input Styles */
.search-input {
  width: 100%;
  height: 44px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: white;
  padding: 0 16px;
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.search-input:focus {
  border-color: var(--accent-primary);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

/* Styling dropdown menus in select elements */
select.search-input {
  color: white;
  background-color: rgba(255, 255, 255, 0.04);
  padding: 0 12px;
  cursor: pointer;
}

select.search-input option {
  background-color: #121214;
  color: white;
}

/* Centered Profile Tab Container */
.profile-container {
  max-width: 650px;
  margin: 0 auto 40px auto;
  width: 100%;
}

/* Override Webkit Browser Autofill (Invisible Text bugfix) */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text-primary) !important;
  -webkit-box-shadow: 0 0 0px 1000px #16161d inset !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* ================= FOOTER ================= */
.app-footer {
  margin-top: 80px;
  padding: 60px 0 40px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-family: 'Inter', sans-serif;
  text-align: center;
  width: 100%;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-title {
  font-size: 18px;
  font-weight: 800;
  color: #3b82f6; /* Bright neon blue matching the image */
  letter-spacing: 0.08em;
  margin: 0 0 4px 0;
  text-transform: uppercase;
}

.footer-info-text {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.8;
}

.footer-info-text p {
  margin: 4px 0;
}

.footer-info-text a {
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  transition: var(--transition-fast);
}

.footer-info-text a:hover {
  color: #3b82f6;
}

.footer-info-text .payment-info {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.25);
  margin-top: 6px;
}

.footer-links-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 12px 0;
  width: 100%;
}

.footer-links-row {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-links-row a {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: var(--transition-fast);
}

.footer-links-row a:hover {
  color: #3b82f6;
}

.footer-copyright {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.25);
  letter-spacing: 0.08em;
  margin-top: 12px;
  text-transform: uppercase;
}

/* Legal Modal */
.legal-modal-card {
  max-width: 650px;
  width: 90%;
}

.legal-modal-body h4 {
  margin-top: 20px;
  margin-bottom: 8px;
  color: var(--text-primary);
  font-size: 16px;
}

.legal-modal-body p {
  margin-bottom: 16px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .footer-links-row {
    flex-direction: column;
    gap: 12px;
  }
}

/* ================= SUBSCRIPTION MODAL ================= */
.subscription-modal-card {
  max-width: 680px;
  width: 90%;
}

.limit-warning-box {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 12px;
  padding: 16px;
  box-sizing: border-box;
}

.pricing-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 16px;
}

.pricing-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform var(--transition-medium), border-color var(--transition-fast);
  box-sizing: border-box;
}

.pricing-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.15);
}

.pricing-card.premium-plan {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
  border: 2px solid var(--accent-primary);
}

.pricing-card.premium-plan:hover {
  border-color: var(--accent-light);
  box-shadow: 0 10px 30px -10px rgba(139, 92, 246, 0.3);
}

.plan-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.premium-badge {
  background: var(--accent-primary);
  color: white;
}

.plan-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 8px 0;
}

.plan-price {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-primary);
}

.plan-period {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 13px;
  color: var(--text-secondary);
}

.plan-features li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check-icon {
  stroke: #10b981;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.cross-icon {
  stroke: #ef4444;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.disabled-feature {
  color: var(--text-muted);
}

.pricing-btn {
  margin-top: auto;
}

@media (max-width: 640px) {
  .pricing-options {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ================= iOS INSTALL PWA TOOLTIP ================= */
.ios-install-overlay {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  z-index: 2000;
  display: flex;
  justify-content: center;
  pointer-events: none;
  animation: slideUpFade 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.ios-install-card {
  pointer-events: auto;
  background: rgba(22, 22, 29, 0.95);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 20px;
  width: 100%;
  max-width: 400px;
  padding: 20px;
  box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.8), 0 0 20px rgba(139, 92, 246, 0.15);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: relative;
  box-sizing: border-box;
}

.ios-install-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 12px;
}

.ios-install-logo img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  display: block;
}

.ios-install-title-box {
  flex: 1;
}

.ios-install-title {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.ios-install-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
}

.ios-install-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: var(--transition-fast);
}

.ios-install-close:hover {
  color: var(--text-primary);
}

.ios-install-body p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 12px;
}

.ios-install-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ios-install-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.ios-install-step .step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-primary-glow);
  border: 1px solid var(--accent-primary);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.ios-install-step .step-text {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.4;
}

.ios-install-step strong {
  color: var(--accent-primary);
}

.ios-share-icon, .ios-plus-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 2px 4px;
  margin: 0 2px;
}

.ios-share-icon i, .ios-plus-icon i {
  width: 14px;
  height: 14px;
  stroke-width: 2px;
}

.ios-share-icon i {
  color: #007aff;
}

.ios-install-arrow {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 16px;
  height: 16px;
  background: rgba(22, 22, 29, 0.95);
  border-right: 1px solid rgba(139, 92, 246, 0.3);
  border-bottom: 1px solid rgba(139, 92, 246, 0.3);
  box-shadow: 10px 10px 20px rgba(0, 0, 0, 0.4);
}

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

@media (max-width: 480px) {
  .ios-install-overlay {
    bottom: calc(76px + env(safe-area-inset-bottom));
    padding: 12px;
  }
  .ios-install-arrow {
    display: none;
  }
}

