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

:root {
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  
  /* Color Palette (Deep Black base with neon lime-green accents) */
  --bg-gradient: radial-gradient(circle at 50% 0%, #1a1c1e 0%, #0d0e10 100%);
  --card-bg: rgba(22, 24, 28, 0.9);
  --card-border: rgba(197, 240, 21, 0.12);
  --card-border-active: #c5f015;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  
  --primary-color: #c5f015; /* Logo Neon Green */
  --primary-hover: #b3db0e;
  --primary-glow: rgba(197, 240, 21, 0.45);
  
  --accent-color: #c5f015;
  --accent-hover: #b3db0e;
  --accent-glow: rgba(197, 240, 21, 0.45);
  
  --danger-color: #ef4444;
  --glass-effect: blur(12px);
  --transition-speed: 0.3s;
  --transition-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

body {
  font-family: var(--font-family);
  background: var(--bg-gradient);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  padding: 16px;
}

/* App Container (Constrained for mobile app look on all devices) */
.app-container {
  width: 100%;
  max-width: 440px;
  min-height: 580px;
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  backdrop-filter: var(--glass-effect);
  -webkit-backdrop-filter: var(--glass-effect);
  border: 1px solid var(--card-border);
  border-radius: 28px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 
              0 0 40px rgba(197, 240, 21, 0.03);
  padding: 28px;
  position: relative;
  overflow: hidden;
}

/* Header & Progress Indicator */
.app-header {
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.brand-logo {
  height: 60px;
  width: auto;
  object-fit: contain;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-primary);
}

.progress-container {
  background: rgba(255, 255, 255, 0.05);
  height: 5px;
  border-radius: 3px;
  width: 100%;
  overflow: hidden;
  position: relative;
}

.progress-bar {
  background: var(--primary-color);
  height: 100%;
  width: 0%;
  border-radius: 3px;
  transition: width var(--transition-speed) ease-in-out;
  box-shadow: 0 0 10px var(--primary-glow);
}

/* Cards & Flow Management */
.card-stack {
  position: relative;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card {
  display: none;
  flex-direction: column;
  flex-grow: 1;
  animation: slideIn var(--transition-bounce) 0.4s forwards;
  opacity: 0;
  will-change: transform, opacity;
}

.card.active {
  display: flex;
}

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

.card-title {
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.card-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.45;
}

/* Question Option Types */
.options-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

/* Interactive Option Card */
.option-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all var(--transition-speed) var(--transition-bounce);
  user-select: none;
}

.option-card:hover {
  background: rgba(197, 240, 21, 0.04);
  border-color: rgba(197, 240, 21, 0.4);
  transform: translateY(-2px);
}

.option-card.selected {
  background: rgba(197, 240, 21, 0.08);
  border-color: var(--primary-color);
  box-shadow: 0 0 15px rgba(197, 240, 21, 0.15);
}

.option-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.option-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.option-checkbox-indicator {
  width: 20px;
  height: 20px;
  border: 2px solid var(--text-secondary);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-speed) ease;
}

.option-card.selected .option-checkbox-indicator {
  border-color: var(--primary-color);
  background: var(--primary-color);
}

.option-card.selected .option-checkbox-indicator::after {
  content: '';
  width: 4px;
  height: 8px;
  border-right: 2px solid #000000;
  border-bottom: 2px solid #000000;
  transform: rotate(45deg);
  margin-bottom: 2px;
}

/* Radio button styles */
.option-circle-indicator {
  width: 20px;
  height: 20px;
  border: 2px solid var(--text-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-speed) ease;
}

.option-card.selected .option-circle-indicator {
  border-color: var(--primary-color);
}

.option-card.selected .option-circle-indicator::after {
  content: '';
  width: 10px;
  height: 10px;
  background: var(--primary-color);
  border-radius: 50%;
}

/* Range Sliders / Inputs */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

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

.text-input {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px;
  font-family: var(--font-family);
  font-size: 1.1rem;
  color: var(--text-primary);
  outline: none;
  transition: all var(--transition-speed) ease;
  width: 100%;
  text-align: center;
}

.text-input:focus {
  border-color: var(--primary-color);
  background: rgba(197, 240, 21, 0.04);
  box-shadow: 0 0 12px rgba(197, 240, 21, 0.2);
}

/* Slider Custom Styles */
.slider-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 16px 0 24px 0;
}

.slider-value-display {
  font-size: 2.25rem;
  font-weight: 800;
  text-align: center;
  color: var(--primary-color);
  text-shadow: 0 0 15px var(--primary-glow);
}

.slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
  box-shadow: 0 0 12px var(--primary-glow);
  transition: transform 0.1s ease;
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

/* Navigation Buttons */
.button-row {
  display: flex;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
}

.btn {
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 700;
  padding: 16px 24px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  transition: all var(--transition-speed) var(--transition-bounce);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  user-select: none;
}

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

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

.btn-primary {
  background: var(--primary-color);
  color: #000000;
  flex-grow: 1;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-primary:disabled {
  opacity: 0.4;
  color: rgba(0, 0, 0, 0.7);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Results & Lead Styling on Unified Screen */
.result-card-box {
  background: rgba(197, 240, 21, 0.06);
  border: 1px solid rgba(197, 240, 21, 0.3);
  border-radius: 20px;
  padding: 20px;
  text-align: center;
  margin-bottom: 24px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.result-saving-value {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--primary-color);
  margin: 6px 0;
  text-shadow: 0 0 12px var(--primary-glow);
}

.whatsapp-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.btn-whatsapp {
  background: #25d366;
  color: #000000;
  font-weight: 800;
  width: 100%;
  font-size: 1.05rem;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.35);
  animation: pulse 2s infinite;
}

.btn-whatsapp:hover {
  background: #20ba59;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

.btn-whatsapp svg {
  fill: #000000;
  width: 20px;
  height: 20px;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

.whatsapp-note {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: center;
  margin-top: 8px;
}

/* Error message label */
.error-message {
  color: var(--danger-color);
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  margin-top: -6px;
  margin-bottom: 8px;
  display: none;
}

/* Responsive Overrides */
@media (max-width: 480px) {
  body {
    padding: 0;
    background: #0d0e10;
  }
  .app-container {
    max-width: 100%;
    min-height: 100vh;
    border-radius: 0;
    border: none;
    box-shadow: none;
    padding: 24px 20px;
  }
}

/* Success Card & Checkmark Animation Styles */
.success-icon-box {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 30px 0;
}

.checkmark {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: block;
  stroke-width: 3;
  stroke: var(--primary-color);
  stroke-miterlimit: 10;
  background: rgba(197, 240, 21, 0.03); /* Subtle glass glow fill */
  box-shadow: 0 0 15px rgba(197, 240, 21, 0.1);
  animation: scaleAnimation .3s ease-in-out .9s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

.checkmark__circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 3;
  stroke-miterlimit: 10;
  stroke: var(--primary-color);
  fill: none;
  animation: strokeAnimation 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark__check {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  stroke-width: 3;
  stroke: var(--primary-color); /* Now in primary neon green */
  fill: none;
  animation: strokeAnimation 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes strokeAnimation {
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes scaleAnimation {
  0%, 100% {
    transform: none;
  }
  50% {
    transform: scale3d(1.1, 1.1, 1);
  }
}

@keyframes fillAnimation {
  100% {
    box-shadow: inset 0px 0px 0px 40px var(--primary-color);
  }
}

.whatsapp-success-note {
  line-height: 1.5;
}
