/* ═══════════════════════════════════════════════════════════
   گیم‌هاب فارسی — استایل اصلی (دارک نئونی)
   ═══════════════════════════════════════════════════════════ */
:root {
  --bg: #070b16;
  --bg-2: #0b1224;
  --card: rgba(148, 163, 184, 0.055);
  --card-hover: rgba(148, 163, 184, 0.1);
  --line: rgba(148, 163, 184, 0.16);
  --line-strong: rgba(148, 163, 184, 0.3);
  --text: #e7edff;
  --muted: #92a3c3;
  --muted-2: #6b7ca0;
  --p1: #8b5cf6;
  --p2: #22d3ee;
  --indigo: #6366f1;
  --pink: #f472b6;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;
  --grad: linear-gradient(120deg, #8b5cf6, #6366f1 45%, #22d3ee);
  --shadow-neon: 0 0 24px rgba(139, 92, 246, 0.35);
  --radius: 18px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scrollbar-color: rgba(148,163,184,.3) transparent; }
body {
  margin: 0;
  font-family: Vazirmatn, "Segoe UI", Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.7;
  overflow-x: hidden;
}
h1, h2, h3 { margin: 0; line-height: 1.45; }
p { margin: 0; }
a { color: var(--p2); text-decoration: none; }
input, textarea, button { font-family: inherit; }

/* ── پس‌زمینه نقاط نور ── */
.bg-blobs { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; animation: float 14s ease-in-out infinite alternate; }
.b1 { width: 420px; height: 420px; background: rgba(139, 92, 246, .28); top: -120px; right: -80px; }
.b2 { width: 380px; height: 380px; background: rgba(34, 211, 238, .18); bottom: -100px; left: -80px; animation-delay: -6s; }
.b3 { width: 260px; height: 260px; background: rgba(244, 114, 182, .14); top: 40%; left: 30%; animation-delay: -3s; }
@keyframes float { from { transform: translateY(0) scale(1); } to { transform: translateY(40px) scale(1.08); } }

/* ── آیکون ── */
.ic { width: 20px; height: 20px; flex: none; vertical-align: -5px; }
.ic-xs { width: 14px; height: 14px; }
.ic-logo { width: 26px; height: 26px; color: var(--p1); }
h2 .ic, h3 .ic { margin-inline-start: 2px; }
svg .fill { fill: currentColor; stroke: none; }

/* ── نوار بالا ── */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 16px;
  padding: 12px 22px;
  background: rgba(7, 11, 22, 0.75);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); }
.brand-name { font-weight: 800; font-size: 19px; }
.brand-name b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin-inline-start: 4px; }
.topnav { display: flex; gap: 4px; margin-inline-start: auto; }
.topnav a { color: var(--muted); padding: 7px 14px; border-radius: 999px; font-size: 14px; transition: .2s; }
.topnav a:hover { color: var(--text); background: var(--card); }

