/* 🎨 استایل امکانات جدید — هم‌خانواده با تم اصلی گیمیفای (بنفش تیره + طلایی) */
:root {
  --gm-bg: #17111f;
  --gm-card: #1d1527;
  --gm-card2: #241a33;
  --gm-gold: #f2ca7c;
  --gm-purple: #a98cf7;
  --gm-green: #7cd7b6;
  --gm-pink: #eda0b9;
  --gm-line: rgba(255, 255, 255, 0.12);
}

/* ---------- دکمه‌های شناور ---------- */
#gamify-tribes-fab, #gamify-mod-fab, #gamify-gift-fab {
  position: fixed;
  left: 14px;
  z-index: 99990;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s ease;
  font-family: "Vazirmatn", sans-serif;
}
#gamify-tribes-fab { bottom: 96px; background: linear-gradient(135deg, #2c2140, #1d1527); border: 2px solid var(--gm-purple); animation: gamifyPulse 2.6s ease-in-out infinite; }
#gamify-mod-fab { bottom: 204px; background: #241a33; border: 1px solid var(--gm-green); }
#gamify-gift-fab { bottom: 258px; background: #241a33; border: 1px solid var(--gm-gold); animation: gamifyFloat 3s ease-in-out infinite; }
#gamify-tribes-fab:hover, #gamify-mod-fab:hover, #gamify-gift-fab:hover { transform: scale(1.1); }
.gamify-fab-badge {
  position: absolute; top: -6px; right: -6px;
  background: #e5485c; color: #fff; font-size: 11px; font-weight: 800;
  border-radius: 999px; padding: 1px 7px; min-width: 20px; text-align: center;
}

