/* ============================================
   BOTON.STORE · PREMIUM PACK
   Плавные переходы, микроанимации, скролл
   ============================================ */

/* === Плавный скролл === */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

/* === Анимированный переход между страницами === */
body {
  opacity: 1;
  transition: opacity .28s ease;
}
body.page-enter {
  animation: pageEnter .35s cubic-bezier(.16,1,.3,1);
}
body.page-leave {
  opacity: 0;
  pointer-events: none;
}
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* === Премиум-полоса загрузки сверху === */
.premium-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, #00ffa3, #22d3ee, #a855f7);
  box-shadow: 0 0 12px rgba(0,255,163,.6);
  z-index: 99999;
  transition: width .3s ease, opacity .3s;
  pointer-events: none;
}
.premium-progress.done { width: 100% !important; opacity: 0; }

/* === Микроанимации для кнопок и карточек === */

/* Лёгкое покачивание при hover */
@keyframes softBounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}

/* Пульс для активных элементов */
@keyframes softPulse {
  0%, 100% { box-shadow: 0 0 0 0 currentColor; opacity: 1; }
  50%      { box-shadow: 0 0 0 6px transparent; opacity: .85; }
}

/* Свечение иконок */
@keyframes glowPulse {
  0%, 100% { filter: drop-shadow(0 0 4px currentColor); }
  50%      { filter: drop-shadow(0 0 12px currentColor); }
}

/* Появление блоков при скролле */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1);
  will-change: opacity, transform;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* === Тост-уведомления === */
.premium-toasts {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 340px;
  pointer-events: none;
}
.premium-toast {
  pointer-events: auto;
  background: rgba(10,12,20,.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #e8ecf1;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.4;
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
  animation: toastIn .4s cubic-bezier(.16,1,.3,1);
  position: relative;
  overflow: hidden;
}
.premium-toast::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: #00ffa3;
}
.premium-toast.gold::before { background: #ffd700; }
.premium-toast.cyan::before { background: #22d3ee; }
.premium-toast.purple::before { background: #a855f7; }
.premium-toast.leaving {
  animation: toastOut .35s ease forwards;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-30px) scale(.96); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateX(-30px) scale(.96); }
}
.premium-toast-icon {
  width: 32px; height: 32px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,255,163,.12);
  font-size: 16px;
  flex-shrink: 0;
}
.premium-toast.gold .premium-toast-icon { background: rgba(255,215,0,.12); }
.premium-toast.cyan .premium-toast-icon { background: rgba(34,211,238,.12); }
.premium-toast.purple .premium-toast-icon { background: rgba(168,85,247,.12); }
.premium-toast-text { flex: 1; min-width: 0; }
.premium-toast-title { font-weight: 700; margin-bottom: 2px; }
.premium-toast-meta { font-size: 11px; color: #8b95a3; }

/* === Микро-эффекты на ссылках и кнопках === */
a, button {
  transition: transform .2s ease, filter .2s ease, box-shadow .2s ease, color .2s ease, border-color .2s ease;
}
a:active, button:active {
  transform: scale(.97);
}

/* Пульс для ссылок-кнопок при наведении */
.pulse-hover:hover {
  animation: softBounce .6s ease;
}

/* Блеск на кнопках с классом .shine */
.shine {
  position: relative;
  overflow: hidden;
}
.shine::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  transition: left .7s;
  pointer-events: none;
}
.shine:hover::after { left: 130%; }

/* Иконки в меню — плавное покачивание при hover */
svg, .icon {
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), filter .25s;
}
a:hover svg, button:hover svg {
  filter: drop-shadow(0 0 6px currentColor);
}

/* === Красивая 404-страница (на случай если админка редиректит) === */
.not-found {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
  text-align: center;
  padding: 40px 20px;
  font-family: 'Inter', system-ui, sans-serif;
  background: #05060a;
  color: #e8ecf1;
}
.not-found h1 {
  font-size: clamp(80px, 18vw, 180px);
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(180deg, #fff, #00ffa3, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 40px rgba(0,255,163,.3));
}
.not-found p { color: #8b95a3; font-family: monospace; letter-spacing: 1px; }

/* === Мобильные оптимизации === */
@media (max-width: 640px) {
  .premium-toasts { left: 12px; right: 12px; max-width: none; bottom: 12px; }
}