/* ═══════════════════════════════════════════════════════════
   UI EFFECTS - Non-invasive premium interactions
   Ничего не ломает из существующих animations.css
   ═══════════════════════════════════════════════════════════ */

/* ── RIPPLE (только свой класс) ── */
.ui-ripple {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(255,255,255,0.35) 0%,
    rgba(255,255,255,0.12) 45%,
    transparent 70%);
  transform: scale(0);
  animation: ui-ripple-anim 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 1;
}

body.light-theme .ui-ripple {
  background: radial-gradient(circle,
    rgba(0,0,0,0.2) 0%,
    rgba(0,0,0,0.08) 45%,
    transparent 70%);
}

@keyframes ui-ripple-anim {
  to {
    transform: scale(1);
    opacity: 0;
  }
}

/* ── NAV SCROLLED STATE (только добавляем тень, padding не трогаем) ── */
nav.scrolled {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

body.light-theme nav.scrolled {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

/* ── ACTIVE NAV LINK (только подсветка, не ломает hover) ── */
nav a.nav-active {
  color: var(--text-primary) !important;
}

/* ── TOAST ── */
.ui-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(255, 255, 255, 0.95);
  color: #000;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10000;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

.ui-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

body.light-theme .ui-toast {
  background: rgba(20, 20, 20, 0.95);
  color: #fff;
}

/* ── TEXT SELECTION (кастомный цвет при выделении) ── */
::selection {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

body.light-theme ::selection {
  background: rgba(0, 0, 0, 0.15);
  color: #000;
}

/* ── FOCUS VISIBLE (для accessibility, не мешает) ── */
*:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.3);
  outline-offset: 2px;
}

body.light-theme *:focus-visible {
  outline-color: rgba(0, 0, 0, 0.25);
}

/* Но не для специфичных кнопок (EN/RU, и т.д. где outline мешает) */
.lang-switch button:focus-visible,
.lang-switch button:focus,
#btn-en:focus-visible,
#btn-en:focus,
#btn-ru:focus-visible,
#btn-ru:focus {
  outline: none !important;
  box-shadow: none !important;
}
