/* ============================================
   ACTIVE PLAYER — без обводки, без свечения
   ============================================ */

.players-list {
  overflow: visible;
}

.players-list .player-row {
  position: relative;
}

/* только лёгкое смещение вверх — без рамок и теней */
.players-list .player-row.is-active {
  transform: translateY(-2px);
  transition: transform .25s ease;
}

/* лёгкий ping — без свечения */
.players-list .player-row.ping {
  animation: playerPingGlow 0.65s ease;
}

@keyframes playerPingGlow {
  0%   { transform: translateY(-2px) scale(1); }
  50%  { transform: translateY(-3px) scale(1.02); }
  100% { transform: translateY(-2px) scale(1); }
}


/* ============================================
   TURN HINT (пузырь над игроком)
   ============================================ */

.player-row .turn-hint {
  position: absolute;
  left: 50%;
  top: -14px;

  transform: translate(-50%, -8px) scale(.95);
  z-index: 15;

  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 9px 16px;
  border-radius: 999px;

  background: rgba(12,16,44,.96);

  /* ✅ новая яркая рамка */
  border: 2px solid rgba(255,231,106,.85);

  /* ✅ яркий glow вокруг подсказки */
  box-shadow:
    0 0 14px rgba(255,231,106,.45),
    0 14px 40px rgba(0,0,0,.35);

  backdrop-filter: saturate(120%) blur(2px);
  color: #fff;

  font: 800 13px/1.2 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto;
  letter-spacing: .02em;

  opacity: 0;
  transition:
    opacity .25s ease,
    transform .28s cubic-bezier(.2,.8,.2,1);

  /* дыхание — по умолчанию пауза */
  animation: hintBreath 2.6s ease-in-out infinite paused;
}

/* стрелочка вниз */
.player-row .turn-hint::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%) rotate(-45deg);
  width: 11px;
  height: 11px;

  background: rgba(12,16,44,.96);
  border-left: 2px solid rgba(255,231,106,.85);
  border-bottom: 2px solid rgba(255,231,106,.85);

  box-shadow: 2px 2px 8px rgba(0,0,0,.25);
}

/* появление */
.player-row .turn-hint.is-show {
  opacity: 1;
  transform: translate(-50%, -20px) scale(1);

  /* активируем breathing-анимацию */
  animation-play-state: running;
}


/* ============================================
   АНИМАЦИИ — breathing, glow, bounce
   ============================================ */

/* breathing + glow */
@keyframes hintBreath {
  0% {
    transform: translate(-50%, -20px) scale(1);
    box-shadow:
      0 0 14px rgba(255,231,106,.45),
      0 14px 40px rgba(0,0,0,.35);
  }
  50% {
    transform: translate(-50%, -23px) scale(1.05);
    box-shadow:
      0 0 24px rgba(255,231,106,.75),
      0 18px 46px rgba(0,0,0,.45);
  }
  100% {
    transform: translate(-50%, -20px) scale(1);
    box-shadow:
      0 0 14px rgba(255,231,106,.45),
      0 14px 40px rgba(0,0,0,.35);
  }
}

/* bounce иконки */
.turn-hint__icon {
  font-size: 15px;
  display: inline-block;
  animation: iconBounce 1.6s ease-in-out infinite;
}

@keyframes iconBounce {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-3px); }
}

/* glow текста */
.turn-hint__text {
  white-space: nowrap;
  animation: textGlow 3s ease-in-out infinite;
}

@keyframes textGlow {
  0%,100% { text-shadow: 0 0 6px rgba(255,231,106,.18); }
  50%     { text-shadow: 0 0 12px rgba(255,231,106,.32); }
}


/* ============================================
   ADAPTIVE
   ============================================ */

@media (max-width: 520px) {
  .player-row .turn-hint {
    padding: 7px 12px;
    font-size: 12.5px;
  }

  .turn-hint__icon {
    font-size: 14px;
  }
}


