/* «Какой ты игрок в CS 2?» — стили */
* { box-sizing: border-box; }

:root {
  --bg: #0d0f14;
  --panel: #171a22;
  --panel-2: #1e222c;
  --line: #2a2f3c;
  --text: #e8eaf0;
  --muted: #97a0b3;
  --gold: #ffd93d;
  --orange: #ff9f1c;
  --mono: 'JetBrains Mono', Menlo, monospace;
}

html, body { height: 100%; }

body {
  margin: 0;
  overflow-x: hidden;
  font-family: 'SN Pro', system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 500px at 70% -10%, rgba(255, 159, 28, 0.14), transparent 60%),
    radial-gradient(700px 500px at 10% 110%, rgba(87, 184, 255, 0.1), transparent 60%),
    var(--bg);
}

/* сканирующая линия */
.bg-scan {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.025) 0 1px,
    transparent 1px 4px
  );
  z-index: 5;
}
.bg-scan::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 180px;
  background: linear-gradient(to bottom, transparent, rgba(255, 217, 61, 0.05), transparent);
  animation: scan 7s linear infinite;
}
@keyframes scan {
  from { top: -180px; }
  to { top: 100%; }
}

canvas.fx {
  position: fixed;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}

.app {
  position: relative;
  z-index: 7;
  max-width: 860px;
  margin: 0 auto;
  padding: 1rem 1.1rem 3rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- шапка ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0 1.25rem;
  border-bottom: 1px solid var(--line);
}
.logo {
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: 0.12em;
  font-size: 0.95rem;
}
.logo b { color: var(--gold); }
.logo__num { color: var(--orange); }
.topbar__hint {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---------- экраны ---------- */
.screen {
  display: none;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  padding-top: 2rem;
  animation: fade 0.35s ease both;
}
.screen.is-active { display: flex; }
@keyframes fade {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.kicker {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  color: var(--orange);
  margin: 0 0 0.5rem;
}

/* ---------- старт ---------- */
.screen--start { align-items: center; text-align: center; }

.crosshair {
  position: relative;
  width: 96px;
  height: 96px;
  margin-bottom: 1.5rem;
}
.crosshair__ring {
  position: absolute;
  inset: 0;
  border: 2px solid rgba(255, 217, 61, 0.55);
  border-radius: 50%;
  animation: pulse 2.2s ease-in-out infinite;
}
.crosshair__dot {
  position: absolute;
  left: 50%; top: 50%;
  width: 6px; height: 6px;
  margin: -3px 0 0 -3px;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--gold);
}
.crosshair__t, .crosshair__b, .crosshair__l, .crosshair__r {
  position: absolute;
  background: var(--gold);
}
.crosshair__t, .crosshair__b { left: 50%; width: 2px; height: 22px; margin-left: -1px; }
.crosshair__t { top: -14px; }
.crosshair__b { bottom: -14px; }
.crosshair__l, .crosshair__r { top: 50%; height: 2px; width: 22px; margin-top: -1px; }
.crosshair__l { left: -14px; }
.crosshair__r { right: -14px; }
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.14); opacity: 0.4; }
}

.hero-title {
  margin: 0;
  font-size: clamp(2rem, 6vw, 3.4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.accent {
  color: var(--gold);
  text-shadow: 0 0 30px rgba(255, 217, 61, 0.45);
}
.hero-lead {
  margin: 1rem auto 1.75rem;
  max-width: 34rem;
  color: var(--muted);
  line-height: 1.65;
  font-size: 1rem;
}
.features {
  display: flex;
  gap: 0.6rem;
  list-style: none;
  padding: 0;
  margin: 1.75rem 0 0;
  flex-wrap: wrap;
  justify-content: center;
}
.features li {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
}

/* ---------- кнопки ---------- */
.btn {
  font: inherit;
  cursor: pointer;
  border-radius: 12px;
  padding: 0.85rem 1.6rem;
  font-weight: 700;
  font-size: 1rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn__ico { font-size: 0.85em; margin-right: 0.35rem; }
.btn--primary {
  background: linear-gradient(135deg, var(--orange), var(--gold));
  color: #1a1405;
  box-shadow: 0 8px 30px rgba(255, 159, 28, 0.35);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 36px rgba(255, 159, 28, 0.5); }
.btn--primary:active { transform: translateY(1px); }
.btn--ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--line);
}
.btn--ghost:hover { color: var(--text); border-color: var(--muted); }

/* ---------- вопросы ---------- */
.quiz-head { margin-bottom: 1.4rem; }
.quiz-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  margin-bottom: 0.55rem;
}
.tag {
  color: var(--gold);
  border: 1px solid rgba(255, 217, 61, 0.4);
  background: rgba(255, 217, 61, 0.08);
  border-radius: 6px;
  padding: 0.2rem 0.55rem;
}
.progress {
  height: 6px;
  background: var(--panel-2);
  border-radius: 999px;
  overflow: hidden;
}
.progress__fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--orange), var(--gold));
  box-shadow: 0 0 14px rgba(255, 217, 61, 0.6);
  transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.quiz-q {
  margin: 0 0 1.3rem;
  font-size: clamp(1.3rem, 4vw, 1.9rem);
  font-weight: 800;
  line-height: 1.25;
}

