:root {
  --ocean: #1e88a8;
  --ocean-dark: #15647c;
  --sand: #f5deb3;
  --sand-light: #fdfbf7;
  --terra: #c2410c;
  --terra-light: #ea580c;
  --forest: #14532d;
  --forest-light: #22c55e;
  --bg: #f9f7f1;
  --text: #2d3748;
  --text-light: #718096;
  --white: #ffffff;
  --error: #ef4444;
  
  --font-head: 'DM Sans', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'Roboto Mono', monospace;
}

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

body {
  font-family: var(--font-body);
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hidden {
  display: none !important;
}

.mono {
  font-family: var(--font-mono);
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.2;
  color: var(--text);
}

.container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

/* BUTTONS */
.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  padding: 14px 32px;
  border-radius: 99px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--terra);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(194, 65, 12, 0.3);
}

.btn-primary:hover {
  background-color: var(--terra-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(194, 65, 12, 0.4);
}

.btn-secondary {
  background-color: var(--ocean);
  color: var(--white);
}

.btn-secondary:hover {
  background-color: var(--ocean-dark);
}

.btn-full {
  width: 100%;
}

.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}

/* SECTIONS */
.section {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* HERO SECTION */
.hero {
  position: relative;
  min-height: 100vh;
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: hidden;
  padding: 80px 20px;
}

.hero-bg {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-size: cover;
  background-position: center;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(to bottom, rgba(30, 136, 168, 0.7), rgba(20, 83, 45, 0.8));
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  color: var(--white);
}

.badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
  padding: 6px 16px;
  border-radius: 99px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 24px;
  border: 1px solid rgba(255,255,255,0.3);
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 900;
  margin-bottom: 24px;
  color: var(--white);
}

.hero-title span {
  display: block;
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-weight: 400;
  color: var(--sand);
  margin-top: 8px;
  font-family: var(--font-body);
}

.hero-desc {
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto 40px;
  color: rgba(255,255,255,0.9);
}

/* QUIZ SECTION */
#quiz-section {
  padding: 60px 0;
}

.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  background: var(--white);
  padding: 16px 24px;
  border-radius: 16px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.quiz-progress {
  flex: 1;
  margin-right: 24px;
}

#question-counter {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 8px;
}

.progress-bar {
  height: 8px;
  background: var(--sand);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--ocean);
  width: 0%;
  transition: width 0.3s ease;
}

.quiz-timer {
  background: var(--terra);
  color: var(--white);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 1.25rem;
  font-weight: 700;
  min-width: 90px;
  text-align: center;
}

.question-card {
  background: var(--white);
  border-radius: 24px;
  padding: 40px 30px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  position: relative;
}

.question-title {
  font-size: 1.75rem;
  margin-bottom: 30px;
  text-align: center;
}

/* Options Grid */
.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) {
  .options-grid { grid-template-columns: 1fr; }
}

.option-btn {
  background: var(--sand-light);
  border: 2px solid var(--sand);
  border-radius: 12px;
  padding: 20px;
  font-size: 1.1rem;
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
}

.option-btn:hover {
  background: var(--sand);
  border-color: var(--ocean);
}

.option-btn.flag-option {
  font-size: 3rem;
}

.option-btn.correct {
  background: var(--forest-light);
  border-color: var(--forest);
  color: var(--white);
}

.option-btn.incorrect {
  background: var(--error);
  border-color: #b91c1c;
  color: var(--white);
}

/* Map Container */
.map-container {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: var(--ocean);
  cursor: crosshair;
}

.interactive-map {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none; /* Let the container handle clicks */
}

#map-overlays {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
}

.map-pin {
  position: absolute;
  width: 24px;
  height: 24px;
  background: var(--terra);
  border: 3px solid var(--white);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  animation: dropIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.map-pin.target {
  background: var(--forest-light);
  border-style: dashed;
}

.map-line {
  position: absolute;
  background: var(--text);
  height: 2px;
  transform-origin: left center;
  opacity: 0.5;
}

@keyframes dropIn {
  0% { transform: translate(-50%, -150%) scale(0); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

/* Feedback Toast */
.feedback-toast {
  margin-top: 24px;
  background: var(--white);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  animation: slideUp 0.4s ease;
}

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

.feedback-toast h3 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.feedback-toast p {
  font-size: 1.2rem;
  color: var(--ocean);
  margin-bottom: 16px;
}

/* EMAIL GATE */
#email-gate {
  justify-content: center;
  align-items: center;
  padding: 60px 20px;
  background: var(--ocean);
}

.glass {
  background: rgba(255,255,255,0.95);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.form-header {
  text-align: center;
  margin-bottom: 30px;
}

.form-header h2 {
  font-size: 2.5rem;
  color: var(--ocean);
  margin-bottom: 12px;
}

.form-group {
  margin-bottom: 24px;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

input[type="text"],
input[type="email"] {
  width: 100%;
  padding: 14px 16px;
  font-size: 1rem;
  font-family: inherit;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  transition: all 0.2s;
}

input:focus {
  outline: none;
  border-color: var(--ocean);
  background: var(--white);
}

.error-message {
  background: #fee2e2;
  color: #b91c1c;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 24px;
  font-weight: 500;
  text-align: center;
}

/* RESULTS SECTION */
#results-section {
  padding: 60px 0;
}

.results-header {
  text-align: center;
  margin-bottom: 40px;
}

.results-header h2 {
  font-size: 2.5rem;
  margin-bottom: 24px;
}

.score-display {
  display: inline-block;
  background: var(--white);
  padding: 20px 40px;
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(30, 136, 168, 0.15);
}

.score-label {
  display: block;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.875rem;
  margin-bottom: 8px;
}

.score-value {
  font-size: 4rem;
  font-weight: 700;
  color: var(--ocean);
  line-height: 1;
}

.personality-card {
  background: linear-gradient(135deg, var(--terra) 0%, #9a3412 100%);
  color: var(--white);
  border-radius: 24px;
  padding: 40px;
  text-align: center;
  margin-bottom: 40px;
  box-shadow: 0 10px 30px rgba(194, 65, 12, 0.2);
}

.personality-icon {
  font-size: 4rem;
  margin-bottom: 16px;
}

.personality-card h3 {
  color: var(--white);
  font-size: 2rem;
  margin-bottom: 16px;
}

.personality-card p {
  font-size: 1.125rem;
  opacity: 0.9;
}

.heatmap-card {
  background: var(--white);
  border-radius: 24px;
  padding: 30px;
  margin-bottom: 40px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.heatmap-card h3 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.small-desc {
  color: var(--text-light);
  margin-bottom: 20px;
}

.heatmap-dot {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  filter: blur(10px);
  opacity: 0.7;
  mix-blend-mode: multiply;
}

/* SHARE PANEL */
.share-panel {
  background: var(--white);
  border-radius: 16px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.share-panel h3 {
  margin-bottom: 12px;
}

.share-panel p {
  margin-bottom: 20px;
  color: var(--text-light);
}

.share-controls {
  display: flex;
  gap: 12px;
}

.share-controls input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--text-light);
}

@media (max-width: 600px) {
  .share-controls { flex-direction: column; }
}

/* STATUS MESSAGE */
.status-card {
  max-width: 500px;
  margin: 100px auto;
  background: var(--white);
  padding: 40px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

#wbx-powered-by-slot {
  margin: 40px auto 20px;
  width: 100%;
}
