@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@700;900&family=Vazirmatn:wght@300;400;500;700;900&display=swap');

:root {
  --bg:      #080b14;
  --bg2:     #0e1222;
  --bg3:     #151929;
  --cyan:    #00e5ff;
  --cyan2:   #00b8d9;
  --x-col:   #ff3d5a;
  --o-col:   #ffd600;
  --gold:    #ffd600;
  --text:    #e8edf5;
  --text2:   #6b7a99;
  --border:  #1e2540;
  --success: #00e676;
  --r: 14px;
}

* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color: transparent; }

body {
  font-family: 'Vazirmatn', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  direction: rtl;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

/* ── PAGES ── */
.page { display:none; min-height:100vh; }
.page.active { display:block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }

/* ── AUTH ── */
.auth-bg {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.auth-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 50%, rgba(0,229,255,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 30%, rgba(255,61,90,0.05) 0%, transparent 60%);
}

/* live board bg */
#bg-board {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 2px;
  opacity: 0.04;
  pointer-events: none;
}
#bg-board div {
  border: 1px solid var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20vw;
  font-weight: 900;
}

.auth-card {
  position: relative;
  z-index: 10;
  background: rgba(14,18,34,0.9);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0,229,255,0.15);
  border-radius: 24px;
  padding: 44px 40px;
  width: 400px;
  max-width: 95vw;
  box-shadow:
    0 0 0 1px rgba(0,229,255,0.05),
    0 40px 80px rgba(0,0,0,0.5),
    0 0 60px rgba(0,229,255,0.04);
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 32px;
}
.logo-x { font-family: 'Orbitron', monospace; font-size: 2.2rem; color: var(--x-col); text-shadow: 0 0 20px var(--x-col); }
.logo-o { font-family: 'Orbitron', monospace; font-size: 2.2rem; color: var(--o-col); text-shadow: 0 0 20px var(--o-col); }
.logo-title { font-family: 'Orbitron', monospace; font-size: 1.2rem; font-weight: 700; letter-spacing: 2px; color: var(--text); }

.auth-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 28px;
  background: var(--bg3);
  border-radius: 12px;
  padding: 5px;
  border: 1px solid var(--border);
}
.tab-btn {
  flex: 1;
  padding: 11px;
  border: none;
  background: transparent;
  color: var(--text2);
  border-radius: 9px;
  cursor: pointer;
  font-family: 'Vazirmatn', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.25s;
}
.tab-btn.active {
  background: linear-gradient(135deg, rgba(0,229,255,0.2), rgba(0,229,255,0.08));
  color: var(--cyan);
  border: 1px solid rgba(0,229,255,0.3);
  box-shadow: 0 0 16px rgba(0,229,255,0.1);
}

.inp {
  width: 100%;
  padding: 14px 18px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-family: 'Vazirmatn', sans-serif;
  font-size: 1rem;
  margin-bottom: 12px;
  outline: none;
  transition: all 0.2s;
  direction: rtl;
  -webkit-appearance: none;
}
.inp:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0,229,255,0.08);
  background: #181d30;
}
.inp::placeholder { color: var(--text2); }

.btn-primary {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, var(--cyan), var(--cyan2));
  color: #080b14;
  border: none;
  border-radius: 12px;
  font-family: 'Vazirmatn', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 6px;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 24px rgba(0,229,255,0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,229,255,0.35); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  padding: 12px 24px;
  background: var(--bg3);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: 'Vazirmatn', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-secondary:hover { border-color: var(--cyan); color: var(--cyan); }

.err-msg { font-size: 0.83rem; margin-top: 10px; text-align: center; min-height: 20px; color: var(--x-col); }
.err-msg.success-msg { color: var(--success); }

/* ── NAVBAR ── */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: rgba(14,18,34,0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-logo {
  font-family: 'Orbitron', monospace;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--cyan);
}
.nav-user { display: flex; align-items: center; gap: 14px; }
.nav-name { font-weight: 700; font-size: 0.9rem; display: inline-flex; align-items: center; }
.nav-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--cyan);
  cursor: pointer;
  box-shadow: 0 0 12px rgba(0,229,255,0.3);
  transition: all 0.2s;
}
.nav-avatar:hover { transform: scale(1.08); box-shadow: 0 0 20px rgba(0,229,255,0.5); }

.coin-badge {
  background: rgba(255,214,0,0.1);
  border: 1px solid rgba(255,214,0,0.3);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.3px;
}

.back-btn, .btn-logout {
  padding: 8px 18px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text2);
  font-family: 'Vazirmatn', sans-serif;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s;
}
.back-btn:hover { border-color: var(--cyan); color: var(--cyan); }
.btn-logout:hover { border-color: var(--x-col); color: var(--x-col); }

/* ── MAIN MENU ── */
.main-content { padding: 40px 28px; max-width: 760px; margin: 0 auto; }

