/* ════════════════════════════════════════════════════════════
   THERMOLUX HR Mini App — style.css
   Light theme — white background, #008ad5 accent
   ════════════════════════════════════════════════════════════ */

/* ── CSS Variables ────────────────────────────────────────── */
:root {
  --accent:       #008ad5;
  --accent-light: #33a8e8;
  --accent-dark:  #006fb0;
  --accent-glow:  rgba(0, 138, 213, 0.18);
  --accent-bg:    rgba(0, 138, 213, 0.07);

  --bg:              #f4f7fb;
  --surface:         #ffffff;
  --surface-2:       #eef4fb;
  --border:          #d0e4f5;
  --border-focus:    #008ad5;

  --text-primary:    #0d1b2a;
  --text-secondary:  #4a6070;
  --text-muted:      #9ab0c0;
  --text-on-accent:  #ffffff;

  --success:  #16a34a;
  --radius:   16px;
  --radius-sm: 10px;
  --shadow:   0 4px 24px rgba(0, 100, 180, 0.10);
  --shadow-lg: 0 8px 40px rgba(0, 100, 180, 0.15);
  --transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100%;
  overflow-x: hidden;
}

/* ── Header ───────────────────────────────────────────────── */
.app-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: #ffffff;
  box-shadow: 0 1px 0 var(--border), 0 2px 12px rgba(0,100,180,0.07);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
}

.logo-wrap { display: flex; align-items: center; gap: 10px; }

.logo-img {
  height: 34px;
  width: auto;
  object-fit: contain;
  border-radius: 6px;
}

.logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand { font-size: 14px; font-weight: 700; color: var(--accent); letter-spacing: 0.8px; }
.sub   { font-size: 11px; color: var(--text-secondary); font-weight: 400; }

.progress-info {
  font-size: 12px; font-weight: 600;
  color: var(--accent);
  background: var(--accent-bg);
  border: 1px solid var(--border);
  padding: 4px 12px; border-radius: 100px;
}

.progress-track {
  height: 3px;
  background: var(--border);
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  border-radius: 2px;
  transition: width var(--transition);
  width: 0%;
  box-shadow: 0 0 6px var(--accent-glow);
}

/* ── Main Content ─────────────────────────────────────────── */
.main-content {
  padding-top: 72px;
  padding-bottom: 40px;
  min-height: 100vh;
}

/* ── Slides ───────────────────────────────────────────────── */
.slide {
  display: none;
  padding: 20px 16px;
  animation: slideIn 0.35s ease forwards;
}
.slide.active { display: flex; flex-direction: column; align-items: center; }

@keyframes slideIn {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Welcome Card ─────────────────────────────────────────── */
.welcome-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 36px 28px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.welcome-emoji {
  font-size: 52px;
  margin-bottom: 14px;
  display: block;
  animation: bounce 2s ease-in-out infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

.welcome-title {
  font-size: 24px; font-weight: 700; margin-bottom: 12px;
  color: var(--text-primary);
}

.welcome-desc {
  font-size: 14px; line-height: 1.75;
  color: var(--text-secondary); margin-bottom: 24px;
}

.welcome-meta {
  display: flex; justify-content: center; gap: 10px;
  flex-wrap: wrap; margin-bottom: 28px;
}
.meta-item {
  background: var(--accent-bg);
  border: 1px solid var(--border);
  padding: 5px 13px; border-radius: 100px;
  font-size: 12px; color: var(--accent-dark);
  font-weight: 600;
}

/* ── Question Card ────────────────────────────────────────── */
.question-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  max-width: 500px;
  width: 100%;
  box-shadow: var(--shadow);
}

.q-badge {
  display: inline-block;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.8px;
  background: var(--accent);
  color: var(--text-on-accent);
  padding: 4px 12px; border-radius: 100px;
  margin-bottom: 14px;
}
.logic-badge { background: #6d28d9; }

.q-title {
  font-size: 17px; font-weight: 600;
  line-height: 1.5; margin-bottom: 6px;
  color: var(--text-primary);
}

.q-hint {
  font-size: 13px; color: var(--text-secondary);
  margin-bottom: 18px;
}

/* ── Form Fields ──────────────────────────────────────────── */
.field-input,
.field-textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 15px;
  padding: 13px 15px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  resize: none;
}
.field-input::placeholder,
.field-textarea::placeholder { color: var(--text-muted); }

.field-input:focus,
.field-textarea:focus {
  border-color: var(--border-focus);
  background: #ffffff;
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.field-textarea { min-height: 78px; }
.mt { margin-top: 14px; }

/* ── Radio Cards ──────────────────────────────────────────── */
.radio-group {
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 8px;
}

.radio-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), transform 0.15s;
  user-select: none;
}
.radio-card:hover {
  background: var(--accent-bg);
  border-color: var(--accent);
  transform: translateX(3px);
}
.radio-card input[type="radio"] { display: none; }
.radio-card input[type="radio"]:checked + span {
  color: var(--accent-dark);
  font-weight: 600;
}
.radio-card:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-bg);
  box-shadow: 0 0 0 2px var(--accent-glow);
}
.radio-card span { font-size: 15px; color: var(--text-primary); }

/* ── Buttons ──────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 13px 22px; border-radius: 11px;
  font-family: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; border: none; transition: all var(--transition);
  text-decoration: none;
}
.btn-primary {
  background: var(--accent);
  color: var(--text-on-accent);
  box-shadow: 0 3px 14px var(--accent-glow);
  flex: 1;
  justify-content: center;
}
.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 22px var(--accent-glow);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: var(--surface-2);
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover {
  background: var(--border);
  color: var(--text-primary);
}

/* ── Nav Row ──────────────────────────────────────────────── */
.nav-row {
  display: flex; gap: 10px; margin-top: 20px;
}

/* ── Logic intro ─────────────────────────────────────────── */
.logic-intro { border-top-color: #7c3aed; }
.logic-intro .welcome-title { color: #4c1d95; }
.logic-intro .btn-primary {
  background: #6d28d9;
  box-shadow: 0 3px 14px rgba(109,40,217,0.2);
}
.logic-intro .btn-primary:hover { background: #5b21b6; }

/* ── Success Card ─────────────────────────────────────────── */
.success-card { border-top-color: var(--success); }
.success-anim {
  font-size: 68px; margin-bottom: 16px;
  animation: successPop 0.55s cubic-bezier(0.175,0.885,0.32,1.275) forwards;
}
@keyframes successPop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.success-sub {
  font-size: 17px; margin-top: 10px;
  color: var(--success); font-weight: 600;
}

/* ── Utility ──────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,138,213,0.3); border-radius: 4px; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 360px) {
  .question-card, .welcome-card { padding: 18px 14px; }
  .welcome-title { font-size: 20px; }
  .q-title { font-size: 15px; }
  .btn { padding: 11px 16px; font-size: 13px; }
}
