* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* --- Paleta de marca MiroGames: negro profundo + verde neón --- */
  --bg: #060908;
  --bg-1: #060908;
  --bg-2: #0b100f;
  --card: #101715;
  --card-hover: #16201d;
  --border: #1e2a26;
  --text: #e9f7ef;
  --text-2: #8ba79a;
  --text-dim: #8ba79a;
  --text-muted: #57685f;
  --primary: #00ff80;
  --accent: #00ff80;
  --accent-2: #00c46a;
  --accent-grad: linear-gradient(135deg, #00ff80 0%, #00a854 100%);
  --accent-soft: rgba(0, 255, 128, 0.12);
  --danger: #ff5470;
  --success: #00ff80;
  --warn: #ffc24b;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 8px 32px rgba(0,0,0,0.45);
  /* --- Escala de diseño unificada (radios, elevación, tiempos) --- */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-pill: 999px;
  --e-1: 0 1px 2px rgba(0,0,0,0.35), 0 2px 8px rgba(0,0,0,0.28);
  --e-2: 0 6px 18px rgba(0,0,0,0.42), inset 0 1px 0 rgba(255,255,255,0.03);
  --e-3: 0 18px 48px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.04);
  --glow: 0 0 0 1px rgba(0,255,128,0.35), 0 12px 34px rgba(0,255,128,0.18);
  --dur: 0.14s;
  --ease: cubic-bezier(0.2, 0.8, 0.3, 1);
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; }
svg { width: 20px; height: 20px; }

.launcher {
  display: grid;
  grid-template-columns: 84px 1fr;
  height: 100vh;
  padding: 18px;
  gap: 18px;
  background: radial-gradient(ellipse at 10% 90%, rgba(0,255,128,0.08), transparent 40%),
              radial-gradient(ellipse at 90% 10%, rgba(0,196,106,0.06), transparent 40%),
              var(--bg);
}

.sidebar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 22px 0;
  gap: 10px;
  box-shadow: var(--shadow);
}

.logo { margin-bottom: 18px; }
.logo-mark {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--accent-grad);
  display: grid; place-items: center;
  font-weight: 800; font-size: 20px; color: #fff;
  box-shadow: 0 4px 16px rgba(0,255,128,0.4);
}

.nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  align-items: center;
  padding-top: 8px;
}

.nav-item {
  position: relative;
  width: 48px; height: 48px;
  border-radius: 12px;
  display: grid; place-items: center;
  color: var(--text-dim);
  transition: all 0.2s ease;
}
.nav-item:hover { background: var(--bg-2); color: var(--text); }
.nav-item.active {
  background: rgba(0,255,128,0.15);
  color: var(--accent);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: -10px; top: 12px; bottom: 12px; width: 3px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}
.nav-dot {
  position: absolute;
  top: 12px; right: 12px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--danger);
  border: 2px solid var(--card);
}
.sidebar-footer { padding-top: 8px; }

.main {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 22px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}
.header-left { min-width: 0; }
.page-title { font-size: 24px; font-weight: 700; letter-spacing: -0.3px; }
.page-sub { color: var(--text-dim); font-size: 13px; margin-top: 3px; }

.search {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  display: flex; align-items: center;
  gap: 10px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 16px;
  color: var(--text-dim);
  transition: border-color 0.2s;
}
.search:focus-within { border-color: var(--accent); }
.search input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); font-size: 13px;
}
.search input::placeholder { color: var(--text-muted); }
.search svg { width: 16px; height: 16px; }

.header-right {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 16px;
}
.icon-btn {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: grid; place-items: center;
  color: var(--text-dim);
  background: var(--bg-2);
  border: 1px solid var(--border);
  position: relative;
  transition: all 0.2s;
}
.icon-btn:hover { color: var(--text); border-color: var(--border); }
.notif-dot {
  position: absolute; top: 9px; right: 9px;
  width: 8px; height: 8px;
  border-radius: 50%; background: var(--danger);
  border: 2px solid var(--bg-2);
}

.user {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 12px 6px 6px;
  border-radius: 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
}
.avatar {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--accent-grad);
  display: grid; place-items: center;
  font-weight: 700; color: #fff;
}
.user-info { display: flex; flex-direction: column; line-height: 1.2; }
.user-name { font-weight: 600; font-size: 13px; }
.user-role { color: var(--text-muted); font-size: 11px; }

.content {
  flex: 1;
  overflow: auto;
  padding: 24px 28px 28px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 22px;
}
.content::-webkit-scrollbar { width: 8px; }
.content::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.content-main { display: flex; flex-direction: column; gap: 22px; min-width: 0; }

