/* ============================================================
   BRAND TOKENS
   ============================================================ */
:root {
  --brand-red:    #FF4733;
  --brand-cyan:   #00B9CE;
  --brand-dark:   #1C1C1C;
  --brand-mid:    #404040;
  --brand-grey:   #A9A9A9;
  --brand-white:  #FFFFFF;

  --bg:           #1C1C1C;
  --surface:      #242424;
  --surface-2:    #2e2e2e;
  --border:       rgba(255,255,255,0.07);

  --text-primary: #FFFFFF;
  --text-muted:   #A9A9A9;

  --accent:       #FF4733;
  --accent-glow:  rgba(255, 71, 51, 0.25);
  --accent-2:     #00B9CE;
  --accent-2-glow: rgba(0, 185, 206, 0.2);

  --radius:       16px;
  --transition:   0.45s cubic-bezier(0.23, 1, 0.32, 1);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  height: 100%;
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  overflow: hidden;
  position: relative;
}

/* ============================================================
   NOISE TEXTURE OVERLAY
   ============================================================ */
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.4;
}

/* ============================================================
   DECORATIVE BLOBS
   ============================================================ */
.blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.2s ease, transform 1.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.blob-1 {
  width: 600px;
  height: 600px;
  background: var(--accent);
  top: -200px;
  left: -200px;
  opacity: 0.07;
}

.blob-2 {
  width: 500px;
  height: 500px;
  background: var(--accent-2);
  bottom: -150px;
  right: -150px;
  opacity: 0.07;
}

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress-bar-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--border);
  z-index: 100;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  width: 0%;
  transition: width 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow: 0 0 12px var(--accent-glow);
}

/* ============================================================
   SCREENS
   ============================================================ */
.screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transform: translateY(40px);
  transition:
    opacity var(--transition),
    transform var(--transition);
}

.screen.active {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.screen.exit-up {
  opacity: 0;
  transform: translateY(-40px);
  pointer-events: none;
}

.screen.exit-down {
  opacity: 0;
  transform: translateY(40px);
  pointer-events: none;
}

.screen-inner {
  width: 100%;
  max-width: 680px;
  position: relative;
  z-index: 1;
}

/* ============================================================
   WELCOME SCREEN
   ============================================================ */
.brand-chip {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-2);
  border: 1px solid rgba(0, 185, 206, 0.3);
  background: rgba(0, 185, 206, 0.06);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 32px;
}

.welcome-title {
  font-size: clamp(48px, 9vw, 96px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
}

.welcome-title .accent-text {
  color: var(--accent);
}

.welcome-sub {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 48px;
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: var(--accent);
  background-image: 
    linear-gradient(#fff, #fff), linear-gradient(#fff, #fff),
    linear-gradient(#fff, #fff), linear-gradient(#fff, #fff),
    linear-gradient(#fff, #fff), linear-gradient(#fff, #fff),
    linear-gradient(#fff, #fff), linear-gradient(#fff, #fff);
  background-repeat: no-repeat;
  background-size: 
    10px 1px, 1px 10px,
    10px 1px, 1px 10px,
    10px 1px, 1px 10px,
    10px 1px, 1px 10px;
  background-position: 
    top left, top left,
    top right, top right,
    bottom left, bottom left,
    bottom right, bottom right;
  color: #fff;
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 16px 32px;
  border-radius: 0;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.1);
  opacity: 0;
  transition: opacity 0.2s;
}

.btn-primary:hover::before { opacity: 1; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 40px var(--accent-glow); }
.btn-primary:active { transform: translateY(0); }

.btn-next {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--accent);
  background-image: 
    linear-gradient(#fff, #fff), linear-gradient(#fff, #fff),
    linear-gradient(#fff, #fff), linear-gradient(#fff, #fff),
    linear-gradient(#fff, #fff), linear-gradient(#fff, #fff),
    linear-gradient(#fff, #fff), linear-gradient(#fff, #fff);
  background-repeat: no-repeat;
  background-size: 
    10px 1px, 1px 10px,
    10px 1px, 1px 10px,
    10px 1px, 1px 10px,
    10px 1px, 1px 10px;
  background-position: 
    top left, top left,
    top right, top right,
    bottom left, bottom left,
    bottom right, bottom right;
  color: #fff;
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 0;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-next:hover { transform: translateY(-2px); box-shadow: 0 10px 30px var(--accent-glow); }
.btn-next:active { transform: translateY(0); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  padding: 14px 22px;
  border-radius: 0;
  transition: all 0.25s ease;
}

.btn-ghost:hover {
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.05);
}

/* ============================================================
   QUESTION SCREEN
   ============================================================ */
.q-meta {
  margin-bottom: 12px;
}

.q-num {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.q-of {
  color: var(--text-muted);
  font-weight: 400;
}

.q-title {
  font-size: clamp(28px, 5vw, 46px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin-bottom: 10px;
}

.q-hint {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 36px;
  line-height: 1.6;
}

/* ============================================================
   INPUTS
   ============================================================ */
.input-wrap {
  position: relative;
  margin-bottom: 40px;
}

.q-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--brand-mid);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 400;
  padding: 12px 0 16px;
  outline: none;
  transition: border-color 0.3s ease;
  resize: none;
  line-height: 1.5;
}

.q-input::placeholder {
  color: rgba(169,169,169,0.4);
}

.q-input:focus {
  border-bottom-color: transparent;
}

.input-line {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 2px;
  transition: width 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow: 0 0 12px var(--accent-glow);
}

.q-input:focus ~ .input-line {
  width: 100%;
}

.q-textarea {
  padding-top: 8px;
}

/* ============================================================
   CHIPS (MULTI-SELECT)
   ============================================================ */
.chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  padding: 12px 20px;
  border-radius: 0;
  transition: all 0.25s ease;
  user-select: none;
}

.chip:hover {
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.05);
}

.chip.selected {
  color: #fff;
  border-color: var(--accent);
  background: rgba(255, 71, 51, 0.15);
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.q-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ============================================================
   THANKS SCREEN
   ============================================================ */
.thanks-screen .screen-inner {
  text-align: center;
}

.thanks-icon {
  width: 88px;
  height: 88px;
  background: linear-gradient(135deg, var(--accent), #ff6b5b);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 32px;
  box-shadow: 0 0 60px var(--accent-glow);
  animation: pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

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

.thanks-title {
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.thanks-sub {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 460px;
  margin: 0 auto 40px;
}

/* ============================================================
   TOAST NOTIFICATION
   ============================================================ */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 14px 24px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  z-index: 200;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  white-space: nowrap;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.error {
  border-color: rgba(255, 71, 51, 0.4);
  background: rgba(255, 71, 51, 0.12);
  color: #ff8a7a;
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 0; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
  .screen { padding: 24px 20px; align-items: flex-start; padding-top: 80px; }
  .q-input { font-size: 18px; }
  .btn-primary, .btn-next { padding: 14px 24px; font-size: 15px; }
  .chip { font-size: 13px; padding: 10px 16px; }
}