.main-greeting {
  margin-bottom: 32px;
}
.main-greeting h1 {
  font-family: 'Orbitron', monospace;
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 1px;
}
.main-greeting h1 span { color: var(--cyan); }
.main-greeting p { color: var(--text2); margin-top: 6px; font-size: 0.9rem; }

.menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.menu-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.menu-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, var(--card-glow,rgba(0,229,255,0.05)) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
}
.menu-card:hover::before { opacity: 1; }
.menu-card:hover {
  border-color: rgba(0,229,255,0.4);
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.4), 0 0 0 1px rgba(0,229,255,0.1);
}
.menu-card.game-card { --card-glow: rgba(255,61,90,0.08); }
.menu-card.lb-card { --card-glow: rgba(255,214,0,0.08); }
.menu-card.shop-card { --card-glow: rgba(0,229,255,0.08); }
.menu-card.profile-card { --card-glow: rgba(0,230,118,0.08); }

.menu-icon { font-size: 3rem; margin-bottom: 14px; display: block; }
.menu-label { font-size: 1.05rem; font-weight: 800; letter-spacing: 0.3px; }
.menu-sub { font-size: 0.8rem; color: var(--text2); margin-top: 8px; }

/* ── REACTION GAME ── */
.rg-screen {
  position: fixed;
  inset: 57px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  z-index: 300;
  background: rgba(7,9,15,0.97);
  backdrop-filter: blur(12px);
  padding: 20px;
  overflow-y: auto;
}
.rg-obj {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.08s;
  animation: rgFallIn 0.18s cubic-bezier(.34,1.56,.64,1);
  touch-action: manipulation;
  user-select: none;
}
.rg-obj:active { transform: scale(0.88) !important; }
@keyframes rgFallIn {
  from { transform: scale(0) rotate(-20deg); opacity:0; }
  to   { transform: scale(1) rotate(0deg);  opacity:1; }
}
.rg-obj.star {
  background: radial-gradient(circle at 35% 35%, #fff9c4, #ffe600 50%, #f57f00);
  box-shadow: 0 0 24px rgba(255,230,0,0.6), 0 0 60px rgba(255,230,0,0.2);
  animation: rgFallIn 0.18s cubic-bezier(.34,1.56,.64,1), rgStarPulse 1.2s ease-in-out infinite;
}
.rg-obj.bomb {
  background: radial-gradient(circle at 35% 30%, #555, #111 60%);
  box-shadow: 0 0 16px rgba(255,45,85,0.3);
}
.rg-obj.bomb::before {
  content: '';
  position: absolute;
  top: -12px; right: 42%;
  width: 6px; height: 14px;
  background: #888;
  border-radius: 3px;
  transform: rotate(15deg);
}
.rg-obj.bomb::after {
  content: '🔥';
  position: absolute;
  top: -22px; right: 38%;
  font-size: 1rem;
  animation: rgFlicker 0.3s infinite alternate;
}
@keyframes rgFlicker { from{opacity:1;transform:scale(1)} to{opacity:0.6;transform:scale(0.85)} }
@keyframes rgStarPulse {
  0%,100% { box-shadow: 0 0 24px rgba(255,230,0,0.6), 0 0 60px rgba(255,230,0,0.2); }
  50%      { box-shadow: 0 0 36px rgba(255,230,0,0.9), 0 0 80px rgba(255,230,0,0.35); }
}
.rg-obj-emoji { font-size: 1.8rem; z-index:1; pointer-events:none; }
.rg-feedback {
  position: absolute;
  font-family: 'Orbitron', monospace;
  font-weight: 900;
  font-size: 1.5rem;
  pointer-events: none;
  animation: rgFloatUp 0.7s ease forwards;
  z-index: 200;
  white-space: nowrap;
}
@keyframes rgFloatUp {
  0%   { opacity:1; transform: translateY(0) scale(1); }
  100% { opacity:0; transform: translateY(-80px) scale(0.7); }
}
@keyframes rgShake {
  0%,100% { transform:translateX(0); }
  20%     { transform:translateX(-8px); }
  40%     { transform:translateX(8px); }
  60%     { transform:translateX(-5px); }
  80%     { transform:translateX(5px); }
}
.rg-shake { animation: rgShake 0.4s ease; }
.rg-lb-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 10px;
  margin-bottom: 6px;
  background: rgba(255,255,255,0.04);
  font-size: 0.85rem;
}
.rg-lb-row.me { background: rgba(255,230,0,0.08); border: 1px solid rgba(255,230,0,0.2); }

/* canvas particles */
#particles { position:fixed; top:0; left:0; pointer-events:none; z-index:999; }

/* ── LEADERBOARD ── */
.lb-content { padding: 28px; max-width: 700px; margin: 0 auto; }
.lb-header { margin-bottom: 24px; }
.lb-header h2 { font-family: 'Orbitron', monospace; font-size: 1.1rem; letter-spacing: 2px; color: var(--gold); }

.lb-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
  background: var(--bg2);
  border-radius: 12px;
  padding: 5px;
  border: 1px solid var(--border);
}
.lb-list { display: flex; flex-direction: column; gap: 10px; }

