/* =====================================================================
   Тест-радар «Какой ты фрилансер» — стили (Этап 1)
   Тёмная база (семья Flekk/Чек) + собственный акцент: коралл/жёлтый.
   Шрифт Inter. Без эмодзи нигде.
   ===================================================================== */

:root {
  --bg:          #100D1C;
  --bg-panel:    #1A1630;
  --bg-elevated: #221C3A;
  --fg:          #F7F6FB;
  --fg-muted:    #B9B6C9;
  --fg-dim:      #7E7A92;
  --border:      #2C2745;
  --border-hi:   #3C3658;

  --coral:       #FF6B5E;
  --coral-dim:   rgba(255, 107, 94, 0.12);
  --coral-glow:  rgba(255, 107, 94, 0.35);
  --violet:      #8B7CFF;
  --yellow:      #FFC83D;

  --radius:      16px;
  --radius-sm:   12px;
  --maxw:        560px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html, body { height: 100%; }

body {
  font-family: var(--font);
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(255, 107, 94, 0.10), transparent 60%),
    radial-gradient(120% 60% at 50% 100%, rgba(139, 124, 255, 0.12), transparent 60%),
    linear-gradient(180deg, #1B1633 0%, #141020 55%, #0F0C18 100%);
  background-attachment: fixed;
  color: var(--fg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 24px 20px 40px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* --- Экраны --- */
.screen { display: none; flex: 1; flex-direction: column; }
.screen.active { display: flex; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* --- Типографика --- */
.kicker {
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--coral);
  font-weight: 600;
}
h1 { font-size: clamp(28px, 7vw, 40px); font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
h2 { font-size: clamp(22px, 5.5vw, 30px); font-weight: 700; letter-spacing: -.01em; }
.lead { color: var(--fg-muted); font-size: 17px; }

/* --- Кнопки --- */
.btn {
  appearance: none;
  border: 1px solid var(--border-hi);
  background: var(--bg-elevated);
  color: var(--fg);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .05s;
  width: 100%;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn:hover { border-color: var(--fg-dim); }
.btn:active { transform: scale(.99); }

.btn-primary {
  background: var(--coral);
  border-color: var(--coral);
  color: #1A0A08;
  box-shadow: 0 8px 24px -8px var(--coral-glow);
}
.btn-primary:hover { background: #ff7d71; border-color: #ff7d71; }

.btn-ghost { background: transparent; }
.btn-link {
  background: none; border: none; color: var(--fg-dim);
  font-size: 14px; cursor: pointer; padding: 8px; width: auto; font-weight: 500;
}
.btn-link:hover { color: var(--fg-muted); }

/* --- Стартовый экран --- */
#screen-start { justify-content: center; gap: 20px; text-align: center; }
#screen-start .stack { display: flex; flex-direction: column; gap: 14px; align-items: center; }
.start-meta { color: var(--fg-dim); font-size: 14px; }
.start-actions { margin-top: 8px; width: 100%; }

/* Счётчик прохождений — отдельной строкой под кнопкой, с «живой» точкой */
#start-counter {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  color: var(--fg-muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
}
#start-counter::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 0 var(--coral-glow);
  animation: counter-pulse 2.4s ease-out infinite;
  flex: none;
}
@keyframes counter-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 107, 94, 0.45); }
  70%  { box-shadow: 0 0 0 7px rgba(255, 107, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 107, 94, 0); }
}
#start-counter[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) {
  #start-counter::before { animation: none; }
}

/* --- Вопросы --- */
.progress {
  display: flex; align-items: center; gap: 12px; margin-bottom: 24px;
}
.progress-bar {
  flex: 1; height: 6px; background: var(--bg-panel); border-radius: 99px; overflow: hidden;
}
.progress-fill {
  height: 100%; width: 0; background: linear-gradient(90deg, var(--coral), var(--yellow));
  border-radius: 99px; transition: width .3s ease;
}
.progress-num { font-size: 13px; color: var(--fg-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

.question { font-size: clamp(20px, 5vw, 26px); font-weight: 700; margin-bottom: 24px; letter-spacing: -.01em; }
.options { display: flex; flex-direction: column; gap: 12px; }
.option {
  text-align: left;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--fg);
  font-family: inherit;
  font-size: 16px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .05s;
}
.option:hover { border-color: var(--coral); background: var(--coral-dim); }
.option:active { transform: scale(.995); }

.quiz-foot { margin-top: 24px; display: flex; justify-content: flex-start; }

/* --- Экран результата --- */
#screen-result { gap: 22px; }
.result-card-preview {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  aspect-ratio: 1080 / 1920;
  max-height: 62vh;
  margin: 0 auto;
  display: block;
  object-fit: contain;
}
.result-head .kicker { margin-bottom: 6px; }
.result-name { color: var(--fg); }
.result-block { display: flex; flex-direction: column; gap: 10px; }
.result-line { display: flex; gap: 10px; align-items: baseline; }
.result-line .tag {
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--fg-dim); white-space: nowrap; min-width: 84px;
}
.result-line.strong .tag { color: var(--yellow); }
.result-line.trap .tag { color: var(--coral); }
.result-line p { font-size: 16px; color: var(--fg); }

/* Денежный CTA-блок — визуально приоритетный */
.money-block {
  background: var(--coral-dim);
  border: 1px solid var(--coral);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.money-text { font-size: 17px; font-weight: 600; color: var(--fg); }

.share-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.result-foot { text-align: center; margin-top: 4px; }

@media (max-width: 380px) {
  .share-actions { grid-template-columns: 1fr; }
  .result-line { flex-direction: column; gap: 2px; }
  .result-line .tag { min-width: 0; }
}
