/* ──────────────────────────────────────────────────────────────────────────────
   Are You Stuck in the Time-for-Money Trap? Quiz
   Stylesheet
   ────────────────────────────────────────────────────────────────────────────── */

/* ── Reset & Base ── */
*, *::before, *::after { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
}

:root {
  --bg:        #0d0d0d;
  --card:      #161616;
  --border:    #2a2a2a;
  --accent:    #f5a623;
  --accent2:   #e8880a;
  --text:      #f0f0f0;
  --muted:     #888;
  --radius:    12px;
  --shadow:    0 4px 32px rgba(0,0,0,0.55);
}

html { 
  scroll-behavior: smooth; 
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 16px 80px;
  line-height: 1.5;
}

/* ── Header ── */
.header {
  text-align: center;
  max-width: 680px;
  margin-bottom: 40px;
}

.header .tag {
  display: inline-block;
  background: var(--accent);
  color: #000;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 18px;
}

.header h1 {
  font-size: clamp(1.6rem, 5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff 30%, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.header p strong {
  color: var(--text);
}

/* ── Progress Bar ── */
.progress-wrap {
  width: 100%;
  max-width: 680px;
  margin-bottom: 28px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.progress-bar-bg {
  background: var(--border);
  border-radius: 100px;
  height: 6px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  border-radius: 100px;
  transition: width 0.4s ease;
  width: 0%;
}

/* ── Quiz Card ── */
.quiz-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 32px;
  width: 100%;
  max-width: 680px;
}

/* ── Question ── */
.question-block { 
  display: none; 
}

.question-block.active { 
  display: block; 
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.q-number {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.q-text {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 24px;
  color: #fff;
}

/* ── Options ── */
.options { 
  display: flex; 
  flex-direction: column; 
  gap: 12px; 
}

.option {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #1e1e1e;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  user-select: none;
}

.option:hover {
  border-color: var(--accent);
  background: #222;
  transform: translateY(-1px);
}

.option:active {
  transform: translateY(0);
}

.option.selected {
  border-color: var(--accent);
  background: rgba(245, 166, 35, 0.1);
}

.option-letter {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--border);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.option.selected .option-letter {
  background: var(--accent);
  color: #000;
}

.option-text {
  font-size: 0.97rem;
  line-height: 1.5;
  color: var(--text);
  padding-top: 3px;
}

/* ── Navigation ── */
.nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  gap: 12px;
}

.btn {
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: opacity 0.2s, transform 0.15s;
}

.btn:active { 
  transform: scale(0.97); 
}

.btn-back {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--muted);
}

.btn-back:hover { 
  border-color: #555; 
  color: var(--text); 
}

.btn-next {
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  color: #000;
  margin-left: auto;
}

.btn-next:hover { 
  opacity: 0.88; 
}

.btn-next:disabled { 
  opacity: 0.35; 
  cursor: not-allowed; 
}

.btn-submit {
  background: linear-gradient(135deg, #28a745, #34d058);
  color: #fff;
  margin-left: auto;
}

.btn-submit:hover { 
  opacity: 0.88; 
}

.btn-submit:disabled { 
  opacity: 0.35; 
  cursor: not-allowed; 
}

/* ── Results ── */
#results { 
  display: none; 
}

#results.show {
  display: block;
  animation: fadeIn 0.5s ease-in;
}

.result-header {
  text-align: center;
  margin-bottom: 32px;
}

.result-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  color: #000;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 16px;
}

.result-title {
  font-size: clamp(1.5rem, 5vw, 2.2rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
}

.result-subtitle {
  font-size: 1.05rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 20px;
}

/* Score breakdown */
.score-breakdown {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.score-pill {
  background: #1e1e1e;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  padding: 6px 20px;
  font-size: 0.88rem;
  font-weight: 700;
}

.score-pill.highlight {
  border-color: var(--accent);
  background: rgba(245, 166, 35, 0.12);
  color: var(--accent);
}

/* Result body */
.result-body {
  background: #1a1a1a;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 28px;
  margin-bottom: 28px;
  line-height: 1.75;
  font-size: 1rem;
  color: #ddd;
}

.result-body p { 
  margin-bottom: 10px; 
}

.result-body p:last-child { 
  margin-bottom: 0; 
}

.result-body strong {
  color: var(--accent);
  font-weight: 700;
}

/* Final reality check */
.reality-check {
  background: linear-gradient(135deg, #1a1200, #1e1500);
  border: 1px solid #3d2e00;
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 28px;
  text-align: center;
}

.reality-check h3 {
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.reality-check p {
  color: #ccc;
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 8px;
}

.reality-check p:last-child {
  margin-bottom: 0;
}

/* CTA */
.cta-block {
  text-align: center;
}

.cta-block p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 18px;
}

.btn-cta {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  color: #000;
  font-size: 1.05rem;
  font-weight: 800;
  padding: 16px 40px;
  border-radius: 10px;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.15s;
  letter-spacing: 0.02em;
}

.btn-cta:hover { 
  opacity: 0.88; 
  transform: translateY(-2px); 
}

.btn-cta:active {
  transform: translateY(0);
}

.retake-link {
  display: block;
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.88rem;
  cursor: pointer;
  text-decoration: underline;
  background: none;
  border: none;
  font-family: inherit;
}

.retake-link:hover { 
  color: var(--text); 
}

/* ── Accessibility ── */
.option:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-cta:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── Responsive ── */
@media (max-width: 520px) {
  .quiz-card { 
    padding: 24px 18px; 
  }

  .nav-row { 
    flex-direction: column; 
  }

  .btn { 
    width: 100%; 
    text-align: center; 
  }

  .btn-next, .btn-submit { 
    margin-left: 0; 
  }

  .btn-back {
    order: 2;
  }

  .btn-submit {
    order: 1;
  }
}