.lb-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 20px;
  transition: all 0.2s;
}
.lb-item:hover { border-color: rgba(0,229,255,0.3); transform: translateX(-4px); }
.lb-item.me { border-color: var(--cyan); background: rgba(0,229,255,0.04); }

.lb-rank { font-family: 'Orbitron', monospace; font-size: 1rem; font-weight: 900; min-width: 40px; text-align: center; }
.lb-rank.gold { color: var(--gold); text-shadow: 0 0 12px rgba(255,214,0,0.5); }
.lb-rank.silver { color: #b0bec5; }
.lb-rank.bronze { color: #ff8f00; }
.lb-avatar-wrap { position: relative; flex-shrink: 0; display: inline-flex; }
.lb-avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); flex-shrink: 0; max-width: 46px; max-height: 46px; }
.lb-corner-badge { position: absolute; bottom: -4px; right: -6px; font-size: 1.1rem; line-height: 1; filter: drop-shadow(0 0 4px currentColor); pointer-events: none; }

.kamil-lion-badge { position: absolute; top: -4px; right: -6px; font-size: 1.1rem; line-height: 1; filter: drop-shadow(0 0 6px #ffd600); pointer-events: none; }
.lb-name { flex: 1; font-weight: 700; font-size: 0.95rem; }
.lb-val { font-family: 'Orbitron', monospace; font-size: 1rem; font-weight: 700; }

/* ── SHOP ── */
.shop-content { padding: 28px; max-width: 700px; margin: 0 auto; }
.shop-section { margin-bottom: 40px; }
.shop-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text2);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.shop-avatars { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 20px; }

.shop-avatar-item {
  position: relative;
  cursor: pointer;
  border-radius: 14px;
  border: 2px solid var(--border);
  transition: all 0.25s;
  overflow: hidden;
  background: var(--bg2);
}
.shop-avatar-item:hover { border-color: var(--cyan); transform: scale(1.07); box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
.shop-avatar-item.owned { border-color: var(--success); }
.shop-avatar-item.equipped { border-color: var(--gold); box-shadow: 0 0 20px rgba(255,214,0,0.2); }
.shop-avatar-item img { width: 84px; height: 84px; object-fit: cover; display: block; }

.shop-avatar-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  padding: 4px 6px 2px;
  background: rgba(0,0,0,0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 88px;
}

.shop-avatar-badge {
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 4px;
  letter-spacing: 0.5px;
}
.badge-price { background: rgba(0,0,0,0.85); color: #ffd600; }
.badge-owned { background: rgba(0,230,118,0.9); color: #080b14; }
.badge-equipped { background: rgba(255,214,0,0.95); color: #080b14; }

.upload-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 12px 22px;
  font-size: 0.9rem;
}

.name-change-box { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.name-change-box .inp { flex: 1; min-width: 200px; margin-bottom: 0; }
.name-change-box .btn-primary { width: auto; padding: 14px 22px; white-space: nowrap; }

/* ── PROFILE ── */
.profile-content { padding: 28px; max-width: 620px; margin: 0 auto; }
.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 44px 36px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.profile-header::before {
  content: '';
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,229,255,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.profile-avatar-wrap { position: relative; }
.profile-avatar {
  width: 110px; height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--cyan);
  box-shadow: 0 0 32px rgba(0,229,255,0.25);
}
.avatar-edit-btn {
  position: absolute;
  bottom: 2px; left: 2px;
  background: var(--cyan);
  border-radius: 50%;
  width: 32px; height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}
.profile-name { font-size: 1.3rem; font-weight: 900; letter-spacing: 1px; }
.profile-name .username-display,
.profile-name span { font-family: 'Vazirmatn', sans-serif !important; }
.profile-coins { font-size: 1rem; color: var(--gold); font-weight: 700; }
.profile-joined { font-size: 0.78rem; color: var(--text2); }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 12px;
  text-align: center;
  transition: all 0.2s;
}
.stat-card:hover { border-color: rgba(0,229,255,0.3); }
.stat-val { font-family: 'Orbitron', monospace; font-size: 1.7rem; font-weight: 900; color: var(--cyan); }
.stat-label { font-size: 0.78rem; color: var(--text2); margin-top: 6px; }

.avatar-wrap { cursor: pointer; }

/* ── RESPONSIVE — موبایل اول ── */
@media (max-width: 600px) {

  /* Auth */
  .auth-card { padding: 28px 18px; width: 100%; border-radius: 0; min-height: 100vh; justify-content: center; display: flex; flex-direction: column; }
  .auth-bg { align-items: flex-start; }
  .logo-x, .logo-o { font-size: 1.7rem; }
  .logo-title { font-size: 1rem; }

  /* Navbar */
  .navbar { padding: 10px 14px; }
  .nav-logo { font-size: 0.85rem; letter-spacing: 1px; }
  .nav-name { display: none; }
  .coin-badge { padding: 5px 10px; font-size: 0.8rem; }
  .nav-avatar { width: 32px; height: 32px; }
  .back-btn, .btn-logout { padding: 7px 12px; font-size: 0.8rem; }

  /* Main menu */
  .main-content { padding: 20px 14px; }
  .main-greeting { margin-bottom: 20px; }
  .main-greeting h1 { font-size: 1.2rem; }
  .menu-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .menu-card { padding: 22px 12px; border-radius: 16px; }
  .menu-icon { font-size: 2.2rem; margin-bottom: 10px; }
  .menu-label { font-size: 0.9rem; }
  .menu-sub { font-size: 0.72rem; }

  /* Leaderboard */
  .lb-content { padding: 16px 14px; }
  .lb-item { padding: 12px 14px; gap: 10px; }
  .lb-avatar { width: 36px; height: 36px; }
  .lb-name { font-size: 0.85rem; }
  .lb-val { font-size: 0.85rem; }
  .lb-rank { font-size: 0.85rem; min-width: 30px; }

  /* Shop */
  .shop-content { padding: 16px 14px; }
  .shop-avatar-item img { width: 70px; height: 70px; }
  .shop-avatars { gap: 10px; }
  .name-change-box { flex-direction: column; }
  .name-change-box .inp { min-width: unset; }
  .name-change-box .btn-primary { width: 100%; }

  /* Profile */
  .profile-content { padding: 16px 14px; }
  .profile-header { padding: 28px 18px; }
  .profile-avatar { width: 88px; height: 88px; }
  .profile-name { font-size: 1.05rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat-card { padding: 16px 8px; }
  .stat-val { font-size: 1.4rem; }

  /* Reaction game screens */
  .rg-screen { gap: 12px; padding: 14px; }
  .rg-screen > div[style*="font-size:4rem"] { font-size: 3rem !important; }
  .rg-screen > div[style*="font-size:1.8rem"] { font-size: 1.4rem !important; }

  /* Inputs & buttons */
  .inp { font-size: 1rem; padding: 13px 14px; } /* 1rem جلوی zoom روی iOS رو می‌گیره */
  .btn-primary { padding: 15px; font-size: 1rem; }
  .btn-secondary { padding: 13px 18px; font-size: 0.9rem; }

  /* Reaction HUD */
  #rg-hud { padding: 8px 14px !important; }
  #rg-score { font-size: 1.5rem !important; }
  #rg-timer-bar-bg { width: 90px !important; }
  #rg-lives { font-size: 1.1rem !important; letter-spacing: 2px !important; }
  #rg-arena { top: 140px !important; }
  #rg-level-badge { top: 115px !important; font-size: 0.65rem !important; }
}

/* ── RGB NAME ── */
.vip-rgb-name {
  font-weight: 800;
  background: linear-gradient(90deg, #ff0000, #ff7700, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: rgbShift 2s linear infinite;
}
@keyframes rgbShift {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* ── ADMIN ── */
.admin-content { padding: 24px 28px; max-width: 760px; margin: 0 auto; }
.admin-header { margin-bottom: 24px; }
.admin-title { font-family: 'Orbitron', monospace; font-size: 1.1rem; font-weight: 900; color: #ff3d5a; letter-spacing: 2px; }
.admin-sub { font-size: 0.78rem; color: var(--text2); margin-top: 4px; }

.admin-user-list { display: flex; flex-direction: column; gap: 10px; }

.admin-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 18px;
  flex-wrap: wrap;
  transition: all 0.2s;
}
.admin-user-row.banned {
  border-color: rgba(255,61,90,0.4);
  background: rgba(255,61,90,0.04);
  opacity: 0.7;
}

.admin-user-info { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.admin-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 1.5px solid var(--border); flex-shrink: 0; }
.admin-uname { font-weight: 700; font-size: 0.9rem; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.admin-umeta { font-size: 0.72rem; color: var(--text2); margin-top: 3px; }
.admin-ip { font-family: monospace; color: var(--cyan); }
.admin-tag-ban { background: rgba(255,61,90,0.2); color: #ff3d5a; font-size: 0.68rem; padding: 2px 7px; border-radius: 10px; font-weight: 800; }

.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-btn {
  padding: 7px 14px;
  border: none;
  border-radius: 9px;
  font-family: 'Vazirmatn', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.admin-btn.ban     { background: rgba(255,149,0,0.15); color: #ff9500; border: 1px solid rgba(255,149,0,0.3); }
.admin-btn.ban-ip  { background: rgba(199,125,255,0.15); color: #c77dff; border: 1px solid rgba(199,125,255,0.3); }
.admin-btn.unban   { background: rgba(0,230,118,0.15); color: var(--success); border: 1px solid rgba(0,230,118,0.3); }
.admin-btn.delete  { background: rgba(255,61,90,0.15); color: #ff3d5a; border: 1px solid rgba(255,61,90,0.3); }
.admin-btn:hover   { filter: brightness(1.2); transform: translateY(-1px); }

.admin-main-card { border-color: rgba(255,61,90,0.3) !important; position: relative; }
.admin-main-card:hover { border-color: rgba(255,61,90,0.6) !important; }
.admin-main-card span:first-child { color: #ff3d5a; }

@media (max-width: 600px) {
  .admin-content { padding: 16px 14px; }
  .admin-user-row { flex-direction: column; align-items: flex-start; }
  .admin-actions { width: 100%; }
  .admin-btn { flex: 1; text-align: center; }
}
.vip-subsection-title {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text2);
  letter-spacing: 1.5px;
  margin: 16px 0 10px;
  text-transform: uppercase;
}

.shop-section-sub {
  font-size: 0.78rem;
  color: var(--text2);
  margin-bottom: 14px;
  margin-top: -10px;
}

.vip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
}

.vip-item {
  position: relative;
  background: var(--bg3);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 90px;
}
.vip-item:hover {
  border-color: rgba(255,255,255,0.3);
  transform: translateY(-3px);
}
.vip-item.owned { border-color: var(--success); }
.vip-item.equipped {
  border-color: var(--gold);
  box-shadow: 0 0 20px rgba(255,214,0,0.2);
  background: rgba(255,214,0,0.06);
}

.vip-item-preview {
  font-size: 1.6rem;
  line-height: 1;
}
.vip-item-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text2);
  text-align: center;
}
.vip-item-price {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--gold);
}
.vip-item-status {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 20px;
}
.vip-item-status.s-equipped { background: rgba(255,214,0,0.2); color: var(--gold); }
.vip-item-status.s-owned { background: rgba(0,230,118,0.2); color: var(--success); }

/* badge glow preview */
.badge-preview {
  display: inline-block;
  font-size: 1.1rem;
  animation: badgeGlow 1.5s ease-in-out infinite alternate;
}
@keyframes badgeGlow {
  from { filter: drop-shadow(0 0 4px currentColor); }
  to   { filter: drop-shadow(0 0 12px currentColor) brightness(1.3); }
}

/* ── VIP در همه‌جا ── */
.username-display {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.user-emoji { font-size: 1em; }
.user-badge {
  font-size: 0.9em;
  animation: badgeGlow 1.5s ease-in-out infinite alternate;
}

/* ── LEADERBOARD NEW ── */
.lb-stats { text-align: left; }
.lb-stat-main {
  font-family: 'Orbitron', monospace;
  font-size: 1rem;
  font-weight: 900;
  color: var(--cyan);
}
.lb-stat-sub {
  font-size: 0.72rem;
  color: var(--text2);
  margin-top: 3px;
}
.lb-item {
  border-radius: 16px;
  transition: all 0.2s;
}
.lb-item:nth-child(1) { transform: scale(1.02); }

/* ── PLAY BUTTON ── */
.play-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 28px 28px;
  background: linear-gradient(135deg, rgba(255,45,85,0.15), rgba(255,149,0,0.1));
  border: 2px solid rgba(255,45,85,0.4);
  border-radius: 24px;
  cursor: pointer;
  font-family: 'Vazirmatn', sans-serif;
  color: var(--text);
  text-align: right;
  margin-bottom: 20px;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}
.play-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,45,85,0.08), transparent);
  opacity: 0;
  transition: opacity 0.25s;
}
.play-btn:hover::before { opacity: 1; }
.play-btn:hover {
  border-color: rgba(255,45,85,0.7);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(255,45,85,0.2);
}
.play-btn:active { transform: scale(0.98); }

.play-btn-icon {
  font-size: 3.2rem;
  animation: playPulse 1.5s ease-in-out infinite alternate;
  flex-shrink: 0;
}
@keyframes playPulse {
  from { transform: scale(1); filter: drop-shadow(0 0 8px rgba(255,45,85,0.5)); }
  to   { transform: scale(1.12); filter: drop-shadow(0 0 20px rgba(255,149,0,0.7)); }
}
.play-btn-title {
  font-size: 1.4rem;
  font-weight: 900;
  font-family: 'Orbitron', monospace;
  letter-spacing: 1px;
  color: #fff;
}
.play-btn-sub {
  font-size: 0.82rem;
  color: var(--text2);
  margin-top: 5px;
}
.play-btn-arrow {
  margin-right: auto;
  font-size: 1.6rem;
  color: rgba(255,45,85,0.6);
  flex-shrink: 0;
}

/* ── SUB MENU ── */
.sub-menu {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.sub-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
  transition: all 0.2s;
}
.sub-card span:first-child { font-size: 1.6rem; }
.sub-card:hover {
  border-color: rgba(0,229,255,0.3);
  transform: translateY(-3px);
  background: var(--bg3);
}

/* ── PLAY BTN کوچیک ── */
.play-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 22px;
  background: linear-gradient(135deg, rgba(255,45,85,0.12), rgba(255,149,0,0.08));
  border: 1.5px solid rgba(255,45,85,0.35);
  border-radius: 16px;
  cursor: pointer;
  font-family: 'Vazirmatn', sans-serif;
  color: var(--text);
  margin-bottom: 20px;
  transition: all 0.2s;
}
.play-btn:hover { border-color: rgba(255,45,85,0.6); transform: translateY(-2px); }
.play-btn:active { transform: scale(0.98); }
.play-btn-title { font-size: 1rem; font-weight: 800; }
.play-btn-arrow { color: rgba(255,45,85,0.7); font-size: 1.1rem; }

/* ── HOME LEADERBOARD ── */
.home-lb-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text2);
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}
.home-lb-more {
  color: var(--cyan);
  cursor: pointer;
  font-size: 0.8rem;
}
.home-lb-more:hover { opacity: 0.7; }

.home-lb-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }

.home-lb-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
}
.home-lb-row.me { border-color: var(--cyan); background: rgba(0,229,255,0.04); }
.home-lb-row:nth-child(1) { border-color: rgba(255,215,0,0.3); }
.home-lb-row:nth-child(2) { border-color: rgba(176,190,197,0.2); }
.home-lb-row:nth-child(3) { border-color: rgba(255,143,0,0.2); }

.home-lb-rank { font-family:'Orbitron',monospace; font-weight:900; min-width:28px; font-size:1rem; }
.home-lb-avatar { width:36px; height:36px; border-radius:50%; object-fit:cover; border:1.5px solid var(--border); max-width:36px; max-height:36px; }
.home-lb-row .lb-corner-badge { font-size: 0.95rem; bottom: -3px; right: -5px; }
.home-lb-name { flex:1; font-weight:700; font-size:0.88rem; }
.home-lb-score { font-family:'Orbitron',monospace; font-size:0.88rem; color:var(--cyan); font-weight:700; }

/* ── TEDDY ── */
.teddy-done {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(0,230,118,0.07);
  border: 1px solid rgba(0,230,118,0.25);
  border-radius: 16px;
  padding: 20px;
}
.teddy-step {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.teddy-step-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text2);
}
.teddy-link {
  display: block;
  background: rgba(0,229,255,0.08);
  border: 1px solid rgba(0,229,255,0.2);
  border-radius: 12px;
  padding: 12px 16px;
  color: var(--cyan);
  font-size: 0.82rem;
  word-break: break-all;
  text-decoration: none;
}
.teddy-link:hover { background: rgba(0,229,255,0.14); }
.teddy-status {
  font-size: 0.85rem;
  color: var(--text2);
  display: flex;
  align-items: center;
  gap: 8px;
}
.teddy-confirm {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px 0;
}
.teddy-tg-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--cyan);
  box-shadow: 0 0 20px rgba(0,229,255,0.3);
}
.teddy-tg-info { text-align: center; }
.teddy-question {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--gold);
  margin-top: 4px;
}

