/* public/assets/style.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #090c10;
  --text: #f0f6fc;
  --muted: #8b949e;
  --accent: #238636; /* GitHub-ish green for finance vibe */
  --accent-hover: #2ea043;
  --border: rgba(48, 54, 61, 0.8);
  --input-bg: rgba(22, 27, 34, 0.8);
  --input-border: rgba(48, 54, 61, 1);
  --shadow: 0 8px 24px rgba(0,0,0,0.5);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Progress Area */
.progress-bar-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.05);
  z-index: 100;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.5s ease;
}

/* Base Layout */
.main-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.typeform-form {
  width: 100%;
  max-width: 800px;
  position: relative;
}

/* Step Transitions */
.step {
  display: none;
  opacity: 0;
  transform: translateY(30px);
  animation: slideUp 0.5s forwards ease-out;
}
.step.active {
  display: block;
}

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

/* Typography & Titles */
.hero-step h1 {
  font-size: 40px;
  margin: 0 0 16px 0;
  line-height: 1.2;
  letter-spacing: -1px;
}
.subtitle {
  font-size: 20px;
  color: var(--muted);
  margin: 0 0 16px 0;
  font-weight: 400;
}
.note {
  font-size: 14px;
  color: var(--muted);
}
.block-indicator {
  font-size: 14px;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.q-title {
  display: flex;
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 24px;
  line-height: 1.3;
}
.q-num {
  color: var(--accent);
  margin-right: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.icon-arrow-right::before { content: "→"; }
.icon-arrow-up::before { content: "↑"; }
.icon-arrow-down::before { content: "↓"; }

.req { color: #f85149; margin-left: 6px; font-size: 18px; }
.hint { color: var(--muted); margin-bottom: 16px; font-size: 14px; }
.hint.small { font-size: 13px; }

/* Inputs */
.input-text {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--muted);
  color: var(--accent);
  font-size: 24px;
  padding: 12px 0;
  outline: none;
  font-family: inherit;
  transition: border-color 0.3s;
}
.input-text:focus {
  border-bottom-color: var(--accent);
}
.input-text::placeholder {
  color: rgba(139, 148, 158, 0.4);
}
textarea.input-text {
  resize: vertical;
  min-height: 80px;
  line-height: 1.4;
  font-size: 20px;
}

.select-wrapper {
  position: relative;
  width: 100%;
  max-width: 400px;
}
.input-select {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--text);
  font-size: 18px;
  padding: 16px;
  border-radius: 8px;
  outline: none;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.2s;
}
.input-select:focus {
  border-color: var(--accent);
}
.select-wrapper::after {
  content: "▼";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--muted);
  font-size: 12px;
}

/* Checkboxes & Multi-Options */
.options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.checkbox-opt {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  padding: 12px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  max-width: 600px;
}
.checkbox-opt:hover {
  background: rgba(48, 54, 61, 0.4);
}
.checkbox-opt input {
  display: none; /* Hide default checkbox */
}
.opt-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid rgba(255,255,255,0.1);
}
.opt-text {
  font-size: 18px;
}
.checkbox-opt:has(input:checked) {
  border-color: var(--accent);
  background: rgba(35, 134, 54, 0.1);
}
.checkbox-opt:has(input:checked) .opt-letter {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Linear Scale */
.scale-container {
  margin-top: 16px;
  max-width: 600px;
}
.scale-labels {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 12px;
}
.scale-options {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.scale-opt {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}
.scale-opt input { display: none; }
.scale-val { font-size: 18px; font-weight: 500; }
.scale-opt:hover { background: rgba(48, 54, 61, 0.4); }
.scale-opt:has(input:checked) {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Matrix */
.matrix-wrap {
  width: 100%;
}
.matrix-instruction {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 24px;
}
.matrix-mobile-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.matrix-rowlabel {
  font-size: 18px;
  margin-bottom: 12px;
  font-weight: 500;
}
.matrix-row-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.matrix-opt {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 48px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 6px;
  cursor: pointer;
  padding: 0 12px;
  transition: all 0.2s;
}
.matrix-opt input { display: none; }
.mx-val { font-size: 16px; font-weight: 500; }
.matrix-opt:hover { background: rgba(48, 54, 61, 0.4); }
.matrix-opt:has(input:checked) {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Ranking */
.ranking-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 500px;
}
.rank-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.rank-pos {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--input-bg);
  border-radius: 8px;
  font-weight: 600;
  color: var(--muted);
  flex-shrink: 0;
}
.rank-select {
  padding: 12px 16px;
  font-size: 16px;
}

/* Actions & Buttons */
.step-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.inline-actions {
  margin-top: 24px;
}
.mt-sm { margin-top: 12px; }
.mt-md { margin-top: 24px; }
.mt-lg { margin-top: 40px; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 14px 28px;
  font-size: 20px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: filter 0.2s;
}
.btn-primary:hover { filter: brightness(1.1); }
.btn-primary span { font-size: 14px; font-weight: 400; opacity: 0.8; }

.btn-text {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  text-decoration: underline;
}
.btn-text:hover { color: var(--text); }

/* Navigation Footer Helpers */
.step-footer {
  margin-top: 48px;
  display: flex;
  gap: 8px;
}
.btn-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.05);
  border: none;
  border-radius: 4px;
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-nav:hover {
  background: rgba(255,255,255,0.15);
}
.btn-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.footnote { color: var(--muted); font-size: 14px; }
