/* Spilio StoryPoints — стили приложения поверх дизайн-системы Nocturne */

body { margin: 0; background: var(--color-bg); color: var(--color-text); font-family: var(--font-body); }
a { color: var(--color-accent); }
a:hover { color: var(--color-accent-400); }
.btn, .tag { white-space: nowrap; }

/* Кнопки в стиле Spilio: пилюли; primary — светлая заливка фирменного
   голубого (#A6BAC8-рампа) с тёмным текстом, как «Got it!» на сайте */
.btn { border-radius: 999px; }
.btn-primary {
  background: var(--color-accent-2-300);
  border-color: var(--color-accent-2-300);
  color: #1a1a1a;
  font-weight: 500;
}
.btn-primary:hover { background: var(--color-accent-2-200); border-color: var(--color-accent-2-200); color: #1a1a1a; }
.btn-primary:active { background: var(--color-accent-2-400); border-color: var(--color-accent-2-400); color: #1a1a1a; }
.btn-primary:disabled { background: var(--color-accent-2-800); border-color: var(--color-accent-2-800); color: var(--color-neutral-400); }

/* Спилик */
@keyframes mascotFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes mascotBlink { 0%, 90%, 100% { transform: scaleY(1); } 93% { transform: scaleY(0.12); } 96% { transform: scaleY(1); } }
@keyframes mascotTear { 0% { transform: translateY(0); opacity: 0.9; } 100% { transform: translateY(14px); opacity: 0; } }
/* Праздник при максимуме SP */
@keyframes mascotParty {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  25% { transform: translateY(-8px) rotate(3deg); }
  50% { transform: translateY(0) rotate(-3deg); }
  75% { transform: translateY(-8px) rotate(3deg); }
}
@keyframes sparkle { 0%, 100% { opacity: 0; transform: scale(0.4); } 50% { opacity: 1; transform: scale(1); } }
/* Анимации по порогам бонуса: 10% — покачивание, 15% — подпрыгивание */
@keyframes mascotSway { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
@keyframes mascotBounce {
  0%, 100% { transform: translateY(0); }
  30% { transform: translateY(-9px); }
  50% { transform: translateY(-2px); }
  70% { transform: translateY(-7px); }
}
/* Подсветка по порогам: 10% — мягкая статичная, 15% — пульс, 20% — сильный пульс (max-glow) */
.tier-glow { box-shadow: 0 0 0 1px color-mix(in srgb, var(--color-accent) 55%, transparent), 0 0 14px color-mix(in srgb, var(--color-accent) 20%, transparent); }
@keyframes tierGlow2 {
  0%, 100% { box-shadow: 0 0 0 1px color-mix(in srgb, var(--color-accent) 70%, transparent), 0 0 12px color-mix(in srgb, var(--color-accent) 22%, transparent); }
  50% { box-shadow: 0 0 0 1px var(--color-accent), 0 0 22px color-mix(in srgb, var(--color-accent) 42%, transparent); }
}
.tier-glow-2 { animation: tierGlow2 2.6s ease-in-out infinite; }
/* Праздник покупки за коины */
@keyframes popIn {
  0% { transform: scale(0.55); opacity: 0; }
  70% { transform: scale(1.06); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes confettiFall {
  0% { transform: translateY(-16px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(150px) rotate(300deg); opacity: 0; }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
/* Реакции Спилика на тап — по настроению */
/* Пузырёк: центрирование через translateX внутри кейфреймов, чтобы не было
   рывка после появления; в конце плавно растворяется */
@keyframes bubblePop {
  0% { transform: translateX(-50%) scale(0.55); opacity: 0; }
  12% { transform: translateX(-50%) scale(1.06); opacity: 1; }
  20% { transform: translateX(-50%) scale(1); opacity: 1; }
  72% { transform: translateX(-50%) scale(1); opacity: 1; }
  100% { transform: translateX(-50%) scale(1); opacity: 0; }
}
@keyframes pokeShake { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-9deg); } 40% { transform: rotate(8deg); } 60% { transform: rotate(-6deg); } 80% { transform: rotate(5deg); } }
@keyframes pokeNod { 0%, 100% { transform: translateY(0); } 30% { transform: translateY(4px); } 60% { transform: translateY(-3px); } }
@keyframes pokeWiggle { 0%, 100% { transform: scale(1) rotate(0); } 30% { transform: scale(1.07) rotate(-4deg); } 60% { transform: scale(1.05) rotate(4deg); } }
@keyframes pokeJump { 0%, 100% { transform: translateY(0) scaleY(1); } 25% { transform: translateY(2px) scaleY(0.92); } 55% { transform: translateY(-14px) scaleY(1.04); } 80% { transform: translateY(0) scaleY(0.97); } }
@keyframes pokeSpin { 0% { transform: rotate(0) scale(1); } 60% { transform: rotate(360deg) scale(1.12); } 100% { transform: rotate(360deg) scale(1); } }
@keyframes maxGlow {
  0%, 100% { box-shadow: 0 0 0 1px var(--color-accent), 0 0 18px color-mix(in srgb, var(--color-accent) 30%, transparent); }
  50% { box-shadow: 0 0 0 1px var(--color-accent), 0 0 30px color-mix(in srgb, var(--color-accent) 55%, transparent); }
}
.max-glow { animation: maxGlow 2.2s ease-in-out infinite; }
@keyframes barGlow {
  0%, 100% { box-shadow: 0 0 8px color-mix(in srgb, var(--color-accent) 45%, transparent); }
  50% { box-shadow: 0 0 16px color-mix(in srgb, var(--color-accent) 80%, transparent); }
}
.bar-glow { animation: barGlow 2.2s ease-in-out infinite; }

/* Интерактивные состояния */
.chip:hover { color: var(--color-accent-300) !important; }
.kpi-click { transition: box-shadow 0.15s; }
.kpi-click:hover { box-shadow: 0 0 0 1px color-mix(in srgb, var(--color-accent) 55%, transparent); }
.bar-hit:hover { filter: brightness(1.3); }
.nav-btn:hover { background: color-mix(in srgb, var(--color-text) 6%, transparent) !important; }
tr[data-click]:hover { background: color-mix(in srgb, var(--color-text) 4%, transparent); }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

/* Числовые инпуты в таблицах */
.num-inp::-webkit-outer-spin-button, .num-inp::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Адаптив */
@media (max-width: 980px) {
  .two-col { grid-template-columns: 1fr !important; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