/* ── ADMIN NOTIFS ── */
.admin-notif-section {
  margin-bottom: 24px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
}
.admin-section-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text2);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.admin-notif-panel { display: flex; flex-direction: column; gap: 10px; }
.admin-notif-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: var(--bg3);
  border-radius: 12px;
  border: 1px solid var(--border);
}
.admin-notif-row.unseen {
  border-color: rgba(255,214,0,0.3);
  background: rgba(255,214,0,0.04);
}
.admin-notif-badge {
  background: #ff3d5a;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 900;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: -6px;
  left: -6px;
}

/* ── FLOATING VIP EMOJI روی پروفایل ── */
.profile-floating-emoji {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.8rem;
  animation: floatEmoji 2.2s ease-in-out infinite;
  filter: drop-shadow(0 0 8px rgba(255,255,255,0.4));
  pointer-events: none;
  z-index: 10;
}
@keyframes floatEmoji {
  0%   { transform: translateX(-50%) translateY(0px);   }
  50%  { transform: translateX(-50%) translateY(-10px); }
  100% { transform: translateX(-50%) translateY(0px);   }
}

/* ── USER PROFILE MODAL ── */
.uprofile-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px;
}
.uprofile-modal {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 20px; padding: 28px 24px; width: 100%;
  max-width: 340px; position: relative;
  animation: fadeIn 0.18s ease;
}
.uprofile-close {
  position: absolute; top: 14px; left: 14px;
  background: none; border: none; color: var(--text2);
  font-size: 1.1rem; cursor: pointer; padding: 4px 8px;
}
.uprofile-header { text-align: center; margin-bottom: 20px; }
.uprofile-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  object-fit: cover; border: 3px solid var(--border);
}
.uprofile-name { font-size: 1.1rem; font-weight: 800; margin: 10px 0 4px; }
.uprofile-joined { font-size: 0.78rem; color: var(--text2); }
.uprofile-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; margin-bottom: 18px;
}
.uprofile-stat {
  background: var(--bg); border-radius: 12px;
  padding: 10px 6px; text-align: center;
}
.uprofile-stat-val { font-family: 'Orbitron', monospace; font-size: 1rem; font-weight: 900; color: var(--cyan); }
.uprofile-stat-lbl { font-size: 0.72rem; color: var(--text2); margin-top: 3px; }