.banner {
  position: relative;
  border-radius: var(--radius);
  min-height: 220px;
  background:
    linear-gradient(120deg, #03130c 0%, #06432b 55%, #00a854 120%);
  overflow: hidden;
  padding: 30px 36px;
  display: flex; align-items: center;
  border: 1px solid rgba(255,255,255,0.08);
}
.banner::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 30%, rgba(255,255,255,0.1), transparent 50%);
  pointer-events: none;
}
.banner-content { position: relative; z-index: 1; max-width: 500px; }
.banner-tag {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.banner-title { font-size: 32px; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.5px; }
.banner-desc { color: rgba(255,255,255,0.8); font-size: 14px; line-height: 1.5; margin-bottom: 20px; }
.banner-actions { display: flex; gap: 10px; }

.home-overview-head { margin-top: -8px; }
.home-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.home-overview-card {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 12px;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 94px;
  padding: 14px;
  text-align: left;
  background: linear-gradient(145deg, rgba(18,27,23,.96), rgba(11,16,15,.96));
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.home-overview-card:hover,
.home-overview-card:focus-visible {
  border-color: rgba(0,255,128,.42);
  background: linear-gradient(145deg, rgba(21,34,28,.98), rgba(12,20,16,.98));
  transform: translateY(-1px);
}
.home-overview-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.home-overview-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: rgba(0,255,128,.09);
  border: 1px solid rgba(0,255,128,.14);
  border-radius: 12px;
}
.home-overview-icon svg { width: 20px; height: 20px; }
.home-overview-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.home-overview-title {
  color: var(--text-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .35px;
  text-transform: uppercase;
}
.home-overview-main strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.home-overview-main small {
  color: var(--text-muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.home-overview-arrow { color: var(--text-muted); font-size: 23px; transition: color .16s ease, transform .16s ease; }
.home-overview-card:hover .home-overview-arrow { color: var(--accent); transform: translateX(2px); }

/* ---- Link de sección (ej. "Ver catálogo") ---- */
.section-link {
  background: none; border: 0; padding: 2px 0;
  color: var(--accent); font-size: 12.5px; font-weight: 650; cursor: pointer;
  transition: color .16s ease, transform .16s ease;
}
.section-link:hover { color: var(--text); transform: translateX(2px); }

/* ---- "Continuá jugando": fila horizontal de tus juegos con estado ---- */
.continue-strip {
  display: flex; gap: 14px;
  overflow-x: auto; padding: 2px 2px 10px;
  scroll-snap-type: x proximity;
}
.continue-card {
  flex: 0 0 168px; scroll-snap-align: start;
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-md); overflow: hidden; cursor: pointer; text-align: left;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.continue-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--glow); }
.continue-art { position: relative; height: 96px; display: grid; place-items: center; color: #fff; }
.continue-art .gt-mono { font-size: 30px; font-weight: 800; opacity: .9; }
.continue-play {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(0,0,0,.32); opacity: 0; transition: opacity .18s ease;
}
.continue-play svg { width: 40px; height: 40px; padding: 11px; border-radius: 50%; background: var(--accent-grad); color: #fff; }
.continue-card:hover .continue-play { opacity: 1; }
.continue-info { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px 12px; min-width: 0; }
.continue-name {
  color: var(--text); font-size: 13px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.continue-status {
  align-self: flex-start;
  font-size: 10.5px; font-weight: 700; letter-spacing: .3px;
  color: var(--text-dim); background: var(--bg-2);
  border: 1px solid var(--border); border-radius: 20px; padding: 3px 9px;
}
.continue-status[data-state="ready"] { color: #04120c; background: var(--accent); border-color: transparent; }
.continue-status[data-state="update"] { color: #ffd479; border-color: rgba(255,196,77,.45); background: rgba(255,196,77,.12); }
.continue-status[data-state="downloading"] { color: #7fd7ff; border-color: rgba(127,215,255,.45); background: rgba(127,215,255,.12); }
.continue-status[data-state="install"] { color: var(--text); border-color: rgba(0,255,128,.4); background: rgba(0,255,128,.1); }
.continue-status[data-state="unavailable"] { color: var(--text-muted); }

.continue-empty {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 18px 20px;
  background: linear-gradient(145deg, rgba(18,27,23,.96), rgba(11,16,15,.96));
  border: 1px dashed var(--border); border-radius: var(--r-md);
}
.continue-empty-ico {
  flex: 0 0 46px; width: 46px; height: 46px; display: grid; place-items: center;
  color: var(--accent); background: rgba(0,255,128,.09);
  border: 1px solid rgba(0,255,128,.14); border-radius: 13px;
}
.continue-empty-ico svg { width: 24px; height: 24px; }
.continue-empty-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.continue-empty-main strong { color: var(--text); font-size: 14px; font-weight: 700; }
.continue-empty-main small { color: var(--text-muted); font-size: 12px; }
.continue-empty .btn { flex: 0 0 auto; }

/* ---- Filtros del catálogo ---- */
.games-filter { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 7px 14px; border-radius: 20px;
  background: var(--bg-2); border: 1px solid var(--border);
  color: var(--text-dim); font-size: 12.5px; font-weight: 650; cursor: pointer;
  transition: color .16s ease, border-color .16s ease, background .16s ease;
}
.chip:hover { color: var(--text); border-color: rgba(0,255,128,.35); }
.chip.active { color: #04120c; background: var(--accent); border-color: transparent; }

.btn {
  padding: 11px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-primary {
  background: var(--accent);
  color: #04120a;
  box-shadow: 0 4px 18px rgba(0,255,128,0.25);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,0,0,0.2); }
.btn-ghost {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
}
.btn-ghost:hover { background: rgba(255,255,255,0.18); }

.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 4px;
}
.section-title { font-size: 17px; font-weight: 700; }
.section-sub { color: var(--text-dim); font-size: 12px; }

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

.game-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.25s ease;
  cursor: pointer;
  position: relative;
}
.game-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,255,128,0.2);
}
.game-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0,255,128,0.3), 0 12px 32px rgba(0,255,128,0.2);
}
.game-thumb {
  width: 100%;
  aspect-ratio: 16/10;
  background-size: cover;
  background-position: center;
  position: relative;
  display: grid; place-items: center;
}
.game-thumb .play-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.3);
  display: grid; place-items: center;
  opacity: 0;
  transition: opacity 0.2s;
}
.game-card:hover .play-overlay { opacity: 1; }
.play-overlay svg {
  width: 48px; height: 48px;
  background: var(--accent-grad);
  border-radius: 50%;
  padding: 14px;
  color: #fff;
}
.game-body { padding: 14px 16px 16px; }
.game-meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}
.game-genre {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 600;
}
.game-date {
  font-size: 10px; color: var(--text-muted);
}
.game-name {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.2px;
}
.game-desc {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.game-footer {
  display: flex; align-items: center; justify-content: space-between;
}
.game-btn {
  flex: 1;
  padding: 9px 14px;
  border-radius: 8px;
  background: rgba(0,255,128,0.12);
  color: var(--accent);
  font-weight: 600;
  font-size: 12px;
  transition: all 0.2s;
}
.game-btn:hover { background: var(--accent); color: #04120a; }

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.stat-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(0,255,128,0.15);
  color: var(--accent);
  display: grid; place-items: center;
  margin-bottom: 12px;
}
.stat-icon.alt { background: rgba(0,196,106,0.15); color: var(--accent-2); }
.stat-icon.alt2 { background: rgba(253,203,110,0.15); color: var(--warn); }
.stat-icon svg { width: 18px; height: 18px; }
.stat-info { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.stat-label { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; }
.stat-value { font-size: 22px; font-weight: 800; letter-spacing: -0.3px; }
.stat-bar {
  height: 4px; background: var(--bg-2); border-radius: 4px; overflow: hidden; }
.stat-bar span {
  display: block; height: 100%; border-radius: 4px;
}
.stat-bar-1 span { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.stat-bar-2 span { background: linear-gradient(90deg, #7dffb8, #00c46a); }
.stat-bar-3 span { background: linear-gradient(90deg, #fdcb6e, #e17055); }

.content-side { display: flex; flex-direction: column; gap: 16px; }

.side-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.side-card.mini { padding: 18px; }
.side-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.side-title { font-size: 14px; font-weight: 700; }
.side-filter {
  font-size: 11px;
  color: var(--accent);
  background: rgba(0,255,128,0.12);
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 600;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.news-list { display: flex; flex-direction: column; gap: 12px; }
.news-item {
  padding: 12px;
  background: var(--bg-2);
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}
.news-item:hover { border-color: var(--border); }
.news-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  margin-bottom: 8px;
  letter-spacing: 0.3px;
}
.news-tag.update { background: rgba(0,196,106,0.15); color: var(--accent-2); }
.news-tag.event { background: rgba(253,203,110,0.15); color: var(--warn); }
.news-tag.patch { background: rgba(0,255,128,0.15); color: var(--accent); }
.news-tag.dlc { background: rgba(255,107,107,0.15); color: var(--danger); }
.news-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.4;
}
.news-text {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-time {
  font-size: 10px;
  color: var(--text-muted);
}
.news-empty {
  padding: 20px 10px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}

.activity { display: flex; flex-direction: column; gap: 14px; margin-top: 10px; }
.act-item { display: flex; align-items: flex-start; gap: 10px; }
.act-dot {
  width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex-shrink: 0;
}
.dot-green { background: var(--success); }
.dot-blue { background: var(--accent-2); }
.dot-purple { background: var(--accent); }
.act-info { flex: 1; min-width: 0; }
.act-text { font-size: 12px; color: var(--text-dim); line-height: 1.4; display: block; }
.act-time { font-size: 10px; color: var(--text-muted); }

.btn.full { width: 100%; justify-content: center; padding: 13px 22px; font-size: 14px; }

.auth-screen {
  position: fixed; inset: 0; z-index: 50;
  background: radial-gradient(ellipse at 20% 20%, rgba(0,255,128,0.25), transparent 50%),
              radial-gradient(ellipse at 80% 80%, rgba(0,196,106,0.2), transparent 50%),
              var(--bg);
  display: grid; place-items: center;
  padding: 20px;
}
.auth-screen.hidden { display: none; }
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 32px 28px 28px;
  box-shadow: 0 20px 80px rgba(0,0,0,0.5);
}
.auth-logo { text-align: center; margin-bottom: 22px; }
.auth-logo .logo-mark { margin: 0 auto 10px; }
.logo-mark.big {
  width: 64px; height: 64px; border-radius: 18px;
  font-size: 28px;
  box-shadow: 0 8px 30px rgba(0,255,128,0.45);
}
.auth-brand {
  font-size: 22px; font-weight: 800; letter-spacing: -0.3px;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 3px;
}
.auth-sub { color: var(--text-dim); font-size: 12px; }

.auth-tabs {
  display: flex;
  background: var(--bg-2);
  padding: 4px;
  border-radius: 10px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
}
.auth-tab {
  flex: 1; padding: 9px 14px;
  color: var(--text-dim);
  border-radius: 8px;
  font-size: 12px; font-weight: 600;
  transition: all 0.2s;
}
.auth-tab:hover { color: var(--text); }
.auth-tab.active {
  background: var(--accent);
  color: #04120a;
  box-shadow: 0 2px 10px rgba(0,255,128,0.35);
}

.auth-form { display: none; flex-direction: column; gap: 12px; }
.auth-form.active { display: flex; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field-label {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 600;
}
.field input {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,255,128,0.15);
}
.auth-error {
  color: var(--danger);
  font-size: 12px;
  min-height: 16px;
  padding: 2px 2px;
}

/* =============== ACCESO REDISEÑADO (Mundo MiroGames) =============== */

.auth-shell {
  width: 100%;
  max-width: 940px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
}

/* --- Panel de marca (izquierda) --- */
.auth-brand-panel {
  position: relative;
  padding: 34px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 26px;
  border-right: 1px solid var(--border);
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 15% 10%, rgba(0, 255, 128, 0.18), transparent 55%),
    radial-gradient(90% 70% at 100% 100%, rgba(0, 168, 84, 0.22), transparent 60%),
    linear-gradient(160deg, #04120c 0%, #061a12 45%, #04150e 100%);
}
.auth-brand-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 255, 128, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 128, 0.045) 1px, transparent 1px);
  background-size: 34px 34px;
  -webkit-mask-image: radial-gradient(120% 80% at 20% 20%, #000 30%, transparent 80%);
  mask-image: radial-gradient(120% 80% at 20% 20%, #000 30%, transparent 80%);
}
.auth-brand-panel > * { position: relative; z-index: 1; }

.abp-top { display: flex; align-items: center; gap: 14px; }
.abp-brand { display: flex; flex-direction: column; line-height: 1.15; }
.abp-brand-name { font-size: 17px; font-weight: 800; letter-spacing: -0.2px; color: var(--text); }
.abp-brand-sub {
  font-size: 10.5px; font-weight: 700; letter-spacing: 1.6px;
  text-transform: uppercase; color: var(--accent);
}

.abp-mid { display: flex; flex-direction: column; gap: 15px; }
.abp-headline { font-size: 29px; font-weight: 800; line-height: 1.15; letter-spacing: -0.6px; color: var(--text); }
.abp-text { font-size: 13px; line-height: 1.6; color: var(--text-2); max-width: 380px; }

.abp-features { list-style: none; display: flex; flex-direction: column; gap: 14px; margin-top: 4px; }
.abp-features li { display: flex; align-items: flex-start; gap: 12px; }
.abp-ico {
  flex: 0 0 auto;
  width: 36px; height: 36px; border-radius: 11px;
  display: grid; place-items: center;
  color: var(--accent);
  background: rgba(0, 255, 128, 0.1);
  border: 1px solid rgba(0, 255, 128, 0.22);
}
.abp-ico svg { width: 17px; height: 17px; }
.abp-features b { display: block; font-size: 13px; font-weight: 700; color: var(--text); }
.abp-features i { font-style: normal; font-size: 12px; color: var(--text-muted); }

.abp-foot { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.abp-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(0, 255, 128, 0.15);
  animation: abpPulse 2s ease-in-out infinite;
}
@keyframes abpPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(0, 255, 128, 0.15); }
  50% { box-shadow: 0 0 0 7px rgba(0, 255, 128, 0.04); }
}

.logo-mark.xl {
  width: 56px; height: 56px; border-radius: 16px;
  font-size: 26px;
  box-shadow: 0 10px 30px rgba(0, 255, 128, 0.35);
}

/* --- Panel de formulario (derecha) --- */
.auth-form-panel {
  padding: 38px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(180deg, var(--card) 0%, #0d1512 100%);
}
.afp-head { margin-bottom: 20px; }
.afp-title { font-size: 24px; font-weight: 800; letter-spacing: -0.4px; color: var(--text); }
.afp-sub { margin-top: 4px; font-size: 12.5px; color: var(--text-2); }
.afp-legal { margin-top: 18px; font-size: 11px; line-height: 1.5; text-align: center; color: var(--text-muted); }

@media (max-width: 820px) {
  .auth-shell { grid-template-columns: 1fr; max-width: 460px; }
  .auth-brand-panel { display: none; }
  .auth-form-panel { padding: 30px 26px; }
}

/* =============== TARJETA DE PERFIL (cabecera) =============== */
.user-card.ext {
  font-family: inherit;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s;
}
.user-card.ext:hover {
  background: rgba(0, 255, 128, 0.08);
  border-color: rgba(0, 255, 128, 0.35);
}
.user-card-chev {
  margin-left: 2px;
  color: var(--text-2);
  opacity: 0.7;
  transition: transform 0.18s, opacity 0.18s;
}
.user-card.ext:hover .user-card-chev { opacity: 1; transform: translateY(1px); }

/* =============== MODAL DE PERFIL =============== */
.profile-modal {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center;
  padding: 22px;
  overflow: auto;
}
.profile-modal.hidden { display: none; }
.profile-backdrop {
  position: absolute; inset: 0;
  background: rgba(3, 6, 5, 0.72);
  backdrop-filter: blur(6px);
}
.profile-card {
  position: relative;
  width: 100%; max-width: 460px;
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  display: flex; flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.65);
  animation: profileIn 0.22s ease;
}
@keyframes profileIn {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
}
.profile-banner {
  position: relative;
  height: 96px;
  flex-shrink: 0;
  background:
    radial-gradient(120% 140% at 12% 0%, rgba(0, 255, 128, 0.35), transparent 60%),
    linear-gradient(120deg, #04120c 0%, #06432b 60%, #00a854 130%);
}
.profile-close {
  position: absolute; top: 12px; right: 12px;
  width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center;
  color: #d9ffe9;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: background 0.18s;
}
.profile-close:hover { background: rgba(0, 0, 0, 0.55); }

.profile-head {
  min-width: 0;
  margin-top: -38px;
  padding: 0 22px 16px;
  flex-shrink: 0;
  display: flex; align-items: flex-end; gap: 14px;
}
.profile-avatar {
  width: 82px; height: 82px; border-radius: 22px;
  display: grid; place-items: center;
  font-size: 34px; font-weight: 800; color: #04120a;
  background: var(--accent-grad);
  border: 4px solid var(--card);
  box-shadow: 0 8px 26px rgba(0, 255, 128, 0.3);
}
.profile-meta { flex: 1; min-width: 0; padding-bottom: 6px; display: flex; flex-direction: column; gap: 5px; }
.profile-name { min-width: 0; font-size: 20px; font-weight: 800; letter-spacing: -0.3px; line-height: 1.15; overflow-wrap: anywhere; color: var(--text); }
.profile-status { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--accent); }
.ps-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(0, 255, 128, 0.18); }

.profile-body { padding: 0 22px 22px; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; min-height: 0; }
.profile-email {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 9px 12px;
  font-size: 12px; color: var(--text-2);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.profile-email b { color: var(--text); font-weight: 600; }

.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.profile-stat {
  padding: 12px 10px;
  text-align: center;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.ps-val { display: block; font-size: 20px; font-weight: 800; color: var(--accent); }
.ps-lbl { font-size: 10.5px; letter-spacing: 0.6px; text-transform: uppercase; color: var(--text-muted); }

.profile-subhead { font-size: 11px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--text-muted); }
.profile-library { display: flex; flex-wrap: wrap; gap: 8px; }
.profile-game-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 12px; border-radius: 20px;
  font-size: 12px; font-weight: 600; color: var(--text);
  background: rgba(0, 255, 128, 0.08);
  border: 1px solid rgba(0, 255, 128, 0.22);
}
.pgc-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.profile-empty { font-size: 12px; color: var(--text-muted); }

/* ---------- Muro de logros ---------- */
.profile-achievements {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.ach-card {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 13px; border-radius: 13px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.ach-card.on {
  background: linear-gradient(135deg, rgba(0, 255, 128, 0.12), rgba(0, 255, 128, 0.03));
  border-color: rgba(0, 255, 128, 0.35);
  box-shadow: 0 0 0 1px rgba(0, 255, 128, 0.08) inset;
}
.ach-card.on:hover { transform: translateY(-2px); border-color: rgba(0, 255, 128, 0.6); }
.ach-ico {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.05); color: var(--text-muted);
}
.ach-card.on .ach-ico {
  color: #04140b;
  background: linear-gradient(140deg, #4dffa0, #00c06a);
  box-shadow: 0 0 14px rgba(0, 255, 128, 0.35);
}
.ach-card.off .ach-ico { opacity: 0.55; filter: grayscale(1); }
.ach-body { flex: 1; min-width: 0; }
.ach-name { font-size: 13px; font-weight: 700; color: var(--text); }
.ach-card.off .ach-name { color: var(--text-muted); }
.ach-desc { font-size: 11px; color: var(--text-muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ach-bar { margin-top: 6px; height: 4px; border-radius: 3px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.ach-bar > div { height: 100%; border-radius: 3px; background: linear-gradient(90deg, #00c06a, #4dffa0); transition: width 0.3s ease; }

.profile-actions { display: flex; gap: 10px; }
.profile-actions .btn { flex: 1; justify-content: center; }

/* ---------- Extras del perfil: fondo, avatar editable, nivel y XP ---------- */
.auth-note {
  margin: 12px 2px 0;
  font-size: 11.5px;
  line-height: 1.5;
  text-align: center;
  color: var(--text-muted);
}

.pf-tool {
  position: absolute; right: 12px; bottom: 10px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px;
  font-size: 11.5px; font-weight: 600;
  color: #d9ffe9;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.18s;
}
.pf-tool:hover { background: rgba(0, 0, 0, 0.62); }

.profile-avatar-wrap { position: relative; flex: 0 0 auto; }
.profile-avatar { background-position: center; background-size: contain; background-repeat: no-repeat; background-color: var(--bg-2); overflow: hidden; }
.profile-avatar-edit {
  position: absolute; right: -3px; bottom: -3px;
  width: 27px; height: 27px; border-radius: 9px;
  display: grid; place-items: center;
  color: #04120a;
  background: var(--accent);
  border: 3px solid var(--card);
  cursor: pointer;
  transition: transform 0.16s;
}
.profile-avatar-edit:hover { transform: scale(1.08); }

.profile-level-tag {
  align-self: flex-start;
  padding: 4px 11px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.3px;
  color: #04120a;
  background: var(--accent-grad);
  border-radius: 20px;
}

.profile-xp { display: flex; flex-direction: column; gap: 7px; }
.profile-xp-top { display: flex; justify-content: space-between; font-size: 11px; font-weight: 600; color: var(--text-2); }
.profile-xp-bar {
  height: 9px; border-radius: 99px; overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--border);
}
.profile-xp-fill {
  height: 100%; width: 0%;
  border-radius: 99px;
  background: var(--accent-grad);
  box-shadow: 0 0 14px rgba(0, 255, 128, 0.4);
  transition: width 0.35s ease;
}

.profile-bio {
  margin: 0;
  padding: 11px 13px;
  font-size: 12.5px; line-height: 1.5; color: var(--text-2);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.profile-edit {
  display: flex; flex-direction: column; gap: 14px;
  padding: 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.profile-edit.hidden { display: none; }
.banner-picks { display: flex; flex-wrap: wrap; gap: 9px; }
.banner-pick {
  width: 48px; height: 32px; padding: 0;
  border: 2px solid transparent;
  border-radius: 9px;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}
.banner-pick:hover { transform: translateY(-2px); }
.banner-pick.active { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(0, 255, 128, 0.25); }
.profile-edit-actions { display: flex; gap: 10px; }
.profile-edit-actions .btn { flex: 1; justify-content: center; }

.launcher.app-hidden { display: none; }

.game-owned-badge {
  position: absolute;
  top: 10px; left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(0,184,148,0.2);
  color: var(--success);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(0,184,148,0.3);
  z-index: 2;
}
.game-btn.secondary {
  background: var(--bg-2);
  color: var(--text-dim);
  border: 1px solid var(--border);
}
.game-btn.secondary:hover { background: var(--card-hover); color: var(--text); }
.game-card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}
.game-card-actions .game-btn { padding: 8px 10px; font-size: 11px; }
.game-card-actions .game-btn.play { flex: 1; }

.chat-side { display: flex; flex-direction: column; height: 420px; }
.chat-side .side-head { flex-shrink: 0; margin-bottom: 10px; }
.chat-list {
  flex: 1;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px;
  padding: 4px 2px 4px 0;
  margin-bottom: 12px;
  padding-right: 4px;
}
.chat-list::-webkit-scrollbar { width: 6px; }
.chat-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.chat-msg {
  display: flex;
  gap: 9px;
  max-width: 95%;
  align-items: flex-end;
}
.chat-msg.me { align-self: flex-end; flex-direction: row-reverse; }
.chat-avatar {
  width: 30px; height: 30px;
  border-radius: 9px;
  display: grid; place-items: center;
  background: var(--accent-grad);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}
.chat-msg.me .chat-avatar {
  background: linear-gradient(135deg, #00c46a 0%, #00a854 100%);
}
.chat-body {
  background: var(--bg-2);
  border-radius: 12px 12px 12px 4px;
  padding: 8px 11px;
  min-width: 0;
  max-width: 100%;
}
.chat-msg.me .chat-body {
  background: rgba(0,255,128,0.18);
  border-radius: 12px 12px 4px 12px;
  border: 1px solid rgba(0,255,128,0.3);
}
.chat-meta {
  display: flex; align-items: baseline; gap: 6px;
  margin-bottom: 2px;
}
.chat-name { font-size: 11px; font-weight: 700; color: var(--text); }
.chat-msg.me .chat-name { color: var(--accent); }
.chat-time { font-size: 10px; color: var(--text-muted); }
.chat-content {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.45;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.chat-msg.me .chat-content { color: var(--text); }

.chat-input {
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 6px 6px 12px;
  flex-shrink: 0;
  transition: border-color 0.2s;
}
.chat-input:focus-within { border-color: var(--accent); }
.chat-input input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 12px;
  padding: 6px 0;
}
.chat-input input::placeholder { color: var(--text-muted); }
.chat-input button {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: var(--accent-grad);
  color: #fff;
  display: grid; place-items: center;
  transition: transform 0.2s;
}
.chat-input button:hover { transform: scale(1.04); }
.chat-input button svg { width: 16px; height: 16px; }

.chat-empty {
  margin: auto;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  padding: 20px;
}

.toast {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 100;
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  transform: translateY(120%);
  transition: transform 0.25s;
  max-width: 320px;
}
.toast.show { transform: translateY(0); }
.toast.error { border-left-color: var(--danger); }
.toast.success { border-left-color: var(--success); }

@media (max-width: 1100px) {
  .content { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr; }
  .chat-side { height: 320px; }
}
@media (max-width: 768px) {
  .launcher { grid-template-columns: 64px 1fr; padding: 10px; gap: 10px; }
  .header { grid-template-columns: 1fr; padding: 16px; }
  .header-right { justify-content: flex-start; }
  .search { max-width: none; }
  .auth-card { padding: 24px 20px; }
  .friends-layout { grid-template-columns: 1fr !important; }
}

/* =============== FRIENDS / DM NEW STYLES =============== */

.friends-section { display: flex; flex-direction: column; gap: 16px; }

.friends-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 16px;
  min-height: 560px;
}

.friends-pane, .dm-pane {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.friends-pane { overflow: hidden; }

.friends-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 2px 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.count-chip {
  display: inline-block;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  line-height: 20px;
  text-align: center;
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
}
.count-chip.danger { background: var(--danger); }
.count-chip.warn { background: var(--warn); color: #0b100f; }

.friends-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  padding-right: 4px;
  max-height: 260px;
}
.friends-list.compact { max-height: none; flex: 1; }
.friends-list::-webkit-scrollbar { width: 6px; }
.friends-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.friend-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  background: var(--bg-2);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}
.friend-row:hover { border-color: var(--border); background: var(--card-hover); }
.friend-row.active {
  background: rgba(0,255,128,0.12);
  border-color: rgba(0,255,128,0.35);
}
.friend-row .avatar {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--accent-grad);
  color: #fff;
  font-weight: 700;
  display: grid; place-items: center;
  font-size: 13px;
  flex-shrink: 0;
}
.friend-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.friend-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.friend-meta {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.friend-meta .status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
}
.friend-meta .status.pending { background: rgba(253,203,110,0.15); color: var(--warn); }
.friend-meta .status.sent { background: rgba(0,255,128,0.15); color: var(--accent); }
.friend-meta .status.accepted { background: rgba(0,184,148,0.15); color: var(--success); }
.friend-row .count-chip {
  position: absolute;
  top: 8px;
  right: 10px;
}
.friend-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.icon-btn.sm { width: 30px; height: 30px; border-radius: 8px; }
.icon-btn.sm svg { width: 15px; height: 15px; }
.icon-btn.sm.ok { background: rgba(0,184,148,0.12); color: var(--success); border-color: rgba(0,184,148,0.25); }
.icon-btn.sm.ok:hover { background: var(--success); color: #fff; }
.icon-btn.sm.bad { background: rgba(255,107,107,0.12); color: var(--danger); border-color: rgba(255,107,107,0.25); }
.icon-btn.sm.bad:hover { background: var(--danger); color: #fff; }
.icon-btn.sm.neutral { background: var(--bg-2); color: var(--text-dim); }
.icon-btn.sm.neutral:hover { background: var(--card-hover); color: var(--text); }

.mini-btn {
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.mini-btn.primary { background: var(--accent); color: #04120a; }
.mini-btn.primary:hover { filter: brightness(1.08); }
.mini-btn.ghost { background: var(--bg-2); color: var(--text-dim); border: 1px solid var(--border); }
.mini-btn.ghost:hover { background: var(--card-hover); color: var(--text); }
.mini-btn.danger { background: rgba(255,107,107,0.12); color: var(--danger); border: 1px solid rgba(255,107,107,0.2); }
.mini-btn.danger:hover { background: var(--danger); color: #fff; }

.dm-head-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.dm-head-actions .mini-btn svg { flex: 0 0 auto; }

.search-results {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}
.search-result {
  padding: 9px 10px;
  border-radius: 10px;
  background: var(--bg-2);
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  transition: all 0.15s;
}
.search-result:hover { border-color: var(--border); background: var(--card-hover); }
.search-result .avatar {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--accent-grad);
  color: #fff;
  font-weight: 700;
  display: grid; place-items: center;
  font-size: 13px;
}
.search-result-info { flex: 1; min-width: 0; }
.search-result-info .u-name { font-size: 13px; font-weight: 600; }
.search-result-info .u-rel { font-size: 10px; color: var(--text-muted); display: inline-flex; align-items: center; gap: 4px; }
.search-result-info .u-rel.incoming { color: var(--warn); }
.search-result-info .u-rel.friend { color: var(--success); }
.search-result-info .u-rel.outgoing { color: var(--accent); }

.dm-pane { overflow: hidden; }
.dm-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
  flex-shrink: 0;
}
.dm-head.with-chat { justify-content: space-between; }
.dm-empty-state {
  margin: auto;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 40px 20px;
}
.dm-user-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.dm-user-info .avatar {
  width: 40px; height: 40px;
  border-radius: 11px;
  background: var(--accent-grad);
  color: #fff;
  font-weight: 700;
  display: grid; place-items: center;
  font-size: 15px;
  flex-shrink: 0;
}
.dm-user-info .names { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dm-user-info .names .nm { font-size: 14px; font-weight: 700; }
.dm-user-info .names .st { font-size: 11px; color: var(--text-dim); }

.chat-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-2);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border);
  margin-bottom: 8px;
}
.chat-tab {
  flex: 1;
  position: relative;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.chat-tab:hover { color: var(--text); }
.chat-tab.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 10px rgba(0,255,128,0.35);
}
.chat-tab-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.side-head.small { margin-bottom: 10px; padding-bottom: 0; border: 0; }
.side-title.sm { font-size: 13px; }
.notif-dot.tiny { width: 6px; height: 6px; top: 7px; right: 7px; border-width: 1px; }

.side-head.small {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

/* =============== GLOBAL CHAT LARGE (MAIN SECTION) =============== */

#chatSection { display: flex; flex-direction: column; gap: 14px; min-height: 0; height: clamp(520px, calc(100vh - 230px), 960px); }

.chat-side.large {
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: 0;
  flex: 1 1 auto;
}

.chat-list.big {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  padding: 18px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-y: auto;
}
.chat-list.big::-webkit-scrollbar { width: 10px; }
.chat-list.big::-webkit-scrollbar-track { background: transparent; }
.chat-list.big::-webkit-scrollbar-thumb { background: var(--border); border-radius: 5px; }
.chat-list.big .chat-msg { max-width: 72%; }
.chat-list.big .chat-avatar { width: 38px; height: 38px; font-size: 14px; border-radius: 11px; }
.chat-list.big .chat-name { font-size: 14px; }
.chat-list.big .chat-time { font-size: 11px; }
.chat-list.big .chat-content {
  padding: 12px 14px;
  border-radius: 12px 12px 12px 3px;
  font-size: 14px;
  line-height: 1.55;
}
.chat-list.big .chat-msg.me .chat-content { border-radius: 12px 12px 3px 12px; }

.chat-input.big { margin-top: 12px; position: sticky; bottom: 0; z-index: 6; box-shadow: 0 -18px 30px -22px rgba(0, 0, 0, .85); }
.chat-input.big input {
  font-size: 15px;
  padding: 14px 18px;
  border-radius: 14px;
}
.chat-input.big button {
  padding: 0 20px;
  border-radius: 14px;
}
.chat-input.big button svg { width: 20px; height: 20px; }

/* =============== NEW LAYOUT: GAMES RAIL SIDEBAR + EXT HEADER =============== */

.launcher {
  grid-template-columns: 92px 1fr !important;
  gap: 0 !important;
}

.sidebar { display: none; }

.games-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px 10px;
  background: linear-gradient(180deg, rgba(16, 23, 21, 0.92) 0%, rgba(8, 13, 12, 0.96) 100%);
  border-right: 1px solid var(--border);
  backdrop-filter: blur(12px);
  height: 100vh;
  position: sticky;
  top: 0;
  overflow: hidden;
}

.rail-logo {
  margin-bottom: 14px;
  padding-bottom: 12px;
  width: 100%;
  display: flex;
  justify-content: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.logo-mark.rail {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  font-size: 20px;
  font-weight: 900;
  box-shadow: 0 8px 24px rgba(0, 255, 128, 0.35);
}

.rail-games {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  flex: 1;
  width: 100%;
  padding-top: 6px;
}

.game-tile {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  position: relative;
  transition: transform 0.2s ease;
  width: 100%;
  display: flex;
  justify-content: center;
  outline: none;
}
.game-tile:hover { transform: translateY(-2px); }

.game-tile-art {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}
.game-tile-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.15), rgba(255,255,255,0) 45%);
  pointer-events: none;
}

.game-tile:hover .game-tile-art {
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45), 0 0 0 2px rgba(0,255,128,0.5), 0 0 24px rgba(0,255,128,0.25);
  transform: scale(1.03);
}

.game-tile.active .game-tile-art {
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.5), 0 0 0 2px #00ff80, 0 0 28px rgba(0,255,128,0.45);
}
.game-tile.active::after {
  content: "";
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 32px;
  background: var(--primary);
  border-radius: 0 4px 4px 0;
}

.rail-footer {
  margin-top: auto;
  padding-top: 12px;
  width: 100%;
  display: flex;
  justify-content: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.rail-btn {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  color: var(--text-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.rail-btn:hover {
  background: rgba(0, 255, 128, 0.12);
  color: var(--accent);
  border-color: rgba(0, 255, 128, 0.35);
}
.rail-btn.active {
  background: rgba(0, 255, 128, 0.16);
  color: var(--accent);
  border-color: rgba(0, 255, 128, 0.45);
}

/* =============== NEW HEADER: EXT WITH NAV BUTTONS =============== */

.header { display: none !important; }

.header-ext {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 22px;
  background: linear-gradient(180deg, rgba(14,20,18,0.92) 0%, rgba(9,13,12,0.8) 100%);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.hleft {
  display: flex;
  align-items: center;
  min-width: 200px;
}
.brand-block { display: flex; flex-direction: column; gap: 2px; }
.brand-title {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #00ff80, #7dffb8, #00c46a);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-sub {
  font-size: 12px;
  color: var(--text-2);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.hcenter {
  flex: 1;
  display: flex;
  justify-content: center;
  max-width: 700px;
  margin: 0 auto;
  position: relative;
}

.search.ext {
  width: 100%;
  max-width: 560px;
  margin: 0;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 10px 16px;
  transition: all 0.2s;
}
.search.ext:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,255,128,0.18);
  background: rgba(255,255,255,0.05);
}

/* Panel de resultados de la busqueda global: aparece debajo del buscador
   mientras se escribe, con juegos y usuarios que coinciden. */
.global-search-results {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 560px;
  max-height: 58vh;
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(0,0,0,0.55);
  padding: 8px;
  z-index: 80;
  flex-direction: column;
  gap: 3px;
}
.gsr-group {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  padding: 8px 8px 3px;
}
.gsr-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  width: 100%;
  text-align: left;
  color: var(--text);
  font: inherit;
  transition: all 0.13s;
}
.gsr-item:hover,
.gsr-item.active {
  background: var(--card-hover);
  border-color: var(--border);
}
.gsr-ico {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--bg-2);
  color: var(--primary);
  flex: 0 0 auto;
}
.gsr-body { flex: 1; min-width: 0; }
.gsr-title {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gsr-sub {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gsr-empty {
  padding: 14px;
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
}

.hright {
  display: flex;
  align-items: center;
  gap: 10px;
}

.divider-v {
  width: 1px;
  height: 28px;
  background: var(--border);
  margin: 0 4px;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--text-2);
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.2s;
  position: relative;
  white-space: nowrap;
}
.nav-btn:hover {
  background: rgba(255,255,255,0.07);
  color: var(--text);
  border-color: rgba(255,255,255,0.14);
}
.nav-btn.active {
  background: rgba(0,255,128,0.18);
  border-color: rgba(0,255,128,0.45);
  color: #fff;
  box-shadow: 0 6px 18px rgba(0,255,128,0.25);
}
.nav-btn.chat.active {
  background: rgba(0,255,128,0.16);
  border-color: rgba(0,255,128,0.42);
  color: #d9ffe9;
  box-shadow: 0 6px 18px rgba(0,255,128,0.22);
}
.nav-btn.friends.active {
  background: rgba(0,255,128,0.16);
  border-color: rgba(0,255,128,0.42);
  color: #d9ffe9;
  box-shadow: 0 6px 18px rgba(0,255,128,0.22);
}

.nbtn-label { font-size: 13px; font-weight: 600; }

.nbtn-dot {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 9px;
  height: 9px;
  background: #ef4444;
  border: 2px solid var(--bg-1);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.8);
}

.nbtn-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #ef4444;
  color: #fff;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-1);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
}

.icon-btn.ext {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.03);
  color: var(--text-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  position: relative;
}
.icon-btn.ext:hover {
  background: rgba(255,255,255,0.07);
  color: var(--text);
  border-color: rgba(255,255,255,0.14);
}
.icon-btn.ext.active {
  background: rgba(0,255,128,0.18);
  border-color: rgba(0,255,128,0.4);
  color: #fff;
}

.user-card.ext {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 12px 5px 5px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  cursor: default;
}
.avatar.big {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 800;
}
.user-card.ext .user-info { display: flex; flex-direction: column; line-height: 1.15; }
.user-card.ext .user-name { font-size: 13px; font-weight: 700; }
.user-card.ext .user-role { font-size: 11px; color: var(--text-2); }

/* =============== CONTENT MAIN WIDE =============== */

.main { grid-template-rows: auto 1fr !important; }

.content-main.wide { padding: 24px 26px !important; }

.library-section, .settings-section { display: flex; flex-direction: column; gap: 20px; }

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.setting-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
}
.setting-card h4 { font-size: 16px; margin-bottom: 6px; }
.setting-card p { color: var(--text-2); font-size: 13px; margin-bottom: 16px; line-height: 1.5; }
.setting-card .btn + .btn { margin-top: 8px; }

.shortcut-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 2px 0 0;
  padding: 0;
}
.shortcut-list li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.shortcut-list li em {
  font-style: normal;
  color: var(--text-2);
  margin-left: auto;
}
.kbd {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 24px;
  padding: 0 7px;
  border-radius: 6px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: inset 0 -2px 0 rgba(0,0,0,0.35);
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
}

/* =============== GAME DETAIL SECTION =============== */

.game-detail { display: flex; flex-direction: column; gap: 18px; min-height: 0; }

.gdetail-hero {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  min-height: 280px;
  padding: 36px 34px;
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  display: flex;
  align-items: flex-end;
}
.gdetail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 30%, rgba(255,255,255,0.12), transparent 60%),
              linear-gradient(180deg, transparent 30%, rgba(0,0,0,0.55) 100%);
  pointer-events: none;
}
.gdetail-overlay {
  position: absolute;
  inset: 0;
  backdrop-filter: blur(2px);
  pointer-events: none;
}
.gdetail-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: #fff;
  max-width: 820px;
}

