/* ===== прогресс чтения ===== */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--orange), var(--orange-deep));
  z-index: 120;
  transition: width 0.1s linear;
}

/* ===== переключатель тем ===== */
.themes {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: 0.75rem;
}

.themes__dot {
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  background: var(--c);
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}

.themes__dot:hover { transform: scale(1.18); }
.themes__dot.is-active { border-color: #fff; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.22); }

body[data-theme='blue'] { --orange: #56a8ff; --orange-deep: #2f7fd6; --blue: #f7a23b; }
body[data-theme='lime'] { --orange: #9be15d; --orange-deep: #59b63a; --blue: #56a8ff; }

/* ===== кнопка «наверх» ===== */
.totop {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--orange);
  font-size: 1rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.25s, transform 0.25s, border-color 0.2s;
  z-index: 110;
}

.totop.is-visible { opacity: 1; pointer-events: auto; transform: none; }
.totop:hover { border-color: var(--orange); }

/* ===== гранаты ===== */
.nades {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.1rem;
}

.nade {
  position: relative;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: transform 0.2s, border-color 0.2s;
}

.nade:hover { transform: translateY(-4px); border-color: var(--orange); }

.nade__ball {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  margin-bottom: 0.9rem;
  position: relative;
  box-shadow: inset -6px -8px 0 rgba(0, 0, 0, 0.25);
}

.nade__ball::after {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 8px;
  border-radius: 3px;
  background: #9aa3b5;
}

.nade--smoke .nade__ball { background: #cfd5df; }
.nade--he .nade__ball { background: #7d8b5a; }
.nade--flash .nade__ball { background: #b9c2cf; }
.nade--fire .nade__ball { background: linear-gradient(180deg, #ffb347, #e0521f); }

.nade__tag {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--orange);
  border: 1px solid rgba(247, 162, 59, 0.45);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
}

.nade h3 { margin: 0 0 0.45rem; font-size: 1rem; }
.nade p { margin: 0; color: var(--muted); font-size: 0.88rem; }

/* ===== тест реакции ===== */
.reaction {
  display: grid;
  grid-template-columns: 1fr 250px;
  gap: 1.25rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.reaction__arena {
  position: relative;
  height: 290px;
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
  user-select: none;
  cursor: crosshair;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: radial-gradient(circle at 50% 40%, #1b212d, #10131a);
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  padding: 1rem;
}

.reaction__arena.is-ready #rtStatus { color: var(--orange); font-weight: 600; }

.reaction__target {
  position: absolute;
  width: 66px;
  height: 66px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  background: radial-gradient(circle, #fff 0 14%, #ff4d4d 18% 44%, #c41f1f 46% 100%);
  box-shadow: 0 0 26px rgba(255, 77, 77, 0.6);
  animation: pop 0.18s ease;
}

@keyframes pop {
  from { transform: translate(-50%, -50%) scale(0.4); opacity: 0; }
}

.reaction__stats { display: flex; flex-direction: column; gap: 0.6rem; }

.reaction__stat {
  background: #141821;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem 0.8rem;
}

.reaction__stat b {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.25rem;
  color: var(--orange);
}

.reaction__stat span { font-size: 0.74rem; color: var(--muted); }
.reaction__hint { margin: 0.2rem 0 0; font-size: 0.8rem; color: var(--muted); }

/* ===== FAQ ===== */
.faq {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  max-width: 860px;
}

.faq__item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 1.1rem;
}

.faq__item[open] { border-color: rgba(247, 162, 59, 0.5); }

.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
  cursor: pointer;
  list-style: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.94rem;
}

.faq__item summary::-webkit-details-marker { display: none; }

.faq__item summary::after {
  content: '+';
  color: var(--orange);
  font-size: 1.35rem;
  line-height: 1;
  transition: transform 0.2s;
}

.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item p { margin: 0 0 1rem; color: var(--muted); font-size: 0.92rem; }

@media (max-width: 780px) {
  .reaction { grid-template-columns: 1fr; }
  .themes { margin-left: 0.5rem; }
}