/* ── CHAT PAGE ── */
#page-chat { display: flex; flex-direction: column; height: 100vh; }
.chat-header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  background: var(--bg2); flex-shrink: 0;
}
#chat-title { flex: 1; font-weight: 800; font-size: 1rem; }
.chat-messages {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.chat-msg { display: flex; flex-direction: column; max-width: 75%; }
.chat-msg.mine { align-self: flex-end; align-items: flex-end; }
.chat-msg.theirs { align-self: flex-start; align-items: flex-start; }
.chat-bubble {
  padding: 10px 14px; border-radius: 16px;
  font-size: 0.92rem; line-height: 1.5; word-break: break-word;
}
.chat-msg.mine .chat-bubble { background: var(--cyan); color: #000; border-bottom-right-radius: 4px; }
.chat-msg.theirs .chat-bubble { background: var(--bg2); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.chat-time { font-size: 0.68rem; color: var(--text2); margin-top: 3px; padding: 0 4px; }
.chat-input-row {
  display: flex; gap: 10px; padding: 12px 16px;
  border-top: 1px solid var(--border); background: var(--bg2); flex-shrink: 0;
}
#chat-input {
  flex: 1; background: var(--bg); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 14px; color: var(--text);
  font-size: 0.92rem; outline: none; font-family: inherit;
}
#chat-input:focus { border-color: var(--cyan); }
.chat-send-btn {
  background: var(--cyan); color: #000; border: none;
  border-radius: 12px; padding: 10px 18px; font-weight: 800;
  font-size: 1rem; cursor: pointer; flex-shrink: 0;
}

/* ── GROUPS LIST ── */
.groups-list { padding: 12px 16px; max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 2px; }
.group-create-form {
  padding: 16px 20px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.group-create-form .inp { margin-bottom: 0; }
.group-icon-wrap {
  flex-shrink: 0;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(0,229,255,0.15), rgba(199,125,255,0.15));
  border: 1.5px solid rgba(0,229,255,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
}
.msgs-empty { text-align:center; color:var(--text2); padding:60px 20px; font-size:0.95rem; line-height:2; }
.conv-row { display:flex; align-items:center; gap:14px; padding:14px 16px; border-radius:16px; cursor:pointer; transition:background 0.15s; }
.conv-row:hover { background:var(--bg2); }
.conv-info { flex:1; min-width:0; }
.conv-top { display:flex; justify-content:space-between; align-items:center; margin-bottom:4px; }
.conv-name { font-weight:700; font-size:0.92rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.conv-time { font-size:0.72rem; color:var(--text2); flex-shrink:0; margin-right:8px; }
.conv-bottom { display:flex; align-items:center; gap:8px; }
.conv-preview { font-size:0.82rem; color:var(--text2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; flex:1; }

/* ── GROUP CHAT ── */
#page-groupchat { display:flex; flex-direction:column; height:100vh; min-height:100dvh; }

.gchat-msg {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 82%;
  position: relative;
}
.gchat-msg.mine {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.gchat-msg.theirs {
  align-self: flex-start;
}
.gchat-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: transform 0.15s;
}
.gchat-avatar:hover { transform: scale(1.1); }
.gchat-bubble-wrap { display:flex; flex-direction:column; gap:3px; min-width:0; }
.gchat-sender { font-size:0.72rem; font-weight:700; color:var(--cyan); margin-bottom:2px; display:inline-flex; align-items:center; gap:4px; }
.gchat-bubble {
  padding: 9px 13px;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.5;
  word-break: break-word;
}
.mine-bubble { background: var(--cyan); color:#000; border-bottom-right-radius:4px; }
.theirs-bubble { background:var(--bg2); border:1px solid var(--border); border-bottom-left-radius:4px; }

.gchat-reply-btn {
  background: none; border: none;
  color: var(--text2); cursor: pointer;
  font-size: 1rem; padding: 4px 6px;
  border-radius: 6px; opacity: 0;
  transition: opacity 0.15s, color 0.15s;
  align-self: center;
}
.gchat-msg:hover .gchat-reply-btn { opacity: 1; }
.gchat-reply-btn:hover { color: var(--cyan); }

/* ریپلای quote داخل حباب */
.gchat-reply-quote {
  background: rgba(0,229,255,0.08);
  border-right: 3px solid var(--cyan);
  border-radius: 8px;
  padding: 6px 10px;
  margin-bottom: 4px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 100%;
  overflow: hidden;
}
.gchat-reply-from { font-size:0.7rem; font-weight:800; color:var(--cyan); }
.gchat-reply-snippet { font-size:0.78rem; color:var(--text2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* نوار ریپلای پایین */
.gchat-reply-bar {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 8px 16px;
  flex-shrink: 0;
}
.gchat-reply-preview {
  display: flex; align-items: center; gap: 10px;
  background: rgba(0,229,255,0.07);
  border-right: 3px solid var(--cyan);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.82rem; color: var(--text2);
}
.gchat-reply-cancel {
  background: none; border: none; color: var(--text2);
  cursor: pointer; font-size: 1rem; margin-right: auto; padding: 0 4px;
}
.gchat-reply-cancel:hover { color: var(--x-col); }

/* هایلایت پیام هنگام اسکرول */
@keyframes gchatPing {
  0%,100% { background: transparent; }
  30%     { background: rgba(0,229,255,0.12); }
}
.gchat-highlight { animation: gchatPing 1.5s ease; border-radius: 12px; }

#gchat-input {
  flex:1; background:var(--bg); border:1px solid var(--border);
  border-radius:12px; padding:10px 14px; color:var(--text);
  font-size:0.92rem; outline:none; font-family:inherit;
}
#gchat-input:focus { border-color:var(--cyan); }

/* sub-menu چهارتایی */
.sub-menu { grid-template-columns: repeat(4,1fr); }

/* ── GROUP MSG ACTIONS ── */
.gchat-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-self: center;
  opacity: 0;
  transition: opacity 0.15s;
}
.gchat-msg:hover .gchat-actions { opacity: 1; }
.gchat-del-btn {
  background: none; border: none;
  cursor: pointer; font-size: 0.85rem;
  padding: 3px 6px; border-radius: 6px;
  opacity: 0.6; transition: opacity 0.15s, background 0.15s;
}
.gchat-del-btn:hover { opacity: 1; background: rgba(255,45,85,0.15); }

/* ── CHAT SECTION LABEL ── */
.chat-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text2);
  text-transform: uppercase;
  padding: 4px 4px 0;
  margin-top: 4px;
}

/* chat-menu دوتایی */
.chat-menu { grid-template-columns: repeat(2,1fr); }

/* conv-row برای لیست DM */
.conv-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}
.conv-row:hover { background: rgba(255,255,255,0.04); }
.conv-info { flex: 1; min-width: 0; }
.conv-top { display: flex; justify-content: space-between; align-items: center; }
.conv-name { font-weight: 700; font-size: 0.95rem; }
.conv-time { font-size: 0.72rem; color: var(--text2); }
.conv-bottom { margin-top: 3px; }
.conv-preview { font-size: 0.8rem; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }

/* ── UNREAD BADGE ── */
.unread-badge {
  position: absolute;
  top: -4px;
  left: -4px;
  min-width: 18px;
  height: 18px;
  background: var(--x-col);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 900;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--bg);
  line-height: 1;
  font-family: 'Orbitron', monospace;
}

.group-icon-wrap {
  position: relative;
  flex-shrink: 0;
}

.conv-name-unread {
  font-weight: 900;
  color: var(--text);
}

.conv-preview-unread {
  color: var(--text);
  font-weight: 600;
}

/* ── WELCOME PAGE ── */
.welcome-card {
  gap: 12px;
  align-items: center;
  text-align: center;
}
.welcome-title {
  font-family: 'Orbitron', monospace;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--cyan);
}
.welcome-sub {
  font-size: 0.9rem;
  color: var(--text2);
  line-height: 1.6;
}
.welcome-avatar-wrap {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 8px auto;
}
.welcome-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--cyan);
  background: var(--bg2);
}
.welcome-avatar-edit {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 30px;
  background: var(--cyan);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  border: 2px solid var(--bg);
}
.welcome-hint {
  font-size: 0.78rem;
  color: var(--text2);
  line-height: 1.6;
}