.gdetail-tag {
  display: inline-flex;
  align-self: flex-start;
  padding: 5px 12px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #fff;
}

.gdetail-title {
  font-size: 42px;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin: 0;
  line-height: 1.1;
  text-shadow: 0 6px 20px rgba(0,0,0,0.5);
}

.gdetail-genre {
  font-size: 14px;
  margin: 0;
  color: rgba(255,255,255,0.82);
  font-weight: 500;
}

.gdetail-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  padding-top: 8px;
}
.gstat { display: flex; flex-direction: column; gap: 2px; }
.gstat-label {
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  font-weight: 700;
}
.gstat-val {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
}

.gdetail-actions {
  display: flex;
  gap: 12px;
  padding-top: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.gdetail-media-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding-top: 6px;
}

.gdetail-volume {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 14px;
  background: rgba(0,0,0,0.38);
  border: 1px solid rgba(255,255,255,0.16);
  backdrop-filter: blur(10px);
}

.gdetail-volume span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: rgba(255,255,255,0.86);
}

.gdetail-volume input[type="range"] {
  width: 140px;
  accent-color: #8b5cf6;
}

.gdetail-hero.media-hero::before {
  background:
    linear-gradient(90deg, rgba(5,8,15,0.88) 0%, rgba(5,8,15,0.55) 42%, rgba(5,8,15,0.82) 100%),
    radial-gradient(circle at 78% 22%, rgba(255,255,255,0.12), transparent 38%),
    linear-gradient(180deg, transparent 30%, rgba(0,0,0,0.65) 100%);
}

.btn.big {
  padding: 12px 20px !important;
  font-size: 14px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  border-radius: 14px !important;
  font-weight: 700 !important;
}

.gdetail-tabs {
  display: flex;
  gap: 6px;
  padding: 6px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  width: fit-content;
}
.gdetail-tab {
  padding: 9px 18px;
  border: none;
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}
.gdetail-tab:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.gdetail-tab.active {
  background: linear-gradient(135deg, rgba(0,255,128,0.28), rgba(0,168,84,0.35));
  color: #eafff3;
  box-shadow: 0 4px 14px rgba(0,255,128,0.25);
}

.gdetail-tabcontent {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gdetail-desc p {
  font-size: 15px;
  line-height: 1.75;
  white-space: normal;
  color: var(--text);
  background: var(--bg-2);
  padding: 22px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  margin: 0;
}

.gdetail-features {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
}
.gdetail-features h4 {
  margin: 0 0 14px 0;
  font-size: 15px;
}
.gdetail-features ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px 24px;
}
.gdetail-features li {
  padding: 10px 12px 10px 32px;
  position: relative;
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.5;
}
.gdetail-features li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 10px;
  width: 18px;
  height: 18px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 11px 11px no-repeat,
    linear-gradient(135deg, #10b981, #34d399);
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(16,185,129,0.35);
}

.news-item.large {
  padding: 20px 22px !important;
  border-radius: var(--radius-lg) !important;
  background: var(--bg-2) !important;
  border: 1px solid var(--border) !important;
  box-shadow: none !important;
}
.news-item.large .news-title { font-size: 16px !important; margin: 10px 0 8px !important; }
.news-item.large .news-text { font-size: 13.5px !important; line-height: 1.65 !important; }
.news-item.large .news-time { font-size: 11.5px !important; margin-top: 12px !important; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.gallery-item {
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 10px 28px rgba(0,0,0,0.3);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.gallery-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(0,0,0,0.4), 0 0 0 2px rgba(0,255,128,0.3);
}
.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.18), transparent 45%, rgba(0,0,0,0.55));
  pointer-events: none;
}
.gallery-tag {
  position: absolute;
  bottom: 12px;
  left: 14px;
  z-index: 2;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  background: rgba(0,0,0,0.5);
  border-radius: 8px;
  backdrop-filter: blur(4px);
}

/* ---------- Galería social (capturas de la comunidad) ---------- */
.gallery-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.gallery-hint { font-size: 12.5px; color: var(--text-muted); }
.gallery-empty { grid-column: 1 / -1; padding: 34px 16px; text-align: center; color: var(--text-muted); font-size: 13px; border: 1px dashed var(--border); border-radius: 14px; }

