* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

#app {
  width: 100%;
  min-height: 100vh;
}

.page {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  transition: background .2s;
  position: relative;
}

.content-area {
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Top bar */
.topbar {
  display: flex;
  align-items: center;
  height: 28px;
  gap: 20px;
  padding: 24px 64px 0 64px;
}

.back-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: none;
  border: none;
  background: none;
  padding: 0;
}

.back-btn svg {
  display: block;
}

.progress-track {
  flex: 1;
  height: 16px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  border-radius: 8px;
  transition: width .5s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.progress-highlight {
  position: absolute;
  top: 4px;
  left: 3px;
  right: 3px;
  height: 3px;
  border-radius: 4px;
}

/* Question content */
.question-title-wrap {
  padding: 48px 64px 0 64px;
  display: flex;
  justify-content: center;
}

.question-title {
  max-width: 620px;
  width: 100%;
  font-size: 30px;
  font-weight: 800;
  text-align: center;
  line-height: 1.25;
}

.options-wrap {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 36px 64px 0 64px;
}

.options-list {
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 22px;
  border-radius: 14px;
  border-style: solid;
  border-width: 2px 2px 4px 2px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  background: #ffffff;
  border-color: #e5e5e5;
}

.card:hover {
  background: #f7f7f7;
}

.card.selected {
  border-color: #84d8ff;
  background: #ddf4ff;
  animation: cardPop .3s ease;
}

.card.selected:hover {
  background: #ddf4ff;
}

.card-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  color: #1899d6;
  font-size: 15px;
  font-weight: 800;
  transition: background .15s;
  background: #d1ebf7;
}

.card:hover .card-badge {
  background: #cbe5f1;
}

.card.selected .card-badge {
  background: #b6e2f7;
}

.card-label {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: #4b4b4b;
}

.card.selected .card-label {
  color: #1899d6;
}

/* Dark theme card variant */
.page.dark .card {
  background: #131f24;
  border-color: #37464f;
}

.page.dark .card:hover {
  background: #1a2b32;
}

.page.dark .card.selected {
  background: #1a2b32;
  border-color: #3f85a7;
}

.page.dark .card.selected:hover {
  background: #1a2b32;
}

.page.dark .card-badge {
  background: #1e3a46;
}

.page.dark .card:hover .card-badge {
  background: #1e3a46;
}

.page.dark .card.selected .card-badge {
  background: #1e3a46;
}

.page.dark .card-label {
  color: #f1f7fb;
}

.page.dark .card.selected .card-label {
  color: #1899d6;
}

@keyframes cardPop {
  0% { transform: scale(1); }
  45% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

/* Funny note */
.funny-note {
  font-size: 14px;
  font-weight: 700;
  color: #4b4b4b;
  text-align: center;
  line-height: 1.4;
  padding-top: 4px;
}

/* Reaction media */
.reaction-media {
  width: 100%;
  max-width: 420px;
  height: 420px;
  border-radius: 20px;
  object-fit: cover;
  display: block;
  background: #1a2b32;
}

/* Confetti burst */
.confetti-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  left: 50%;
  top: 38%;
  width: 10px;
  height: 14px;
  border-radius: 2px;
  animation: confettiBurst 1.3s ease-out forwards;
}

@keyframes confettiBurst {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity: 0; }
}

/* Text input row (Instagram / WhatsApp fields on the contact screen) */
.text-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 22px;
  border-radius: 14px;
  border-style: solid;
  border-width: 2px 2px 4px 2px;
  transition: background .15s, border-color .15s;
  background: #ffffff;
  border-color: #e5e5e5;
}

.text-row.hover {
  background: #f7f7f7;
}

.text-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  font-weight: 700;
  font-family: 'Inter', system-ui, sans-serif;
  color: #4b4b4b;
}

.text-row.filled {
  border-color: #84d8ff;
  background: #ddf4ff;
}

.text-row.filled .text-input {
  color: #1899d6;
}

/* Bottom bar */
.bottombar {
  padding: 20px 64px calc(20px + env(safe-area-inset-bottom)) 64px;
  display: flex;
  justify-content: center;
}

.continue-btn {
  width: 100%;
  max-width: 500px;
  height: 50px;
  padding: 0;
  border-radius: 14px;
  border-style: solid;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all .15s;
  font-family: 'Inter', system-ui, sans-serif;
}

.continue-btn.light {
  border-width: 0 0 4px 0;
  border-color: #58a700;
  background: #58cc02;
  color: #ffffff;
}

.continue-btn.light:hover {
  background: #61e002;
  border-color: #61b800;
}

.continue-btn.dark {
  border-width: 0 0 4px 0;
  border-color: #c99700;
  background: #ffc800;
  color: #4b4b4b;
}

.continue-btn.dark:hover {
  background: #ffd11a;
  border-color: #e0ac00;
}

.continue-btn.disabled {
  border: none;
  background: #e5e5e5;
  color: #afafaf;
  cursor: not-allowed;
}

.page.dark .continue-btn.disabled {
  background: #37464f;
  color: #4d616c;
}

@media (max-width: 640px) {
  .topbar { padding: 20px 20px 0 20px; }
  .question-title-wrap { padding: 32px 20px 0 20px; }
  .options-wrap { padding: 28px 20px 0 20px; }
  .bottombar { padding: 16px 20px calc(32px + env(safe-area-inset-bottom)) 20px; }
  .question-title { font-size: 24px; }
}
