/* ==================== RESET & BASE ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --success: #10B981;
  --danger: #EF4444;
  --text-primary: #111827;
  --text-secondary: #6B7280;
  --text-muted: #9CA3AF;
  --border: #E5E7EB;
  --bg-primary: #FFFFFF;
  --bg-secondary: #F9FAFB;
  --radius: 16px;
  --transition: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==================== HEADER ==================== */
.header {
  padding: 24px 20px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
}

.logo {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.tagline {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ==================== PROGRESS ==================== */
.progress-wrapper {
  padding: 32px 20px 24px;
  text-align: center;
}

.progress-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  transition: all var(--transition);
}

.dot.active {
  background: var(--primary);
  transform: scale(1.3);
}

.dot.completed {
  background: var(--success);
}

.progress-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

/* ==================== CONTAINER ==================== */
.container {
  flex: 1;
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px 120px;
}

/* ==================== STEP ==================== */
.step {
  display: none;
  opacity: 0;
  animation: fadeIn 0.4s ease forwards;
}

.step.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.step-header {
  text-align: center;
  margin-bottom: 40px;
}

.step-icon {
  font-size: 56px;
  margin-bottom: 20px;
  display: block;
}

.step-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.step-subtitle {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ==================== OPTIONS ==================== */
.options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.options.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.option {
  position: relative;
  background: var(--bg-primary);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.option:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.option.selected {
  border-color: var(--primary);
  background: rgba(37, 99, 235, 0.03);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.option input {
  display: none;
}

.option-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.option-content {
  flex: 1;
}

.option-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.4;
}

.option-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.option-check {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.option.selected .option-check {
  background: var(--primary);
  border-color: var(--primary);
}

.option-check::after {
  content: "✓";
  color: white;
  font-size: 14px;
  font-weight: 700;
  opacity: 0;
  transition: opacity var(--transition);
}

.option.selected .option-check::after {
  opacity: 1;
}

/* Grid variant */
.options.grid .option {
  flex-direction: column;
  text-align: center;
  padding: 28px 20px;
  min-height: 180px;
}

.options.grid .option-icon {
  font-size: 40px;
}

.options.grid .option-check {
  top: 20px;
  right: 20px;
}

/* ==================== SUMMARY ==================== */
.summary-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.summary-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

.summary-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.summary-label-icon {
  font-size: 18px;
}

.summary-value {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.5;
}

.continue-btn {
  width: 100%;
  height: 56px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.continue-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.continue-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.continue-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.summary-note {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: var(--success);
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ==================== LOADING ==================== */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==================== ERROR MESSAGE ==================== */
.error-message {
  display: none;
  padding: 12px 16px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 10px;
  color: var(--danger);
  font-size: 14px;
  margin-top: 16px;
  text-align: center;
}

.error-message.show {
  display: block;
}

/* ==================== FOOTER NAV ==================== */
.footer-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
}

.btn-back {
  padding: 10px 20px;
  background: transparent;
  border: 2px solid var(--border);
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition);
  opacity: 0;
  pointer-events: none;
}

.btn-back.visible {
  opacity: 1;
  pointer-events: auto;
}

.btn-back:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.progress-bar-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.progress-bar {
  width: 120px;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  width: 33%;
}

.progress-percent {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  min-width: 40px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 640px) {
  .step-title {
    font-size: 24px;
  }

  .step-icon {
    font-size: 48px;
  }

  .options.grid {
    grid-template-columns: 1fr;
  }

  .options.grid .option {
    flex-direction: row;
    text-align: left;
    min-height: auto;
  }

  .options.grid .option-icon {
    font-size: 32px;
  }

  .progress-bar-wrapper {
    gap: 8px;
  }

  .progress-bar {
    width: 80px;
  }

  .progress-percent {
    font-size: 13px;
  }
}

@media (min-width: 641px) {
  .header {
    padding: 28px 24px;
  }

  .logo {
    font-size: 24px;
  }

  .container {
    padding: 0 24px 120px;
  }

  .step-title {
    font-size: 32px;
  }

  .step-icon {
    font-size: 64px;
  }
}