/* cosmetics.css — Music Spy Cosmetics Styles
   Подключи в HTML: <link rel="stylesheet" href="/css/cosmetics.css">
*/

/* ─── АНИМАЦИИ ────────────────────────────────────────────────────────────── */

@keyframes cosmetic-bg-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes bgShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes framePulse {
  0%, 100% { box-shadow: 0 0 8px var(--fc), 0 0 16px var(--fc); }
  50% { box-shadow: 0 0 18px var(--fc), 0 0 36px var(--fc); }
}

@keyframes frame-pulse-gold {
  0%, 100% { box-shadow: 0 0 8px #ffd700, 0 0 16px #ffd70066; }
  50% { box-shadow: 0 0 16px #ffd700, 0 0 32px #ffd70099; }
}

@keyframes frame-pulse-purple {
  0%, 100% { box-shadow: 0 0 10px #9d4edd, 0 0 20px #9d4edd44; }
  50% { box-shadow: 0 0 20px #9d4edd, 0 0 40px #9d4edd77; }
}

@keyframes frame-flicker {
  0%, 95%, 100% { opacity: 1; }
  96% { opacity: 0.7; }
  97% { opacity: 1; }
  98% { opacity: 0.5; }
}

/* ─── БАЗОВЫЕ СТИЛИ ДЛЯ ЧАТ-БАБЛОВ С ЭФФЕКТОМ ──────────────────────────── */

.cosmetic-chat-active {
  border: 1px solid;
  border-radius: 10px;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.cosmetic-chat-active[data-cosmetic-chat="emoji-rain"]::before {
  content: "🎵 🎶 🎸";
  position: absolute;
  top: -18px;
  left: 0;
  font-size: 12px;
  opacity: 0.6;
  pointer-events: none;
  animation: emoji-float 3s ease-in-out infinite;
}

@keyframes emoji-float {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(-4px); opacity: 1; }
}

.cosmetic-chat-active[data-cosmetic-chat="waveform-glow"]::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #00ff88, transparent);
  background-size: 200% 100%;
  animation: waveform-scan 2s linear infinite;
  border-radius: 0 0 10px 10px;
}

@keyframes waveform-scan {
  0% { background-position: -100% 0; }
  100% { background-position: 200% 0; }
}

/* ─── КАРТОЧКИ ЛОББИ ─────────────────────────────────────────────────────── */

[data-cosmetic-lobby="neon-grid"]::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 24px, #cc00ff22 24px, #cc00ff22 25px),
    repeating-linear-gradient(90deg, transparent, transparent 24px, #cc00ff22 24px, #cc00ff22 25px);
  border-radius: inherit;
  z-index: 0;
}

/* ─── АВАТАРКИ ───────────────────────────────────────────────────────────── */

[data-cosmetic-frame] {
  border-radius: 50%;
  transition: box-shadow 0.3s ease;
}

/* ─── ПРЕВЬЮ В МАГАЗИНЕ ──────────────────────────────────────────────────── */

.shop-preview-nickname {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.shop-preview-nickname-stage {
  width: 100%;
  min-height: 74px;
  border-radius: 12px;
  background: #0d0b1a;
  border: 1px solid rgba(146, 122, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.shop-preview-chat-bubble {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: #e0e0ff;
  position: relative;
  }

.shop-chat-preview {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  border-radius: 12px;
  background: #0d0b1a;
  border: 1px solid rgba(146, 122, 255, 0.22);
}

.shop-chat-content {
  min-width: 0;
  flex: 1;
}

.shop-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  gap: 8px;
}

.shop-chat-nickname {
  font-size: 13px;
  font-weight: 700;
}

.shop-chat-time {
  font-size: 11px;
  opacity: 0.72;
}

.shop-preview-lobby-card {
  border-radius: 12px;
  border: 1px solid transparent;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.shop-preview-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #2f2850;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #d8d2ff;
  font-weight: 700;
  font-size: 14px;
}