/* ── دکمه‌ها ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; cursor: pointer; color: #fff;
  border-radius: var(--radius-sm);
  padding: 11px 20px; font-size: 15px; font-weight: 700;
  transition: transform .15s, box-shadow .2s, background .2s, opacity .2s;
}
.btn.primary { background: var(--grad); box-shadow: var(--shadow-neon); }
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 0 34px rgba(139, 92, 246, .5); }
.btn.ghost { background: var(--card); border: 1px solid var(--line); color: var(--text); }
.btn.ghost:hover { background: var(--card-hover); }
.btn.danger { background: rgba(248, 113, 113, .15); color: var(--red); border: 1px solid rgba(248, 113, 113, .35); }
.btn.danger:hover { background: rgba(248, 113, 113, .25); }
.btn.success { background: linear-gradient(120deg, #10b981, #34d399); color: #052e1c; }
.btn.warn { background: rgba(251, 191, 36, .14); color: var(--amber); border: 1px solid rgba(251, 191, 36, .35); }
.btn.sm { padding: 7px 14px; font-size: 13px; border-radius: 10px; }
.btn.w100 { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; box-shadow: none; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 11px; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); color: var(--muted);
  transition: .2s;
}
.icon-btn:hover { color: var(--text); background: var(--card-hover); }
.icon-btn.accent { color: var(--p2); }
.icon-btn.danger:hover { color: var(--red); border-color: rgba(248, 113, 113, .4); }

/* ── کارت و فرم ── */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  backdrop-filter: blur(8px);
}
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.card-head h2 { font-size: 18px; }
.card-ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 13px; flex: none;
  background: linear-gradient(135deg, rgba(139, 92, 246, .25), rgba(34, 211, 238, .18));
  color: var(--p1); border: 1px solid rgba(139, 92, 246, .3);
}
.card-ic.alt { color: var(--p2); border-color: rgba(34, 211, 238, .3); background: linear-gradient(135deg, rgba(34, 211, 238, .18), rgba(244, 114, 182, .14)); }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.field small { color: var(--muted-2); font-weight: 400; }
.field input {
  width: 100%; padding: 11px 14px; font-size: 15px;
  background: rgba(7, 11, 22, .6); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  outline: none; transition: border-color .2s, box-shadow .2s;
}
.field input:focus { border-color: var(--p1); box-shadow: 0 0 0 3px rgba(139, 92, 246, .18); }
.field input::placeholder { color: var(--muted-2); }
.code-row { display: flex; gap: 8px; }
.code-row input { text-transform: uppercase; letter-spacing: 2px; font-weight: 700; flex: 1; }
.hint { font-size: 12.5px; color: var(--muted-2); margin-top: 10px; }
.err { color: var(--red); font-size: 13.5px; margin: 8px 0; }

/* ── هیرو ── */
.hero { text-align: center; padding: 54px 20px 30px; position: relative; z-index: 1; }
.hero-badge {
  display: inline-block; padding: 6px 16px; border-radius: 999px;
  background: rgba(34, 211, 238, .1); border: 1px solid rgba(34, 211, 238, .3);
  color: var(--p2); font-size: 13px; font-weight: 600; margin-bottom: 18px;
}
.hero h1 { font-size: clamp(28px, 5vw, 44px); font-weight: 900; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { color: var(--muted); max-width: 620px; margin: 14px auto 0; font-size: 16px; }

/* ── لابی ── */
main { position: relative; z-index: 1; max-width: 1080px; margin: 0 auto; padding: 0 20px 40px; }
.lobby-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 12px; }
.section-head { display: flex; align-items: center; gap: 10px; margin: 34px 0 16px; }
.section-head h2 { font-size: 20px; }
.section-head.slim { margin: 0 0 12px; }
.section-head.slim h2 { font-size: 15px; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }

.rooms-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.room-item {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px;
  cursor: pointer; transition: .2s; position: relative;
}
.room-item:hover { background: var(--card-hover); border-color: var(--line-strong); transform: translateY(-2px); }
.room-item .ri-top { display: flex; align-items: center; gap: 10px; }
.room-item h3 { font-size: 16px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lock-badge { color: var(--amber); display: inline-flex; }
.ri-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: rgba(139, 92, 246, .13); color: #b7a3f8; border: 1px solid rgba(139, 92, 246, .3);
}
.chip.cy { background: rgba(34, 211, 238, .1); color: #7ddfee; border-color: rgba(34, 211, 238, .3); }
.chip.on { background: rgba(52, 211, 153, .12); color: var(--green); border-color: rgba(52, 211, 153, .3); }
.chip.mut { background: rgba(148, 163, 184, .1); color: var(--muted); border-color: var(--line); }
.empty-state {
  text-align: center; color: var(--muted-2); padding: 34px 10px;
  border: 1px dashed var(--line); border-radius: var(--radius); font-size: 14px;
}

/* ── کارت بازی‌ها ── */
.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.game-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; position: relative;
  transition: .2s;
}
.game-card:hover { background: var(--card-hover); transform: translateY(-3px); border-color: var(--line-strong); }
.game-card h3 { font-size: 16.5px; margin: 10px 0 6px; }
.game-card p { color: var(--muted); font-size: 13.5px; }
.game-ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(139, 92, 246, .22), rgba(34, 211, 238, .16));
  border: 1px solid rgba(139, 92, 246, .35); color: var(--p1);
}
.game-ic .ic { width: 24px; height: 24px; }
.game-type { position: absolute; top: 16px; left: 16px; font-size: 11.5px; color: var(--muted-2); border: 1px solid var(--line); padding: 2px 10px; border-radius: 999px; }