.options { display: flex; flex-direction: column; gap: 0.7rem; }
.option {
  --d: 0ms;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  text-align: left;
  font: inherit;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  cursor: pointer;
  animation: fade 0.3s ease both;
  animation-delay: var(--d);
  transition: border-color 0.15s, transform 0.15s, background 0.15s;
}
.option:hover:not(:disabled) {
  border-color: var(--gold);
  background: var(--panel-2);
  transform: translateX(6px);
}
.option__key {
  flex: none;
  width: 30px; height: 30px;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}
.option:hover:not(:disabled) .option__key {
  border-color: var(--gold);
  color: var(--gold);
}
.option__text { flex: 1; line-height: 1.45; }
.option__arrow {
  color: var(--muted);
  opacity: 0;
  transform: translateX(-6px);
  transition: 0.15s;
  font-size: 1.3rem;
}
.option:hover:not(:disabled) .option__arrow { opacity: 1; transform: none; color: var(--gold); }
.option.is-picked {
  border-color: var(--gold);
  background: rgba(255, 217, 61, 0.12);
  box-shadow: 0 0 24px rgba(255, 217, 61, 0.25);
}
.option:disabled { cursor: default; }

.quiz-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
}
.quiz-hint {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

/* ---------- результат ---------- */
.result-card {
  --accent: var(--gold);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 20px;
  padding: 2rem 1.6rem 1.8rem;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
.rank-badge {
  width: 92px; height: 92px;
  margin: 0 auto 1rem;
  display: grid;
  place-items: center;
  font-size: 2.6rem;
  border: 3px solid var(--gold);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  animation: pop 0.5s cubic-bezier(0.2, 1.6, 0.4, 1) both;
}
@keyframes pop {
  from { transform: scale(0.3); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.result-title {
  margin: 0.3rem 0 0.35rem;
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  font-weight: 800;
}
.result-tagline {
  margin: 0 0 1rem;
  font-family: var(--mono);
  color: var(--muted);
  font-size: 0.9rem;
}
.result-desc {
  margin: 0 auto 1.3rem;
  max-width: 36rem;
  color: #c9cddd;
  line-height: 1.65;
}
.loadout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
  font-family: var(--mono);
  font-size: 0.8rem;
}
.loadout__label { color: var(--muted); letter-spacing: 0.12em; }
.chip {
  background: rgba(255, 217, 61, 0.1);
  border: 1px solid rgba(255, 217, 61, 0.35);
  color: var(--gold);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  margin: 0 0.2rem;
}

.bars { display: flex; flex-direction: column; gap: 0.7rem; text-align: left; margin-bottom: 1.6rem; }
.bar {
  display: grid;
  grid-template-columns: minmax(140px, 1.2fr) 2fr auto;
  align-items: center;
  gap: 0.7rem;
  opacity: 0;
  transform: translateY(8px);
  transition: 0.4s ease;
}
.bar.is-in { opacity: 1; transform: none; }
.bar__label { font-size: 0.85rem; color: var(--muted); }
.bar--top .bar__label { color: var(--text); font-weight: 700; }
.bar__track {
  height: 10px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.bar__fill {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--c), rgba(255, 255, 255, 0.85));
  transition: width 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 0.25s;
}
.bar.is-in .bar__fill { width: var(--w); }
.bar__pct { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); }

.result-actions {
  display: flex;
  gap: 0.7rem;
  justify-content: center;
  flex-wrap: wrap;
}
.share-note {
  min-height: 1.2em;
  margin: 0.9rem 0 0;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--gold);
}

/* ---------- адаптив ---------- */
@media (max-width: 640px) {
  .bar { grid-template-columns: 1fr auto; }
  .bar__track { grid-column: 1 / -1; order: 3; }
  .quiz-hint { display: none; }
  .option { padding: 0.85rem 0.9rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
