:root {
  /* Brand Colors */
  --primary: #84cc16; /* Lime green from logo */
  --primary-dark: #65a30d;
  --primary-light: #bef264;
  --accent: #6366f1; /* Secondary accent for specific actions */
  
  /* Neutral Colors */
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  
  /* Feedback Colors */
  --success: #22c55e;
  --error: #ef4444;
  --warning: #f59e0b;
  
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
  --shadow-float: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}

* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  margin: 0;
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

/* Mobile Container */
.app-container {
  width: 100%;
  max-width: 390px; /* iPhone 14 width approx */
  background-color: var(--bg-card);
  min-height: 100vh;
  position: relative;
  box-shadow: 0 0 50px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
}

/* Typography */
h1, h2, h3, h4, p {
  margin: 0;
}

h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 20px;
  font-weight: 600;
}

h3 {
  font-size: 16px;
  font-weight: 600;
}

.text-sm { font-size: 14px; }
.text-xs { font-size: 12px; }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.font-bold { font-weight: 700; }

/* Navigation */
.nav-header {
  padding: var(--space-md) var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  z-index: 50;
  border-bottom: 1px solid var(--border);
}

.nav-bottom {
  position: fixed;
  bottom: 0;
  width: 100%;
  max-width: 390px;
  background: white;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  padding: var(--space-md) 0;
  padding-bottom: max(var(--space-md), env(safe-area-inset-bottom));
  z-index: 50;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 10px;
  gap: 4px;
}

.nav-item.active {
  color: var(--primary-dark);
}

.nav-icon {
  width: 24px;
  height: 24px;
  background: var(--border);
  border-radius: 6px;
}

.nav-item.active .nav-icon {
  background: var(--primary);
}

.nav-item-center {
  position: relative;
  top: -24px;
  background: var(--primary);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px solid white;
  box-shadow: 0 -4px 10px rgba(0,0,0,0.1);
  color: white;
  text-decoration: none;
}

.nav-item-center .placeholder-icon {
  width: 32px;
  height: 32px;
  background: white;
}

/* Cards & Layout */
.main-content {
  flex: 1;
  padding: var(--space-lg);
  padding-bottom: 80px; /* Space for bottom nav */
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.card {
  background: white;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

/* Discovery Card Stack */
.card-stack {
  position: relative;
  height: 60vh;
  width: 100%;
  margin-top: var(--space-md);
}

/* Swipe Feedback Overlays */
.swipe-feedback {
  position: absolute;
  top: 40px;
  padding: 8px 16px;
  border-width: 4px;
  border-style: solid;
  border-radius: 8px;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  z-index: 10;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  opacity: 0; /* Hidden by default */
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.swipe-feedback.like {
  left: 40px;
  color: var(--success);
  border-color: var(--success);
  transform: rotate(-15deg);
}

.swipe-feedback.nope {
  right: 40px;
  color: var(--error);
  border-color: var(--error);
  transform: rotate(15deg);
}

/* Visible state for static wireframes */
.swipe-feedback.visible {
  opacity: 1;
}

.profile-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-lg);
  background: white;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.profile-image {
  flex: 1;
  background-color: #e2e8f0;
  position: relative;
  background-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.6) 100%);
}

.profile-info {
  padding: var(--space-lg);
  background: white;
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--bg-body);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform 0.1s;
  text-decoration: none;
  font-size: 16px;
}

.btn:active {
  transform: scale(0.98);
}

.btn.active-scale {
  transform: scale(1.15);
  box-shadow: 0 0 0 8px rgba(99, 102, 241, 0.2); /* Ring effect */
}

.btn-primary {
  background: var(--primary);
  color: #fff; /* White text on lime green might be hard to read, checking contrast */
  color: #0f172a; /* Dark text on bright lime is better */
}

.btn-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: var(--shadow-md);
}

.btn-reject {
  background: white;
  color: var(--error);
  border: 1px solid var(--border);
}

.btn-like {
  background: var(--primary);
  color: var(--text-main);
  box-shadow: 0 4px 14px rgba(132, 204, 22, 0.4);
}

.btn-super {
  background: white;
  color: var(--accent);
  border: 1px solid var(--border);
}

.action-bar {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  margin-top: var(--space-md);
  align-items: center;
}

/* Map specific */
.map-view {
  background-color: #f1f5f9;
  height: 100%;
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.heat-zone {
  position: absolute;
  border-radius: 50%;
  filter: blur(20px);
  opacity: 0.6;
}

/* Chat */
.chat-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.chat-item {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md);
  border-bottom: 1px solid var(--border);
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #cbd5e1;
  flex-shrink: 0;
}

.message-bubble {
  padding: 12px 16px;
  border-radius: 16px;
  max-width: 80%;
  margin-bottom: 8px;
}