.footer { text-align: center; color: var(--muted-2); font-size: 13px; padding: 26px; border-top: 1px solid var(--line); position: relative; z-index: 1; }

/* ── مودال ── */
.modal-back {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(4, 7, 15, .7); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
  width: 100%; max-width: 420px;
  background: var(--bg-2); border: 1px solid var(--line-strong);
  border-radius: 20px; padding: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
  animation: pop .18s ease-out;
}
@keyframes pop { from { transform: scale(.94); opacity: 0; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.modal-head h3 { font-size: 17px; }
.modal-room { color: var(--muted); font-size: 13.5px; margin-bottom: 14px; }

/* ── توست ── */
.toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: rgba(11, 18, 36, .95); border: 1px solid var(--line-strong);
  padding: 10px 20px; border-radius: 999px; font-size: 13.5px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45); animation: pop .18s ease-out;
  max-width: 90vw;
}
.toast.ok { border-color: rgba(52, 211, 153, .45); color: var(--green); }
.toast.err { border-color: rgba(248, 113, 113, .45); color: var(--red); }
.toast.info { border-color: rgba(34, 211, 238, .4); color: var(--p2); }

/* ═══════════ صفحه اتاق ═══════════ */
.roombar { gap: 14px; }
.room-title-wrap { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.room-title { font-size: 17px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code-chip {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  background: rgba(139, 92, 246, .13); color: #b7a3f8;
  border: 1px solid rgba(139, 92, 246, .35); border-radius: 999px;
  padding: 5px 12px; font-size: 13px; transition: .2s; flex: none;
}
.code-chip:hover { background: rgba(139, 92, 246, .22); }
.code-chip b { letter-spacing: 2px; }
.roombar-actions { display: flex; gap: 8px; }

.room-layout {
  position: relative; z-index: 1;
  max-width: 1280px; margin: 18px auto; padding: 0 18px 30px;
  display: grid; grid-template-columns: 300px 1fr; gap: 18px;
  align-items: start;
}
.side-panel { display: flex; flex-direction: column; gap: 14px; }
.side-card { padding: 16px; }
.players-list { display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow-y: auto; }
.player-row {
  display: flex; align-items: center; gap: 10px;
  background: rgba(7, 11, 22, .5); border: 1px solid var(--line);
  border-radius: 12px; padding: 8px 12px; font-size: 14px;
}
.player-row .p-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted-2); flex: none; }
.player-row.online .p-dot { background: var(--green); box-shadow: 0 0 8px rgba(52, 211, 153, .7); }
.player-row .p-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.player-row .p-name .crown { color: var(--amber); display: inline-flex; }
.player-row .p-score { font-weight: 800; color: var(--p2); font-variant-numeric: tabular-nums; }

.chat-card { display: flex; flex-direction: column; }
.chat-box { height: 240px; overflow-y: auto; display: flex; flex-direction: column; gap: 7px; font-size: 13.5px; }
.chat-msg { background: rgba(7, 11, 22, .5); border: 1px solid var(--line); border-radius: 12px; padding: 6px 11px; overflow-wrap: anywhere; }
.chat-msg .cm-name { color: var(--p2); font-weight: 700; font-size: 12.5px; }
.chat-msg.mine .cm-name { color: var(--p1); }
.chat-form { display: flex; gap: 8px; margin-top: 10px; }
.chat-form input {
  flex: 1; padding: 9px 13px; font-size: 14px;
  background: rgba(7, 11, 22, .6); color: var(--text);
  border: 1px solid var(--line); border-radius: 12px; outline: none;
}
.chat-form input:focus { border-color: var(--p1); }

.game-panel { min-height: 420px; }
.game-area { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; min-height: 420px; }

/* ── حالت لابی داخل اتاق (انتخاب بازی) ── */
.picker-head { text-align: center; margin-bottom: 18px; }
.picker-head h3 { font-size: 19px; }
.picker-head p { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.picker-item {
  display: flex; align-items: center; gap: 14px;
  background: rgba(7, 11, 22, .5); border: 1px solid var(--line);
  border-radius: 16px; padding: 16px; transition: .2s;
}
.picker-item.pickable { cursor: pointer; }
.picker-item.pickable:hover { border-color: var(--p1); background: rgba(139, 92, 246, .08); transform: translateY(-2px); }
.picker-item .pi-ic {
  width: 48px; height: 48px; border-radius: 14px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(139, 92, 246, .22), rgba(34, 211, 238, .16));
  border: 1px solid rgba(139, 92, 246, .35); color: var(--p1);
}
.picker-item h4 { margin: 0 0 3px; font-size: 15.5px; }
.picker-item p { font-size: 12.5px; color: var(--muted); }

