:root {
  --bg: #0f0f0f;
  --surface: #1a1a1a;
  --surface-hover: #252525;
  --primary: #ffaa00;
  --primary-dark: #e69900;
  --text: #f0f0f0;
  --text-secondary: #a0a0a0;
  --danger: #ff4444;
  --success: #00c853;
  --radius: 14px;
  --shadow: 0 4px 16px rgba(0,0,0,0.4);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  overflow-x: hidden;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 16px;
  display: flex;
  flex-direction: column;
}

/* Loading */
#loading {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
#loading p {
  color: var(--text-secondary);
  font-size: 14px;
}
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #333;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }

/* Progress */
.progress-bar {
  width: 100%;
  height: 6px;
  background: #333;
  border-radius: 3px;
  margin-bottom: 20px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* Step */
.step {
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

h2 {
  font-size: 20px;
  margin: 0 0 6px;
  font-weight: 700;
}
.subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0 0 18px;
}

/* Inputs */
input[type="text"],
input[type="tel"],
textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid #333;
  border-radius: var(--radius);
  color: var(--text);
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s;
  margin-bottom: 12px;
}
input:focus, textarea:focus {
  border-color: var(--primary);
}
textarea {
  min-height: 100px;
  resize: vertical;
}

/* Buttons */
.btn {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: transform 0.1s, opacity 0.2s;
  margin-bottom: 10px;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--primary);
  color: #000;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid #333;
}
.btn-secondary:hover { background: var(--surface-hover); }
.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
}
.btn-success {
  background: var(--success);
  color: #000;
}

/* Option cards */
.options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.option-card {
  background: var(--surface);
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  font-size: 15px;
  transition: border-color 0.2s, background 0.2s;
  text-align: left;
}
.option-card:hover { background: var(--surface-hover); }
.option-card.selected {
  border-color: var(--primary);
  background: rgba(255,170,0,0.08);
}

/* Actions */
.actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}
.actions .btn {
  flex: 1;
  margin-bottom: 0;
}

/* Or divider */
.or {
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
  margin: 6px 0 12px;
  position: relative;
}
.or::before, .or::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 36%;
  height: 1px;
  background: #333;
}
.or::before { left: 0; }
.or::after { right: 0; }

/* Summary */
.summary {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #2a2a2a;
  font-size: 14px;
}
.summary-row:last-child { border-bottom: none; }
.summary-label {
  color: var(--text-secondary);
}
.summary-value {
  text-align: right;
  max-width: 60%;
  word-break: break-word;
}

/* Success */
.success-icon {
  font-size: 64px;
  text-align: center;
  margin-bottom: 12px;
}
.success-text {
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 24px;
}

/* Error */
.error-box {
  background: rgba(255,68,68,0.1);
  border: 1px solid var(--danger);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  color: var(--danger);
  font-size: 14px;
}

/* Top bar */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.top-bar h2 {
  margin: 0;
}
.back-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
}

/* Responsive */
@media (min-width: 400px) {
  .options-grid {
    grid-template-columns: 1fr 1fr;
  }
}