.msg-sent {
  background: var(--primary);
  color: var(--text-main);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.msg-received {
  background: #f1f5f9;
  color: var(--text-main);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

/* Chat Suggestions */
.chat-footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  max-width: 390px;
  pointer-events: none;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.suggestion-container {
  padding: 0 16px 8px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  pointer-events: auto;
  scrollbar-width: none; /* Hide scrollbar Firefox */
}
.suggestion-container::-webkit-scrollbar {
  display: none; /* Hide scrollbar Chrome/Safari */
}

.suggestion-chip {
  background: white;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: 16px;
  font-size: 12px;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.suggestion-chip.active {
  border-color: var(--primary);
  color: var(--primary-dark);
  background: #f0fdf4;
}

.suggestion-chip:active {
  transform: scale(0.95);
}

.chat-input-bar {
  background: white;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  pointer-events: auto;
}

.btn-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.1s;
}
.btn-circle:active {
  transform: scale(0.9);
}

/* Utility Placeholders */
.placeholder-icon {
  width: 24px;
  height: 24px;
  background: currentColor;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
}

/* Icons */
.icon-search { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E"); }
.icon-user { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'%3E%3C/path%3E%3Ccircle cx='12' cy='7' r='4'%3E%3C/circle%3E%3C/svg%3E"); }
.icon-chat { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'%3E%3C/path%3E%3C/svg%3E"); }
.icon-map { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='1 6 1 22 8 18 16 22 21 18 21 2 16 6 8 2 1 6'%3E%3C/polygon%3E%3Cline x1='8' y1='2' x2='8' y2='18'%3E%3C/line%3E%3Cline x1='16' y1='6' x2='16' y2='22'%3E%3C/line%3E%3C/svg%3E"); }
.icon-dice { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='2' width='20' height='20' rx='5' ry='5'%3E%3C/rect%3E%3Ccircle cx='16' cy='8' r='2'%3E%3C/circle%3E%3Ccircle cx='8' cy='16' r='2'%3E%3C/circle%3E%3Ccircle cx='8' cy='8' r='2'%3E%3C/circle%3E%3Ccircle cx='16' cy='16' r='2'%3E%3C/circle%3E%3Ccircle cx='12' cy='12' r='2'%3E%3C/circle%3E%3C/svg%3E"); }
.icon-x { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E"); }
.icon-heart { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'%3E%3C/path%3E%3C/svg%3E"); }
.icon-star { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'%3E%3C/polygon%3E%3C/svg%3E"); }
.icon-arrow-left { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='19' y1='12' x2='5' y2='12'%3E%3C/line%3E%3Cpolyline points='12 19 5 12 12 5'%3E%3C/polyline%3E%3C/svg%3E"); }

/* Loading Shimmer */
.shimmer {
  background: #f6f7f8;
  background-image: linear-gradient(to right, #f6f7f8 0%, #edeef1 20%, #f6f7f8 40%, #f6f7f8 100%);
  background-repeat: no-repeat;
  background-size: 800px 100%; 
  animation-duration: 1s;
  animation-fill-mode: forwards; 
  animation-iteration-count: infinite;
  animation-name: placeholderShimmer;
  animation-timing-function: linear;
}

@keyframes placeholderShimmer {
  0% { background-position: -468px 0; }
  100% { background-position: 468px 0; }
}

/* User Flow Diagram Styles */
.flow-body {
    background-color: #f8fafc;
    padding: 40px;
    color: #0f172a;
    display: block; /* Override flex centered body */
    min-height: 100vh;
}
.flow-container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: flex-start;
}
.flow-column {
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: center;
}
.flow-node {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    width: 200px;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    position: relative;
}
.flow-node.start {
    border-color: #84cc16;
    background: #f7fee7;
}
.flow-node.action {
    border-style: dashed;
    background: #fffbeb;
    border-color: #f59e0b;
}
.flow-node strong {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
}
.flow-node span {
    font-size: 12px;
    color: #64748b;
}
.arrow-down {
    width: 2px;
    height: 40px;
    background: #cbd5e1;
    position: relative;
}
.arrow-down::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -4px;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #cbd5e1;
}
.arrow-right {
     display: inline-block;
     width: 40px;
     height: 2px;
     background: #cbd5e1;
     position: relative;
     margin: 0 10px;
     vertical-align: middle;
}
.arrow-right::after {
    content: '';
    position: absolute;
    right: 0;
    top: -4px;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 5px solid #cbd5e1;
}
.legend {
    margin-top: 60px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    display: inline-flex;
    gap: 24px;
}
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.dot { width: 12px; height: 12px; border-radius: 50%; }

/* Mobile Responsive Styles */
@media (max-width: 767px) {
  :root {
    --space-lg: 16px;
    --space-xl: 24px;
  }

  body {
    background-color: var(--bg-card);
    align-items: flex-start;
  }

  .app-container {
    max-width: 100%;
    box-shadow: none;
    min-height: 100vh;
  }

  h1 { font-size: 20px; }
  h2 { font-size: 18px; }
  h3 { font-size: 15px; }

  .nav-header {
    padding: var(--space-md);
  }

  .main-content {
    padding: var(--space-md);
    padding-bottom: 90px; /* More space for bottom nav */
  }

  .card-stack {
    height: 55vh; /* Slightly shorter to ensure action bar fits */
  }

  .action-bar {
    gap: var(--space-md);
  }

  .btn-icon {
    width: 56px;
    height: 56px;
    font-size: 20px;
  }

  /* Ensure touch targets are large enough */
  .nav-item {
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
  }

  /* Stack User Flow on mobile */
  .flow-container {
    flex-direction: column;
    gap: var(--space-xl);
  }

  .flow-column {
    width: 100%;
    align-items: flex-start;
    padding-left: var(--space-md);
    border-left: 2px dashed var(--border);
  }

  .flow-node {
    width: 100%;
    text-align: left;
  }

  .arrow-right {
    display: none;
  }
}