/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  .player-row .turn-hint,
  .player-row.ping {
    animation: none !important;
  }
}




/* ============================================
   ANSWER TOAST (статичный, над блоком игрока)
   ============================================ */

/* ====== Глобальный слой для тостов ответов ====== */
#answer-toast-layer{
  position: fixed;
  inset: 0;                /* во весь экран */
  pointer-events: none;    /* кликаем только по внутренним контролам тоста */
  z-index: 5000;           /* выше #question-modal / #answer-modal */
}

/* Сам тост (статичный, без анимации «дыхания») */
.answer-hint{
  position: absolute;      /* позиционируем скриптом по координатам игрока */
  left: 0; top: 0;
  transform: translate(-50%, -100%); /* по центру сверху от target-точки */
  opacity: 0;

  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(12,16,44,.96);
  border: 2px solid rgba(255,231,106,.85);
  box-shadow: 0 0 12px rgba(255,231,106,.45), 0 10px 34px rgba(0,0,0,.45);
  color: #fff;

  white-space: nowrap;
  pointer-events: auto;    /* внутри — кликабельно */
  will-change: transform, opacity;

  transition: opacity .24s ease, transform .24s cubic-bezier(.2,.8,.2,1);
}

/* стрелочка вниз */
.answer-hint::after{
  content:"";
  position:absolute;
  left:50%;
  top:100%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px; height: 12px;
  background: rgba(12,16,44,.96);
  border-right: 2px solid rgba(255,231,106,.85);
  border-bottom: 2px solid rgba(255,231,106,.85);
  box-shadow: 2px 2px 8px rgba(0,0,0,.25);
}

.answer-hint.is-show{ opacity:1; }

/* Внутренняя форма */
.answer-hint .answer-form{ display:flex; align-items:center; gap:8px; }
.answer-hint .answer-input{
  flex:1 1 auto;
  min-width:160px;
  padding:8px 10px;
  border-radius:8px;
  border:1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.10);
  color:#fff;
  font-size:16px;
  font-weight:600;
  outline:none;
}
.answer-hint .answer-input::placeholder{ color: rgba(255,255,255,.55); }

.answer-hint .btn-voice, .answer-hint .btn-send{
  width:34px; height:34px; display:inline-flex; align-items:center; justify-content:center;
  border-radius:8px; border:1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.12); color:#fff; font-size:16px; cursor:pointer;
  transition: background .15s ease, transform .12s ease;
}
.answer-hint .btn-voice:hover, .answer-hint .btn-send:hover{ background: rgba(255,255,255,.18); }
.answer-hint .btn-voice:active, .answer-hint .btn-send:active{ transform: scale(.96); }
.answer-hint.is-recording .btn-voice{ background: rgba(255,90,90,.35); border-color: rgba(255,90,90,.55); }

/* Лёгкий shake на ошибке (без миганий) */
.answer-hint.shake{ animation: answerShake .28s ease; }
@keyframes answerShake{
  0%,100% { transform: translate(-50%, -100%) }
  25%     { transform: translate(calc(-50% - 6px), -100%) }
  75%     { transform: translate(calc(-50% + 6px), -100%) }
}

@media (max-width:540px){ .answer-hint .answer-input{ min-width:110px; } }
@media (prefers-reduced-motion: reduce){ .answer-hint.shake{ animation:none!important; } }

/* ============================================
   ЖЁЛТАЯ ПОДСВЕТКА ПРИ БАЗЗЕ (SPACE)
   ============================================ */

.players-list .player-row {
  position: relative;
  z-index: 1;
}

.players-list .player-row.is-buzzed {
  z-index: 5;
  outline: 2px solid rgba(255,231,106,.95);
  outline-offset: 5px;

  box-shadow:
    0 0 18px rgba(255,231,106,.55),
    0 22px 58px rgba(0,0,0,.45);

  animation: buzzBlink .55s ease-in-out infinite alternate;
  transition: outline .15s ease, box-shadow .2s ease, transform .2s ease;
}

