/* ── Reset & Base ─────────────────────────────────────────────────────── */
:root {
  --primary:    #e50914;
  --secondary:  #141414;
  --radius:     8px;
  --font:       'Inter', system-ui, sans-serif;
  --bg:         #0a0a0a;
  --fg:         #f5f5f5;
  --muted:      rgba(255, 255, 255, 0.45);
  --border:     rgba(255, 255, 255, 0.10);
  --surface:    rgba(255, 255, 255, 0.05);
}

*, *::before, *::after {
  margin:     0;
  padding:    0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width:       1280px;
  height:      800px;
  overflow:    hidden;
  background:  var(--bg);
  color:       var(--fg);
  font-family: var(--font);
  font-size:   16px;
  line-height: 1.5;
  touch-action: pan-y;
  user-select:  none;
  -webkit-font-smoothing: antialiased;
}

#root {
  position: relative;
  width:    100%;
  height:   100%;
}

/* ── Screens ─────────────────────────────────────────────────────────── */
.screen {
  position:        absolute;
  inset:           0;
  display:         flex;
  flex-direction:  column;
  align-items:     center;
  justify-content: center;
  opacity:         0;
  pointer-events:  none;
  transition:      opacity 0.3s ease;
}

.screen.active {
  opacity:        1;
  pointer-events: all;
}

/* ── Loading ──────────────────────────────────────────────────────────── */
.spinner {
  width:  52px;
  height: 52px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius:    50%;
  animation:        spin 0.75s linear infinite;
}

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

.loading-text {
  margin-top: 20px;
  font-size:  18px;
  color:      var(--muted);
}

/* ── Survey wrapper ───────────────────────────────────────────────────── */
#screen-survey {
  align-items:  stretch;
  justify-content: flex-start;
  padding:      0;
}

.survey-wrapper {
  display:        flex;
  flex-direction: column;
  width:          100%;
  height:         100%;
  padding:        52px 44px 44px;
  gap:            28px;
}

/* ── Header ───────────────────────────────────────────────────────────── */
.survey-header {
  display:     flex;
  align-items: center;
  gap:         16px;
  flex-shrink: 0;
}

.progress-bar {
  flex:          1;
  height:        4px;
  background:    var(--border);
  border-radius: 2px;
  overflow:      hidden;
}

