/* ============================================================================
   PLUS-V2 — estilos (MÓDULO SEPARADO, ainda não linkado no index.html real).
   Fase 1: temas prontos, criador de tema personalizado, personalização de
   perfil (moldura/banner/badge). Paleta segue as variáveis já usadas no site
   (--accent, --bg-app etc.) pra já nascer parecido, mas isolado num prefixo
   "pv2-" pra não colidir com nenhuma classe existente até a hora de integrar.
============================================================================ */

.pv2-root {
  --pv2-accent: #00ff9d;
  color: #e6e6e6;
  font-family: inherit;
}

.pv2-tabs {
  display: flex; gap: 6px; margin-bottom: 18px; border-bottom: 1px solid #2a2b32; flex-wrap: wrap;
}
.pv2-tab {
  background: none; border: none; color: #8b909a; font-size: 13px; font-weight: 700; cursor: pointer;
  padding: 10px 14px; border-bottom: 2px solid transparent; transition: color 0.15s ease;
}
.pv2-tab:hover { color: #cfd2d8; }
.pv2-tab.active { color: #ffffff; border-bottom-color: var(--pv2-accent); }
.pv2-panel { display: none; }
.pv2-panel.active { display: block; }

.pv2-section-title { font-size: 15px; font-weight: 800; margin: 0 0 4px; color: #fff; }
.pv2-section-hint { font-size: 12.5px; color: #9aa0ab; margin: 0 0 16px; line-height: 1.5; }

/* ---------- galeria de temas prontos ---------- */
.pv2-theme-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px;
}
.pv2-theme-card {
  position: relative; border-radius: 12px; overflow: hidden; cursor: pointer; border: 2px solid transparent;
  background: #1a1b20; transition: transform 0.12s ease, border-color 0.15s ease;
}
.pv2-theme-card:hover { transform: translateY(-2px); }
.pv2-theme-card.selected { border-color: #fff; }
.pv2-theme-card.locked { cursor: not-allowed; opacity: 0.88; }
.pv2-theme-mini {
  height: 118px; padding: 8px 8px 6px; display: flex; flex-direction: column; gap: 6px;
  background: var(--pv2-mini-bg); color: var(--pv2-mini-text);
}
/* -- mini-interface de verdade: sidebar de servidores + topo + chat + input -- */
.pv2-theme-mini-body { flex: 1; display: flex; gap: 6px; min-height: 0; }
.pv2-theme-mini-side {
  width: 16px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center;
  gap: 5px; padding-top: 2px; background: rgba(0,0,0,0.22); border-radius: 6px;
}
.pv2-theme-mini-server {
  width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.18); flex-shrink: 0;
}
.pv2-theme-mini-server.active { background: var(--pv2-mini-primary); }
.pv2-theme-mini-main { flex: 1; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.pv2-theme-mini-topbar { height: 5px; width: 55%; border-radius: 3px; background: var(--pv2-mini-secondary); opacity: 0.85; }
.pv2-theme-mini-chat { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.pv2-theme-mini-bubble { height: 8px; border-radius: 6px; }
.pv2-theme-mini-bubble.other { width: 72%; align-self: flex-start; background: var(--pv2-mini-secondary); opacity: 0.55; }
.pv2-theme-mini-bubble.mine { width: 52%; align-self: flex-end; background: var(--pv2-mini-primary); }
.pv2-theme-mini-input {
  height: 10px; border-radius: 6px; border: 1px solid var(--pv2-mini-highlight); opacity: 0.8; flex-shrink: 0;
}
.pv2-theme-mini-btn {
  align-self: flex-start; font-size: 9px; font-weight: 700; padding: 3px 8px; border-radius: 6px;
  background: var(--pv2-mini-button); color: var(--pv2-mini-highlight); flex-shrink: 0;
}
.pv2-theme-name {
  padding: 8px 10px; font-size: 12.5px; font-weight: 700; display: flex; align-items: center; justify-content: space-between;
  background: #202127;
}
.pv2-lock-badge {
  position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,0.6); color: #ffd93d; font-size: 10px;
  font-weight: 800; padding: 3px 7px; border-radius: 20px; display: flex; align-items: center; gap: 3px;
  backdrop-filter: blur(2px);
}
.pv2-premium-pill {
  font-size: 9px; font-weight: 800; padding: 2px 7px; border-radius: 20px; letter-spacing: 0.04em;
  background: linear-gradient(90deg, #00e5ff, #00ff9d); color: #fff;
}

/* ---------- efeitos visuais dos temas premium ---------- */
.pv2-effect-shine .pv2-theme-mini-btn { animation: pv2Shine 2.2s linear infinite; background-size: 200% auto; }
@keyframes pv2Shine {
  0% { filter: brightness(1); } 50% { filter: brightness(1.5); } 100% { filter: brightness(1); }
}
.pv2-effect-glow .pv2-theme-mini { animation: pv2Glow 2s ease-in-out infinite; }
@keyframes pv2Glow {
  0%, 100% { box-shadow: inset 0 0 12px rgba(255,255,255,0.05); }
  50% { box-shadow: inset 0 0 22px rgba(255,255,255,0.25); }
}
.pv2-effect-pulse .pv2-theme-mini-server.active { animation: pv2Pulse 1.4s ease-in-out infinite; }
@keyframes pv2Pulse {
  0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.6); opacity: 0.6; }
}

/* ---------- criador de tema personalizado ---------- */
.pv2-creator-layout { display: flex; gap: 24px; flex-wrap: wrap; }
.pv2-creator-controls { flex: 1 1 260px; min-width: 240px; }
.pv2-color-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px;
}
.pv2-color-row label { font-size: 12.5px; font-weight: 600; color: #cfd2d8; }
.pv2-color-input-wrap { display: flex; align-items: center; gap: 8px; }
.pv2-color-input-wrap input[type="color"] {
  width: 34px; height: 34px; border: none; border-radius: 8px; background: none; cursor: pointer; padding: 0;
}
.pv2-color-input-wrap input[type="text"] {
  width: 90px; background: #14151a; border: 1px solid #35373c; border-radius: 6px; color: #e6e6e6;
  font-size: 12px; padding: 6px 8px; font-family: monospace;
}
.pv2-toggle-row { display: flex; align-items: center; justify-content: space-between; margin: 14px 0; }
.pv2-effect-select {
  width: 100%; background: #14151a; border: 1px solid #35373c; border-radius: 8px; color: #e6e6e6;
  padding: 8px 10px; font-size: 12.5px; margin-top: 6px;
}
.pv2-name-input {
  width: 100%; background: #14151a; border: 1px solid #35373c; border-radius: 8px; color: #e6e6e6;
  padding: 9px 12px; font-size: 13px; margin-bottom: 14px;
}
.pv2-save-btn {
  background: var(--pv2-accent); color: #fff; border: none; border-radius: 8px; padding: 10px 18px;
  font-size: 13px; font-weight: 700; cursor: pointer; margin-top: 6px;
}
.pv2-save-btn:hover { filter: brightness(1.1); }
.pv2-save-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.pv2-locked-note {
  background: rgba(145,70,255,0.12); border: 1px solid rgba(145,70,255,0.4); color: #cbb2ff;
  border-radius: 10px; padding: 12px 14px; font-size: 12.5px; margin-bottom: 16px; line-height: 1.5;
}

/* ---------- live preview (mini mock do app) ---------- */
.pv2-preview-wrap { flex: 1 1 300px; min-width: 280px; }
.pv2-preview-frame {
  border-radius: 14px; overflow: hidden; border: 1px solid #2a2b32; box-shadow: 0 8px 30px rgba(0,0,0,0.4);
  background: var(--pv2-mini-bg); color: var(--pv2-mini-text); font-size: 12px;
}
.pv2-preview-topbar {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--pv2-mini-button);
  font-weight: 800; font-size: 12px;
}
.pv2-preview-topbar .pv2-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--pv2-mini-primary); }
.pv2-preview-body { display: flex; min-height: 220px; }
.pv2-preview-rail { width: 46px; background: rgba(0,0,0,0.15); display: flex; flex-direction: column; gap: 8px; align-items: center; padding: 10px 0; }
.pv2-preview-rail-dot { width: 26px; height: 26px; border-radius: 50%; background: var(--pv2-mini-secondary); }
.pv2-preview-sidebar { width: 100px; background: rgba(0,0,0,0.1); padding: 10px 8px; display: flex; flex-direction: column; gap: 6px; }
.pv2-preview-sidebar-item { height: 8px; border-radius: 4px; background: rgba(255,255,255,0.12); }
.pv2-preview-sidebar-item.active { background: var(--pv2-mini-primary); }
.pv2-preview-chat { flex: 1; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.pv2-preview-bubble {
  max-width: 70%; padding: 7px 10px; border-radius: 10px; background: var(--pv2-mini-secondary);
  font-size: 11px; color: var(--pv2-mini-text);
}
.pv2-preview-bubble.own { align-self: flex-end; background: var(--pv2-mini-primary); }
.pv2-preview-btn {
  align-self: flex-start; background: var(--pv2-mini-button); color: var(--pv2-mini-highlight);
  padding: 5px 10px; border-radius: 6px; font-size: 10px; font-weight: 700; margin-top: auto;
}

/* ---------- personalização de perfil ---------- */
.pv2-profile-layout { display: flex; gap: 24px; flex-wrap: wrap; }
.pv2-profile-tabs { display: flex; flex-direction: column; gap: 2px; width: 150px; flex-shrink: 0; }
.pv2-profile-tab {
  text-align: left; background: none; border: none; color: #9aa0ab; font-size: 13px; font-weight: 600;
  padding: 10px 12px; border-radius: 8px; cursor: pointer; display: flex; align-items: center; gap: 8px;
}
.pv2-profile-tab:hover { background: #1e1f26; color: #cfd2d8; }
.pv2-profile-tab.active { background: #26272e; color: #fff; }
.pv2-profile-content { flex: 1 1 300px; min-width: 260px; }

.pv2-card-preview {
  width: 240px; border-radius: 14px; overflow: hidden; background: #1a1b20; border: 1px solid #2a2b32;
}
.pv2-card-banner { height: 70px; position: relative; }
.pv2-card-avatar {
  width: 64px; height: 64px; border-radius: 50%; background: #35373c; border: 3px solid #1a1b20;
  margin: -32px 0 0 16px; position: relative; display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.pv2-card-badge {
  position: absolute; bottom: -2px; right: -2px; width: 22px; height: 22px; border-radius: 50%;
  background: #1a1b20; display: flex; align-items: center; justify-content: center; font-size: 12px;
  border: 2px solid #1a1b20;
}
.pv2-card-body { padding: 10px 16px 16px; }
.pv2-card-name { font-weight: 800; font-size: 14px; color: #fff; }
.pv2-card-tag { font-size: 11px; color: #9aa0ab; }

.pv2-banner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 10px; margin: 12px 0; }
.pv2-banner-swatch {
  height: 44px; border-radius: 8px; cursor: pointer; border: 2px solid transparent; position: relative;
}
.pv2-banner-swatch.selected { border-color: #fff; }
.pv2-banner-swatch.locked { cursor: not-allowed; opacity: 0.6; }

.pv2-badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 10px; margin: 12px 0; }
.pv2-badge-chip {
  height: 52px; border-radius: 10px; background: #1a1b20; display: flex; align-items: center; justify-content: center;
  font-size: 22px; cursor: pointer; border: 2px solid transparent; position: relative;
}
.pv2-badge-chip.selected { border-color: #fff; }
.pv2-badge-chip.locked { opacity: 0.5; cursor: not-allowed; }
.pv2-badge-chip .pv2-mini-lock { position: absolute; bottom: 2px; right: 2px; font-size: 9px; }

.pv2-plus-cta {
  margin-top: 18px; background: linear-gradient(135deg, rgba(145,70,255,0.16), rgba(0,255,157,0.16));
  border: 1px solid rgba(145,70,255,0.35); border-radius: 12px; padding: 14px 16px;
}
.pv2-plus-cta-title { font-weight: 800; font-size: 13px; color: #fff; margin-bottom: 4px; }
.pv2-plus-cta-text { font-size: 12px; color: #b9bcc5; line-height: 1.5; }

/* ============================================================================
   FASE 2 — FUNDOS PERSONALIZADOS
============================================================================ */
.pv2-bg-layout { display: flex; gap: 24px; flex-wrap: wrap; }
.pv2-bg-controls { flex: 1 1 300px; min-width: 260px; }
.pv2-bg-group-title { font-size: 12px; font-weight: 800; color: #9aa0ab; text-transform: uppercase; letter-spacing: 0.05em; margin: 18px 0 8px; }
.pv2-bg-group-title:first-child { margin-top: 0; }
.pv2-bg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 10px; }
.pv2-bg-swatch {
  height: 58px; border-radius: 10px; cursor: pointer; border: 2px solid transparent; position: relative;
  overflow: hidden; background-size: cover; background-position: center;
  display: flex; align-items: flex-end; padding: 4px 6px;
}
.pv2-bg-swatch span { font-size: 9px; font-weight: 700; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,0.7); }
.pv2-bg-swatch.selected { border-color: #fff; }
.pv2-bg-swatch.locked { opacity: 0.6; cursor: not-allowed; }
.pv2-bg-swatch .pv2-mini-lock { position: absolute; top: 4px; right: 5px; font-size: 10px; }
.pv2-bg-swatch canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.pv2-slider-row { margin: 14px 0; }
.pv2-slider-row-head { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 600; color: #cfd2d8; margin-bottom: 6px; }
.pv2-slider-row-head b { color: #fff; font-weight: 800; }
.pv2-slider-row input[type="range"] { width: 100%; accent-color: var(--pv2-accent); }

.pv2-bg-preview-wrap { flex: 1 1 300px; min-width: 280px; }
.pv2-bg-preview-stage { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid #2a2b32; min-height: 240px; }
.pv2-bg-preview-layer { position: absolute; inset: 0; background-size: cover; background-position: center; }
.pv2-bg-preview-content { position: relative; z-index: 1; }

/* ============================================================================
   FASE 2 — EFEITOS E ANIMAÇÕES
============================================================================ */
.pv2-switch { position: relative; width: 38px; height: 21px; flex-shrink: 0; display: inline-block; }
.pv2-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.pv2-switch-track {
  position: absolute; inset: 0; background: #35373c; border-radius: 30px; cursor: pointer; transition: background 0.15s ease;
}
.pv2-switch-track::after {
  content: ''; position: absolute; width: 15px; height: 15px; border-radius: 50%; background: #fff; top: 3px; left: 3px;
  transition: transform 0.15s ease;
}
.pv2-switch input:checked + .pv2-switch-track { background: var(--pv2-accent); }
.pv2-switch input:checked + .pv2-switch-track::after { transform: translateX(17px); }
.pv2-switch input:disabled + .pv2-switch-track { opacity: 0.4; cursor: not-allowed; }

.pv2-toggle-list { display: flex; flex-direction: column; gap: 2px; }
.pv2-toggle-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 4px;
  border-bottom: 1px solid #22232a;
}
.pv2-toggle-item:last-child { border-bottom: none; }
.pv2-toggle-item-label { font-size: 13px; font-weight: 700; color: #e6e6e6; display: flex; align-items: center; gap: 6px; }
.pv2-toggle-item-hint { font-size: 11.5px; color: #8b909a; margin-top: 2px; }
.pv2-perf-banner {
  background: rgba(255,159,67,0.1); border: 1px solid rgba(255,159,67,0.35); color: #ffc98a;
  border-radius: 10px; padding: 10px 14px; font-size: 12px; margin-bottom: 14px; line-height: 1.5;
}

.pv2-demo-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.pv2-demo-btn {
  background: #26272e; border: 1px solid #35373c; color: #cfd2d8; font-size: 11.5px; font-weight: 700;
  padding: 7px 12px; border-radius: 8px; cursor: pointer;
}
.pv2-demo-btn:hover { background: #2f3037; }

.pv2-fx-button-glow { animation: pv2ButtonGlow 1.8s ease-in-out infinite; }
@keyframes pv2ButtonGlow {
  0%, 100% { box-shadow: 0 0 4px rgba(255,255,255,0.15); }
  50% { box-shadow: 0 0 14px 2px var(--pv2-mini-primary, #00ff9d); }
}
.pv2-fx-avatar-glow { animation: pv2AvatarGlow 1.6s ease-in-out infinite; }
@keyframes pv2AvatarGlow {
  0%, 100% { box-shadow: 0 0 0 rgba(255,255,255,0); }
  50% { box-shadow: 0 0 10px 3px var(--pv2-mini-highlight, #00d4ff); }
}
.pv2-fx-gradient-anim {
  background-image: linear-gradient(120deg, var(--pv2-mini-primary, #00ff9d), var(--pv2-mini-secondary, #00e5ff), var(--pv2-mini-primary, #00ff9d));
  background-size: 220% 220%; animation: pv2GradAnim 4s ease infinite;
}
@keyframes pv2GradAnim { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
.pv2-fx-msg-receive { animation: pv2MsgReceive 0.5s ease; }
@keyframes pv2MsgReceive { 0% { transform: translateY(8px) scale(0.92); opacity: 0; } 100% { transform: translateY(0) scale(1); opacity: 1; } }
.pv2-fx-call-ring { position: relative; }
.pv2-fx-call-ring::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--pv2-mini-highlight, #00d4ff);
  animation: pv2CallRing 1s ease-out infinite;
}
@keyframes pv2CallRing { 0% { transform: scale(0.8); opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }
.pv2-fx-transition-demo { transition: transform 0.3s ease, opacity 0.3s ease; }
.pv2-fx-transition-demo.pv2-fx-out { transform: translateX(6px); opacity: 0.3; }

/* ============================================================================
   FASE 2 — PERSONALIZAÇÃO DO CHAT
============================================================================ */
.pv2-chat-layout { display: flex; gap: 24px; flex-wrap: wrap; }
.pv2-chat-controls { flex: 1 1 280px; min-width: 250px; display: flex; flex-direction: column; gap: 14px; }
.pv2-field-label { font-size: 12px; font-weight: 800; color: #9aa0ab; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; }
.pv2-radio-group { display: flex; gap: 8px; flex-wrap: wrap; }
.pv2-radio-chip {
  padding: 7px 12px; border-radius: 8px; background: #1e1f26; border: 1px solid #2e2f37; font-size: 12px;
  font-weight: 700; color: #cfd2d8; cursor: pointer;
}
.pv2-radio-chip.active { background: var(--pv2-accent); border-color: var(--pv2-accent); color: #fff; }
.pv2-select {
  width: 100%; background: #14151a; border: 1px solid #35373c; border-radius: 8px; color: #e6e6e6;
  padding: 8px 10px; font-size: 12.5px;
}
.pv2-chat-toggle-row { display: flex; align-items: center; justify-content: space-between; }

.pv2-chat-preview-wrap { flex: 1 1 300px; min-width: 280px; }
.pv2-chat-preview {
  border-radius: 14px; border: 1px solid #2a2b32; background: #14151a; padding: 14px; display: flex;
  flex-direction: column; min-height: 260px;
}
.pv2-chat-msg-row { display: flex; align-items: flex-end; gap: 8px; }
.pv2-chat-avatar { width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; background: #35373c; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.pv2-chat-msg-col { display: flex; flex-direction: column; gap: 2px; max-width: 78%; }
.pv2-chat-msg-meta { font-size: 10px; color: #7c828d; display: flex; gap: 6px; align-items: center; }
.pv2-chat-bubble { padding: 8px 12px; font-size: 12.5px; line-height: 1.4; color: #f1f1f4; }
.pv2-chat-bubble.pv2-bubble-rounded { border-radius: 14px; }
.pv2-chat-bubble.pv2-bubble-square { border-radius: 4px; }
.pv2-chat-bubble.pv2-bubble-minimal { border-radius: 0; background: transparent !important; border-left: 3px solid var(--pv2-chat-color, #00ff9d); padding-left: 10px; }
.pv2-chat-reactions { display: flex; gap: 4px; margin-top: 3px; }
.pv2-chat-reaction { background: #26272e; border-radius: 10px; padding: 1px 6px; font-size: 10.5px; }
.pv2-chat-mention.pv2-mention-highlight { background: rgba(255,217,61,0.18); border: 1px solid rgba(255,217,61,0.5); border-radius: 8px; }
.pv2-chat-mention.pv2-mention-shake { animation: pv2MentionShake 0.4s ease; }
@keyframes pv2MentionShake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.pv2-chat-mention.pv2-mention-glow { box-shadow: 0 0 0 2px var(--pv2-mini-highlight, #00d4ff); border-radius: 8px; }

/* ============================================================================
   FASE 4 — FIGURINHAS
============================================================================ */
.pv2-sticker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; max-width: 520px; }
.pv2-sticker-item {
  width: 52px; height: 52px; border-radius: 10px; background: #1a1b20; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 26px; transition: background 0.1s ease, transform 0.1s ease;
}
.pv2-sticker-item:hover { background: #24252c; transform: scale(1.05); }
.pv2-sticker-item.locked { opacity: 0.45; cursor: not-allowed; }
.pv2-sticker-item.locked:hover { transform: none; }
.pv2-sticker-item img { width: 34px; height: 34px; object-fit: contain; }

.pv2-sticker-demo-log {
  border: 1px solid #24252c; border-radius: 12px; background: #14151a; min-height: 90px; max-height: 160px;
  overflow-y: auto; padding: 10px; display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start;
}
.pv2-sticker-demo-bubble { font-size: 44px; line-height: 1; }
.pv2-sticker-demo-bubble-img img { width: 72px; height: 72px; object-fit: contain; }

/* ============================================================================
   BANNER COM IMAGEM PRÓPRIA (upload)
============================================================================ */
.pv2-upload-row { display: flex; align-items: center; gap: 10px; margin: 12px 0; flex-wrap: wrap; }
.pv2-upload-btn {
  background: #26272e; border: 1px solid #35373c; color: #cfd2d8; font-size: 12px; font-weight: 700;
  padding: 8px 14px; border-radius: 8px; cursor: pointer;
}
.pv2-upload-btn:hover { background: #2f3037; }
.pv2-upload-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.pv2-upload-preview {
  width: 90px; height: 44px; border-radius: 8px; background-size: cover; background-position: center;
  border: 2px solid transparent;
}
.pv2-upload-preview.selected { border-color: #fff; }
.pv2-upload-hint { font-size: 11px; color: #8b909a; }

/* ============================================================================
   APLICAÇÃO NA PÁGINA DE VERDADE (plus2-live.js) — daqui pra baixo não é
   mais sobre a TELA de configurações, é o que aparece no app inteiro
   quando a pessoa liga um fundo/efeito.
============================================================================ */

/* Fundo personalizado — deixa os painéis de cor sólida um pouco translúcidos
   só quando tem um fundo diferente do padrão ativo, senão a camada de fundo
   (#plus2-bg-layer, position:fixed atrás de tudo) nunca apareceria. */
/* SEM backdrop-filter aqui de propósito — esse filtro cria um "stacking
   context" novo no elemento, e isso prendia o menu dropdown do chip de
   perfil (#footer-more-menu, de onde se chega no NEXTGAME PLUS e no Admin)
   atrás do resto da página, tornando ele invisível/impossível de clicar. Só
   a cor translúcida já dá o efeito de "ver o fundo por trás", sem esse risco. */
body.pv2-custom-bg-active { background: transparent !important; }
body.pv2-custom-bg-active .app-sidebar { background: rgba(14,15,19,0.9) !important; }
body.pv2-custom-bg-active .top-navbar { background: rgba(14,15,19,0.9) !important; }
/* CORRIGIDO — estava ".main", classe que não existe (a coluna principal do
   chat é ".app-main"); com o seletor errado essa regra nunca tinha efeito
   nenhum, mesmo com o resto pronto. */
body.pv2-custom-bg-active .app-main { background: rgba(32,33,39,0.92) !important; }
body.pv2-custom-bg-active .sidebar { background: rgba(26,27,32,0.92) !important; }
body.pv2-custom-bg-active .members-panel { background: rgba(26,27,32,0.92) !important; }
#plus2-bg-layer {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-size: cover; background-position: center; background-repeat: no-repeat;
  transition: opacity 0.3s ease;
}
@keyframes pv2LiveWaves { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
#plus2-bg-layer.pv2-bg-waves {
  background-image: linear-gradient(120deg, #00ff9d, #00e5ff, #0a0b0d, #00ff9d) !important;
  background-size: 300% 300% !important;
  animation: pv2LiveWaves 12s ease-in-out infinite;
}

/* Brilho nos botões — só nos botões principais de call-to-action. */
body.pv2-fx-button-glow .home-btn-primary,
body.pv2-fx-button-glow .plus-promo-cta,
body.pv2-fx-button-glow #form-message button[type="submit"] {
  animation: pv2LiveButtonGlow 2s ease-in-out infinite;
}
@keyframes pv2LiveButtonGlow {
  0%, 100% { box-shadow: 0 0 4px rgba(255,255,255,0.1); }
  50% { box-shadow: 0 0 16px 2px var(--accent); }
}

/* Glow no avatar — só no seu próprio, no chip de perfil do topo. */
body.pv2-fx-avatar-glow #navbar-chip-avatar {
  animation: pv2LiveAvatarGlow 1.8s ease-in-out infinite;
  border-radius: 50%;
}
@keyframes pv2LiveAvatarGlow {
  0%, 100% { box-shadow: 0 0 0 rgba(255,255,255,0); }
  50% { box-shadow: 0 0 10px 3px var(--accent-3); }
}

/* Gradiente animado — barra lateral principal. */
body.pv2-fx-gradient-sidebar .app-sidebar {
  background-image: linear-gradient(160deg, var(--bg-rail) 40%, var(--accent-2) 220%) !important;
  background-size: 200% 200%;
  animation: pv2LiveGradientShift 8s ease infinite;
}
@keyframes pv2LiveGradientShift { 0% { background-position: 0% 0%; } 50% { background-position: 100% 100%; } 100% { background-position: 0% 0%; } }

/* Animações de transição — troca de aba/painel mais suave em vez de "cortar seco". */
body.pv2-fx-transitions .manage-tab-panel:not(.hidden),
body.pv2-fx-transitions .home-panel {
  animation: pv2LiveFadeIn 0.25s ease;
}
@keyframes pv2LiveFadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* Efeito ao receber mensagem — aplicado em mensagens novas via renderMessage(). */
.pv2-live-msg-in { animation: pv2LiveMsgIn 0.4s ease; }
@keyframes pv2LiveMsgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* Efeito ao entrar na call — aro pulsante em volta do avatar da tile nova. */
.pv2-live-join-ring { position: relative; }
.pv2-live-join-ring::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--accent-3);
  animation: pv2LiveJoinRing 1s ease-out infinite;
}
@keyframes pv2LiveJoinRing { 0% { transform: scale(0.8); opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }

/* Badge escolhido, ao lado do nome no chat. */
.pv2-live-badge { margin-left: 4px; font-size: 12px; }

/* Personalização do chat aplicada de verdade — classes/vars que renderMessage()
   coloca em cada mensagem conforme o que a pessoa escolheu. */
.message.pv2-bubble-square .content { border-radius: 4px !important; }
.message.pv2-bubble-minimal .content { border-radius: 0 !important; background: transparent !important; border-left: 3px solid var(--accent); padding-left: 10px !important; }
.message.pv2-hide-avatar .message-avatar { display: none !important; }
.message.pv2-font-small .content { font-size: 12px !important; }
.message.pv2-font-large .content { font-size: 15.5px !important; }
.message.pv2-hide-timestamp .pv2-live-time { display: none; }
.message.pv2-mention-highlight { background: rgba(255,217,61,0.1); border-radius: 8px; }
.message.pv2-mention-shake { animation: pv2LiveMentionShake 0.4s ease; }
@keyframes pv2LiveMentionShake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.message.pv2-mention-glow .content { box-shadow: 0 0 0 2px var(--accent-3); border-radius: 8px; }

/* Espaçamento entre mensagens — cai de volta pra 10px (o padrão de sempre)
   se a Personalização ainda não carregou. */
.messages { gap: var(--pv2-live-spacing, 10px); }

/* ============================================================================
   FIGURINHAS NO FORMULÁRIO DE MENSAGEM — botão + popup de escolha, e como a
   figurinha aparece depois de enviada na conversa.
============================================================================ */
.pv2-sticker-picker-wrap { position: relative; flex-shrink: 0; }
#btn-sticker-picker {
  background: #26272e; border-radius: 50%; width: 40px; height: 40px; padding: 0; border: none;
  display: flex; align-items: center; justify-content: center; cursor: pointer; color: #dbdee1;
  transition: background 0.15s ease;
}
#btn-sticker-picker:hover { background: #2f3037; }
.pv2-sticker-picker {
  position: absolute; bottom: 50px; left: 0; background: #26272e; border-radius: 12px; padding: 10px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.45); z-index: 20; border: 1px solid #35373c; width: 260px;
  max-height: 320px; overflow-y: auto;
}
.pv2-sticker-picker.hidden { display: none; }
.pv2-sticker-picker-loading { font-size: 12px; color: #9aa0ab; text-align: center; padding: 14px; margin: 0; }
.pv2-sticker-picker-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.pv2-sticker-picker-tab {
  background: #1a1b20; border: none; color: #9aa0ab; font-size: 10.5px; font-weight: 700;
  padding: 5px 9px; border-radius: 20px; cursor: pointer;
}
.pv2-sticker-picker-tab.active { background: var(--accent); color: #fff; }
.pv2-sticker-picker-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.pv2-sticker-picker-item {
  width: 42px; height: 42px; border: none; background: transparent; cursor: pointer; font-size: 22px;
  border-radius: 8px; display: flex; align-items: center; justify-content: center; transition: background 0.1s ease;
}
.pv2-sticker-picker-item:hover { background: #35373c; }
.pv2-sticker-picker-item.locked { opacity: 0.4; cursor: not-allowed; }
.pv2-sticker-picker-item img { width: 100%; height: 100%; object-fit: contain; }
.pv2-sticker-picker-cta {
  margin-top: 8px; text-align: center; font-size: 11px; color: #b18aff; background: rgba(145,70,255,0.12);
  border-radius: 8px; padding: 6px;
}
.pv2-sticker-msg { font-size: 64px; line-height: 1; padding: 2px 0; background: transparent !important; }
.pv2-sticker-msg-img img { width: 128px; height: 128px; object-fit: contain; display: block; }