.shot-card { position: relative; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: #0b0d12; box-shadow: 0 10px 28px rgba(0,0,0,.3); }
.shot-img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; transition: transform .3s ease; }
.shot-card:hover .shot-img { transform: scale(1.05); }
.shot-grad { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.55), transparent 38%, transparent 55%, rgba(0,0,0,.72)); pointer-events: none; }
.shot-author { position: absolute; top: 10px; left: 12px; font-size: 11.5px; font-weight: 700; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.8); }
.shot-bottom { position: absolute; bottom: 9px; left: 10px; right: 10px; display: flex; align-items: center; gap: 8px; }
.shot-like, .shot-cbtn, .shot-del { display: inline-flex; align-items: center; gap: 5px; border: none; cursor: pointer; font-size: 12px; font-weight: 700; color: #fff; background: rgba(0,0,0,.5); padding: 5px 10px; border-radius: 9px; backdrop-filter: blur(4px); transition: background .15s ease, color .15s ease; }
.shot-like:hover, .shot-cbtn:hover, .shot-del:hover { background: rgba(0,0,0,.72); }
.shot-like.on { color: #ff5b7f; }
.shot-like .sl-ico, .shot-like .sl-ico svg, .shot-cbtn svg, .shot-del svg { width: 15px; height: 15px; display: inline-flex; }
.shot-del { margin-left: auto; }
.shot-del:hover { color: #ff6b6b; }

/* Visor de capturas (lightbox) */
.shot-viewer { position: fixed; inset: 0; z-index: 400; display: flex; align-items: center; justify-content: center; }
.shot-viewer.hidden { display: none !important; }
.sv-backdrop { position: absolute; inset: 0; background: rgba(3,5,9,.82); backdrop-filter: blur(6px); }
.sv-panel { position: relative; z-index: 2; display: flex; width: min(1120px, 94vw); height: min(720px, 92vh); background: var(--panel, #12151c); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.sv-close { position: absolute; top: 10px; right: 12px; z-index: 3; width: 32px; height: 32px; border-radius: 50%; border: none; cursor: pointer; background: rgba(0,0,0,.55); color: #fff; font-size: 14px; }
.sv-stage { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; background: #05070b; }
.sv-stage img { max-width: 100%; max-height: 100%; object-fit: contain; }
.sv-side { width: 340px; flex: 0 0 340px; display: flex; flex-direction: column; border-left: 1px solid var(--border); }
.sv-head { padding: 16px 18px 10px; border-bottom: 1px solid var(--border); }
.sv-author { font-size: 14px; font-weight: 700; color: var(--text); }
.sv-when { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.sv-caption { padding: 12px 18px; font-size: 13px; color: var(--text); }
.sv-likerow { display: flex; align-items: center; gap: 10px; padding: 0 18px 12px; border-bottom: 1px solid var(--border); }
.sv-like { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: transparent; color: var(--text); cursor: pointer; font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 9px; }
.sv-like .sv-heart { color: var(--text-muted); }
.sv-like.on { border-color: rgba(255,91,127,.6); color: #ff5b7f; }
.sv-like.on .sv-heart { color: #ff5b7f; }
.sv-del { margin-left: auto; background: transparent; border: none; color: #ff6b6b; cursor: pointer; font-size: 12.5px; font-weight: 700; }
.sv-comments { flex: 1; overflow-y: auto; padding: 12px 18px; display: flex; flex-direction: column; gap: 10px; }
.sv-empty { color: var(--text-muted); font-size: 12.5px; }
.sv-comment { font-size: 13px; line-height: 1.35; }
.svc-name { font-weight: 700; color: var(--accent); margin-right: 6px; }
.svc-text { color: var(--text); word-break: break-word; }
.sv-form { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--border); }
.sv-form input { flex: 1; background: rgba(255,255,255,.04); border: 1px solid var(--border); border-radius: 9px; padding: 9px 12px; color: var(--text); font-size: 13px; }

/* =============== NUBE DE GUARDADOS (cloud saves) =============== */

.cloud-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 22px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.cloud-loading { font-size: 13.5px; color: var(--text-muted); padding: 4px 0; }
.cloud-note {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-2);
  background: rgba(255,255,255,0.03);
  border: 1px dashed var(--border);
  border-radius: var(--r-sm);
  padding: 12px 14px;
}
.cloud-note b { color: var(--text); }
.cloud-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.cloud-title { font-size: 16px; font-weight: 800; color: var(--text); }
.cloud-auto {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
}
.cloud-auto input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.cloud-status {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13.5px;
  color: var(--text);
}
.cloud-row { display: flex; align-items: center; gap: 9px; }
.cloud-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--text-muted);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.05);
}
.cloud-dot.on { background: var(--accent); box-shadow: 0 0 0 3px rgba(0,255,128,0.18); }
.cloud-dim { color: var(--text-muted); font-size: 12.5px; }
.cloud-paths { display: flex; flex-wrap: wrap; gap: 7px; }
.cloud-chip {
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(0,255,128,0.22);
  border-radius: 8px;
  padding: 4px 10px;
  word-break: break-all;
}
.cloud-edit { display: flex; flex-direction: column; gap: 10px; }
.cloud-edit textarea {
  width: 100%;
  min-height: 78px;
  resize: vertical;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  color: var(--text);
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1.5;
}
.cloud-edit textarea:focus { outline: none; border-color: var(--accent); }
.cloud-edit-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cloud-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}
.cloud-actions .btn:disabled,
.cloud-actions .btn-danger:disabled { opacity: .45; cursor: not-allowed; }
.cloud-actions .btn:disabled:hover,
.cloud-actions .btn-danger:disabled:hover { transform: none; box-shadow: none; filter: none; }
.btn-danger {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  border-color: transparent;
  color: #fff;
}
.btn-danger:hover { filter: brightness(1.08); }

/* =============== COLA DE DESCARGAS =============== */

.dl-queue { position: fixed; right: 18px; top: 74px; z-index: 9500; }
.dl-queue.hidden { display: none; }
.dlq-card {
  width: min(420px, 94vw);
  background: linear-gradient(165deg, #12141c, #0b0d14);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0,0,0,.6);
  color: var(--text);
  overflow: hidden;
}
.dlq-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; cursor: move; touch-action: none; user-select: none;
  background: rgba(255,255,255,.03);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.dlq-ico {
  width: 30px; height: 30px; flex: 0 0 auto; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #2f7bff, #1b4fd6); color: #fff;
}
.dlq-titles { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dlq-title { font-size: 13px; font-weight: 700; }
.dlq-sub { font-size: 11px; opacity: .65; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dlq-min, .dlq-close {
  background: transparent; border: 1px solid rgba(255,255,255,.14); color: var(--text);
  width: 26px; height: 26px; border-radius: 8px; cursor: pointer; line-height: 1;
  display: flex; align-items: center; justify-content: center; font-size: 13px; padding: 0;
}
.dlq-min:hover, .dlq-close:hover { background: rgba(255,255,255,.08); }
.dlq-body { padding: 12px 14px 14px; }
.dlq-agg { margin-bottom: 12px; }
.dlq-aggbar { height: 8px; border-radius: 99px; background: rgba(255,255,255,.1); overflow: hidden; }
.dlq-aggbar span { display: block; height: 100%; width: 0%; border-radius: 99px; background: linear-gradient(90deg, #2f7bff, #35e0ff); transition: width .3s; }
.dlq-aggmeta { display: flex; justify-content: space-between; font-size: 11px; opacity: .7; margin-top: 6px; }
.dlq-list { display: flex; flex-direction: column; gap: 10px; max-height: 46vh; overflow-y: auto; }
.dlq-empty { font-size: 13px; opacity: .6; padding: 10px 0; text-align: center; }
.dlq-item { background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 10px 12px; }
.dlq-item.done { border-color: rgba(53,224,140,.35); }
.dlq-item.error { border-color: rgba(255,90,90,.4); }
.dlq-item.paused { border-color: rgba(255,196,64,.35); }
.dlq-item-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dlq-item-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dlq-item-pct { font-size: 11px; opacity: .7; flex: 0 0 auto; }
.dlq-item.done .dlq-item-pct { color: #35e08c; opacity: 1; font-weight: 700; }
.dlq-item-bar { height: 6px; border-radius: 99px; background: rgba(255,255,255,.1); overflow: hidden; margin: 8px 0 6px; }
.dlq-item-bar span { display: block; height: 100%; width: 0%; border-radius: 99px; background: linear-gradient(90deg, #2f7bff, #35e0ff); transition: width .3s; }
.dlq-item.paused .dlq-item-bar span { background: linear-gradient(90deg, #b9821f, #ffc440); }
.dlq-item.error .dlq-item-bar span { background: linear-gradient(90deg, #8a2020, #ff5a5a); }
.dlq-item-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; opacity: .72; }
.dlq-item-msg { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dlq-item-speed { flex: 0 0 auto; opacity: .85; }
.dlq-item-actions { display: flex; gap: 8px; margin-top: 9px; }
.dlq-act {
  flex: 1; padding: 6px 10px; border-radius: 9px; cursor: pointer; font-size: 12px; font-weight: 600;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); color: var(--text);
}
.dlq-act:hover { background: rgba(255,255,255,.12); }
.dlq-act.go { background: linear-gradient(135deg, #2f7bff, #1b4fd6); border-color: transparent; color: #fff; }
.dlq-act.danger { background: rgba(255,90,90,.14); border-color: rgba(255,90,90,.4); color: #ff9a9a; }
.dlq-foot { margin-top: 12px; display: flex; justify-content: flex-end; }

/* =============== HOME NEWS FEED =============== */

.news-feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.news-item.flat {
  display: grid !important;
  grid-template-columns: auto 1fr auto !important;
  align-items: center !important;
  gap: 14px !important;
  padding: 12px 16px !important;
  background: var(--bg-2) !important;
  border: 1px solid var(--border) !important;
  border-radius: 14px !important;
  box-shadow: none !important;
  margin: 0 !important;
  flex-direction: row !important;
}
.news-item.flat .news-tag {
  position: static !important;
  margin: 0 !important;
}
.news-item.flat .news-tag.sm { padding: 4px 10px; font-size: 10.5px; }
.news-item.flat .news-title.sm { font-size: 14px; margin: 0 0 2px 0; }
.news-item.flat .news-text.sm { font-size: 12.5px; color: var(--text-2); margin: 0; }
.news-item.flat .news-time.sm { margin: 0; color: var(--text-2); font-size: 11px; }

/* =============== LOGIN REMEMBER ME =============== */

.remember-me {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 2px 10px 2px;
  user-select: none;
  cursor: pointer;
  font-size: 13.5px;
  color: var(--text-2);
  font-weight: 500;
}
.remember-me input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}
.remember-me:hover { color: var(--text); }

/* =============== RESPONSIVE TWEAKS =============== */

@media (max-width: 1280px) {
  .gdetail-title { font-size: 32px; }
  .nbtn-label { display: none; }
  .nav-btn { padding: 9px 11px; }
}
@media (max-width: 1080px) {
  .launcher { grid-template-columns: 80px 1fr !important; }
  .game-tile-art { width: 52px; height: 52px; border-radius: 15px; }
  .user-card.ext .user-info { display: none; }
  .search.ext { max-width: 360px; }
}
@media (max-width: 860px) {
  .home-overview { grid-template-columns: 1fr; }
  .home-overview-card { min-height: 82px; }
  .continue-card { flex-basis: 152px; }
  .continue-empty { flex-wrap: wrap; }
}

/* =============== LAYOUT OVERRIDE: NO SIDE PANEL =============== */
.content { grid-template-columns: 1fr !important; }
.content-side { display: none !important; }

.launcher.in-call { padding-bottom: 84px; }
body.in-call .launcher { padding-bottom: 84px; }

/* =============== DRAWER (RIGHT FLOATING PANEL) =============== */
.dm-drawer {
  position: fixed;
  inset: 0;
  z-index: 900;
  pointer-events: none;
  display: flex;
  justify-content: flex-end;
}
.dm-drawer .drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5,5,10,0.45);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 240ms ease;
  pointer-events: none;
}
.dm-drawer.open { pointer-events: auto; }
.dm-drawer.open .drawer-backdrop { opacity: 1; pointer-events: auto; }
.dm-drawer .drawer-panel {
  position: relative;
  width: 380px;
  max-width: 92vw;
  height: 100%;
  background: linear-gradient(180deg, #12121c 0%, #0e0e17 100%);
  border-left: 1px solid var(--border);
  box-shadow: -24px 0 64px rgba(0,0,0,0.55);
  transform: translateX(104%);
  transition: transform 300ms cubic-bezier(.22,1,.36,1);
  display: flex;
  flex-direction: column;
  color: var(--text);
}
.dm-drawer.open .drawer-panel { transform: translateX(0); }

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 10px;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}
.drawer-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
}
.drawer-actions { display: flex; align-items: center; gap: 6px; }
.drawer-icon-btn {
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: 150ms ease;
  font-size: 14px;
}
.drawer-icon-btn:hover { background: rgba(255,255,255,0.08); border-color: #3b3b55; }
.drawer-icon-btn.primary { background: rgba(0,255,128,0.18); border-color: rgba(0,255,128,0.5); }

.drawer-body { flex: 1; overflow-y: auto; padding: 10px 12px 12px; }
.drawer-body::-webkit-scrollbar { width: 8px; }
.drawer-body::-webkit-scrollbar-thumb { background: #2a2a40; border-radius: 8px; }

.drawer-section { display: none; flex-direction: column; gap: 10px; }
.drawer-section.active { display: flex; }
.drawer-section[style*="display: flex"],
.drawer-section[style*="flex"] { display: flex; }

.drawer-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 4px 0;
}
.drawer-subhead h4 { font-size: 12px; letter-spacing: .5px; text-transform: uppercase; color: var(--text-dim); font-weight: 700; }

.drawer-friends, .drawer-requests {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 2px 0 8px;
}
.drawer-friend-row {
  width: 100%;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
  border: 1px solid transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: 160ms ease;
}
.drawer-friend-row:hover {
  background: rgba(0,255,128,0.1);
  border-color: rgba(0,255,128,0.3);
  transform: translateX(-2px);
}
.dfr-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dfr-name { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.dfr-last { font-size: 12px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dfr-actions { display: flex; gap: 4px; }

.mini-btn {
  height: 28px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
}
.mini-btn:hover { background: rgba(255,255,255,0.08); }
.mini-btn.ghost { background: transparent; }
.mini-btn.primary { background: var(--accent); border-color: transparent; }
.mini-btn.danger { background: rgba(239,68,68,0.2); border-color: rgba(239,68,68,0.4); color: #fecaca; }
.mini-btn.call { color: #86efac; border-color: rgba(34,197,94,0.35); }
.mini-btn.call:hover { background: rgba(34,197,94,0.15); }

.count-chip {
  background: #ef4444;
  color: #fff;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  min-width: 18px;
  height: 18px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.4);
}
.count-chip.sm { line-height: 16px; min-width: 16px; height: 16px; font-size: 10px; padding: 0 6px; }
.count-chip.purple { background: var(--accent); }

.empty-sm {
  text-align: center;
  padding: 22px 10px;
  color: var(--text-dim);
  font-size: 13px;
  border: 1px dashed #2d2d42;
  border-radius: 10px;
  background: rgba(255,255,255,0.015);
}

/* DM inside drawer */
.drawer-dm-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 12px;
  border-bottom: 1px solid var(--border);
}
.drawer-dm-user { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.drawer-dm-name { font-weight: 700; }
.drawer-dm-status { font-size: 12px; color: var(--text-dim); }

.drawer-dm-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 280px;
}
.drawer-dm-form {
  padding: 10px 12px 14px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  align-items: center;
  background: rgba(0,0,0,0.15);
}
.drawer-dm-form input,
.drawer-dm-form textarea {
  flex: 1;
  background: #0a0a11;
  color: var(--text);
  border: 1px solid #26263c;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 13px;
  font-family: inherit;
  resize: none;
  outline: none;
}
.drawer-dm-form input:focus, .drawer-dm-form textarea:focus { border-color: rgba(0,255,128,0.6); }
.drawer-dm-form button {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 10px;
  height: 36px;
  padding: 0 14px;
  cursor: pointer;
  font-weight: 600;
}

/* =============== CALL BAR =============== */
.call-bar {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 850;
  min-height: 64px;
  padding: 10px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(30,16,50,0.95) 0%, rgba(14,10,28,0.97) 100%);
  border: 1px solid rgba(0,255,128,0.55);
  box-shadow: 0 12px 40px rgba(0,0,0,0.6), inset 0 0 0 1px rgba(255,255,255,0.03);
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--text);
  backdrop-filter: blur(8px);
  overflow: hidden;
}
.call-video-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  align-items: stretch;
  min-height: 0;
  max-height: 240px;
  padding: 4px 2px 0;
}
.call-video-strip:empty { display: none; }
.call-video {
  flex: 0 0 auto;
  width: 220px;
  max-width: 36vw;
  min-height: 124px;
  border-radius: 14px;
  background: #060609;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.06);
}
.call-video video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #060609;
}
.call-video .cv-tag {
  position: absolute;
  left: 8px;
  bottom: 8px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  backdrop-filter: blur(6px);
}
.call-video.cam-off::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='1' y1='1' x2='23' y2='23'/%3E%3Cpath d='M21 21H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h2m4-3h4l2 3h6a2 2 0 0 1 2 2v9'/%3E%3Ccircle cx='12' cy='13' r='3'/%3E%3C/svg%3E") center / 40px 40px no-repeat;
  opacity: 0.45;
}
.call-video.sharing-screen { border-color: rgba(0,255,128,0.5); box-shadow: 0 0 0 2px rgba(0,255,128,0.3), 0 10px 30px rgba(0,0,0,0.55); }
.call-video.sharing-screen video { object-fit: contain; background: #000; }
.call-bar-inner {
  display: grid;
  grid-template-columns: 260px 1fr auto;
  align-items: center;
  gap: 16px;
}
.call-bar-left { display: flex; align-items: center; gap: 10px; }
.call-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34,197,94,0.7);
  animation: callPulse 1.6s infinite;
}
@keyframes callPulse {
  0% { box-shadow: 0 0 0 0 rgba(34,197,94,0.7); }
  70% { box-shadow: 0 0 0 12px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}
.call-name { font-weight: 700; font-size: 14px; }
.call-timer { font-size: 12px; color: var(--text-dim); font-variant-numeric: tabular-nums; }

.call-participants {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-start;
  max-height: 52px;
  overflow: hidden;
}
.call-participant {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  font-size: 12px;
  max-width: 170px;
}
.call-participant .cp { width: 28px; height: 28px; font-size: 12px; }
.call-participant.muted { opacity: 0.7; }
.call-participant.speaking .avatar.sm.cp {
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.9), 0 0 18px 2px rgba(34, 197, 94, 0.45);
  transform: translateY(-1px);
}
.call-participant.speaking::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px; height: 18px;
  border-radius: 3px;
  background: linear-gradient(180deg, #22c55e, #10b981);
  animation: speakingPulse 0.7s ease-in-out infinite alternate;
}
@keyframes speakingPulse {
  from { opacity: 0.35; height: 10px; }
  to { opacity: 1; height: 20px; }
}
.cp-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-mute { font-size: 12px; display: inline-flex; align-items: center; opacity: 0.85; }
.cp-screen { display: inline-flex; align-items: center; color: var(--accent); opacity: 0.95; }

.call-controls, .call-bar-right { display: flex; align-items: center; gap: 8px; }
.call-btn, .call-action {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: 150ms ease;
}
.call-btn:hover, .call-action:hover { background: rgba(255,255,255,0.09); transform: translateY(-1px); }
.call-btn.muted, .call-action.muted { background: rgba(239,68,68,0.2); border-color: rgba(239,68,68,0.4); color: #fecaca; }
.call-btn.sharing, .call-action.sharing { background: rgba(0,255,128,0.22); border-color: rgba(0,255,128,0.55); color: #b9ffd8; box-shadow: 0 0 0 3px rgba(0,255,128,0.12); }
.call-btn.primary, .call-action.primary { background: rgba(0,255,128,0.25); border-color: rgba(0,255,128,0.5); }
.call-btn.danger, .call-action.danger {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  border-color: transparent;
  color: #fff;
  width: 48px;
  border-radius: 24px;
  box-shadow: 0 6px 18px rgba(239,68,68,0.35);
}
.call-btn svg, .call-action svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* =============== SELECTOR DE DISPOSITIVOS (llamada) =============== */
.call-device-panel {
  position: fixed;
  right: 14px;
  bottom: 96px;
  z-index: 860;
  width: 310px;
  max-width: calc(100vw - 28px);
  padding: 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(30,16,50,0.98) 0%, rgba(14,10,28,0.99) 100%);
  border: 1px solid rgba(0,255,128,0.55);
  box-shadow: 0 16px 46px rgba(0,0,0,0.65), inset 0 0 0 1px rgba(255,255,255,0.03);
  color: var(--text);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.call-device-panel .cdp-head {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.cdp-row { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.cdp-ico {
  width: 34px; height: 34px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: rgba(0,255,128,0.16);
  border: 1px solid rgba(0,255,128,0.35);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--accent-2);
}
.cdp-ico svg { width: 17px; height: 17px; }
.cdp-field { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cdp-lbl { font-size: 11px; color: var(--text-dim); }
.cdp-field select {
  width: 100%;
  padding: 7px 9px;
  border-radius: 9px;
  background: #12121c;
  color: var(--text);
  border: 1px solid var(--border);
  font-size: 12.5px;
  outline: none;
  cursor: pointer;
}
.cdp-field select:focus { border-color: rgba(0,255,128,0.7); }
.cdp-field select:disabled { opacity: 0.55; cursor: default; }
.cdp-field select option { background: #12121c; color: var(--text); }
.cdp-hint { font-size: 11px; color: var(--text-dim); line-height: 1.35; }
.cdp-hint:empty { display: none; }

/* =============== MEZCLADOR DE AUDIO (llamada) =============== */
.call-mixer-panel {
  position: fixed;
  right: 14px;
  bottom: 96px;
  z-index: 862;
  width: 330px;
  max-width: calc(100vw - 28px);
  max-height: 62vh;
  overflow-y: auto;
  padding: 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(30,16,50,0.98) 0%, rgba(14,10,28,0.99) 100%);
  border: 1px solid rgba(0,255,128,0.55);
  box-shadow: 0 16px 46px rgba(0,0,0,0.65), inset 0 0 0 1px rgba(255,255,255,0.03);
  color: var(--text);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cmx-head { display: flex; align-items: center; justify-content: space-between; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim); }
.cmx-close { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 15px; line-height: 1; padding: 2px 4px; }
.cmx-close:hover { color: var(--text); }
.cmx-row { display: flex; align-items: center; gap: 8px; }
.cmx-name { flex: 1; min-width: 0; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmx-mute {
  width: 30px; height: 30px; flex: 0 0 auto;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: 150ms ease;
}
.cmx-mute svg { width: 15px; height: 15px; }
.cmx-mute.muted { background: rgba(239,68,68,0.22); border-color: rgba(239,68,68,0.45); color: #fecaca; }
.cmx-row input[type="range"] { flex: 2; min-width: 0; accent-color: #00ff80; cursor: pointer; }
.cmx-val { flex: 0 0 40px; text-align: right; font-size: 11px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.cmx-foot { border-top: 1px solid var(--border); padding-top: 9px; margin-top: 2px; }

/* =============== LLAMADA ENTRANTE (PC) =============== */
.call-ring {
  position: fixed;
  inset: 0;
  z-index: 960;
  display: grid;
  place-items: center;
  background: rgba(4, 6, 5, 0.62);
  backdrop-filter: blur(4px);
  animation: callRingFade 200ms ease;
}
.call-ring.hidden { display: none; }
.call-ring-card {
  width: 340px;
  max-width: 92vw;
  padding: 28px 26px 22px;
  border-radius: 22px;
  text-align: center;
  background: linear-gradient(135deg, rgba(16,30,24,0.98) 0%, rgba(8,12,10,0.99) 100%);
  border: 1px solid rgba(0,255,128,0.5);
  box-shadow: 0 24px 70px rgba(0,0,0,0.7), inset 0 0 0 1px rgba(255,255,255,0.04);
  color: var(--text);
  animation: callRingPop 260ms cubic-bezier(.22,1,.36,1);
}
.call-ring-pulse {
  width: 92px;
  height: 92px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  box-shadow: 0 0 0 0 rgba(0,255,128,0.45);
  animation: callRingPulse 1.8s ease-out infinite;
}
.call-ring-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 30px;
  font-weight: 800;
  color: #04120a;
  background: var(--accent-grad);
  overflow: hidden;
}
.call-ring-title { font-size: 19px; font-weight: 800; margin-bottom: 4px; }
.call-ring-sub { font-size: 13px; color: var(--text-2); margin-bottom: 22px; }
.call-ring-actions { display: flex; gap: 12px; justify-content: center; }
.call-ring-btn {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, box-shadow 140ms ease;
}
.call-ring-btn svg { width: 24px; height: 24px; }
.call-ring-btn:hover { transform: translateY(-2px); }
.call-ring-btn.accept {
  background: var(--accent-grad);
  color: #04120a;
  border-color: transparent;
  box-shadow: 0 10px 26px rgba(0,255,128,0.35);
}
.call-ring-btn.decline {
  background: rgba(239,68,68,0.2);
  border-color: rgba(239,68,68,0.45);
  color: #fecaca;
}
.call-ring-btn.decline:hover { background: rgba(239,68,68,0.32); }
@keyframes callRingFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes callRingPop { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: scale(1); } }
@keyframes callRingPulse {
  0% { box-shadow: 0 0 0 0 rgba(0,255,128,0.40); }
  70% { box-shadow: 0 0 0 22px rgba(0,255,128,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,255,128,0); }
}

/* =============== STACKED TOASTS =============== */
.toasts-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 340px;
  max-width: 90vw;
  pointer-events: none;
}
.stacked-toast {
  pointer-events: auto;
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(20,15,40,0.97) 0%, rgba(10,8,22,0.97) 100%);
  border: 1px solid var(--border);
  box-shadow: 0 12px 36px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.03);
  color: var(--text);
  text-align: left;
  transform: translateX(110%);
  opacity: 0;
  transition: transform 320ms cubic-bezier(.22,1,.36,1), opacity 280ms ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  width: 100%;
  font-family: inherit;
}
.stacked-toast::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--accent);
}
.stacked-toast.in { transform: translateX(0); opacity: 1; }
.stacked-toast.dm::before { background: linear-gradient(180deg,#00ff80,#00c46a); }
.stacked-toast.call::before { background: linear-gradient(180deg,#22c55e,#0ea5e9); }
.stacked-toast.error::before { background: #ef4444; }
.stacked-toast.success::before { background: #22c55e; }
.stacked-toast.warning::before { background: #ffc24b; }

.st-icon {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  font-size: 18px;
  overflow: hidden;
}
.st-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.st-title { font-weight: 700; font-size: 13px; }
.st-text { font-size: 12px; color: var(--text-dim); line-height: 1.35; word-break: break-word; }
.st-close {
  width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 6px;
  font-size: 16px;
  line-height: 1;
}
.st-close:hover { background: rgba(255,255,255,0.06); color: var(--text); }

/* =============== TUNNELS (VPN juegos sin abrir puertos) =============== */
.tunnels-section { padding: 22px 0 60px 0; }
.tunnels-toolbar {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin: 8px 0 18px;
}
.tunnels-hint {
  flex: 1;
  background: rgba(0,255,128,0.08);
  border: 1px solid rgba(0,255,128,0.28);
  color: var(--text-dim);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 12.5px;
  line-height: 1.55;
}
.tunnels-hint code {
  font-family: ui-monospace, Consolas, Menlo, monospace;
  background: rgba(0,0,0,0.35);
  border-radius: 5px;
  padding: 1px 5px;
  color: #c7d2fe;
}
.tunnels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}
.tunnel-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.01));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .18s, transform .18s;
}
.tunnel-card:hover { border-color: rgba(0,255,128,0.55); transform: translateY(-1px); }
.tc-head { display:flex; align-items:center; gap:10px; }
.tc-icon {
  width: 38px; height: 38px; border-radius: 10px;
  display:inline-flex; align-items:center; justify-content:center;
  font-size: 20px;
  background: linear-gradient(145deg, rgba(0,255,128,0.25), rgba(14,165,233,0.18));
  border: 1px solid rgba(0,255,128,0.35);
}
.tc-meta { display:flex; flex-direction:column; gap:2px; flex:1; min-width:0; }
.tc-name { font-weight: 700; font-size: 14px; display:flex; align-items:center; gap:8px; }
.tc-mode-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; font-weight: 600;
  padding: 2px 8px; border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
}
.tc-mode-badge.host { background: rgba(34,197,94,0.11); border-color: rgba(34,197,94,0.35); color: #86efac; }
.tc-mode-badge.client { background: rgba(14,165,233,0.11); border-color: rgba(14,165,233,0.35); color: #7dd3fc; }
.tc-sub { font-size: 11.5px; color: var(--text-dim); display:flex; gap:8px; flex-wrap:wrap; }
.tc-body { display:flex; flex-direction: column; gap:6px; font-size: 12px; color: var(--text-dim); }
.tc-row { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.tc-row span:first-child { opacity: 0.75; }
.tc-row.tc-err {
  justify-content: flex-start;
  align-items: flex-start;
  gap: 6px;
  padding: 7px 9px;
  border-radius: 8px;
  color: #fca5a5;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.25);
  font-size: 11.5px;
  line-height: 1.35;
}
.tc-row.tc-err svg { margin-top: 1px; }
.tc-row code {
  font-family: ui-monospace, Consolas, Menlo, monospace;
  background: rgba(0,0,0,0.3);
  padding: 2px 6px; border-radius: 5px;
  color: #e9d5ff;
}
.tc-status {
  display:inline-flex; align-items:center; gap:6px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 11.5px;
  background: rgba(0,0,0,0.28);
  border: 1px solid var(--border);
}
.tc-status .dot { width:8px; height:8px; border-radius:50%; background:#6b7280; }
.tc-status.on .dot { background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,0.18); }
.tc-status.on { border-color: rgba(34,197,94,0.45); color: #86efac; background: rgba(34,197,94,0.07); }
.tc-status.err .dot { background: #ef4444; box-shadow: 0 0 0 4px rgba(239,68,68,0.16); }
.tc-status.err { border-color: rgba(239,68,68,0.4); color: #fca5a5; background: rgba(239,68,68,0.07); }
.tc-actions { display:flex; align-items:center; gap:6px; flex-wrap: wrap; }
.btn.tiny { padding: 6px 10px; font-size: 12px; }
.field { display:flex; flex-direction: column; gap:6px; }
.field > span { font-size: 12px; color: var(--text-dim); font-weight: 600; }
.field input, .field select {
  width: 100%;
  background: rgba(0,0,0,0.25);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 13px;
  outline: none;
  transition: border-color .15s;
}
.field input:focus, .field select:focus { border-color: var(--accent); }
.field-hint { font-size: 11.5px; color: var(--text-muted); }
.segmented {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: rgba(0,0,0,0.22);
  border: 1px solid var(--border);
  border-radius: 11px;
}
.segmented .seg {
  flex: 1;
  padding: 7px 10px;
  font-size: 12.5px;
  border-radius: 9px;
  border: none;
  color: var(--text-dim);
  background: transparent;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.segmented .seg.active {
  background: linear-gradient(145deg, var(--accent), #0ea5e9);
  color: white;
  box-shadow: 0 6px 20px -10px rgba(0,255,128,0.75);
}
.modal-card.small-elev { width: min(620px, 92vw); }

.modal {
  position: fixed;
  inset: 0;
  z-index: 950;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal.open { display: flex; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3,3,10,0.6);
  backdrop-filter: blur(4px);
}
.modal-panel {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 86vh;
  border-radius: 18px;
  background: linear-gradient(180deg, #18122c 0%, #0d0b1c 100%);
  border: 1px solid rgba(0,255,128,0.45);
  box-shadow: 0 30px 80px rgba(0,0,0,0.7), inset 0 0 0 1px rgba(255,255,255,0.04);
  display: flex;
  flex-direction: column;
  color: var(--text);
  overflow: hidden;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.modal-head h3 { font-size: 15px; font-weight: 700; }
.modal-body { padding: 14px 18px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
.modal-foot {
  padding: 12px 18px 16px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,0.25);
}
.search.modal {
  background: #0a0a14;
  border: 1px solid #2a2a44;
  color: var(--text);
  padding: 9px 12px;
  border-radius: 10px;
  width: 100%;
  font-size: 13px;
}
.search.modal:focus { outline: none; border-color: rgba(0,255,128,0.6); }

.invite-list {
  display: flex; flex-direction: column; gap: 6px;
  max-height: 340px; overflow-y: auto;
  padding: 2px;
}
.invite-list::-webkit-scrollbar { width: 8px; }
.invite-list::-webkit-scrollbar-thumb { background: #2a2a40; border-radius: 8px; }

.invite-row {
  display: grid;
  grid-template-columns: auto 36px 1fr;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  cursor: pointer;
  transition: 150ms ease;
  color: var(--text);
}
.invite-row:hover { background: rgba(255,255,255,0.05); }
.invite-row.selected {
  background: rgba(0,255,128,0.14);
  border-color: rgba(0,255,128,0.55);
}
.invite-row.in-call { opacity: 0.6; }
.invite-row input[type="checkbox"] { accent-color: var(--accent); cursor: pointer; width: 16px; height: 16px; }
.invite-meta { display: flex; flex-direction: column; gap: 2px; }
.invite-name { font-weight: 600; font-size: 13px; }
.invite-chip {
  align-self: flex-start;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 999px;
  background: rgba(0,255,128,0.2);
  color: #c4b5fd;
}

.btn {
  height: 36px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: 150ms ease;
}
.btn:hover { background: rgba(255,255,255,0.09); }
.btn.primary { background: var(--accent); border-color: transparent; color: #04120a; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { background: linear-gradient(135deg,#ef4444,#b91c1c); border-color: transparent; color: #fff; }
.btn .count-chip { margin-left: 6px; }

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-grad);
  color: white;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.avatar.sm { width: 32px; height: 32px; font-size: 12px; }
.avatar.lg { width: 48px; height: 48px; font-size: 16px; }
.avatar img, .chat-avatar img, .user-card-avatar img, .profile-avatar img {
  width: 100%; height: 100%; object-fit: contain; background: var(--bg-2); border-radius: inherit; display: block;
}

/* ================= COSMÉTICOS Y TIENDA (v2) ================= */
.profile-name-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.profile-badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 999px;
  font-size: 9.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
  color: #04120a; background: var(--accent-grad);
}
.profile-badge.hidden { display: none; }
.profile-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.coins-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 11px; border-radius: 999px;
  background: rgba(255, 201, 77, 0.14); border: 1px solid rgba(255, 201, 77, 0.34);
  font-weight: 800; font-size: 12px; color: #ffd980;
}
.coins-pill.big { padding: 8px 14px; font-size: 14px; }
.coins-pill .coin-ico { display: grid; place-items: center; color: #ffc94d; }
.coins-pill .coin-ico svg { width: 16px; height: 16px; }
.mini-link {
  margin-left: 8px; padding: 0; border: none; background: none;
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: none;
  color: var(--accent); cursor: pointer;
}
.mini-link:hover { text-decoration: underline; }
.hidden-color {
  position: absolute; left: -9999px; top: 0; width: 1px; height: 1px;
  opacity: 0; pointer-events: none;
}
.swatch-row { display: flex; flex-wrap: wrap; gap: 9px; }
.swatch {
  width: 34px; height: 34px; border-radius: 10px;
  border: 2px solid transparent; position: relative; cursor: pointer;
  display: grid; place-items: center; color: #dbe7ff; font-size: 12px; font-weight: 800;
  transition: transform .15s, border-color .15s;
}
.swatch:hover { transform: translateY(-2px); }
.swatch.on { border-color: #fff; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3); }
.frame-row { display: flex; flex-wrap: wrap; gap: 10px; }
.frame-opt {
  width: 45px; height: 45px; border-radius: 14px;
  border: 2px solid var(--border); background: var(--bg-2);
  display: grid; place-items: center; font-size: 14px; font-weight: 800; color: var(--text);
  cursor: pointer; transition: transform .15s, border-color .15s;
}
.frame-opt:hover { transform: translateY(-2px); }
.frame-opt.on { border-color: var(--accent); }
.badge-row { display: flex; flex-wrap: wrap; gap: 8px; }
.badge-opt {
  padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 700;
  color: var(--text-2); background: var(--card); border: 1px solid var(--border); cursor: pointer;
  transition: filter .15s;
}
.badge-opt:hover { filter: brightness(1.15); }
.badge-opt.on { color: #04120a; background: var(--accent-grad); border-color: transparent; }
.badge-opt.locked { opacity: .5; }

/* Marcos de avatar (cosméticos) */
.avf-green { box-shadow: 0 0 0 3px #00e07a, 0 0 14px rgba(0, 224, 122, .55); }
.avf-gold { box-shadow: 0 0 0 3px #ffc94d, 0 0 16px rgba(255, 201, 77, .6); }
.avf-blue { box-shadow: 0 0 0 3px #3f8cff, 0 0 16px rgba(63, 140, 255, .6); }
.avf-pink { box-shadow: 0 0 0 3px #ff4d94, 0 0 16px rgba(255, 77, 148, .6); }
.avf-ice { box-shadow: 0 0 0 3px #7fe7ff, 0 0 18px rgba(127, 231, 255, .7); }
.avf-fire { box-shadow: 0 0 0 3px #ff7a1a, 0 0 18px rgba(255, 122, 26, .7); }
.avf-rainbow { box-shadow: 0 0 0 3px #b06bff, 0 0 18px rgba(176, 107, 255, .7); }

/* Insignia en listas / chat */
.chat-badge {
  display: inline-flex; align-items: center; margin-left: 6px;
  padding: 1px 7px; border-radius: 999px;
  font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: #04120a; background: var(--accent-grad); vertical-align: middle;
}

/* --- Insignias premium: metalico biselado con brillo --- */
.chat-badge, .profile-badge, .badge-opt.on {
  position: relative;
  border: 1px solid rgba(255, 255, 255, .28);
  text-shadow: 0 1px 1px rgba(0, 0, 0, .45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 -2px 3px rgba(0, 0, 0, .3), 0 1px 4px rgba(0, 0, 0, .4);
}
.chat-badge::before, .profile-badge::before, .badge-opt.on::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, .6) 0%, rgba(255, 255, 255, 0) 42%, rgba(255, 255, 255, 0) 60%, rgba(255, 255, 255, .38) 100%);
  mix-blend-mode: screen;
}
.badge-beta {
  color: #08251b; background: linear-gradient(180deg, #c8ffe9, #3ee0a0 46%, #0f9b6c 100%);
  border-color: #c8ffe8; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 0 9px rgba(62, 224, 160, .55);
}
.badge-vip {
  color: #2b1c00; background: linear-gradient(180deg, #fff2c2, #f3c33b 44%, #bb8210 78%, #7c5203 100%);
  border-color: #ffeeb0; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 0 11px rgba(243, 195, 59, .6);
}
.badge-fundador {
  color: #eef4ff; background: linear-gradient(180deg, #e6efff, #9dbdff 38%, #3f6fd6 72%, #16367f 100%);
  border-color: #d5e4ff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 0 13px rgba(90, 145, 255, .65);
}
.badge-leyenda {
  color: #fff2f8; background: linear-gradient(180deg, #ffd6ec, #ff62b6 40%, #b2136f 74%, #4a0633 100%);
  border-color: #ffc9e5; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75), 0 0 16px rgba(255, 80, 180, .7);
  animation: badgeLegendPulse 2.4s ease-in-out infinite;
}
@keyframes badgeLegendPulse {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75), 0 0 12px rgba(255, 80, 180, .55); }
  50% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75), 0 0 22px rgba(255, 80, 180, .95); }
}

/* ---------- Tienda ---------- */
.modal-panel.store-card {
  max-width: 720px;
  background: var(--card);
  border: 1px solid var(--border);
}
.store-top {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  padding: 18px 20px 14px; border-bottom: 1px solid var(--border);
}
.store-top-left h3 { font-size: 17px; font-weight: 800; letter-spacing: -.2px; }
.store-sub { margin-top: 3px; font-size: 12px; color: var(--text-2); }
.store-top-right { display: flex; align-items: center; gap: 10px; }
.store-tabs { display: flex; gap: 8px; padding: 12px 20px 4px; }
.st-tab {
  padding: 8px 16px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  color: var(--text-2); background: var(--bg-2); border: 1px solid var(--border); cursor: pointer;
  transition: filter .15s;
}
.st-tab:hover { filter: brightness(1.15); }
.st-tab.active { color: #04120a; background: var(--accent-grad); border-color: transparent; }
.store-body { padding: 12px 20px 4px; overflow-y: auto; max-height: 60vh; }
.store-body::-webkit-scrollbar { width: 8px; }
.store-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; }
.store-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.store-item {
  position: relative; display: flex; flex-direction: column; gap: 8px;
  padding: 12px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--border);
  transition: border-color .15s, transform .15s;
}
.store-item:hover { border-color: rgba(0, 255, 128, 0.35); transform: translateY(-2px); }
.store-item .si-thumb {
  height: 78px; border-radius: 10px; display: grid; place-items: center;
  background: var(--card); overflow: hidden;
}
.store-item .si-thumb img { width: 100%; height: 100%; object-fit: cover; }
.si-emoji { font-size: 32px; }
.si-name { font-size: 13.5px; font-weight: 700; }
.si-desc { font-size: 11.5px; color: var(--text-2); line-height: 1.35; min-height: 30px; }
.si-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.si-price { display: inline-flex; align-items: center; gap: 5px; font-weight: 800; color: #ffd980; font-size: 13.5px; }
.si-price .coin-ico { display: grid; place-items: center; color: #ffc94d; }
.si-price .coin-ico svg { width: 14px; height: 14px; }
.si-buy { padding: 7px 13px; border-radius: 9px; font-size: 12.5px; font-weight: 700; background: var(--accent-grad); color: #04120a; cursor: pointer; }
.si-buy:disabled { cursor: default; }
.si-buy.owned { background: rgba(0, 224, 122, 0.16); color: var(--accent-2); }
.si-buy.equipped { background: var(--bg-2); color: var(--text-muted); border: 1px solid var(--border); }
.si-rare {
  position: absolute; top: 9px; right: 9px;
  font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  padding: 3px 8px; border-radius: 999px;
}
.rare-common { background: rgba(255, 255, 255, 0.12); color: #cfd6df; }
.rare-rare { background: rgba(63, 140, 255, 0.22); color: #9cc4ff; }
.rare-epic { background: rgba(176, 107, 255, 0.22); color: #d5b3ff; }
.rare-legendary { background: rgba(255, 201, 77, 0.24); color: #ffd980; }
.store-empty { grid-column: 1 / -1; text-align: center; color: var(--text-muted); padding: 34px 16px; }
.store-foot { padding: 10px 20px 16px; border-top: 1px solid var(--border); background: rgba(0, 0, 0, 0.2); }
.store-note { font-size: 11.5px; color: var(--text-muted); }

/* =============== PC SOCIAL INBOX REDESIGN =============== */
#friendsSection { min-height: 100%; }
.social-section-head { align-items: center; }
.social-start-call svg { width: 17px; height: 17px; }
.social-layout {
  grid-template-columns: minmax(310px, 350px) minmax(0, 1fr);
  height: clamp(500px, calc(100vh - 235px), 900px);
  min-height: 500px;
}
.social-sidebar,
.social-chat-pane {
  padding: 0;
  gap: 0;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(18, 29, 25, .98), rgba(11, 16, 15, .99));
  border-color: rgba(130, 170, 150, .13);
  box-shadow: 0 16px 45px rgba(0, 0, 0, .2);
}
.social-sidebar { min-width: 0; }
.social-sidebar-intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 20px 18px 15px;
}
.social-sidebar-intro h3 { font-size: 16px; letter-spacing: -.2px; }
.social-sidebar-intro p { color: var(--text-muted); font-size: 11px; line-height: 1.45; margin-top: 4px; }
.social-online-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  color: #a9d8bd;
  background: rgba(0, 224, 122, .07);
  font-size: 10px;
}
.social-online-indicator i {
  width: 7px; height: 7px; border-radius: 50%;
  background: #20d98b; box-shadow: 0 0 10px rgba(32, 217, 139, .6);
}
.social-sidebar > .search {
  width: auto;
  max-width: none;
  margin: 0 16px 12px !important;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(3, 9, 7, .52);
}
.social-sidebar > .search input { font-size: 12px; }
.social-sidebar > .search-results:empty { display: none; }
.social-sidebar > .search-results:not(:empty) {
  margin: 0 14px 10px;
  max-height: 190px;
  overflow-y: auto;
}
.social-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin: 0 14px;
  padding: 4px;
  border: 1px solid rgba(130, 170, 150, .12);
  border-radius: 12px;
  background: rgba(2, 7, 5, .45);
}
.social-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  padding: 9px 5px;
  border-radius: 9px;
  color: #84968c;
  font-size: 11px;
  font-weight: 700;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}
.social-tab:hover { color: var(--text); background: rgba(255,255,255,.035); }
.social-tab.active {
  color: #eafff3;
  background: linear-gradient(135deg, rgba(0, 224, 122, .18), rgba(0, 120, 70, .12));
  box-shadow: inset 0 0 0 1px rgba(0, 224, 122, .2);
}
.social-tab-count {
  display: inline-flex;
  min-width: 17px;
  height: 17px;
  justify-content: center;
  align-items: center;
  padding: 0 5px;
  border-radius: 999px;
  color: #052012;
  background: #45e49a;
  font-size: 9px;
  font-weight: 800;
}
.social-tab-count.warn { color: #2a1900; background: #ffc24b; }
.social-list-panel {
  display: none;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 12px 10px 8px;
}
.social-list-panel.active { display: flex; }
.social-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 7px 10px;
  color: #9aaca2;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.social-list-hint { color: #5f7067; font-size: 9px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.friends-list.social-conversation-list,
.friends-list.social-request-list {
  display: flex;
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  padding: 0 3px 8px;
  gap: 5px;
}
.friends-list.social-request-list { flex: 0 1 235px; max-height: 235px; }
.friends-list.social-request-list.outgoing-list { flex: 0 1 150px; max-height: 150px; }
.social-conversation {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 9px 9px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.social-conversation:hover {
  background: rgba(255,255,255,.035);
  border-color: rgba(130,170,150,.12);
}
.social-conversation.active {
  background: linear-gradient(100deg, rgba(0, 224, 122, .12), rgba(0, 224, 122, .035));
  border-color: rgba(0, 224, 122, .2);
}
.social-conversation.has-unread { background: rgba(0, 224, 122, .045); }
.social-conversation.has-unread .social-conversation-name { color: #effff5; font-weight: 800; }
.social-conversation > .avatar {
  width: 42px; height: 42px; border-radius: 13px; font-size: 14px;
}
.social-conversation-body { flex: 1; min-width: 0; }
.social-conversation-top,
.social-conversation-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.social-conversation-name {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #d7e4dc;
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.social-conversation-top time { flex: 0 0 auto; color: #687a70; font-size: 9px; }
.social-conversation-preview {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #7e9186;
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.social-conversation.has-unread .social-conversation-preview { color: #c0d9ca; }
.social-unread-pill {
  flex: 0 0 auto;
  min-width: 18px;
  padding: 2px 6px;
  border-radius: 999px;
  color: #062012;
  background: #38dd91;
  text-align: center;
  font-size: 9px;
  font-weight: 900;
}
.social-conversation-actions { display: flex; gap: 4px; opacity: .72; transition: opacity .14s ease; }
.social-conversation:hover .social-conversation-actions,
.social-conversation:focus-within .social-conversation-actions { opacity: 1; }
.social-conversation-actions .icon-btn { width: 27px; height: 27px; background: rgba(3, 9, 7, .5); }
.social-list-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  margin: auto 8px;
  padding: 22px 14px;
  border: 1px dashed rgba(130, 170, 150, .17);
  border-radius: 13px;
  color: #809188;
  text-align: center;
}
.social-list-empty-icon {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  margin-bottom: 3px;
  border-radius: 12px;
  color: #61dba0;
  background: rgba(0, 224, 122, .09);
}
.social-list-empty strong { color: #c4d4ca; font-size: 12px; }
.social-list-empty > span:last-child { max-width: 220px; font-size: 10px; line-height: 1.5; }
.social-request-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 10px;
  border: 1px solid rgba(255,194,75,.14);
  border-radius: 12px;
  background: linear-gradient(100deg, rgba(255,194,75,.055), rgba(255,255,255,.012));
}
.social-request-card > .avatar { width: 39px; height: 39px; border-radius: 12px; }
.social-request-info { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 3px; }
.social-request-info strong { overflow: hidden; color: #e7eee9; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.social-request-info > span { color: #89988f; font-size: 10px; }
.social-request-actions { display: flex; flex: 0 0 auto; gap: 5px; }
.social-request-actions .mini-btn { height: 30px; font-size: 10px; }
.social-outgoing-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 6px 9px;
  border: 1px solid rgba(130,170,150,.1);
  border-radius: 10px;
  background: rgba(255,255,255,.015);
  color: #829188;
  font-size: 10px;
}
.social-outgoing-row .avatar { width: 30px; height: 30px; border-radius: 9px; font-size: 11px; }
.social-outgoing-row > span { flex: 1; min-width: 0; }
.social-outgoing-row strong { color: #c2d0c8; }
.social-outgoing-empty { padding: 5px 7px 10px; color: #5f7067; font-size: 10px; }
.outgoing-heading { margin-top: 12px; border-top: 1px solid rgba(130,170,150,.1); padding-top: 14px; }
.social-chat-pane { min-width: 0; }
.social-chat-pane .dm-head {
  min-height: 76px;
  padding: 16px 20px;
  margin: 0;
  border-bottom: 1px solid rgba(130,170,150,.12);
  background: rgba(255,255,255,.012);
}
.social-empty-state { max-width: 510px; gap: 12px; }
.social-empty-icon {
  display: grid;
  place-items: center;
  width: 68px; height: 68px;
  margin: 0 auto 4px;
  border: 1px solid rgba(0,224,122,.19);
  border-radius: 22px;
  color: #55db98;
  background: radial-gradient(circle at 30% 20%, rgba(0,224,122,.18), rgba(0,224,122,.035));
  box-shadow: 0 12px 36px rgba(0,0,0,.2);
}
.social-empty-icon svg { width: 30px; height: 30px; }
.social-empty-eyebrow { color: #63d99f; font-size: 9px; font-weight: 900; letter-spacing: .16em; }
.social-empty-state h2 { max-width: 380px; color: #e6f2ea; font-size: 22px; letter-spacing: -.5px; }
.social-empty-state p { max-width: 390px; color: #7d9085; line-height: 1.65; }
.social-empty-shortcuts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
}
.social-empty-shortcuts > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid rgba(130,170,150,.1);
  border-radius: 9px;
  background: rgba(255,255,255,.018);
  color: #899a90;
  font-size: 9px;
}
.social-empty-shortcuts b { color: #082515; background: #55db98; border-radius: 50%; width: 17px; height: 17px; display: grid; place-items: center; }
.social-empty-shortcuts strong { color: #c6d7cc; }
.social-chat-pane > .chat-list {
  flex: 1;
  min-height: 0;
  max-height: none;
  margin: 0;
  padding: 18px 22px;
  background: transparent;
}
.social-chat-pane > .chat-input {
  margin: 12px 18px 16px;
  padding: 8px 8px 8px 14px;
  border-radius: 12px;
}
.social-chat-pane > .chat-input input { font-size: 13px; }
@media (max-width: 1060px) {
  .social-layout { grid-template-columns: minmax(280px, 320px) minmax(0, 1fr); }
  .social-conversation-actions { opacity: 1; }
  .social-conversation-actions .icon-btn { width: 24px; height: 24px; }
}
@media (max-width: 760px) {
  .social-layout { height: auto; min-height: 0; grid-template-columns: 1fr; }
  .social-sidebar { min-height: 540px; }
  .social-chat-pane { min-height: 480px; }
  .social-section-head { align-items: flex-start; }
  .social-start-call { padding: 0 10px; font-size: 11px; }
  .social-request-card { flex-wrap: wrap; }
  .social-request-actions { width: 100%; justify-content: flex-end; }
}

/* =============== CHAT REGIONAL + ROLES MIROGAMES =============== */

/* --- Cabecera de chat con píldora de región --- */
.chat-head-ext { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.chat-region-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 12px; border-radius: 12px; flex-shrink: 0;
  background: var(--bg-2); border: 1px solid var(--border);
  transition: border-color .2s, background .2s; text-align: left;
}
.chat-region-pill:hover { border-color: rgba(0,255,128,0.5); background: var(--card-hover); }
.chat-region-pill .crp-ico {
  width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent);
}
.chat-region-pill .crp-text { display: flex; flex-direction: column; line-height: 1.15; }
.chat-region-pill .crp-label { font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.chat-region-pill .crp-value { font-size: 13px; font-weight: 700; color: var(--text); }
.chat-region-pill .crp-edit { font-size: 10px; font-weight: 700; color: var(--accent); padding-left: 9px; border-left: 1px solid var(--border); }

/* --- Tabs global/regional --- */
.chat-tabs .chat-tab { flex-direction: column; gap: 2px; padding: 9px 12px; }
.chat-tab svg { width: 16px; height: 16px; }
.chat-tab em { font-style: normal; font-size: 10px; font-weight: 600; opacity: .72; }
.chat-tab.active em { opacity: .92; }

.chat-scope-note {
  font-size: 11.5px; line-height: 1.45; color: var(--text-dim);
  padding: 8px 12px; border-radius: 10px; margin-bottom: 10px;
  border: 1px solid var(--border); background: var(--bg-2);
}
.chat-scope-note b { color: var(--text); }
.chat-scope-note.region { border-color: rgba(0,255,128,0.3); background: rgba(0,255,128,0.06); }

/* --- Insignia de staff (MiroGames) --- */
.staff-chip {
  display: inline-flex; align-items: center; gap: 4px;
  margin-left: 6px; padding: 1px 7px; border-radius: 999px;
  font-size: 9px; font-weight: 800; letter-spacing: .06em;
  color: #fff; background: linear-gradient(135deg, #ff3b30, #b3160c);
  vertical-align: middle; box-shadow: 0 0 10px rgba(255,59,48,.45);
}
.staff-chip svg { width: 10px; height: 10px; }

.chat-name.clickable { cursor: pointer; }
.chat-name.clickable:hover { text-decoration: underline; }
.chat-msg.staff .chat-body { border: 1px solid rgba(255,59,48,0.35); }
.chat-msg.staff .chat-avatar { background: linear-gradient(135deg, #ff3b30, #8f1209); }
.chat-msg.staff .chat-name { color: #ff6b60; }
.chat-msg.staff.me .chat-name { color: #ff6b60; }

.nav-btn.mod .nbtn-dot.staff { background: #ff3b30; box-shadow: 0 0 8px rgba(255,59,48,.8); }

/* --- Modal: perfil de otro usuario --- */
.user-card-panel { max-width: 460px; }
.user-card-banner { height: 96px; background: var(--accent-grad); position: relative; }
.user-card-close { position: absolute; top: 12px; right: 12px; z-index: 3; background: rgba(0,0,0,.45); }
.user-card-head { display: flex; align-items: flex-end; gap: 14px; padding: 0 20px; margin-top: -34px; position: relative; }
.user-card-avatar {
  width: 72px; height: 72px; border-radius: 20px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 26px; font-weight: 800;
  color: #fff; background: var(--accent-grad); border: 3px solid var(--card);
  position: relative;
}
.user-card-id { flex: 1; padding-bottom: 8px; min-width: 0; }
.user-card-name { min-width: 0; font-size: 19px; font-weight: 800; display: flex; align-items: center; flex-wrap: wrap; gap: 2px; line-height: 1.15; overflow-wrap: anywhere; }
.user-card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.uc-tag {
  font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: var(--bg-2); border: 1px solid var(--border); color: var(--text-dim);
}
.uc-tag.staff { color: #fff; background: linear-gradient(135deg, #ff3b30, #b3160c); border-color: transparent; }
.uc-tag.warn { color: var(--warn); border-color: rgba(255,194,75,.4); background: rgba(255,194,75,.1); }
.uc-tag.online { color: var(--accent); border-color: rgba(0,255,128,.35); background: rgba(0,255,128,.1); }
.user-card-body { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
.user-card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.user-card-actions .btn { flex: 1; min-width: 118px; justify-content: center; }
.user-card-bio { font-size: 13px; line-height: 1.5; color: var(--text-dim); }
.user-card-stats, .mod-detail-grid { display: flex; gap: 8px; }
.user-card-stats > div, .mod-detail-grid > div {
  flex: 1; text-align: center; padding: 10px 6px; border-radius: 10px;
  background: var(--bg-2); border: 1px solid var(--border);
}
.user-card-stats b, .mod-detail-grid b { display: block; font-size: 16px; font-weight: 800; color: var(--text); }
.user-card-stats span, .mod-detail-grid span { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.user-card-section { display: flex; flex-direction: column; gap: 8px; }
.user-card-mod { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.uc-mod-note { font-size: 12px; color: var(--text-dim); }

/* --- Modal: cambiar región --- */
.region-panel { max-width: 420px; }
.region-detect { font-size: 12.5px; color: var(--text-dim); line-height: 1.45; }
.region-hint { font-size: 11.5px; color: var(--text-muted); line-height: 1.4; }

/* --- Panel de moderación --- */
.mod-panel { max-width: 900px; width: min(900px, 94vw); background: var(--card); border-color: var(--border); }
.mod-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.mod-top-left { display: flex; align-items: center; gap: 12px; }
.mod-crest {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  color: #fff; background: linear-gradient(135deg, #ff3b30, #b3160c);
  box-shadow: 0 0 16px rgba(255,59,48,.4);
}
.mod-top h3 { font-size: 15px; font-weight: 800; }
.mod-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.mod-stats { display: flex; gap: 8px; padding: 14px 18px 0; }
.mod-stat { flex: 1; text-align: center; padding: 10px 6px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border); }
.mod-stat b { display: block; font-size: 17px; font-weight: 800; color: var(--text); }
.mod-stat span { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.mod-stat.staff b { color: #ff6b60; }
.mod-stat.warn b { color: var(--warn); }
.mod-stat.danger b { color: var(--danger); }
.mod-search {
  display: flex; align-items: center; gap: 8px; margin: 12px 18px;
  padding: 8px 12px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px;
}
.mod-search:focus-within { border-color: var(--accent); }
.mod-search svg { width: 16px; height: 16px; color: var(--text-muted); flex-shrink: 0; }
.mod-search input { flex: 1; background: none; border: none; outline: none; color: var(--text); font-size: 13px; }
.mod-split { display: grid; grid-template-columns: minmax(240px, 320px) 1fr; flex: 1; min-height: 0; border-top: 1px solid var(--border); }
.mod-users { overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 4px; border-right: 1px solid var(--border); max-height: 58vh; }
.mod-user-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; text-align: left; transition: background .15s; width: 100%; }
.mod-user-row:hover { background: var(--card-hover); }
.mod-user-row.active { background: var(--accent-soft); box-shadow: inset 0 0 0 1px rgba(0,255,128,.35); }
.mod-user-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.mod-user-name { font-size: 13px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mod-user-sub { font-size: 10.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mod-user-flags { display: flex; gap: 4px; flex-shrink: 0; }
.mod-flag {
  font-size: 8.5px; font-weight: 800; letter-spacing: .05em; padding: 2px 6px;
  border-radius: 999px; background: var(--bg-2); border: 1px solid var(--border);
  color: var(--text-dim); white-space: nowrap;
}
.mod-flag.staff { color: #fff; background: linear-gradient(135deg, #ff3b30, #b3160c); border-color: transparent; }
.mod-flag.danger { color: var(--danger); border-color: rgba(255,84,112,.4); background: rgba(255,84,112,.12); }
.mod-flag.warn { color: var(--warn); border-color: rgba(255,194,75,.4); background: rgba(255,194,75,.12); }
.mod-detail { overflow-y: auto; padding: 16px 18px; max-height: 58vh; }
.mod-detail-empty { color: var(--text-muted); font-size: 13px; text-align: center; padding: 44px 12px; }
.mod-detail-head { display: flex; align-items: center; gap: 12px; }
.mod-detail-id { min-width: 0; }
.mod-detail-name { font-size: 17px; font-weight: 800; color: var(--text); }
.mod-detail-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.mod-detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.mod-detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.mod-action-holder:empty { display: none; }
.mod-action-holder { margin-top: 12px; }
.mod-form { background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.mod-form-title { font-size: 13.5px; font-weight: 800; color: var(--text); }
.mod-form-text { font-size: 12px; color: var(--text-dim); line-height: 1.45; }
.mod-form-actions { display: flex; justify-content: flex-end; gap: 8px; }
.mod-detail-messages { margin-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.mod-msg-group { display: flex; flex-direction: column; gap: 6px; }
.mod-msg-title { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.mod-msg-row { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 9px; background: var(--bg-2); border: 1px solid var(--border); }
.mod-msg-scope { font-size: 9px; font-weight: 800; padding: 2px 6px; border-radius: 6px; background: var(--card-hover); color: var(--text-dim); flex-shrink: 0; }
.mod-msg-text { flex: 1; font-size: 12px; color: var(--text-dim); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mod-msg-row time { font-size: 10px; color: var(--text-muted); flex-shrink: 0; }
.mod-empty { font-size: 12px; color: var(--text-muted); padding: 8px 2px; }

@media (max-width: 760px) {
  .chat-head-ext { flex-direction: column; align-items: stretch; }
  .chat-region-pill { width: 100%; }
  .mod-split { grid-template-columns: 1fr; }
  .mod-users { max-height: 34vh; border-right: none; border-bottom: 1px solid var(--border); }
}

/* ============================================================
   Pulido visual: profundidad, microinteracciones y splash
   ============================================================ */

/* --- Profundidad coherente --- */
.sidebar, .main { box-shadow: var(--e-2); }
.card, .panel { box-shadow: var(--e-1); }
.toast { box-shadow: var(--e-2); }

/* --- Microinteracciones --- */
.btn {
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--e-1); }
.btn:active { transform: translateY(0) scale(0.97); }

.nav-item, .rail-btn {
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nav-item:active, .rail-btn:active { transform: scale(0.94); }

.game-card {
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), border-color 0.22s var(--ease);
}
.game-card:hover { box-shadow: var(--glow); }
.game-card:active { transform: translateY(-3px) scale(0.995); }

.store-item {
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), border-color 0.18s var(--ease);
}
.store-item:hover { box-shadow: var(--glow); }

/* --- Foco visible (teclado) --- */
:focus-visible { outline: 2px solid rgba(0, 255, 128, 0.7); outline-offset: 2px; }

/* --- Selección de texto --- */
::selection { background: rgba(0, 255, 128, 0.28); }

/* --- Scrollbars discretas --- */
* { scrollbar-width: thin; scrollbar-color: #24312c transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #1f2b26; border: 2px solid transparent; background-clip: content-box; border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover { background: #2c3d36; background-clip: content-box; }

/* --- Esqueletos de carga --- */
.mg-skel { position: relative; overflow: hidden; background: var(--bg-2); border-radius: var(--r-sm); }
.mg-skel::after {
  content: ''; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  animation: mgSkel 1.25s infinite;
}
@keyframes mgSkel { to { transform: translateX(100%); } }

/* --- Splash de arranque (intro con voz) --- */
#bootSplash {
  position: fixed; inset: 0; z-index: 99999;
  display: grid; place-content: center; justify-items: center; gap: 28px;
  background: radial-gradient(ellipse at 50% 46%, rgba(0, 255, 128, 0.10), transparent 60%), var(--bg);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
#bootSplash.hide { opacity: 0; transform: scale(1.04); pointer-events: none; }
.bs-stage { position: relative; width: 132px; height: 132px; display: grid; place-items: center; }
.bs-glow {
  position: absolute; inset: -36px; border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 255, 128, 0.30), transparent 68%);
  filter: blur(16px); animation: bsPulse 2.4s ease-in-out infinite;
}
.bs-ring {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 52%, rgba(0, 255, 128, 0.85) 76%, #00ff80 92%, transparent 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
  animation: bsSpin 1.5s linear infinite;
}
.bs-logo {
  width: 96px; height: 96px; border-radius: 28px; display: grid; place-items: center;
  font-size: 40px; font-weight: 800; letter-spacing: 0.5px; color: #04120a;
  background: var(--accent-grad); box-shadow: 0 18px 50px rgba(0, 255, 128, 0.35);
  animation: bsPop 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.3) both;
}
.bs-word {
  font-size: 15px; font-weight: 800; letter-spacing: 6px; color: var(--text);
  opacity: 0; animation: bsFade 0.8s ease 0.35s forwards;
}
.bs-bar { width: 168px; height: 3px; border-radius: 3px; background: #16201d; overflow: hidden; }
.bs-bar span {
  display: block; height: 100%; width: 38%; border-radius: 3px;
  background: var(--accent-grad); animation: bsSlide 1.1s ease-in-out infinite;
}
@keyframes bsSpin { to { transform: rotate(360deg); } }
@keyframes bsPulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
@keyframes bsPop { from { opacity: 0; transform: scale(0.82); } to { opacity: 1; transform: scale(1); } }
@keyframes bsFade { to { opacity: 1; } }
@keyframes bsSlide { 0% { transform: translateX(-115%); } 100% { transform: translateX(330%); } }

/* ============================================================
   Tarjetas de juego, tienda y perfil
   ============================================================ */

/* --- Portada de juego: monograma, velo y zoom --- */
.game-thumb { position: relative; overflow: hidden; transition: transform 0.35s var(--ease); }
.game-card:hover .game-thumb { transform: scale(1.045); }
.gt-mono {
  position: absolute; right: 4px; bottom: -22px;
  font-size: 92px; font-weight: 800; line-height: 1; letter-spacing: -5px;
  color: rgba(255, 255, 255, 0.10); pointer-events: none; user-select: none;
}
.gt-veil {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.10) 0%, transparent 38%, rgba(0, 0, 0, 0.45) 100%);
}
.game-thumb > svg { position: relative; z-index: 1; }
.game-owned-badge, .play-overlay { z-index: 2; }

/* --- Tienda: brillo por rareza y revelado de compra --- */
.store-item { position: relative; overflow: hidden; }
.store-item .si-thumb {
  position: relative; overflow: hidden;
  background: radial-gradient(circle at 50% 22%, rgba(255, 255, 255, 0.07), transparent 72%), var(--bg-2);
}
.store-item:has(.rare-rare) { border-color: rgba(63, 140, 255, 0.35); }
.store-item:has(.rare-epic) { border-color: rgba(176, 107, 255, 0.38); }
.store-item:has(.rare-legendary) { border-color: rgba(255, 201, 77, 0.45); }
.store-item:has(.rare-legendary)::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 215, 120, 0.16) 50%, transparent 62%);
  transform: translateX(-100%); animation: siShine 3.4s ease-in-out infinite;
}
@keyframes siShine { 0% { transform: translateX(-100%); } 55%, 100% { transform: translateX(100%); } }
.si-reveal { animation: siReveal 0.9s var(--ease); }
.si-reveal-big { animation: siRevealBig 1.5s var(--ease); }
@keyframes siReveal {
  0% { transform: scale(1); }
  35% { transform: scale(1.045); box-shadow: 0 0 0 1px var(--accent), 0 14px 34px rgba(0, 0, 0, 0.5); }
  100% { transform: scale(1); }
}
@keyframes siRevealBig {
  0% { transform: scale(1) rotate(0deg); }
  18% { transform: scale(1.06) rotate(-0.6deg); box-shadow: 0 0 0 2px var(--accent), 0 18px 46px rgba(0, 0, 0, 0.55); }
  42% { transform: scale(1.03) rotate(0.5deg); }
  70% { transform: scale(1.01) rotate(0deg); }
  100% { transform: scale(1); }
}

/* --- Perfil: velo en portadas, avatares con relieve --- */
.profile-banner::after, .user-card-banner::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.45) 100%);
}
.profile-avatar, .user-card-avatar {
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.55), 0 0 0 3px var(--card);
}
.profile-name, .user-card-name { text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45); }

/* --- Perfil propio: tarjeta amplia y editor organizado --- */
.profile-card {
  width: min(1120px, calc(100vw - 44px));
  max-width: none;
  height: min(884px, calc(100vh - 44px));
  max-height: calc(100vh - 44px);
  border-radius: 24px;
  background: linear-gradient(155deg, #1a201e 0%, var(--card) 42%);
}
.profile-banner { height: 168px; }
.profile-head {
  position: relative;
  z-index: 1;
  margin-top: -64px;
  padding: 0 36px 26px;
  align-items: flex-end;
  gap: 24px;
}
.profile-avatar {
  width: 124px;
  height: 124px;
  border-radius: 30px;
  font-size: 46px;
  border-width: 5px;
}
.profile-meta { padding-bottom: 8px; gap: 8px; }
.profile-eyebrow, .profile-kicker {
  display: block;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
}
.profile-name-row { align-items: center; gap: 9px; }
.profile-name { font-size: clamp(23px, 3vw, 31px); line-height: 1.12; }
.profile-tags { gap: 9px; }
.profile-level-tag, .coins-pill { padding: 7px 12px; font-size: 12px; }
.profile-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0 36px 32px;
  gap: 22px;
  overflow-y: auto;
  scrollbar-gutter: stable;
}
/* Modo edición: vista previa a la izquierda y opciones a la derecha, cada panel con su propio scroll */
.profile-body.editing {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 22px;
  overflow: hidden;
}
.profile-body.editing > * {
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  scrollbar-gutter: stable;
}
.profile-body.editing .profile-overview {
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}
.profile-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  align-items: start;
  gap: 26px;
}
.profile-main, .profile-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.profile-progress-card, .profile-info-section, .profile-stats-panel {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(8, 13, 11, .44);
}
.profile-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.profile-section-heading > div { display: flex; flex-direction: column; gap: 4px; }
.profile-section-heading strong { color: var(--text); font-size: 15px; font-weight: 800; }
.profile-xp-pct {
  color: var(--accent);
  font-size: 18px;
  font-weight: 800;
}
.profile-xp { gap: 9px; }
.profile-xp-top { font-size: 12px; }
.profile-xp-top span:first-child { color: var(--text-muted); }
.profile-xp-bar { height: 11px; }
.profile-bio { min-height: 58px; padding: 14px 15px; font-size: 13px; }
.profile-library { min-height: 38px; align-content: flex-start; }
.profile-game-chip { padding: 8px 13px; }
.profile-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.profile-stat { min-width: 0; padding: 13px 8px; }
.profile-stat-since {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  text-align: left;
}
.profile-stat-since .ps-val { font-size: 15px; }
.profile-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.profile-actions .btn { min-width: 0; min-height: 42px; padding: 9px 10px; }
.profile-edit {
  gap: 18px;
  padding: 20px;
  border-radius: 16px;
  background: rgba(8, 13, 11, .55);
}
.profile-edit-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.profile-edit-intro > div { display: flex; flex-direction: column; gap: 5px; }
.profile-edit-intro strong { color: var(--text); font-size: 18px; }
.profile-edit-intro > span { color: var(--text-muted); font-size: 11px; text-align: right; }
.profile-custom-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.profile-custom-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 11px;
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: rgba(255, 255, 255, .025);
}
.profile-custom-title { display: flex; flex-direction: column; gap: 4px; }
.profile-custom-title strong { color: var(--text); font-size: 13px; }
.profile-custom-title span { color: var(--text-muted); font-size: 11px; }
.profile-custom-block .field { width: 100%; margin: 0; }
.profile-custom-block .profile-subhead { width: 100%; display: flex; justify-content: space-between; align-items: center; }
.profile-custom-block .swatch-row,
.profile-custom-block .frame-row,
.profile-custom-block .badge-row { width: 100%; }
.profile-upload-btn { width: 100%; justify-content: center; }
.profile-edit-actions { justify-content: flex-end; }
.profile-edit-actions .btn { flex: 0 0 150px; }

@media (max-width: 920px) {
  .profile-overview { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .profile-side {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, .9fr);
    align-items: start;
  }
  .profile-body.editing { display: flex; flex-direction: column; overflow-y: auto; }
  .profile-body.editing > * { flex: 0 0 auto; max-height: none; overflow: visible; }
  .profile-body.editing .profile-overview { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .profile-modal { padding: 14px; }
  .profile-card { width: min(680px, calc(100vw - 28px)); height: auto; max-height: calc(100vh - 28px); max-height: calc(100dvh - 28px); }
  .profile-banner { height: 140px; }
  .profile-head { margin-top: -52px; padding: 0 22px 20px; gap: 16px; }
  .profile-avatar { width: 98px; height: 98px; border-radius: 26px; font-size: 37px; }
  .profile-body { padding: 0 22px 22px; }
  .profile-overview { grid-template-columns: 1fr; gap: 14px; }
  .profile-main, .profile-side { gap: 14px; }
  .profile-side { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, .9fr); align-items: start; }
}
@media (max-width: 520px) {
  .profile-head { align-items: flex-end; gap: 12px; padding-inline: 16px; }
  .profile-avatar { width: 76px; height: 76px; border-radius: 21px; font-size: 29px; }
  .profile-meta { gap: 6px; padding-bottom: 4px; }
  .profile-eyebrow { font-size: 8px; }
  .profile-name { font-size: 21px; }
  .profile-tags { gap: 6px; }
  .profile-level-tag, .coins-pill { padding: 6px 8px; font-size: 10px; }
  .profile-body { padding-inline: 16px; }
  .profile-side { display: flex; }
  .profile-custom-grid { grid-template-columns: 1fr; }
  .profile-edit-intro { align-items: flex-start; flex-direction: column; }
  .profile-edit-intro > span { text-align: left; }
  .profile-edit-actions .btn { flex: 1; }
}

/* ======================================================================
   COSMÉTICOS AVANZADOS: efectos de nombre, decoraciones, portadas y sonido
   ====================================================================== */

/* ---------- Marcos animados ---------- */
@keyframes avfHolo {
  0% { box-shadow: 0 0 0 3px #7fe7ff, 0 0 16px rgba(127, 231, 255, .6); }
  50% { box-shadow: 0 0 0 3px #b06bff, 0 0 22px rgba(176, 107, 255, .75); }
  100% { box-shadow: 0 0 0 3px #7fe7ff, 0 0 16px rgba(127, 231, 255, .6); }
}
.avf-holo { animation: avfHolo 3s linear infinite; }
@keyframes avfNeon {
  0%, 100% { box-shadow: 0 0 0 3px #00ffa3, 0 0 12px rgba(0, 255, 163, .5); }
  50% { box-shadow: 0 0 0 3px #00ffa3, 0 0 28px rgba(0, 255, 163, .95); }
}
.avf-neonpulse { animation: avfNeon 1.6s ease-in-out infinite; }
@keyframes avfAurora {
  0% { box-shadow: 0 0 0 3px #22d3a6, 0 0 18px rgba(34, 211, 166, .7); }
  33% { box-shadow: 0 0 0 3px #4a8cff, 0 0 20px rgba(74, 140, 255, .7); }
  66% { box-shadow: 0 0 0 3px #b06bff, 0 0 20px rgba(176, 107, 255, .7); }
  100% { box-shadow: 0 0 0 3px #22d3a6, 0 0 18px rgba(34, 211, 166, .7); }
}
.avf-aurora { animation: avfAurora 5s linear infinite; }

/* ---------- Efectos de nombre ---------- */
@keyframes nfxShine { from { background-position: 200% center; } to { background-position: -200% center; } }
@keyframes nfxFlow { to { background-position: 300% center; } }
@keyframes nfxFire { from { background-position: 50% 120%; } to { background-position: 50% -20%; } }
@keyframes nfxFlicker {
  0%, 100% { filter: brightness(1) saturate(1); }
  25% { filter: brightness(1.35) saturate(1.35); }
  50% { filter: brightness(.93) saturate(1.05); }
  75% { filter: brightness(1.22) saturate(1.25); }
}
@keyframes nfxNeonPulse {
  0%, 100% { text-shadow: 0 0 4px #00ffa3, 0 0 12px #00ffa3, 0 0 24px rgba(0, 255, 163, .7); }
  50% { text-shadow: 0 0 6px #9dffd6, 0 0 18px #00ffa3, 0 0 38px rgba(0, 255, 163, .95), 0 0 64px rgba(0, 255, 163, .55); }
}
@keyframes nfxGlitch {
  0%, 88%, 100% { transform: translate(0, 0); text-shadow: 1.5px 0 #ff2d55, -1.5px 0 #00e5ff; }
  89% { transform: translate(-2px, 1px); }
  91% { transform: translate(2px, -1px); }
  93% { transform: translate(-1px, 0); text-shadow: 2.6px 0 #ff2d55, -2.6px 0 #00e5ff; }
  95% { transform: translate(1px, 1px); }
  97% { transform: translate(-1px, -1px); }
}
.nfx-shine {
  background: linear-gradient(100deg, #8f9aa6 0%, #cfd8e3 20%, #ffffff 44%, #ffffff 56%, #cfd8e3 80%, #8f9aa6 100%);
  background-size: 220% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: nfxShine 2.6s linear infinite;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .55));
}
.nfx-neon { color: #eafff6; animation: nfxNeonPulse 2.2s ease-in-out infinite; }
.nfx-hologram {
  background: linear-gradient(90deg, #7fe7ff, #b06bff, #ff7ad0, #7fe7ff, #b06bff);
  background-size: 300% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: nfxFlow 4s linear infinite;
  filter: drop-shadow(0 0 6px rgba(176, 107, 255, .45));
}
.nfx-rainbowflow {
  background: linear-gradient(90deg, #ff4d4d, #ffc94d, #00e07a, #3f8cff, #b06bff, #ff4d4d);
  background-size: 300% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: nfxFlow 4s linear infinite;
  filter: drop-shadow(0 0 6px rgba(255, 120, 180, .35));
}
.nfx-fire {
  background: linear-gradient(0deg, #ff2d00 0%, #ff7a1a 45%, #ffd23f 78%, #fff2b0 100%);
  background-size: 100% 220%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: #ffb347;
  text-shadow: 0 0 12px rgba(255, 122, 26, .75);
  animation: nfxFlicker 1.2s ease-in-out infinite, nfxFire 3.2s linear infinite;
}
.nfx-glitch { color: #e6fbff; animation: nfxGlitch 2.6s steps(1) infinite; }
.fx-opt .nfx-shine, .fx-opt .nfx-hologram, .fx-opt .nfx-rainbowflow, .fx-opt .nfx-fire { display: inline-block; }

/* ---------- Decoraciones de avatar (arte vectorial premium, sin emoji) ---------- */
@keyframes decorFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5%); } }
@keyframes decorFlicker { 0%, 100% { opacity: .92; transform: scaleY(1); } 50% { opacity: 1; transform: scaleY(1.07); } }
@keyframes decorTwinkle { 0%, 100% { opacity: .6; } 50% { opacity: 1; } }
@keyframes decorGlow {
  0%, 100% { filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .6)) drop-shadow(0 0 6px rgba(255, 201, 77, .5)); }
  50% { filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .6)) drop-shadow(0 0 13px rgba(255, 210, 90, .95)); }
}
.av-decor { position: absolute; inset: -16%; pointer-events: none; z-index: 4; }
.av-decor::before {
  content: ""; position: absolute; inset: 0;
  background-repeat: no-repeat; background-position: center top;
}
.ad-crown::before {
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 60'><defs><linearGradient id='g' x1='0' y1='0' x2='0' y2='1'><stop offset='0' stop-color='%23fff6cf'/><stop offset='.28' stop-color='%23ffd75e'/><stop offset='.55' stop-color='%23dca223'/><stop offset='.78' stop-color='%23a9770f'/><stop offset='1' stop-color='%23ffe290'/></linearGradient></defs><path d='M6 54 L3 22 L26 40 L37 8 L50 36 L63 8 L74 40 L97 22 L94 54 Z' fill='url(%23g)' stroke='%238a5d10' stroke-width='2.4' stroke-linejoin='round'/><rect x='7' y='47' width='86' height='11' rx='3.5' fill='url(%23g)' stroke='%238a5d10' stroke-width='2.2'/><circle cx='26' cy='52.5' r='4' fill='%23ff3b6b'/><circle cx='50' cy='52.5' r='5' fill='%233fd0ff'/><circle cx='74' cy='52.5' r='4' fill='%23b06bff'/><circle cx='37' cy='7' r='3.4' fill='%23fff4bf'/><circle cx='63' cy='7' r='3.4' fill='%23fff4bf'/></svg>");
  background-size: 62% auto; background-position: 50% -8%;
  animation: decorGlow 3.4s ease-in-out infinite;
}
.ad-halo::before {
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 34'><defs><linearGradient id='h' x1='0' y1='0' x2='1' y2='0'><stop offset='0' stop-color='%23fff7c8'/><stop offset='.5' stop-color='%23ffd24d'/><stop offset='1' stop-color='%23fff7c8'/></linearGradient></defs><ellipse cx='50' cy='17' rx='43' ry='11' fill='none' stroke='url(%23h)' stroke-width='6.5'/><ellipse cx='50' cy='17' rx='43' ry='11' fill='none' stroke='%23fffde6' stroke-width='1.6' opacity='.85'/></svg>");
  background-size: 68% auto; background-position: 50% -4%;
  filter: drop-shadow(0 0 10px rgba(255, 210, 77, .85));
  animation: decorFloat 4s ease-in-out infinite;
}
.ad-wings::before {
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 140 70'><defs><linearGradient id='w' x1='0' y1='0' x2='0' y2='1'><stop offset='0' stop-color='%23ffffff'/><stop offset='.45' stop-color='%23dcebff'/><stop offset='1' stop-color='%237fa8e0'/></linearGradient></defs><path d='M68 30 C50 8 24 5 6 16 C22 19 32 28 37 40 C24 38 14 44 7 56 C24 53 36 57 43 66 C40 53 45 44 53 40 C57 49 62 58 64 68 C68 55 68 42 68 30 Z' fill='url(%23w)' stroke='%23aac7f0' stroke-width='1.6'/><path d='M72 30 C90 8 116 5 134 16 C118 19 108 28 103 40 C116 38 126 44 133 56 C116 53 104 57 97 66 C100 53 95 44 87 40 C83 49 78 58 76 68 C72 55 72 42 72 30 Z' fill='url(%23w)' stroke='%23aac7f0' stroke-width='1.6'/></svg>");
  background-size: 116% auto; background-position: 50% 54%;
  filter: drop-shadow(0 0 9px rgba(150, 200, 255, .7));
  animation: decorFloat 5s ease-in-out infinite;
}
.ad-flames::before {
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 80'><defs><linearGradient id='f' x1='0' y1='1' x2='0' y2='0'><stop offset='0' stop-color='%23ff2d00'/><stop offset='.5' stop-color='%23ff8a00'/><stop offset='1' stop-color='%23ffe066'/></linearGradient></defs><path d='M60 78 C36 78 22 66 22 50 C22 38 32 32 37 22 C39 32 46 36 50 33 C45 20 48 10 57 2 C54 16 62 22 66 23 C64 14 69 8 74 4 C74 16 84 20 88 30 C94 40 100 44 100 54 C100 68 84 78 60 78 Z' fill='url(%23f)' opacity='.95'/></svg>");
  background-size: 84% auto; background-position: 50% 106%;
  filter: drop-shadow(0 0 12px rgba(255, 122, 26, .8));
  transform-origin: 50% 100%;
  animation: decorFlicker 1.1s ease-in-out infinite;
}
.ad-cat::before {
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 60'><defs><linearGradient id='c' x1='0' y1='0' x2='0' y2='1'><stop offset='0' stop-color='%23967a88'/><stop offset='1' stop-color='%23332831'/></linearGradient></defs><path d='M16 58 L23 6 L58 44 Z' fill='url(%23c)' stroke='%23271d25' stroke-width='2.4' stroke-linejoin='round'/><path d='M104 58 L97 6 L62 44 Z' fill='url(%23c)' stroke='%23271d25' stroke-width='2.4' stroke-linejoin='round'/><path d='M27 50 L30 20 L48 44 Z' fill='%23ff9ec7' opacity='.9'/><path d='M93 50 L90 20 L72 44 Z' fill='%23ff9ec7' opacity='.9'/></svg>");
  background-size: 62% auto; background-position: 50% -2%;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .55));
}
.ad-stars::before {
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 70'><defs><radialGradient id='s'><stop offset='0' stop-color='%23fffceb'/><stop offset='1' stop-color='%23ffd23f'/></radialGradient></defs><path d='M22 6 l3.2 9.4 9.4 3.2 -9.4 3.2 -3.2 9.4 -3.2 -9.4 -9.4 -3.2 9.4 -3.2 z' fill='url(%23s)'/><path d='M100 28 l2.6 7.6 7.6 2.6 -7.6 2.6 -2.6 7.6 -2.6 -7.6 -7.6 -2.6 7.6 -2.6 z' fill='url(%23s)'/><path d='M62 46 l2.2 6.4 6.4 2.2 -6.4 2.2 -2.2 6.4 -2.2 -6.4 -6.4 -2.2 6.4 -2.2 z' fill='url(%23s)'/></svg>");
  background-size: 104% auto; background-position: 50% 46%;
  filter: drop-shadow(0 0 7px rgba(255, 220, 120, .9));
  animation: decorTwinkle 2.4s ease-in-out infinite;
}
.ad-horns::before {
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 60'><defs><linearGradient id='n' x1='0' y1='0' x2='0' y2='1'><stop offset='0' stop-color='%23ff7a6b'/><stop offset='.45' stop-color='%23c81f1f'/><stop offset='1' stop-color='%23500404'/></linearGradient></defs><path d='M42 58 C31 40 27 20 32 4 C42 17 52 34 60 47 C54 53 48 57 42 58 Z' fill='url(%23n)' stroke='%233a0606' stroke-width='2.2' stroke-linejoin='round'/><path d='M78 58 C89 40 93 20 88 4 C78 17 68 34 60 47 C66 53 72 57 78 58 Z' fill='url(%23n)' stroke='%233a0606' stroke-width='2.2' stroke-linejoin='round'/></svg>");
  background-size: 66% auto; background-position: 50% -6%;
  filter: drop-shadow(0 0 9px rgba(255, 45, 45, .7));
}
.ad-flower::before {
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 66'><defs><radialGradient id='p'><stop offset='0' stop-color='%23fff0f6'/><stop offset='1' stop-color='%23ff7ab8'/></radialGradient></defs><g fill='url(%23p)' stroke='%23e05a98' stroke-width='1.2'><ellipse cx='30' cy='40' rx='11' ry='16' transform='rotate(-25 30 40)'/><ellipse cx='50' cy='30' rx='11' ry='17'/><ellipse cx='70' cy='40' rx='11' ry='16' transform='rotate(25 70 40)'/></g><circle cx='30' cy='40' r='5' fill='%23ffd23f'/><circle cx='50' cy='30' r='5.5' fill='%23ffd23f'/><circle cx='70' cy='40' r='5' fill='%23ffd23f'/></svg>");
  background-size: 46% auto; background-position: 50% -4%;
  filter: drop-shadow(0 0 8px rgba(255, 122, 184, .6));
}

/* ---------- Efectos de portada (partículas) ---------- */
.profile-banner, .user-card-banner { overflow: hidden; }
.banner-fx { position: absolute; inset: 0; pointer-events: none; z-index: 2; background-repeat: repeat; }
@keyframes bfxDown { from { background-position: 0 -140px; } to { background-position: 0 0; } }
@keyframes bfxUp { from { background-position: 0 0; } to { background-position: 0 -160px; } }
@keyframes bfxTwinkle { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }
@keyframes bfxAurora { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.bfx-snow {
  background-image:
    radial-gradient(2px 2px at 10px 20px, #fff, transparent),
    radial-gradient(2px 2px at 70px 90px, #fff, transparent),
    radial-gradient(1.5px 1.5px at 130px 40px, #fff, transparent),
    radial-gradient(2px 2px at 190px 110px, #fff, transparent);
  background-size: 220px 140px; opacity: .85; animation: bfxDown 6s linear infinite;
}
.bfx-embers {
  background-image:
    radial-gradient(2px 2px at 30px 30px, #ffb347, transparent),
    radial-gradient(1.5px 1.5px at 90px 80px, #ff7a1a, transparent),
    radial-gradient(2px 2px at 150px 20px, #ffd23f, transparent);
  background-size: 200px 160px; opacity: .9; animation: bfxUp 6s linear infinite;
}
.bfx-stars {
  background-image:
    radial-gradient(2px 2px at 40px 30px, #fff, transparent),
    radial-gradient(1.5px 1.5px at 120px 70px, #cfe8ff, transparent),
    radial-gradient(2px 2px at 200px 40px, #fff, transparent),
    radial-gradient(1.5px 1.5px at 260px 100px, #ffe9a8, transparent);
  background-size: 300px 160px; animation: bfxTwinkle 2.4s ease-in-out infinite;
}
.bfx-sakura {
  background-image:
    radial-gradient(4px 3px at 30px 20px, #ff9ec7, transparent),
    radial-gradient(3px 2px at 110px 90px, #ffc0d8, transparent),
    radial-gradient(4px 3px at 200px 50px, #ff9ec7, transparent);
  background-size: 240px 150px; opacity: .9; animation: bfxDown 7s linear infinite;
}
.bfx-bubbles {
  background-image:
    radial-gradient(circle at 40px 120px, rgba(180, 230, 255, .5) 0 6px, transparent 7px),
    radial-gradient(circle at 120px 60px, rgba(180, 230, 255, .4) 0 5px, transparent 6px),
    radial-gradient(circle at 200px 140px, rgba(180, 230, 255, .45) 0 7px, transparent 8px);
  background-size: 260px 180px; animation: bfxUp 8s linear infinite;
}
.bfx-matrix {
  background-image:
    radial-gradient(2px 3px at 15px 20px, #00ff6a, transparent),
    radial-gradient(2px 3px at 85px 70px, #00c853, transparent),
    radial-gradient(2px 3px at 160px 30px, #00ff6a, transparent);
  background-size: 200px 120px; opacity: .8; animation: bfxDown 2.2s linear infinite;
}
.bfx-aurora {
  background: linear-gradient(120deg, rgba(34, 211, 166, .35), rgba(74, 140, 255, .3), rgba(176, 107, 255, .35), rgba(34, 211, 166, .35));
  background-size: 300% 300%; mix-blend-mode: screen; animation: bfxAurora 8s ease-in-out infinite;
}

/* ---------- Filas del editor de efectos ---------- */
.fx-row { display: flex; flex-wrap: wrap; gap: 8px; }
.fx-opt {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 700;
  color: var(--text-2); background: var(--card); border: 1px solid var(--border); cursor: pointer;
  transition: border-color .15s, filter .15s, color .15s;
}
.fx-opt:hover { filter: brightness(1.15); }
.fx-opt.on { border-color: var(--accent); color: var(--text); box-shadow: 0 0 0 2px rgba(0, 255, 128, .18); }
.fx-opt.locked { opacity: .55; }
.fx-opt.locked::after {
  content: ""; width: 11px; height: 11px; margin-left: 3px; flex: 0 0 auto;
  background: currentColor; opacity: .75;
  -webkit-mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M12 2a5 5 0 0 0-5 5v3H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8a2 2 0 0 0-2-2h-1V7a5 5 0 0 0-5-5zm-3 5a3 3 0 1 1 6 0v3H9V7z'/></svg>") center / contain no-repeat;
          mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M12 2a5 5 0 0 0-5 5v3H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8a2 2 0 0 0-2-2h-1V7a5 5 0 0 0-5-5zm-3 5a3 3 0 1 1 6 0v3H9V7z'/></svg>") center / contain no-repeat;
}
.fx-sample.ad-mini {
  position: relative; inset: auto; width: 26px; height: 26px;
  display: inline-block; flex: 0 0 auto; border-radius: 8px; overflow: hidden;
  background: var(--bg-2); border: 1px solid var(--border);
}
.fx-sample.ad-mini::before {
  content: ""; position: absolute; inset: 0;
  background-repeat: no-repeat; background-position: center; background-size: 88% auto;
}
.fx-sample.bfx-mini {
  position: relative; inset: auto; width: 30px; height: 22px; display: inline-block; flex: 0 0 auto;
  border-radius: 6px; background-color: #04120c; border: 1px solid var(--border);
}
.si-thumb-txt { font-size: 12px; font-weight: 700; padding: 6px; text-align: center; line-height: 1.25; }
.uc-name-text { min-width: 0; }

@media (max-width: 520px) {
  .av-decor::before { background-size: 74% auto; }
}

/* ======================================================================
   COSMÉTICOS SUPER PREMIUM (v3): marcos, nombres, decoraciones, portadas
   ====================================================================== */

/* ---------- Marcos super premium ---------- */
@keyframes avfDiamond {
  0%, 100% { box-shadow: 0 0 0 3px #bfefff, 0 0 16px rgba(150, 230, 255, .75), inset 0 0 10px rgba(210, 245, 255, .35); }
  50% { box-shadow: 0 0 0 3px #ffffff, 0 0 28px rgba(200, 245, 255, 1), inset 0 0 16px rgba(230, 250, 255, .5); }
}
.avf-diamond { animation: avfDiamond 2.6s ease-in-out infinite; }
@keyframes avfToxic {
  0%, 100% { box-shadow: 0 0 0 3px #7bff2e, 0 0 14px rgba(123, 255, 46, .6); }
  50% { box-shadow: 0 0 0 3px #c6ff2e, 0 0 32px rgba(150, 255, 46, .95); }
}
.avf-toxic { animation: avfToxic 1.8s ease-in-out infinite; }
@keyframes avfBlood {
  0%, 100% { box-shadow: 0 0 0 3px #ff2d3d, 0 0 12px rgba(255, 45, 61, .55); }
  50% { box-shadow: 0 0 0 3px #ff5a6a, 0 0 28px rgba(255, 45, 61, .95); }
}
.avf-blood { animation: avfBlood 1.5s ease-in-out infinite; }
@keyframes avfObsidian {
  0%, 100% { box-shadow: 0 0 0 3px #1b1c22, 0 0 12px rgba(255, 201, 77, .45); }
  50% { box-shadow: 0 0 0 3px #101116, 0 0 24px rgba(255, 201, 77, .85); }
}
.avf-obsidian { animation: avfObsidian 3.4s ease-in-out infinite; }
@keyframes avfCelestial {
  0%, 100% { box-shadow: 0 0 0 3px #ffe9a8, 0 0 18px rgba(255, 215, 110, .8); }
  50% { box-shadow: 0 0 0 3px #fff6d0, 0 0 36px rgba(255, 225, 130, 1); }
}
.avf-celestial { animation: avfCelestial 2.2s ease-in-out infinite; }

/* ---------- Efectos de nombre super premium ---------- */
@keyframes nfxVoid {
  0%, 100% { text-shadow: 0 0 6px #b06bff, 0 0 16px rgba(90, 20, 160, .9); }
  50% { text-shadow: 0 0 10px #d59bff, 0 0 30px rgba(140, 40, 255, .95); }
}
.nfx-void { color: #e9d9ff; animation: nfxVoid 2.8s ease-in-out infinite; }
@keyframes nfxIce {
  0%, 100% { text-shadow: 0 0 5px #9fe8ff, 0 0 14px rgba(80, 200, 255, .7); }
  50% { text-shadow: 0 0 8px #dff6ff, 0 0 26px rgba(140, 230, 255, .95); }
}
.nfx-ice { color: #eaf9ff; animation: nfxIce 2.6s ease-in-out infinite; }
@keyframes nfxToxic {
  0%, 100% { text-shadow: 0 0 5px #7bff2e, 0 0 14px rgba(123, 255, 46, .7); }
  50% { text-shadow: 0 0 9px #d6ff7a, 0 0 26px rgba(150, 255, 46, .95); }
}
.nfx-toxic { color: #eaffd0; animation: nfxToxic 1.8s ease-in-out infinite; }
@keyframes nfxBlood {
  0%, 100% { text-shadow: 0 0 5px #ff2d3d, 0 0 14px rgba(200, 20, 40, .8); }
  50% { text-shadow: 0 0 9px #ff8a95, 0 0 28px rgba(255, 45, 61, .95); }
}
.nfx-blood { color: #ffdfe2; animation: nfxBlood 1.6s ease-in-out infinite; }
.nfx-supernova {
  background: linear-gradient(90deg, #fff3b0, #ffb347, #ff5e3a, #ffd23f, #fff3b0);
  background-size: 300% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: nfxFlow 3s linear infinite;
  filter: drop-shadow(0 0 10px rgba(255, 150, 40, .85));
}
.fx-opt .nfx-void, .fx-opt .nfx-ice, .fx-opt .nfx-toxic, .fx-opt .nfx-blood, .fx-opt .nfx-supernova { display: inline-block; }

/* ---- Mensajería social: reacciones, responder, editar, eliminar ---- */
.chat-msg { position: relative; }
.chat-msg-actions {
  position: absolute;
  top: -10px;
  right: 8px;
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  background: rgba(16, 18, 24, .96);
  border: 1px solid var(--border);
  box-shadow: 0 8px 22px -10px rgba(0, 0, 0, .9);
  opacity: 0;
  pointer-events: none;
  transform: translateY(3px);
  transition: opacity .14s ease, transform .14s ease;
  z-index: 8;
}
.chat-msg:hover .chat-msg-actions { opacity: 1; pointer-events: auto; transform: translateY(0); }
.chat-msg.me .chat-msg-actions { right: auto; left: 8px; }
.cma-btn {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 7px;
  color: var(--text-dim);
  background: none;
  transition: background .14s, color .14s;
}
.cma-btn svg { width: 15px; height: 15px; }
.cma-btn:hover { background: rgba(255, 255, 255, .08); color: var(--text); }
.cma-btn.danger:hover { background: rgba(255, 59, 48, .18); color: #ff6b60; }

.reaction-picker {
  position: fixed;
  display: flex;
  gap: 2px;
  padding: 6px;
  border-radius: 12px;
  background: rgba(18, 20, 26, .98);
  border: 1px solid var(--border);
  box-shadow: 0 16px 40px -14px rgba(0, 0, 0, .95);
  z-index: 4000;
  animation: rpIn .13s ease;
}
@keyframes rpIn { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: scale(1); } }
.reaction-picker button {
  width: 34px; height: 34px;
  font-size: 18px;
  border-radius: 8px;
  background: none;
  transition: transform .12s, background .12s;
}
.reaction-picker button:hover { background: rgba(255, 255, 255, .1); transform: scale(1.18); }

.chat-reactions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.chat-react {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--border);
  font-size: 12px;
  line-height: 1.3;
  transition: background .14s, border-color .14s, transform .12s;
}
.chat-react:hover { background: rgba(255, 255, 255, .12); transform: translateY(-1px); }
.chat-react.mine { background: rgba(0, 255, 128, .16); border-color: rgba(0, 255, 128, .45); }
.cr-count { font-size: 10px; font-weight: 700; color: var(--text-dim); }
.chat-react.mine .cr-count { color: var(--accent); }

.chat-quote {
  display: flex;
  gap: 7px;
  align-items: stretch;
  margin-bottom: 5px;
  padding: 5px 8px 5px 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, .05);
  cursor: pointer;
  overflow: hidden;
  max-width: 100%;
}
.chat-quote:hover { background: rgba(255, 255, 255, .09); }
.cq-bar { width: 3px; flex-shrink: 0; border-radius: 2px; background: var(--accent); margin-left: 6px; }
.cq-body { display: flex; flex-direction: column; min-width: 0; }
.cq-name { font-size: 10.5px; font-weight: 800; color: var(--accent); }
.cq-text { font-size: 11px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-edited { font-size: 9px; color: var(--text-muted); font-style: italic; }
.chat-del { font-style: italic; color: var(--text-muted); opacity: .8; }
.chat-msg.is-deleted .chat-body { opacity: .75; }
.chat-msg.chat-flash .chat-body { animation: chatFlash 1.1s ease; }
@keyframes chatFlash {
  0%, 100% { box-shadow: none; }
  30% { box-shadow: 0 0 0 2px var(--accent); }
}

.chat-edit-box { display: flex; flex-direction: column; gap: 6px; min-width: 180px; }
.chat-edit-input {
  width: 100%;
  min-height: 34px;
  resize: vertical;
  background: var(--bg-1, #0d0f14);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 12px;
  font-family: inherit;
  padding: 6px 8px;
  outline: none;
}
.chat-edit-input:focus { border-color: var(--accent); }
.chat-edit-actions { display: flex; gap: 6px; }

.chat-reply-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 4px;
  padding: 6px 10px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
}
.crb-line { display: none; }
.crb-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.crb-txt b { font-size: 11px; color: var(--accent); font-weight: 800; }
.crb-txt i { font-size: 11px; color: var(--text-dim); font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crb-x {
  width: 24px; height: 24px;
  border-radius: 6px;
  color: var(--text-dim);
  background: none;
  font-size: 13px;
  flex-shrink: 0;
}
.crb-x:hover { background: rgba(255, 255, 255, .1); color: var(--text); }

/* ---------- Decoraciones super premium ---------- */
.ad-dragon::before {
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 150 72'><defs><linearGradient id='d' x1='0' y1='0' x2='0' y2='1'><stop offset='0' stop-color='%23ff7a6b'/><stop offset='.4' stop-color='%23c81f2f'/><stop offset='1' stop-color='%23300308'/></linearGradient></defs><path d='M72 30 C54 4 24 2 4 14 C19 18 30 27 36 40 C23 38 12 46 5 60 C23 55 36 60 43 70 C41 56 47 46 55 42 C60 52 66 61 69 71 C72 57 72 43 72 30 Z' fill='url(%23d)' stroke='%23600912' stroke-width='1.8'/><path d='M78 30 C96 4 126 2 146 14 C131 18 120 27 114 40 C127 38 138 46 145 60 C127 55 114 60 107 70 C109 56 103 46 95 42 C90 52 84 61 81 71 C78 57 78 43 78 30 Z' fill='url(%23d)' stroke='%23600912' stroke-width='1.8'/><g stroke='%23ffd2c2' stroke-width='1.4' opacity='.55' fill='none'><path d='M36 40 C45 44 52 52 55 62'/><path d='M114 40 C105 44 98 52 95 62'/><path d='M30 20 C42 24 52 32 58 42'/><path d='M120 20 C108 24 98 32 92 42'/></g></svg>");
  background-size: 118% auto; background-position: 50% 52%;
  filter: drop-shadow(0 0 10px rgba(255, 60, 60, .7));
  animation: decorFloat 5s ease-in-out infinite;
}
.ad-phoenix::before {
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 150 76'><defs><linearGradient id='p' x1='0' y1='0' x2='0' y2='1'><stop offset='0' stop-color='%23fff3b0'/><stop offset='.4' stop-color='%23ffb347'/><stop offset='.75' stop-color='%23ff5e3a'/><stop offset='1' stop-color='%23961000'/></linearGradient></defs><path d='M72 32 C52 6 20 4 2 18 C20 22 30 32 36 46 C22 44 10 52 4 66 C24 60 38 64 45 74 C42 58 48 48 57 44 C62 54 67 63 70 74 C72 58 72 44 72 32 Z' fill='url(%23p)' stroke='%238a2a00' stroke-width='1.7'/><path d='M78 32 C98 6 130 4 148 18 C130 22 120 32 114 46 C128 44 140 52 146 66 C126 60 112 64 105 74 C108 58 102 48 93 44 C88 54 83 63 80 74 C78 58 78 44 78 32 Z' fill='url(%23p)' stroke='%238a2a00' stroke-width='1.7'/><path d='M75 8 C69 18 70 26 75 34 C80 26 81 18 75 8 Z' fill='%23ffe066'/></svg>");
  background-size: 120% auto; background-position: 50% 50%;
  filter: drop-shadow(0 0 12px rgba(255, 150, 40, .85));
  animation: decorFloat 4.4s ease-in-out infinite;
}
.ad-lightning::before {
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 72'><defs><linearGradient id='l' x1='0' y1='0' x2='0' y2='1'><stop offset='0' stop-color='%23ffffff'/><stop offset='.35' stop-color='%237fe7ff'/><stop offset='1' stop-color='%232a6bff'/></linearGradient></defs><path d='M34 4 L16 38 L28 38 L18 68 L46 30 L32 30 L44 4 Z' fill='url(%23l)' stroke='%23bfe9ff' stroke-width='1.4' stroke-linejoin='round'/><path d='M86 4 L104 38 L92 38 L102 68 L74 30 L88 30 L76 4 Z' fill='url(%23l)' stroke='%23bfe9ff' stroke-width='1.4' stroke-linejoin='round'/></svg>");
  background-size: 62% auto; background-position: 50% -4%;
  filter: drop-shadow(0 0 12px rgba(120, 200, 255, .9));
  animation: decorFlicker 1.3s ease-in-out infinite;
}
.ad-diamondcrown::before {
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 60'><defs><linearGradient id='dc' x1='0' y1='0' x2='0' y2='1'><stop offset='0' stop-color='%23ffffff'/><stop offset='.4' stop-color='%23bfefff'/><stop offset='.75' stop-color='%236fb8e0'/><stop offset='1' stop-color='%232b6f9e'/></linearGradient></defs><path d='M6 54 L3 22 L26 40 L37 8 L50 36 L63 8 L74 40 L97 22 L94 54 Z' fill='url(%23dc)' stroke='%232f6b95' stroke-width='2.2' stroke-linejoin='round'/><rect x='7' y='47' width='86' height='11' rx='3.5' fill='url(%23dc)' stroke='%232f6b95' stroke-width='2'/><polygon points='26,44 31,49 26,55 21,49' fill='%23e6fbff'/><polygon points='50,42 56,49 50,57 44,49' fill='%23e6fbff'/><polygon points='74,44 79,49 74,55 69,49' fill='%23e6fbff'/><circle cx='37' cy='7' r='3.4' fill='%23ffffff'/><circle cx='63' cy='7' r='3.4' fill='%23ffffff'/></svg>");
  background-size: 62% auto; background-position: 50% -8%;
  animation: decorGlow 2.8s ease-in-out infinite;
}
.ad-skull::before {
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 70'><defs><linearGradient id='sk' x1='0' y1='0' x2='0' y2='1'><stop offset='0' stop-color='%23f2f4f7'/><stop offset='.55' stop-color='%23c3c9d2'/><stop offset='1' stop-color='%236a7280'/></linearGradient></defs><path d='M60 6 C38 6 24 20 24 40 C24 51 31 56 33 65 L87 65 C89 56 96 51 96 40 C96 20 82 6 60 6 Z' fill='url(%23sk)' stroke='%23454c58' stroke-width='1.8'/><ellipse cx='45' cy='38' rx='9' ry='10' fill='%23101620'/><ellipse cx='75' cy='38' rx='9' ry='10' fill='%23101620'/><circle cx='45' cy='38' r='3.4' fill='%23ff3b3b'/><circle cx='75' cy='38' r='3.4' fill='%23ff3b3b'/><path d='M55 50 L65 50 L60 58 Z' fill='%23454c58'/><g stroke='%23454c58' stroke-width='1.4'><path d='M52 65 L52 60'/><path d='M60 65 L60 59'/><path d='M68 65 L68 60'/></g></svg>");
  background-size: 58% auto; background-position: 50% -6%;
  filter: drop-shadow(0 0 9px rgba(255, 60, 60, .55));
  animation: decorFloat 5.5s ease-in-out infinite;
}

/* ---------- Efectos de portada super premium ---------- */
@keyframes bfxSway { 0%, 100% { background-position: 0 0; } 50% { background-position: 24px -18px; } }
@keyframes bfxMeteor { from { background-position: 0 -60px; } to { background-position: -120px 220px; } }
@keyframes bfxRise { from { background-position: 0 0; } to { background-position: 0 -180px; } }
@keyframes bfxNebula { 0%, 100% { background-position: 0% 50%; transform: scale(1.05); } 50% { background-position: 100% 50%; transform: scale(1.12); } }
.bfx-galaxy {
  background:
    radial-gradient(closest-side at 30% 40%, rgba(140, 80, 255, .55), transparent 70%),
    radial-gradient(closest-side at 70% 60%, rgba(60, 140, 255, .5), transparent 70%),
    radial-gradient(1.6px 1.6px at 40px 30px, #fff, transparent),
    radial-gradient(1.4px 1.4px at 130px 80px, #dbe8ff, transparent),
    radial-gradient(1.8px 1.8px at 220px 40px, #fff, transparent),
    radial-gradient(1.4px 1.4px at 300px 110px, #ffe9a8, transparent);
  background-size: 160% 160%, 160% 160%, 320px 180px, 320px 180px, 320px 180px, 320px 180px;
  mix-blend-mode: screen;
  animation: bfxNebula 14s ease-in-out infinite;
}
.bfx-meteors {
  background-image:
    linear-gradient(38deg, transparent 46%, rgba(255, 210, 140, .95) 50%, transparent 54%),
    linear-gradient(38deg, transparent 46%, rgba(255, 150, 60, .85) 50%, transparent 54%);
  background-size: 90px 8px, 140px 6px;
  background-repeat: repeat, repeat;
  opacity: .95;
  animation: bfxMeteor 5s linear infinite;
}
.bfx-fireflies {
  background-image:
    radial-gradient(2.4px 2.4px at 40px 60px, #eaff7a, transparent),
    radial-gradient(2px 2px at 120px 30px, #b6ff5c, transparent),
    radial-gradient(2.6px 2.6px at 200px 90px, #fff59a, transparent),
    radial-gradient(1.8px 1.8px at 270px 50px, #d9ff8a, transparent);
  background-size: 300px 180px;
  animation: bfxSway 7s ease-in-out infinite, bfxTwinkle 3s ease-in-out infinite;
}
.bfx-runes {
  background-image:
    radial-gradient(1.6px 1.6px at 30px 30px, #7ffff0, transparent),
    radial-gradient(1.6px 1.6px at 90px 70px, #a0fff4, transparent),
    radial-gradient(2px 2px at 160px 40px, #5ff0e0, transparent),
    radial-gradient(1.6px 1.6px at 230px 100px, #bffff8, transparent);
  background-size: 280px 160px;
  filter: drop-shadow(0 0 4px rgba(90, 255, 230, .8));
  animation: bfxSway 9s ease-in-out infinite, bfxTwinkle 2.6s ease-in-out infinite;
}
.bfx-hearts {
  background-image:
    radial-gradient(3px 3px at 40px 60px, #ff7ab8, transparent),
    radial-gradient(2.6px 2.6px at 120px 30px, #ff5a9e, transparent),
    radial-gradient(3.2px 3.2px at 200px 90px, #ff9ec7, transparent),
    radial-gradient(2.4px 2.4px at 270px 40px, #ff7ab8, transparent);
  background-size: 300px 180px;
  opacity: .92;
  animation: bfxRise 7s linear infinite;
}

/* ---------- Insignias super premium ---------- */
@keyframes badgeImmortalPulse {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75), 0 0 12px rgba(255, 120, 20, .6); }
  50% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75), 0 0 24px rgba(255, 150, 30, 1); }
}
@keyframes badgeMythicPulse {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 0 12px rgba(160, 70, 255, .6); }
  50% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 0 26px rgba(190, 110, 255, 1); }
}
@keyframes badgeCelestialPulse {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 0 14px rgba(120, 220, 255, .6); }
  50% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 0 28px rgba(180, 240, 255, 1); }
}
.badge-inmortal {
  color: #2a1000; background: linear-gradient(180deg, #ffe6b0, #ff8a1a 40%, #b23a06 74%, #4a1502 100%);
  border-color: #ffd9a0; animation: badgeImmortalPulse 2.6s ease-in-out infinite;
}
.badge-mitico {
  color: #f6ecff; background: linear-gradient(180deg, #e9d0ff, #a95cff 40%, #6a1fc0 74%, #2c0a52 100%);
  border-color: #e3ccff; animation: badgeMythicPulse 2.6s ease-in-out infinite;
}
.badge-celestial {
  color: #06222e; background: linear-gradient(180deg, #eafcff, #9fe9ff 38%, #4fb6e0 72%, #125a80 100%);
  border-color: #dff8ff; animation: badgeCelestialPulse 2.6s ease-in-out infinite;
}

/* ---------- Cosméticos visibles en llamadas ---------- */
.call-participant .avatar.cp { position: relative; overflow: visible; }
.call-participant .cp-name { display: inline-flex; align-items: center; gap: 5px; }
.call-participant .cp-name .chat-badge { font-size: 9px; padding: 1px 5px; }

/* ---------- Cosméticos visibles en el chat ---------- */
.chat-avatar { position: relative; overflow: visible; }
.chat-avatar .av-decor { inset: -22%; }
.chat-name.nfx-shine, .chat-name.nfx-neon, .chat-name.nfx-hologram,
.chat-name.nfx-fire, .chat-name.nfx-rainbowflow, .chat-name.nfx-glitch,
.chat-name.nfx-void, .chat-name.nfx-ice, .chat-name.nfx-toxic,
.chat-name.nfx-blood, .chat-name.nfx-supernova { -webkit-background-clip: text; background-clip: text; }

/* ======================================================================
   SOUNDBOARD (audios premium tipo Discord)
   ====================================================================== */
.chat-head-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.chat-sound-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 12px; flex-shrink: 0;
  font-size: 13px; font-weight: 700; color: var(--accent);
  background: var(--accent-soft); border: 1px solid rgba(0, 255, 128, 0.45);
  transition: border-color .2s, background .2s, transform .15s;
}
.chat-sound-pill svg { width: 16px; height: 16px; }
.chat-sound-pill:hover { border-color: var(--accent); transform: translateY(-1px); }

.sound-panel {
  position: fixed; right: 14px; bottom: 96px; z-index: 900;
  width: 340px; max-width: calc(100vw - 28px); max-height: 72vh;
  display: flex; flex-direction: column;
  padding: 12px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(30,16,50,0.98) 0%, rgba(14,10,28,0.99) 100%);
  border: 1px solid rgba(0,255,128,0.55);
  box-shadow: 0 16px 46px rgba(0,0,0,0.65), inset 0 0 0 1px rgba(255,255,255,0.03);
  color: var(--text); backdrop-filter: blur(10px);
}
.sound-panel.hidden { display: none; }
.sp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.sp-title { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim); }
.sp-title svg { width: 16px; height: 16px; color: var(--accent); }
.sp-close { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 15px; line-height: 1; padding: 2px 4px; }
.sp-close:hover { color: var(--text); }
.sp-locked { text-align: center; padding: 10px 6px 6px; }
.sp-lock-ico { font-size: 30px; line-height: 1; margin-bottom: 8px; }
.sp-lock-title { font-size: 15px; font-weight: 800; margin-bottom: 6px; }
.sp-lock-text { font-size: 12px; color: var(--text-dim); line-height: 1.5; margin-bottom: 14px; }
.sp-unlock { width: 100%; }
.sp-body { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.sp-play-row { display: flex; gap: 8px; }
.sp-play-row input {
  flex: 1; min-width: 0; padding: 9px 12px; border-radius: 10px;
  background: var(--bg-2); border: 1px solid var(--border); color: var(--text);
  font-size: 15px; font-weight: 700; letter-spacing: 0.02em;
}
.sp-play-row input:focus { border-color: var(--accent); outline: none; }
.sp-hint { font-size: 11px; color: var(--text-muted); }
.sp-search {
  padding: 8px 11px; border-radius: 10px; background: var(--bg-2);
  border: 1px solid var(--border); color: var(--text); font-size: 12.5px;
}
.sp-search:focus { border-color: var(--accent); outline: none; }
.sp-list {
  display: flex; flex-direction: column; gap: 4px;
  overflow-y: auto; min-height: 60px; max-height: 42vh; padding-right: 2px;
}
.sp-item {
  display: flex; align-items: center; gap: 9px; text-align: left;
  padding: 7px 10px; border-radius: 9px; cursor: pointer;
  background: rgba(255,255,255,0.03); border: 1px solid transparent; color: var(--text);
  transition: background .15s, border-color .15s;
}
.sp-item:hover { background: rgba(0,255,128,0.10); border-color: rgba(0,255,128,0.4); }
.sp-code { flex: 0 0 auto; font-size: 12px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; min-width: 40px; }
.sp-lbl { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-empty { font-size: 12px; color: var(--text-muted); padding: 12px 4px; text-align: center; }

.sound-now {
  position: fixed; left: 16px; bottom: 18px; z-index: 950;
  display: none; align-items: center; gap: 9px;
  padding: 9px 14px; border-radius: 999px;
  background: linear-gradient(135deg, rgba(0,255,128,0.18), rgba(20,12,36,0.95));
  border: 1px solid rgba(0,255,128,0.5);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  color: var(--text); font-size: 12.5px; font-weight: 700;
  opacity: 0; transform: translateY(12px); transition: opacity .25s, transform .25s;
  pointer-events: none;
}
.sound-now.in { opacity: 1; transform: translateY(0); }
.sound-now .sn-ico {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: #04140c; font-size: 13px;
  animation: snPulse 1s ease-in-out infinite;
}
@keyframes snPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.14); } }

.chat-sound-btn {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 4px;
  padding: 6px 11px; border-radius: 9px; cursor: pointer;
  background: rgba(0,255,128,0.12); border: 1px solid rgba(0,255,128,0.45);
  color: var(--text); font-size: 12.5px; font-weight: 700;
  transition: background .15s, transform .15s;
}
.chat-sound-btn:hover { background: rgba(0,255,128,0.22); transform: translateY(-1px); }
.chat-sound-btn .csb-ico { color: var(--accent); font-size: 11px; }
.chat-sound-btn .csb-code { color: var(--accent); font-variant-numeric: tabular-nums; }
.chat-sound-btn .csb-label { font-weight: 600; color: var(--text-dim); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.si-thumb-sb svg { width: 26px; height: 26px; color: var(--accent); }
