*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand: #E8631A;
  --brand-dark: #C04E0E;
  --brand-light: #FFF3ED;
  --text: #1A1A1A;
  --text-muted: #666;
  --border: #E0E0E0;
  --bg: #FFFFFF;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 2px 16px rgba(0,0,0,0.08);
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-text-size-adjust: 100%;
}

/* ── Layout ─────────────────────────────────── */

#app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.progress-bar-wrap {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  padding: 12px 20px 0;
}

.progress-bar-track {
  height: 6px;
  background: #EEE;
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--brand);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.progress-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  text-align: right;
}

/* ── Slides ─────────────────────────────────── */

.slides {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.slide {
  display: none;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100dvh - 80px);
  padding: 32px 24px 40px;
  animation: slideIn 0.3s ease;
}

.slide.active { display: flex; }

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

@keyframes slideBack {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}

.slide.going-back { animation: slideBack 0.3s ease; }

/* ── Welcome ─────────────────────────────────── */

.welcome-logo-img {
  width: 160px;
  max-width: 60vw;
  margin-bottom: 20px;
  display: block;
}

.welcome-title {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
}

.welcome-sub {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.5;
}

.prize-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--brand-light);
  color: var(--brand-dark);
  border-radius: 24px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  margin: 12px 0 32px;
}

/* ── Questions ───────────────────────────────── */

.question-label {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
}

.question-hint {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.5;
}

/* ── Radio / Multi-select pills ──────────────── */

.options-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.option-label {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  font-size: 16px;
  font-weight: 500;
  -webkit-tap-highlight-color: transparent;
}

.option-label:active { background: var(--brand-light); }

input[type="radio"],
input[type="checkbox"] {
  appearance: none;
  width: 22px;
  height: 22px;
  min-width: 22px;
  border: 2px solid var(--border);
  border-radius: 50%;
  transition: border-color 0.15s, background 0.15s;
  position: relative;
  cursor: pointer;
}

input[type="checkbox"] { border-radius: 6px; }

input[type="radio"]:checked,
input[type="checkbox"]:checked {
  background: var(--brand);
  border-color: var(--brand);
}

input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 4px; left: 4px;
  width: 10px; height: 10px;
  background: white;
  border-radius: 50%;
}

input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 13px;
  font-weight: 700;
}

.option-label:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-light);
}

/* ── Star rating ─────────────────────────────── */

.stars {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
}

.star-btn {
  font-size: 44px;
  background: none;
  border: none;
  cursor: pointer;
  transition: transform 0.1s;
  -webkit-tap-highlight-color: transparent;
  filter: grayscale(1);
  opacity: 0.4;
}

.star-btn.lit {
  filter: grayscale(0);
  opacity: 1;
}

.star-btn:active { transform: scale(0.9); }

.star-label {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 24px;
  min-height: 20px;
}

/* ── Text inputs ─────────────────────────────── */

.text-input {
  width: 100%;
  padding: 16px;
  font-size: 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.15s;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  margin-bottom: 16px;
}

.text-input:focus { border-color: var(--brand); }

textarea.text-input {
  resize: vertical;
  min-height: 120px;
}

/* ── Bonus entry screens ─────────────────────── */

.bonus-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FFF3CD;
  color: #7A5800;
  border-radius: 24px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 20px;
  border: 1px solid #F0D060;
}

.bonus-desc {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.6;
}

.social-btns {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 32px;
}

.social-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.social-btn:active { opacity: 0.85; }

.social-btn.facebook {
  background: #1877F2;
  color: white;
}

.social-btn.instagram {
  background: linear-gradient(135deg, #E1306C, #833AB4);
  color: white;
}

.social-btn.done {
  opacity: 0.6;
}

.social-btn svg { flex-shrink: 0; }

/* ── Thank you ───────────────────────────────── */

.thankyou-icon { font-size: 56px; margin-bottom: 16px; }
.thankyou-title {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 12px;
}
.thankyou-sub {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.entry-count-card {
  background: var(--brand-light);
  border: 1px solid #F5C4A0;
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  margin-bottom: 32px;
}

.entry-count-number {
  font-size: 48px;
  font-weight: 900;
  color: var(--brand);
  line-height: 1;
}

.entry-count-label {
  font-size: 14px;
  color: var(--brand-dark);
  font-weight: 600;
  margin-top: 4px;
}

/* ── Buttons ─────────────────────────────────── */

.btn {
  display: block;
  width: 100%;
  padding: 18px 24px;
  background: var(--brand);
  color: white;
  font-size: 17px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: center;
  transition: background 0.15s, opacity 0.15s;
  -webkit-tap-highlight-color: transparent;
  font-family: inherit;
}

.btn:active { background: var(--brand-dark); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-outline {
  background: transparent;
  color: var(--brand);
  border: 2px solid var(--brand);
  margin-top: 12px;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 15px;
  margin-top: 8px;
}

.btn-row {
  display: flex;
  gap: 10px;
}

.btn-row .btn { flex: 1; }

/* ── Error / info messages ───────────────────── */

.error-msg {
  color: #C0392B;
  font-size: 14px;
  margin-top: -8px;
  margin-bottom: 16px;
}

.info-msg {
  background: var(--brand-light);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-size: 14px;
  color: var(--brand-dark);
  margin-bottom: 20px;
  line-height: 1.5;
}

/* ── Closed / error screens ──────────────────── */

.fullscreen-msg {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 40px 24px;
  text-align: center;
}

.fullscreen-msg .icon { font-size: 56px; margin-bottom: 20px; }
.fullscreen-msg h1 { font-size: 24px; font-weight: 800; margin-bottom: 12px; }
.fullscreen-msg p { font-size: 16px; color: var(--text-muted); line-height: 1.6; }

/* ── Footer ──────────────────────────────────── */

.survey-footer {
  text-align: center;
  padding: 16px 24px 24px;
  font-size: 12px;
  color: var(--text-muted);
}

.survey-footer a { color: var(--text-muted); }

/* ── Loading spinner ─────────────────────────── */

.spinner {
  display: inline-block;
  width: 20px; height: 20px;
  border: 3px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ──────────────────────────────── */

@media (min-width: 480px) {
  .slide { max-width: 480px; margin: 0 auto; }
  .progress-bar-wrap { max-width: 480px; margin: 0 auto; }
}