/* ── اجزای مشترک بازی‌ها ── */
.game-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.game-head h3 { font-size: 19px; display: flex; align-items: center; gap: 9px; }
.game-head .gh-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.timer-bar { height: 7px; background: rgba(148, 163, 184, .15); border-radius: 99px; overflow: hidden; margin: 6px 0 16px; }
.timer-bar > div { height: 100%; background: var(--grad); border-radius: 99px; transition: width .25s linear; }
.timer-bar > div.danger { background: linear-gradient(90deg, #f87171, #fbbf24); }
.timer-label { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.submitted-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.badge { display: inline-block; background: var(--grad); color: #fff; border-radius: 999px; padding: 3px 13px; font-size: 13px; font-weight: 800; }

/* اسم فامیل */
.letter-hero { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.letter-circle {
  width: 74px; height: 74px; border-radius: 22px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 38px; font-weight: 900; color: #fff;
  background: var(--grad); box-shadow: var(--shadow-neon);
}
.letter-hero p { color: var(--muted); font-size: 13.5px; }
.cats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.cat-box { background: rgba(7, 11, 22, .5); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.cat-box label { display: block; font-size: 13px; font-weight: 700; color: var(--p2); margin-bottom: 6px; }
.cat-box input {
  width: 100%; padding: 9px 12px; font-size: 14.5px;
  background: rgba(11, 18, 36, .8); color: var(--text);
  border: 1px solid var(--line); border-radius: 10px; outline: none;
}
.cat-box input:focus { border-color: var(--p1); }
.review-table { display: flex; flex-direction: column; gap: 12px; }
.review-cat { background: rgba(7, 11, 22, .5); border: 1px solid var(--line); border-radius: 14px; padding: 13px 16px; }
.review-cat h4 { margin: 0 0 9px; color: var(--p2); font-size: 14.5px; display: flex; align-items: center; gap: 8px; }
.ans-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 14px; border-bottom: 1px dashed rgba(148, 163, 184, .12); }
.ans-row:last-child { border-bottom: none; }
.ans-row .an-name { color: var(--muted); width: 110px; flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ans-row .an-text { flex: 1; overflow-wrap: anywhere; }
.ans-row .an-pts { font-weight: 800; color: var(--green); }
.ans-row.dup .an-text, .ans-row.dup .an-pts { color: var(--amber); }
.ans-row .an-empty { color: var(--muted-2); font-style: italic; }
.standings { margin-top: 14px; }
.stand-row { display: flex; align-items: center; gap: 12px; padding: 9px 14px; border-radius: 12px; background: rgba(7, 11, 22, .5); border: 1px solid var(--line); margin-bottom: 7px; font-size: 14.5px; }
.stand-row .rank { width: 26px; height: 26px; border-radius: 50%; background: var(--card-hover); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; flex: none; }
.stand-row.first { border-color: rgba(251, 191, 36, .5); background: rgba(251, 191, 36, .07); }
.stand-row.first .rank { background: var(--amber); color: #422a02; }
.stand-row .st-name { flex: 1; }
.stand-row .st-pts { font-weight: 800; color: var(--p2); }

/* چهاربازی */
.c4-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.c4-seats { display: flex; gap: 14px; align-items: center; }
.c4-seat {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  border-radius: 14px; border: 1px solid var(--line);
  background: rgba(7, 11, 22, .5); padding: 9px 22px; min-width: 130px; text-align: center;
}
.c4-seat.active { border-color: var(--p1); box-shadow: 0 0 16px rgba(139, 92, 246, .35); }
.c4-seat.s2.active { border-color: var(--p2); box-shadow: 0 0 16px rgba(34, 211, 238, .35); }
.c4-seat .st-name { font-weight: 700; font-size: 14px; }
.c4-seat .st-role { font-size: 11.5px; color: var(--muted); }
.c4-board {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px;
  background: rgba(7, 11, 22, .65); border: 1px solid var(--line);
  border-radius: 18px; padding: 14px; width: 100%; max-width: 520px;
  touch-action: manipulation;
}
.c4-cell {
  aspect-ratio: 1; border-radius: 50%;
  background: rgba(148, 163, 184, .1);
  border: 1px solid rgba(148, 163, 184, .18);
  position: relative; cursor: default; transition: background .15s;
}
.c4-board.clickable .c4-cell { cursor: pointer; }
.c4-board.clickable .c4-cell.col-hover { background: rgba(139, 92, 246, .16); }
.c4-cell.p1 { background: var(--grad); box-shadow: 0 0 12px rgba(139, 92, 246, .55); }
.c4-cell.p2 { background: linear-gradient(120deg, #0891b2, #22d3ee); box-shadow: 0 0 12px rgba(34, 211, 238, .55); }
.c4-cell.win { outline: 3px solid var(--amber); outline-offset: 1px; animation: winPulse 1s infinite alternate; }
@keyframes winPulse { to { transform: scale(1.06); } }
.c4-msg { font-size: 15px; color: var(--muted); text-align: center; }
.c4-msg b.me { color: var(--p2); }

/* تایپ */
.type-sentence {
  background: rgba(7, 11, 22, .65); border: 1px solid var(--line);
  border-radius: 16px; padding: 20px 24px; font-size: 21px; line-height: 2.1;
  text-align: center; letter-spacing: .5px; margin-bottom: 16px;
}
.type-counter { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin: 6px 2px 0; }
.type-area {
  width: 100%; min-height: 130px; resize: vertical;
  background: rgba(11, 18, 36, .8); color: var(--text);
  border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px;
  font-size: 16.5px; line-height: 1.9; outline: none;
}
.type-area:focus { border-color: var(--p1); box-shadow: 0 0 0 3px rgba(139, 92, 246, .18); }
.type-result { border-radius: 14px; border: 1px solid rgba(52, 211, 153, .4); background: rgba(52, 211, 153, .07); padding: 14px 18px; margin-top: 14px; font-size: 14.5px; }
.res-grid { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.res-tile { flex: 1; min-width: 130px; background: rgba(7, 11, 22, .5); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.res-tile .rt-label { font-size: 11.5px; color: var(--muted); }
.res-tile .rt-value { font-size: 19px; font-weight: 800; margin-top: 3px; }
.res-tile .rt-value.pt { color: var(--p2); }

/* حدس کلمه */
.wl-layout { display: flex; gap: 20px; flex-wrap: wrap; }
.wl-board { flex: 1; min-width: 250px; }
.wl-row { display: flex; gap: 6px; justify-content: center; margin-bottom: 6px; direction: rtl; }
.wl-tile {
  width: 52px; height: 52px; border-radius: 10px;
  border: 1px solid var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 23px; font-weight: 800;
  background: rgba(7, 11, 22, .5); transition: all .15s;
}
.wl-tile.filled { background: rgba(139, 92, 246, .12); border-color: rgba(139, 92, 246, .45); }
.wl-tile.pop { animation: pop .15s; }
.wl-tile.m2 { background: rgba(52, 211, 153, .22); border-color: var(--green); color: #b7f4dd; }
.wl-tile.m1 { background: rgba(251, 191, 36, .18); border-color: var(--amber); color: #fde68a; }
.wl-tile.m0 { background: rgba(148, 163, 184, .07); border-color: rgba(148, 163, 184, .25); color: var(--muted); }
.wl-side { width: 240px; flex: none; display: flex; flex-direction: column; gap: 12px; }
.wl-peers { display: flex; flex-direction: column; gap: 7px; }
.wl-peer { display: flex; align-items: center; gap: 9px; background: rgba(7, 11, 22, .5); border: 1px solid var(--line); border-radius: 12px; padding: 7px 12px; font-size: 13.5px; }
.wl-peer .wp-dots { display: flex; gap: 4px; flex: 1; }
.wl-peer .wp-dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(148, 163, 184, .25); }
.wl-peer .wp-dot.done { background: var(--amber); }
.wl-peer .wp-dot.won { background: var(--green); }
.wl-keyboard { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }
.wl-key {
  padding: 9px 2px; border-radius: 9px; cursor: pointer;
  background: rgba(148, 163, 184, .12); border: 1px solid var(--line);
  color: var(--text); font-size: 16px; font-weight: 700; text-align: center;
  transition: .15s; user-select: none;
}
.wl-key:hover { background: rgba(139, 92, 246, .25); border-color: var(--p1); }
.wl-key.wide { grid-column: span 2; font-size: 12px; }
.wl-key.used { opacity: .35; }

/* ریاضی و دانش عمومی */
.race-q {
  background: rgba(7, 11, 22, .65); border: 1px solid var(--line);
  border-radius: 18px; padding: 26px; text-align: center; margin-bottom: 16px;
}
.race-q .rq-text { font-size: clamp(22px, 4vw, 32px); font-weight: 800; letter-spacing: 1px; }
.race-progress { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.quiz-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quiz-opt {
  padding: 15px 18px; border-radius: 14px; cursor: pointer; text-align: right;
  background: rgba(7, 11, 22, .55); border: 1px solid var(--line);
  color: var(--text); font-size: 15.5px; font-weight: 600; transition: .15s;
  display: flex; align-items: center; gap: 10px;
}
.quiz-opt .qo-key { width: 30px; height: 30px; border-radius: 9px; background: rgba(139, 92, 246, .18); color: #b7a3f8; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; flex: none; font-size: 14px; }
.quiz-opt:hover { border-color: var(--p1); background: rgba(139, 92, 246, .1); }
.quiz-opt.picked { border-color: var(--p2); background: rgba(34, 211, 238, .1); }
.quiz-opt.correct { border-color: var(--green); background: rgba(52, 211, 153, .14); }
.quiz-opt.wrongpick { border-color: rgba(248, 113, 113, .55); background: rgba(248, 113, 113, .1); }
.quiz-opt:disabled { cursor: default; }
.math-input-row { display: flex; gap: 10px; justify-content: center; }
.math-input {
  width: 220px; padding: 13px 16px; font-size: 22px; text-align: center; font-weight: 800;
  background: rgba(11, 18, 36, .8); color: var(--text);
  border: 1px solid var(--line); border-radius: 14px; outline: none;
  font-variant-numeric: tabular-nums;
}
.math-input:focus { border-color: var(--p1); }
.reveal-box { border-radius: 16px; border: 1px solid rgba(251, 191, 36, .4); background: rgba(251, 191, 36, .06); padding: 16px 20px; margin-top: 14px; }
.award-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 14.5px; }
.award-row .aw-pts { font-weight: 800; color: var(--green); }
.podium { display: flex; gap: 12px; justify-content: center; align-items: flex-end; margin: 26px 0 10px; }
.podium-item { text-align: center; background: rgba(7, 11, 22, .5); border: 1px solid var(--line); border-radius: 16px; padding: 14px 10px; width: 120px; }
.podium-item .pd-bar { border-radius: 10px; background: var(--grad); margin-bottom: 9px; }
.podium-item.p1 .pd-bar { height: 64px; box-shadow: var(--shadow-neon); }
.podium-item.p2 .pd-bar { height: 44px; background: linear-gradient(120deg, #0891b2, #22d3ee); }
.podium-item.p3 .pd-bar { height: 30px; background: linear-gradient(120deg, #b45309, #fbbf24); }
.podium-item .pd-name { font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-item .pd-pts { color: var(--muted); font-size: 12.5px; }

/* ── ریسپانسیو ── */
@media (max-width: 900px) {
  .lobby-grid { grid-template-columns: 1fr; }
  .room-layout { grid-template-columns: 1fr; }
  .side-panel { flex-direction: row; flex-wrap: wrap; }
  .side-panel .side-card { flex: 1 1 260px; }
  .quiz-options { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .topbar { padding: 10px 14px; }
  .topnav { display: none; }
  .hero { padding: 36px 14px 20px; }
  .card { padding: 17px; }
  .game-area { padding: 15px; }
  .roombar .code-chip span.lbl { display: none; }
  .wl-tile { width: 44px; height: 44px; font-size: 19px; }
  .type-sentence { font-size: 17px; }
}