/* ── AVATAR FRAME ── */
.avatar-framed {
  display: block;
}

@keyframes rgbFrame {
  0%   { border-color: #ff3d5a; box-shadow: 0 0 10px #ff3d5a88; }
  25%  { border-color: #ffd600; box-shadow: 0 0 10px #ffd60088; }
  50%  { border-color: #00e5ff; box-shadow: 0 0 10px #00e5ff88; }
  75%  { border-color: #c77dff; box-shadow: 0 0 10px #c77dff88; }
  100% { border-color: #ff3d5a; box-shadow: 0 0 10px #ff3d5a88; }
}

.avatar-frame-rgb {
  border: 2px solid #ff3d5a !important;
  animation: rgbFrame 2s linear infinite !important;
}

/* nav-avatar از طریق buildAvatarHtml رندر میشه */
.nav-avatar {
  width: 36px !important;
  height: 36px !important;
}

/* ── TETRIS ─────────────────────────────────────────── */
.tet-ctrl-btn {
  width: 64px; height: 54px;
  background: rgba(199,125,255,0.12);
  border: 1px solid rgba(199,125,255,0.3);
  border-radius: 12px;
  color: #c77dff;
  font-size: 1.3rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.tet-ctrl-btn:active { background: rgba(199,125,255,0.3); }