.progress-fill {
  height:        100%;
  background:    var(--primary);
  border-radius: 2px;
  transition:    width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-text {
  font-size:   13px;
  font-weight: 500;
  color:       var(--muted);
  white-space: nowrap;
  min-width:   48px;
  text-align:  right;
}

/* ── Question text ────────────────────────────────────────────────────── */
.question-text {
  font-size:      34px;
  font-weight:    600;
  line-height:    1.25;
  letter-spacing: -0.5px;
  flex-shrink:    0;
}

/* ── Question content ─────────────────────────────────────────────────── */
.question-content {
  flex:       1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}

.question-content::-webkit-scrollbar { display: none; }

/* ── PICK: choices grid ───────────────────────────────────────────────── */

.choices-grid {
  display: grid;
  height: 100%;
  grid-template-columns: repeat(auto-fit, minmax(17rem, max-content)); /* hard cap: 5 per row */
  align-items: start;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 2rem;


}

.choice-btn {
  height: auto;
  position: relative;
  display:         flex;
  flex-direction:  column;
  align-items:     center;
  justify-content: start;
  gap:             14px;
  background:      transparent;
  border:          2px solid var(--border);
  border-radius:   var(--radius);
  color:           var(--fg);
  font-family:     var(--font);
  font-size:       19px;
  font-weight:     500;
  cursor:          pointer;
  padding-bottom: 14px;
  transition:      border-color 0.15s, background 0.15s, transform 0.1s;
}

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

.choice-btn.selected {
  border-color: var(--primary);
  background:   color-mix(in srgb, var(--primary) 12%, transparent);
}

.choice-btn img {
  border-radius: calc(var(--radius));

  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.choice-label {
  font-size:   20px;
  font-weight: 600;
  text-align:  center;
}

.choice-desc {
  font-size:  14px;
  color:      var(--muted);
  text-align: center;
}

.choice-price {
  font-size:   15px;
  font-weight: 700;
  color:       var(--primary);
}

/* ── WRITE ────────────────────────────────────────────────────────────── */
.write-input {
  width:         100%;
  height:        320px;
  background:    var(--surface);
  border:        2px solid var(--border);
  border-radius: var(--radius);
  color:         var(--fg);
  font-family:   var(--font);
  font-size:     20px;
  padding:       24px;
  resize:        none;
  outline:       none;
  transition:    border-color 0.2s;
}

.write-input:focus {
  border-color: var(--primary);
}

.write-input::placeholder {
  color: var(--muted);
  opacity: 0.6;
}

/* ── CONTACT ──────────────────────────────────────────────────────────── */
.contact-fields {
  display:        flex;
  flex-direction: column;
  gap:            16px;
  padding-top:    8px;
}

.contact-input {
  width:         100%;
  padding:       22px 24px;
  background:    var(--surface);
  border:        2px solid var(--border);
  border-radius: var(--radius);
  color:         var(--fg);
  font-family:   var(--font);
  font-size:     20px;
  outline:       none;
  transition:    border-color 0.2s;
}

.contact-input:focus {
  border-color: var(--primary);
}

.contact-input::placeholder {
  color:   var(--muted);
  opacity: 0.6;
}

/* ── Footer nav ───────────────────────────────────────────────────────── */
.survey-footer {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  flex-shrink:     0;
  padding-top:     8px;
}

.btn {
  padding:       22px 52px;
  border-radius: var(--radius);
  font-family:   var(--font);
  font-size:     19px;
  font-weight:   600;
  border:        2px solid transparent;
  cursor:        pointer;
  transition:    filter 0.15s, transform 0.1s, background 0.15s, border-color 0.15s;
}

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

.btn-next {
  background:  var(--primary);
  color:       white;
  box-shadow:  0 8px 32px color-mix(in srgb, var(--primary) 35%, transparent);
}

.btn-next:hover {
  filter: brightness(1.08);
}

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

.btn-back:hover {
  border-color: rgba(255,255,255,0.25);
  color:        var(--fg);
}

/* ── Thank you ────────────────────────────────────────────────────────── */
.thankyou-card {
  display:         flex;
  flex-direction:  column;
  align-items:     center;
  gap:             28px;
  text-align:      center;
  padding:         0 60px;
}

.thankyou-icon {
  width:           112px;
  height:          112px;
  border-radius:   50%;
  border:          3px solid var(--primary);
  background:      color-mix(in srgb, var(--primary) 15%, transparent);
  display:         flex;
  align-items:     center;
  justify-content: center;
  font-size:       52px;
  color:           var(--primary);
  animation:       popIn 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.thankyou-card h2 {
  font-size:      44px;
  font-weight:    700;
  letter-spacing: -0.5px;
}

.thankyou-card p {
  font-size: 22px;
  color:     var(--muted);
}

.thankyou-progress {
  width:         240px;
  height:        3px;
  background:    var(--border);
  border-radius: 2px;
  overflow:      hidden;
  margin-top:    8px;
}

.thankyou-progress-fill {
  height:        100%;
  background:    var(--primary);
  border-radius: 2px;
  width:         0%;
  transition:    width linear;
}

/* ── Error ────────────────────────────────────────────────────────────── */
.error-card {
  display:        flex;
  flex-direction: column;
  align-items:    center;
  gap:            16px;
  text-align:     center;
}

.error-icon {
  font-size: 64px;
  opacity:   0.4;
}

.error-title {
  font-size:   28px;
  font-weight: 600;
  opacity:     0.7;
}

.error-sub {
  font-size: 18px;
  color:     var(--muted);
}