/* дополнительное сияние вокруг игрока */
.players-list .player-row.is-buzzed::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: inherit;
  pointer-events: none;

  box-shadow:
    0 0 26px rgba(255,231,106,.75),
    0 0 64px rgba(255,231,106,.40);

  animation: buzzGlow .6s ease-in-out infinite alternate;
}

@keyframes buzzBlink {
  0% {
    outline-color: rgba(255,231,106,.6);
    transform: scale(1);
  }
  100% {
    outline-color: rgba(255,231,106,1);
    transform: scale(1.015);
  }
}

@keyframes buzzGlow {
  0%   { opacity: .85; }
  100% { opacity: 1; }
}




/* слой как у answer-toast */
#answer-fab-layer{
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 4500;
}

/* пузырь-кнопка в стиле turn-hint — БЕЗ translateY */
.answer-fab{
  position: absolute;
  left: 0; top: 0;
  transform: translateX(-50%) scale(.95); /* только центр по X */
  z-index: 15;

  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 16px; border-radius: 999px;

  background: rgba(12,16,44,.96);
  border: 2px solid rgba(255,231,106,.85);
  box-shadow:
    0 0 14px rgba(255,231,106,.45),
    0 14px 40px rgba(0,0,0,.35);

  color:#fff; font: 800 13px/1.2 ui-sans-serif, system-ui, -apple-system,"Segoe UI",Roboto;
  letter-spacing:.02em;

  opacity: 0; pointer-events: auto;
  transition: opacity .25s ease, transform .28s cubic-bezier(.2,.8,.2,1);
  animation: fabBreath 2.6s ease-in-out infinite paused;
}

/* стрелочка вниз */
.answer-fab::after{
  content:"";
  position:absolute;
  left:50%; bottom:-8px;
  transform: translateX(-50%) rotate(-45deg);
  width:11px; height:11px;
  background: rgba(12,16,44,.96);
  border-left: 2px solid rgba(255,231,106,.85);
  border-bottom: 2px solid rgba(255,231,106,.85);
  box-shadow: 2px 2px 8px rgba(0,0,0,.25);
}

/* появление */
.answer-fab.is-show{
  opacity: 1;
  transform: translateX(-50%) scale(1);
  animation-play-state: running;
}

/* нажатие — лёгкий клик */
.answer-fab:active{ transform: translateX(-50%) scale(.985); }

/* внутренности */
.answer-fab .afab-icon{
  display:inline-flex; align-items:center; justify-content:center;
  width:22px; height:22px; border-radius:6px;
  background: rgba(255,231,106,.14);
  box-shadow: inset 0 0 10px rgba(255,231,106,.45);
  font-size:14px;
}
.answer-fab .afab-text{ font-size:13.5px; color:#fff; text-shadow:0 1px 0 rgba(0,0,0,.35); }

/* breathing/glow (без смещения по Y) */
@keyframes fabBreath{
  0%{
    transform: translateX(-50%) scale(1);
    box-shadow: 0 0 14px rgba(255,231,106,.45), 0 14px 40px rgba(0,0,0,.35);
  }
  50%{
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 0 24px rgba(255,231,106,.75), 0 18px 46px rgba(0,0,0,.45);
  }
  100%{
    transform: translateX(-50%) scale(1);
    box-shadow: 0 0 14px rgba(255,231,106,.45), 0 14px 40px rgba(0,0,0,.35);
  }
}

@media (max-width:520px){
  .answer-fab{ padding:7px 12px; }
  .answer-fab .afab-text{ font-size:12.5px; }
  .answer-fab .afab-icon{ width:20px; height:20px; }
}

/* скрываем на десктопах, если хочется жёстко
@media (hover:hover) and (pointer:fine){
  .answer-fab{ display:none; }
}*/