/* ---------- اورلی و مودال ---------- */
.gamify-overlay {
  position: fixed; inset: 0; z-index: 99991;
  background: rgba(10, 6, 16, 0.78);
  backdrop-filter: blur(4px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 18px 12px;
  overflow-y: auto;
  font-family: "Vazirmatn", sans-serif;
  color: #fff;
}
.gamify-overlay.open { display: flex; animation: gamifyFadeIn 0.25s ease; }
.gamify-modal {
  width: min(640px, 96vw);
  background: var(--gm-card);
  border: 1px solid rgba(169, 140, 247, 0.4);
  border-radius: 22px;
  padding: 18px;
  margin: auto;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  animation: gamifyPop 0.3s ease;
}
.gamify-modal.wide { width: min(760px, 96vw); }
.gamify-modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.gamify-modal-head b { font-size: 18px; }
.gamify-modal-head button { background: rgba(255,255,255,0.07); border: 1px solid var(--gm-line); color: #fff; border-radius: 10px; padding: 4px 12px; cursor: pointer; font-family: inherit; }
.gamify-tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 12px; padding-bottom: 4px; }
.gamify-tabs button {
  white-space: nowrap; background: rgba(255,255,255,0.05); border: 1px solid var(--gm-line);
  color: #ddd; border-radius: 999px; padding: 7px 14px; cursor: pointer; font-family: inherit; font-size: 13px;
}
.gamify-tabs button.active { background: var(--gm-purple); color: #17111f; font-weight: 800; border-color: var(--gm-purple); }
.gamify-body { display: grid; gap: 12px; }
.gamify-loading { text-align: center; padding: 10px; opacity: 0.8; font-size: 13px; }
.gamify-empty { text-align: center; padding: 30px 16px; opacity: 0.95; line-height: 2.2; }
.gamify-empty h3 { margin: 8px 0; }
.gamify-hint { font-size: 12px; opacity: 0.75; line-height: 2; }
.gamify-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- دکمه‌ها ---------- */
.gamify-btn {
  background: rgba(255,255,255,0.07); border: 1px solid var(--gm-line); color: #fff;
  border-radius: 12px; padding: 9px 16px; cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 700;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.gamify-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,0.35); }
.gamify-btn.primary { background: linear-gradient(135deg, var(--gm-gold), #e0a94f); color: #241a10; border: none; }
.gamify-btn.danger { border-color: rgba(229,72,92,0.6); color: #ff9aa8; }
.gamify-btn.sm { padding: 6px 12px; font-size: 12px; }
.gamify-btn.full { width: 100%; }
.gamify-btn.war { border-color: rgba(237,160,185,0.6); color: var(--gm-pink); }
.gamify-joined { font-size: 12px; color: var(--gm-green); font-weight: 800; }

/* ---------- کارت قبیله ---------- */
.gamify-tribe-card {
  display: flex; gap: 12px; align-items: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--gm-line);
  border-inline-start: 4px solid var(--tribe, var(--gm-purple));
  border-radius: 16px; padding: 12px;
}
.gamify-tribe-logo { font-size: 42px; line-height: 1; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.4)); }
.gamify-tribe-logo.sm { font-size: 34px; }
.gamify-tribe-info { flex: 1; display: grid; gap: 2px; min-width: 0; }
.gamify-tribe-info b { font-size: 15px; }
.gamify-tribe-info small { font-size: 12px; opacity: 0.75; }
.gamify-tribe-acts { display: grid; gap: 6px; }
.gamify-tribe-head { display: flex; gap: 14px; background: linear-gradient(135deg, color-mix(in srgb, var(--tribe) 18%, transparent), transparent); border: 1px solid var(--gm-line); border-radius: 18px; padding: 16px; }
.gamify-tribe-head h2 { margin: 0 0 4px; font-size: 20px; }
.gamify-tribe-head h2 small { opacity: 0.6; font-size: 13px; }
.gamify-desc { font-size: 13px; opacity: 0.85; line-height: 1.9; margin: 6px 0; }
.gamify-stats { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; opacity: 0.9; }
.gamify-members { display: grid; gap: 8px; }
.gamify-member { display: flex; gap: 10px; align-items: center; background: rgba(255,255,255,0.04); border-radius: 12px; padding: 8px 12px; }
.gamify-member b { display: block; font-size: 14px; }
.gamify-member small { font-size: 11px; opacity: 0.7; }
.gamify-mavatar { font-size: 20px; }

/* ---------- فرم ---------- */
.gamify-form { display: grid; gap: 12px; }
.gamify-form label { display: grid; gap: 6px; font-size: 13px; font-weight: 700; }
.gamify-form input, .gamify-form textarea, .gamify-form select {
  background: #17111f; border: 1px solid var(--gm-line); color: #fff;
  border-radius: 12px; padding: 10px 12px; font-family: inherit; font-size: 14px; width: 100%;
}
.gamify-form textarea { min-height: 70px; resize: vertical; }
.gamify-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gamify-search { display: flex; gap: 8px; }
.gamify-search input { flex: 1; background: #17111f; border: 1px solid var(--gm-line); color: #fff; border-radius: 12px; padding: 9px 12px; font-family: inherit; }

/* ---------- نبرد و رتبه ---------- */
.gamify-battle { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: rgba(237,160,185,0.07); border: 1px solid rgba(237,160,185,0.3); border-radius: 14px; padding: 12px; }
.gamify-battle b { display: block; }
.gamify-battle small { font-size: 12px; opacity: 0.8; }
.gamify-rank { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: rgba(255,255,255,0.04); border-radius: 12px; padding: 9px 12px; font-size: 13px; flex-wrap: wrap; }

/* ---------- کویییز ---------- */
.gamify-quiz { display: grid; gap: 12px; }
.gamify-quiz-top { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; opacity: 0.9; flex-wrap: wrap; }
.gamify-timer { height: 8px; background: rgba(255,255,255,0.1); border-radius: 999px; overflow: hidden; }
.gamify-timer span { display: block; height: 100%; background: linear-gradient(90deg, var(--gm-green), var(--gm-gold)); border-radius: 999px; transition: width 0.25s linear; }
.gamify-q { font-size: 17px; line-height: 2; margin: 4px 0; }
.gamify-opts { display: grid; gap: 8px; }
.gamify-opt {
  text-align: right; background: rgba(255,255,255,0.05); border: 1px solid var(--gm-line); color: #fff;
  border-radius: 14px; padding: 12px 14px; cursor: pointer; font-family: inherit; font-size: 14px; transition: all 0.2s ease;
}
.gamify-opt:hover:not(:disabled) { border-color: var(--gm-purple); background: rgba(169,140,247,0.12); transform: translateX(-3px); }
.gamify-opt.correct { background: rgba(124,215,182,0.2); border-color: var(--gm-green); animation: gamifyPop 0.4s ease; }
.gamify-opt.wrong { background: rgba(229,72,92,0.18); border-color: #e5485c; }
.gamify-opt:disabled { cursor: default; opacity: 0.95; }
.gamify-expl { background: rgba(242,202,124,0.1); border: 1px solid rgba(242,202,124,0.35); border-radius: 12px; padding: 10px 12px; font-size: 13px; line-height: 2; }
.gamify-quiz-done { text-align: center; padding: 16px; display: grid; gap: 8px; justify-items: center; }

/* ---------- پنل مدیر ---------- */
.gamify-mod-card { background: rgba(255,255,255,0.04); border: 1px solid var(--gm-line); border-radius: 16px; padding: 14px; display: grid; gap: 10px; }
.gamify-mod-head { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; opacity: 0.9; flex-wrap: wrap; }
.gamify-mod-body { font-size: 14px; line-height: 2.1; white-space: pre-wrap; }
.gamify-mod-opts { font-size: 13px; opacity: 0.9; display: grid; gap: 4px; margin: 0; padding-right: 18px; }
.gamify-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 8px; }
.gamify-stat-card { background: rgba(169,140,247,0.1); border: 1px solid rgba(169,140,247,0.3); border-radius: 14px; padding: 12px 8px; text-align: center; }
.gamify-stat-card b { display: block; font-size: 20px; color: var(--gm-gold); }
.gamify-stat-card small { font-size: 11px; opacity: 0.8; }

/* ---------- انیمیشن‌ها ---------- */
@keyframes gamifyFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes gamifyPop { 0% { transform: scale(0.92); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes gamifyFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes gamifyPulse { 0%, 100% { box-shadow: 0 8px 24px rgba(169,140,247,0.25); } 50% { box-shadow: 0 8px 32px rgba(169,140,247,0.55); } }
@keyframes gamifyToastIn { from { transform: translateY(12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* موبایل */
@media (max-width: 560px) {
  .gamify-tribe-card { flex-wrap: wrap; }
  .gamify-tribe-acts { flex-direction: row; display: flex; width: 100%; }
  .gamify-tribe-acts .gamify-btn { flex: 1; }

  .gamify-grid2 { grid-template-columns: 1fr; }
}

/* ===== فیکس ریشه‌ای پرش چت: پنل گفت‌وگوی بازیکنان ارتفاع ثابت می‌گیرد تا فقط کادر پیام‌ها اسکرول شود ===== */
.gm-panel.grid[class*="md:grid-cols-[280px_1fr]"] {
  height: min(78vh, 720px);
  height: min(78dvh, 720px);
  min-height: 420px !important;
  grid-template-rows: minmax(0, 1fr);
}
.gm-panel.grid[class*="md:grid-cols-[280px_1fr]"] > * { min-height: 0; }
@media (max-width: 767px) {
  .gm-panel.grid[class*="md:grid-cols-[280px_1fr]"] { height: min(74dvh, 640px); }
}

/* ===== مرکز پاداش: چرخ شانس + ماموریت‌ها + تالار افتخار ===== */
#gamify-arena-fab {
  position: fixed; left: 14px; bottom: 312px; z-index: 99990; width: 48px; height: 48px; border-radius: 50%;
  font-size: 22px; cursor: pointer; font-family: "Vazirmatn", sans-serif;
  background: radial-gradient(circle at 30% 25%, #ffe9a8, #f2ca7c 55%, #d99a38); color: #241a10;
  border: 2px solid #fff3c9; box-shadow: 0 8px 26px rgba(242,202,124,.5);
  animation: gamifyGlow 2.4s ease-in-out infinite; transition: transform .2s ease;
}
#gamify-arena-fab:hover { transform: scale(1.12) rotate(-8deg); }
#gamify-arena-fab .gamify-fab-badge { top: -6px; right: -6px; animation: gamifyPop .4s ease; }
@keyframes gamifyGlow { 0%,100% { box-shadow: 0 8px 22px rgba(242,202,124,.35); } 50% { box-shadow: 0 8px 36px rgba(242,202,124,.85), 0 0 0 6px rgba(242,202,124,.12); } }
@keyframes gamifyShine { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes gamifyBolt { 0%,100% { transform: scale(1); filter: drop-shadow(0 0 4px #f8c56c); } 50% { transform: scale(1.18); filter: drop-shadow(0 0 14px #ffd76a); } }
@keyframes gamifyRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

.gamify-hero { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 18px; background: linear-gradient(135deg, rgba(242,202,124,.16), rgba(169,140,247,.14)); border: 1px solid rgba(242,202,124,.35); }
.gamify-hero .bolt { font-size: 40px; animation: gamifyBolt 2s ease-in-out infinite; }
.gamify-hero .lv { font-weight: 800; font-size: 16px; }
.gamify-xpbar { height: 10px; border-radius: 999px; background: rgba(255,255,255,.1); overflow: hidden; margin-top: 6px; }
.gamify-xpbar > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #f2ca7c, #ffe9a8, #f2ca7c); background-size: 200% 100%; animation: gamifyShine 2.6s linear infinite; transition: width .8s ease; }

.gamify-wheel-wrap { position: relative; width: min(280px, 78vw); aspect-ratio: 1; margin: 6px auto 4px; }
.gamify-wheel { width: 100%; height: 100%; border-radius: 50%; border: 6px solid #f2ca7c; box-shadow: 0 0 0 4px #241a33, 0 14px 40px rgba(0,0,0,.55), inset 0 0 30px rgba(0,0,0,.4); transition: transform 5s cubic-bezier(.12,.72,.08,1); position: relative; overflow: hidden; }
.gamify-wheel .seg { position: absolute; inset: 0; display: flex; justify-content: center; align-items: flex-start; padding-top: 9%; font-size: 24px; transform-origin: 50% 50%; }
.gamify-wheel-pin { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); font-size: 30px; z-index: 2; filter: drop-shadow(0 3px 4px rgba(0,0,0,.6)); }
.gamify-wheel-hub { position: absolute; inset: 38%; border-radius: 50%; background: radial-gradient(circle at 30% 25%, #ffe9a8, #d99a38); border: 3px solid #fff3c9; z-index: 1; display: grid; place-items: center; font-size: 26px; box-shadow: 0 4px 14px rgba(0,0,0,.5); }

.gamify-quest { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px; border-radius: 16px; background: rgba(255,255,255,.04); border: 1px solid var(--gm-line); animation: gamifyRise .4s ease both; }
.gamify-quest.done { border-color: rgba(124,215,182,.5); background: rgba(124,215,182,.07); }
.gamify-quest .ic { font-size: 28px; }
.gamify-quest .tt { font-weight: 700; font-size: 13px; }
.gamify-quest .rw { font-size: 11px; opacity: .8; margin-top: 2px; }
.gamify-quest .bar { height: 6px; border-radius: 999px; background: rgba(255,255,255,.1); margin-top: 6px; overflow: hidden; }
.gamify-quest .bar i { display: block; height: 100%; background: linear-gradient(90deg, #7cd7b6, #b9f1dc); border-radius: 999px; transition: width .6s ease; }
.gamify-hall { display: grid; gap: 6px; }
.gamify-hall .row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: rgba(255,255,255,.04); font-size: 13px; animation: gamifyRise .4s ease both; }
.gamify-hall .row:nth-child(1) { background: linear-gradient(90deg, rgba(242,202,124,.22), transparent); }
.gamify-hall .row b { flex: 1; }
.gamify-prize-pop { text-align: center; padding: 10px; animation: gamifyPop .45s ease; }
.gamify-prize-pop .big { font-size: 56px; animation: gamifyBolt 1.2s ease-in-out infinite; }

/* انیمیشن ظریف برای کارت‌ها و دکمه‌های بازی اصلی */
.gm-panel, .gm-card { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.gm-panel:hover { box-shadow: 0 10px 34px rgba(0,0,0,.35); }
@media (prefers-reduced-motion: reduce) { #gamify-arena-fab, .gamify-xpbar > i, .gamify-hero .bolt { animation: none !important; } }


/* ===== ⚔️ نبرد واقعی بازیکن‌به‌بازیکن (PvP) ===== */
#gamify-pvp-fab {
  position: fixed; left: 14px; bottom: 366px; z-index: 99990; width: 48px; height: 48px; border-radius: 50%;
  font-size: 22px; cursor: pointer; font-family: "Vazirmatn", sans-serif; color: #fff;
  background: linear-gradient(135deg, #4a2235, #2c1524); border: 2px solid #ef5d84;
  box-shadow: 0 8px 26px rgba(239,93,132,.45); animation: gamifyPulse 2.8s ease-in-out infinite; transition: transform .2s ease;
}
#gamify-pvp-fab:hover { transform: scale(1.12) rotate(8deg); }
#gamify-pvp-fab .gamify-fab-badge { top: -6px; right: -6px; animation: gamifyPop .4s ease; }

.pvp-overlay .pvp-modal, .pvp-quiz, .pvp-result { max-height: min(86dvh, 720px); overflow-y: auto; }
.pvp-body { display: grid; gap: 10px; margin-top: 10px; }
.pvp-card {
  display: grid; gap: 8px; padding: 12px; border-radius: 16px;
  background: rgba(255,255,255,.04); border: 1px solid var(--gm-line); animation: gamifyRise .35s ease both;
}
.pvp-card.unseen { border-color: rgba(242,202,124,.55); background: rgba(242,202,124,.06); }
.pvp-card .pvp-cat { font-size: 12px; opacity: .85; }
.pvp-user { display: flex; align-items: center; gap: 10px; }
.pvp-user-i { display: grid; gap: 2px; min-width: 0; }
.pvp-user-i b { font-size: 14px; }
.pvp-user-i span { font-size: 11px; opacity: .75; }
.pvp-av {
  position: relative; border-radius: 50%; overflow: hidden; flex: 0 0 auto;
  background: radial-gradient(circle at 30% 25%, #3a2a52, #241a33); border: 2px solid rgba(242,202,124,.5);
  display: grid; place-items: center;
}
.pvp-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pvp-av span { font-weight: 800; color: #f2ca7c; font-size: 18px; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.pvp-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pvp-acts.center { justify-content: center; }
.pvp-sel {
  background: #241a33; color: #eee; border: 1px solid var(--gm-line); border-radius: 10px;
  font-family: Vazirmatn, sans-serif; font-size: 12px; padding: 7px 8px; max-width: 150px;
}
.pvp-hint { font-size: 12px; opacity: .8; padding: 8px 10px; border-radius: 12px; background: rgba(124,215,182,.06); border: 1px dashed rgba(124,215,182,.3); }
.pvp-hint.center { text-align: center; margin-top: 8px; }
.waiting-card { border-style: dashed; }

.pvp-mini-overlay {
  position: fixed; inset: 0; z-index: 100002; display: grid; place-items: center;
  background: rgba(10,7,16,.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: pvpFade .25s ease; padding: 14px;
}
.pvp-mini { text-align: center; max-width: 380px; animation: gamifyPop .35s ease; }
.pvp-mini h3 { margin: 10px 0 4px; font-size: 17px; }
.pvp-sub { font-size: 12.5px; opacity: .85; line-height: 1.9; }
.pvp-versus { display: grid; place-items: center; gap: 4px; margin-top: 4px; }
.pvp-swords { font-size: 30px; animation: gamifyBolt 1.4s ease-in-out infinite; }
.pvp-swords.big { font-size: 44px; }
.pvp-dots { display: flex; gap: 6px; justify-content: center; margin: 14px 0; }
.pvp-dots i { width: 8px; height: 8px; border-radius: 50%; background: #f2ca7c; animation: pvpDot 1.2s ease-in-out infinite; }
.pvp-dots i:nth-child(2) { animation-delay: .18s; }
.pvp-dots i:nth-child(3) { animation-delay: .36s; }
@keyframes pvpDot { 0%,100% { opacity: .25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-5px); } }
@keyframes pvpFade { from { opacity: 0; } to { opacity: 1; } }
.pvp-invite-in { border: 1px solid rgba(239,93,132,.55); box-shadow: 0 20px 60px rgba(239,93,132,.25); }

.pvp-quiz { max-width: 560px; }
.pvp-count { font-size: 12px; opacity: .8; }
.pvp-progress { display: flex; gap: 5px; justify-content: center; margin: 10px 0 8px; }
.pvp-progress i { width: 22px; height: 5px; border-radius: 999px; background: rgba(255,255,255,.14); transition: background .3s ease; }
.pvp-progress i.done { background: #7cd7b6; }
.pvp-progress i.cur { background: #f2ca7c; animation: gamifyGlow 1.2s ease-in-out infinite; }
.pvp-timerbar { height: 8px; border-radius: 999px; background: rgba(255,255,255,.09); overflow: hidden; margin-bottom: 14px; }
.pvp-timerbar i { display: block; height: 100%; width: 100%; border-radius: 999px; background: linear-gradient(90deg,#7cd7b6,#b9f1dc); transition: width .1s linear; }
.pvp-timerbar i.low { background: linear-gradient(90deg,#ef5d84,#ff9eb6); }
.pvp-qtitle { font-size: 16.5px; line-height: 2; margin: 4px 0 14px; animation: gamifyRise .3s ease both; }
.pvp-opts { display: grid; gap: 9px; }
.pvp-opt {
  display: flex; align-items: center; gap: 10px; text-align: right; width: 100%;
  padding: 13px 14px; border-radius: 15px; border: 1.5px solid rgba(169,140,247,.35);
  background: rgba(169,140,247,.07); color: #f4efff; font-family: Vazirmatn, sans-serif; font-size: 14px; cursor: pointer;
  transition: transform .15s ease, border-color .2s ease, background .2s ease;
  animation: gamifyRise .32s ease both;
}
.pvp-opt:nth-child(2) { animation-delay: .05s; } .pvp-opt:nth-child(3) { animation-delay: .1s; } .pvp-opt:nth-child(4) { animation-delay: .15s; }
.pvp-opt:hover { border-color: #f2ca7c; background: rgba(242,202,124,.1); transform: translateY(-1px); }
.pvp-opt.picked { border-color: #f2ca7c; background: rgba(242,202,124,.22); box-shadow: 0 0 0 2px rgba(242,202,124,.25); }
.pvp-opt-key {
  width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; flex: 0 0 auto;
  background: rgba(255,255,255,.1); font-size: 12.5px; font-weight: 800; color: #f2ca7c;
}
.pvp-timeout { color: #ffb1c2; font-size: 13px; margin: -6px 0 10px; animation: gamifyPop .3s ease; }

.pvp-result { max-width: 520px; }
.pvp-result.win { border: 1px solid rgba(124,215,182,.6); box-shadow: 0 20px 70px rgba(124,215,182,.2); }
.pvp-result.lose { border: 1px solid rgba(239,93,132,.5); }
.pvp-result.draw { border: 1px solid rgba(242,202,124,.5); }
.pvp-score-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; margin: 8px 0 4px; }
.pvp-side { display: grid; place-items: center; gap: 3px; padding: 12px; border-radius: 18px; background: rgba(255,255,255,.05); border: 1px solid var(--gm-line); }
.pvp-side.me { border-color: rgba(242,202,124,.45); }
.pvp-side .lbl { font-size: 12px; opacity: .85; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pvp-side .sc { font-size: 30px; font-weight: 900; color: #f2ca7c; }
.pvp-side .cc { font-size: 11px; opacity: .75; }
.pvp-vs { font-weight: 900; color: #ef5d84; text-shadow: 0 0 12px rgba(239,93,132,.6); }
.pvp-scroll { max-height: 240px; overflow-y: auto; display: grid; gap: 8px; margin-top: 12px; padding-left: 4px; }
.pvp-perq { padding: 10px 12px; border-radius: 13px; background: rgba(255,255,255,.04); border: 1px solid var(--gm-line); display: grid; gap: 6px; }
.pvp-perq .t { font-size: 12.5px; font-weight: 700; line-height: 1.8; }
.pvp-perq .r { display: grid; gap: 3px; font-size: 11.5px; }
.pvp-perq .r .ok { color: #9de6c8; }
.pvp-perq .r .no { color: #ffb1c2; }
.pvp-perq .corr { font-size: 11px; color: #ffd98a; opacity: .95; border-top: 1px dashed rgba(255,255,255,.12); padding-top: 5px; }

@media (max-width: 520px) {
  #gamify-pvp-fab { bottom: 366px; }
  .pvp-quiz { max-width: calc(100vw - 20px); }
}

/* ===== نبرد زنده / اعلان مدیر / پنل مدیر (نسخهٔ ۵.۶) ===== */
.pvp-live-score { display:flex; justify-content:space-between; align-items:center; gap:8px; font-size:13px; color:#d9cbe8; background:rgba(255,255,255,.04); border:1px solid #3a2d4a; border-radius:12px; padding:6px 10px; margin-top:8px; }
.pvp-live-score b { color:#f2ca7c; }
.pvp-live-dot { color:#5ee0a0; font-size:11px; margin-right:6px; animation: gamifyPulse 1.4s infinite; }
.pvp-cd { text-align:center; }
.pvp-cd-num { font-size:72px; font-weight:900; color:#f2ca7c; line-height:1.1; animation: gamifyPop .5s ease; }
.pvp-swords.pulse { animation: gamifyPulse 1.2s infinite; }
.pvp-wait-bar { height:6px; border-radius:6px; background:#2b2238; overflow:hidden; margin:10px 0; }
.pvp-wait-bar i { display:block; height:100%; width:40%; background:linear-gradient(90deg,#a98cf7,#f2ca7c); animation: gamifySlide 1.3s infinite; }
@keyframes gamifySlide { 0%{transform:translateX(120%)} 100%{transform:translateX(-260%)} }
@keyframes gamifyPulse { 0%,100%{opacity:1} 50%{opacity:.45} }
.pvp-opt.ok { border-color:#5ee0a0 !important; background:rgba(94,224,160,.15) !important; }
.pvp-opt.no { border-color:#ff7a7a !important; background:rgba(255,122,122,.14) !important; }
.pvp-opt:disabled { cursor:default; opacity:.92; }
.pvp-feedback { min-height:22px; margin-top:8px; font-size:13px; text-align:center; }
.pvp-feedback .ok { color:#5ee0a0; } .pvp-feedback .no { color:#ff9d9d; } .pvp-feedback .corr { color:#f2ca7c; }
.pvp-expl { margin-top:6px; color:#cdbde0; font-size:12px; line-height:1.7; }
.pvp-search input { width:100%; box-sizing:border-box; padding:10px 12px; border-radius:12px; border:1px solid #4a3a5c; background:#1d1527; color:#fff; font:inherit; }
.gm-bc-overlay { z-index:100000; }
.gm-bc { max-width:420px; text-align:center; position:relative; padding:18px; }
.gm-bc-x { position:absolute; top:8px; left:8px; background:transparent; border:0; color:#cdbde0; font-size:18px; cursor:pointer; }
.gm-bc-img { width:100%; max-height:220px; object-fit:cover; border-radius:14px; margin-bottom:10px; }
.gm-bc h3 { margin:6px 0; color:#f2ca7c; } .gm-bc p { color:#e4d9f0; line-height:1.8; font-size:14px; }
/* پنل مدیر */
#gm-admin-fab { position:fixed; bottom:150px; right:16px; z-index:9998; width:52px; height:52px; border-radius:50%; border:1px solid #f2ca7c; background:#241a33; color:#f2ca7c; font-size:22px; cursor:pointer; box-shadow:0 8px 24px rgba(0,0,0,.4); }
.gm-admin { max-width:980px; width:min(96vw,980px); max-height:92dvh; overflow:auto; }
.gm-admin .gm-tabs { display:flex; flex-wrap:wrap; gap:6px; margin:10px 0; }
.gm-admin table { width:100%; border-collapse:collapse; font-size:12.5px; }
.gm-admin th, .gm-admin td { padding:7px 6px; border-bottom:1px solid #3a2d4a; text-align:right; vertical-align:middle; white-space:nowrap; }
.gm-admin td.wrap { white-space:normal; }
.gm-admin .gm-row { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:8px 0; }
.gm-admin input, .gm-admin select, .gm-admin textarea { padding:8px 10px; border-radius:10px; border:1px solid #4a3a5c; background:#1d1527; color:#fff; font:inherit; font-size:13px; }
.gm-admin textarea { width:100%; min-height:70px; box-sizing:border-box; }
.gm-admin .gm-card { background:rgba(255,255,255,.04); border:1px solid #3a2d4a; border-radius:14px; padding:12px; margin:8px 0; }
.gm-admin .gm-stats { display:grid; grid-template-columns:repeat(auto-fill,minmax(140px,1fr)); gap:8px; }
.gm-admin .gm-stat { background:#1d1527; border:1px solid #3a2d4a; border-radius:12px; padding:10px; text-align:center; }
.gm-admin .gm-stat b { display:block; font-size:22px; color:#f2ca7c; }
.gm-admin .kind-real { color:#5ee0a0; } .gm-admin .kind-bot { color:#9aa; } .gm-admin .kind-guest { color:#f2ca7c; } .gm-admin .kind-admin { color:#ff9d9d; }
.gm-admin .gm-avatars { display:grid; grid-template-columns:repeat(10,1fr); gap:4px; }
.gm-admin .gm-avatars img { width:100%; border-radius:8px; border:2px solid transparent; cursor:pointer; }
.gm-admin .gm-avatars img.sel { border-color:#f2ca7c; }
.gm-admin details summary { cursor:pointer; color:#f2ca7c; font-weight:700; padding:6px 0; }
.gm-admin .gm-toggle { display:flex; align-items:center; gap:8px; cursor:pointer; font-size:13px; }
@media (max-width:640px) { .gm-admin table { font-size:11px; } .gm-admin th:nth-child(n+5), .gm-admin td:nth-child(n+5) { display:none; } .gm-admin .gm-avatars { grid-template-columns:repeat(5,1fr); } }
