/* =========================================================
   خانه بازی — سیستم طراحی
   پالت: شب آرکید — بنفش‌سرمه‌ای عمیق + طلایی/فیروزه‌ای به‌عنوان تاکید
   ========================================================= */

@import url('https://cdnjs.cloudflare.com/ajax/libs/vazirmatn/33.003/Vazirmatn-font-face.css');

:root {
  /* رنگ‌ها */
  --bg:        #14133F;
  --bg-deep:   #0D0C2B;
  --surface:   #1E1B54;
  --surface-2: #262163;
  --line:      #3A3480;
  --text:      #F2F0FF;
  --text-dim:  #ADA8E0;
  --gold:      #FFB100;
  --teal:      #33D9B2;
  --coral:     #FF5D5D;
  --violet:    #7C9CFF;

  /* تایپوگرافی */
  --font-body: 'Vazirmatn', Tahoma, sans-serif;
  --font-score: 'Vazirmatn', monospace;

  /* اندازه‌ها */
  --radius: 10px;
  --radius-lg: 18px;
  --shadow-hard: 4px 4px 0 rgba(0,0,0,0.35);
}

* { box-sizing: border-box; }

/* ---------- تم روشن ---------- */
html[data-theme="light"] {
  --bg:        #F4F3FC;
  --bg-deep:   #FFFFFF;
  --surface:   #FFFFFF;
  --surface-2: #ECEAFB;
  --line:      #D8D4F2;
  --text:      #1E1B4B;
  --text-dim:  #6B6795;
  --gold:      #E08E00;
  --teal:      #12A788;
  --coral:     #E14545;
  --violet:    #4C6BD6;
}
html[data-theme="light"] body {
  background-image:
    radial-gradient(circle at 15% 10%, rgba(76,107,214,0.06), transparent 40%),
    radial-gradient(circle at 85% 90%, rgba(224,142,0,0.08), transparent 45%);
}
html[data-theme="light"] .btn { box-shadow: 4px 4px 0 rgba(30,27,75,0.12); }
html[data-theme="light"] .ttt-cell,
html[data-theme="light"] .snl-cell,
html[data-theme="light"] .mono-tile { background: #EDEBFA; }
html[data-theme="light"] .hokm-table { background: radial-gradient(circle, #E7E4FB 0%, #F4F3FC 70%); }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  direction: rtl;
  min-height: 100vh;
}

body {
  background-image:
    radial-gradient(circle at 15% 10%, rgba(124,156,255,0.12), transparent 40%),
    radial-gradient(circle at 85% 90%, rgba(255,177,0,0.10), transparent 45%);
}

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.35; margin: 0 0 .5em; font-weight: 700; }
p { line-height: 1.8; color: var(--text-dim); }

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------- نوار بالا ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  border-bottom: 2px solid var(--line);
}
.brand {
  font-size: 22px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 0;
}
.brand span { color: var(--text); }

.nav-user { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.avatar-dot {
  width: 30px; height: 30px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; color: var(--bg-deep); font-size: 13px;
}

/* ---------- دکمه‌ها ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius);
  border: 2px solid var(--bg-deep);
  background: var(--gold);
  color: var(--bg-deep);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  box-shadow: var(--shadow-hard);
  transition: transform .08s ease;
}
.btn:hover { text-decoration: none; transform: translate(-1px,-1px); }
.btn:active { transform: translate(1px,1px); box-shadow: 1px 1px 0 rgba(0,0,0,.35); }
.btn.secondary { background: var(--surface-2); color: var(--text); border-color: var(--line); }
.btn.teal { background: var(--teal); color: var(--bg-deep); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); box-shadow: none; }
.btn.block { width: 100%; }
.btn.small { padding: 6px 14px; font-size: 13px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- کارت‌های بازی (لابی) ---------- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
  margin: 28px 0;
}
.game-card {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.game-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 10px 30px rgba(255,177,0,.18);
}
.game-card::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,177,0,.06), transparent 60%);
  pointer-events: none; /* مهم: نگذار این لایه‌ی تزئینی جلوی کلیک روی دکمه‌ها را بگیرد */
}
.game-card .icon { font-size: 34px; display: block; margin-bottom: 10px; }
.game-card h3 { font-size: 18px; margin-bottom: 6px; }
.game-card p { font-size: 13px; margin-bottom: 16px; min-height: 40px; }
.game-card .meta { font-size: 12px; color: var(--text-dim); margin-bottom: 14px; }

/* ---------- فرم‌ها ---------- */
.auth-wrap {
  max-width: 380px;
  margin: 60px auto;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 6px; font-size: 13px; color: var(--text-dim); }
.field input {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius);
  border: 2px solid var(--line);
  background: var(--bg-deep);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
}
.field input:focus { outline: none; border-color: var(--teal); }

.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 18px;
  border: 2px solid transparent;
}
.alert.error   { background: rgba(255,93,93,.12); border-color: var(--coral); color: #FFD3D3; }
.alert.success { background: rgba(51,217,178,.12); border-color: var(--teal); color: #C9FBEE; }
.alert.info    { background: rgba(124,156,255,.12); border-color: var(--violet); color: #E1E8FF; }

/* ---------- اتاق بازی ---------- */
.room-wrap { display: grid; grid-template-columns: 1fr 280px; gap: 22px; margin: 26px 0; }
@media (max-width: 800px) { .room-wrap { grid-template-columns: 1fr; } }

.board-area {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  min-height: 360px;
}
.side-panel {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 520px;
}
.players-list { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.player-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: var(--radius);
  background: var(--surface-2);
}
.player-chip.turn { outline: 2px solid var(--gold); }

.chat-box { flex: 1; overflow-y: auto; font-size: 13px; display: flex; flex-direction: column; gap: 8px; max-height: 220px; }
.chat-msg {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 85%;
  animation: chatIn .25s ease-out;
}
.chat-msg.own { align-self: flex-end; align-items: flex-end; }
.chat-msg .bubble {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 14px 14px 14px 4px;
  padding: 7px 12px;
  color: var(--text);
}
.chat-msg.own .bubble {
  background: linear-gradient(135deg, var(--teal), #23b596);
  color: var(--bg-deep);
  border-radius: 14px 14px 4px 14px;
  font-weight: 600;
}
.chat-msg .meta { font-size: 10px; color: var(--text-dim); margin-top: 2px; padding: 0 4px; }
.chat-msg .meta b { color: var(--gold); }
@keyframes chatIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.chat-form { display: flex; gap: 6px; }
.chat-form input { flex: 1; padding: 8px 10px; border-radius: var(--radius); border: 2px solid var(--line); background: var(--bg-deep); color: var(--text); }

.room-code-box {
  text-align: center;
  font-family: var(--font-score);
  font-size: 26px;
  letter-spacing: 4px;
  color: var(--gold);
  padding: 10px;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
}

.status-line { font-size: 14px; color: var(--text-dim); margin-bottom: 14px; }
.status-line b { color: var(--teal); }

footer {
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
  padding: 40px 0 20px;
}

/* ---------- دوز ---------- */
.ttt-board { display: grid; grid-template-columns: repeat(3, 100px); grid-template-rows: repeat(3, 100px); gap: 8px; justify-content: center; margin: 10px auto; }
.ttt-cell {
  background: var(--bg-deep);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  font-size: 42px;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--gold);
  transition: transform .12s ease, border-color .12s ease;
}
.ttt-cell.filled { animation: tttPop .22s ease-out; }
.ttt-cell.o { color: var(--teal); }
.ttt-cell:not(.filled):hover { border-color: var(--gold); transform: scale(1.04); }
.ttt-cell.win-cell { border-color: var(--gold); background: rgba(255,177,0,.14); animation: tttGlow 1s ease-in-out infinite; }
@keyframes tttPop {
  from { transform: scale(.5); opacity: .3; }
  to   { transform: scale(1); opacity: 1; }
}
@keyframes tttGlow {
  0%, 100% { box-shadow: 0 0 0 rgba(255,177,0,0); }
  50%      { box-shadow: 0 0 14px rgba(255,177,0,.55); }
}

/* ---------- مار و پله ---------- */
.snl-board { display: grid; grid-template-columns: repeat(10, 44px); gap: 3px; margin: 10px auto; direction: ltr; width: max-content; }
.snl-cell {
  width: 44px; height: 44px;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  font-size: 10px;
  display: flex; align-items: flex-start; justify-content: flex-start;
  padding: 3px;
  position: relative;
  color: var(--text-dim);
  border-radius: 4px;
  overflow: visible;
}
.snl-cell.ladder { background: rgba(51,217,178,.15); }
.snl-cell.snake { background: rgba(255,93,93,.15); }
.snl-icon { position: absolute; bottom: 1px; left: 2px; font-size: 14px; opacity: .85; }
.snl-token {
  position: absolute; bottom: 3px; left: 3px;
  width: 14px; height: 14px; border-radius: 50%;
  font-size: 9px; display:flex; align-items:center; justify-content:center; color:#0D0C2B; font-weight:800;
  border: 1px solid rgba(0,0,0,.3);
  transition: all .3s ease;
  z-index: 2;
}
.dice-display { font-size: 44px; text-align: center; margin: 12px 0; transition: transform .15s ease; }
.dice-display.rolling { animation: diceShake .5s ease; }
@keyframes diceShake {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-15deg) scale(1.1); }
  75% { transform: rotate(15deg) scale(1.1); }
}

.board-area { overflow-x: auto; }

/* ---------- ریسپانسیو ---------- */
@media (max-width: 640px) {
  .container { padding: 0 12px; }
  .topbar { flex-wrap: wrap; gap: 10px; padding: 14px 0; }
  .brand { font-size: 19px; }
  h1 { font-size: 22px !important; }
  .game-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .game-card { padding: 16px; }
  .game-card .icon { font-size: 26px; }
  .game-card h3 { font-size: 16px; }
  .auth-wrap { margin: 24px auto; padding: 22px; max-width: 92vw; }
  .room-code-box { font-size: 20px; letter-spacing: 2px; }
  .ttt-board { grid-template-columns: repeat(3, 84px); grid-template-rows: repeat(3, 84px); }
  .ttt-cell { font-size: 34px; }
  .snl-board { grid-template-columns: repeat(10, 34px); }
  .snl-cell { width: 34px; height: 34px; font-size: 8px; }
  .mono-board { grid-template-columns: repeat(6, 92px); grid-auto-rows: 76px; }
  .side-panel { max-height: none; }
}

.mono-board { display: grid; grid-template-columns: repeat(6, 120px); grid-auto-rows: 90px; gap: 4px; margin: 10px auto; width: max-content; }
.mono-tile {
  background: var(--bg-deep);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 11px;
  padding: 6px;
  position: relative;
  color: var(--text-dim);
}
.mono-tile.owned { border-color: var(--gold); }
.mono-tile .price { color: var(--gold); font-weight: 700; display: block; margin-top: 4px; }
.mono-players-onboard { position: absolute; bottom: 3px; right: 3px; display: flex; gap: 2px; }
.mono-cash-list { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }

/* ---------- حکم (پاسور) ---------- */
.hokm-info-bar {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; margin-bottom: 10px; color: var(--text-dim);
}
.hokm-trump-badge { background: var(--surface-2); padding: 6px 12px; border-radius: 20px; border: 1px solid var(--line); }
.hokm-trump-badge span { color: var(--gold); font-weight: 800; font-size: 16px; }

.hokm-table {
  position: relative;
  width: 100%;
  max-width: 440px;
  aspect-ratio: 1 / 1;
  margin: 10px auto 20px;
  background: radial-gradient(circle, #1c1852 0%, #14133F 70%);
  border: 3px solid var(--line);
  border-radius: 50%;
}
.hokm-seat {
  position: absolute;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: 11px;
  color: var(--text-dim);
  transition: filter .2s ease;
}
.hokm-seat.turn { color: var(--gold); filter: drop-shadow(0 0 6px rgba(255,177,0,.6)); }
.hokm-seat-label { display: flex; align-items: center; gap: 5px; background: var(--surface); padding: 3px 8px; border-radius: 20px; border: 1px solid var(--line); white-space: nowrap; }
.hokm-seat-bottom { bottom: 4%; left: 50%; transform: translateX(-50%); }
.hokm-seat-top     { top: 4%; left: 50%; transform: translateX(-50%); }
.hokm-seat-left    { left: 4%; top: 50%; transform: translateY(-50%); }
.hokm-seat-right   { right: 4%; top: 50%; transform: translateY(-50%); }
.hokm-cardback-row { display: flex; gap: -6px; }
.hokm-cardback {
  width: 14px; height: 20px; margin-right: -8px;
  background: repeating-linear-gradient(45deg, var(--violet), var(--violet) 3px, #5b74d1 3px, #5b74d1 6px);
  border: 1px solid var(--bg-deep); border-radius: 3px;
}

.hokm-trick-area {
  position: absolute; inset: 26%;
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 4px;
}

.hokm-trump-picker {
  text-align: center;
  background: var(--surface-2);
  border: 2px dashed var(--gold);
  border-radius: var(--radius);
  padding: 16px;
  margin: 14px 0;
}

.hokm-hand {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.playing-card {
  width: 52px; height: 74px;
  background: #FBF8EF;
  border-radius: 7px;
  border: 1px solid #d8d2bd;
  box-shadow: 0 3px 0 rgba(0,0,0,.25);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px;
  color: #1a1a1a;
  cursor: pointer;
  transition: transform .12s ease;
  user-select: none;
}
.playing-card:hover { transform: translateY(-6px); }
.playing-card.red { color: #D4302F; }
.playing-card.small { width: 34px; height: 48px; font-size: 12px; }
.playing-card .suit-symbol { font-size: 20px; line-height: 1; }
.playing-card.disabled { opacity: .45; cursor: not-allowed; transform: none; }

@media (max-width: 640px) {
  .hokm-table { max-width: 300px; }
  .playing-card { width: 38px; height: 54px; font-size: 12px; }
  .playing-card .suit-symbol { font-size: 15px; }
}

/* ---------- آمیرزا ---------- */
.amirza-wrap { text-align: center; padding: 10px 0; }
.amirza-timer {
  display: inline-block;
  font-size: 20px; font-weight: 800;
  background: var(--surface-2);
  padding: 8px 20px;
  border-radius: 20px;
  color: var(--gold);
  margin-bottom: 16px;
}
.amirza-timer.low { color: var(--coral); animation: tttGlow 0.6s ease-in-out infinite; }
.amirza-letters { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }
.amirza-tile {
  width: 46px; height: 46px;
  background: linear-gradient(135deg, var(--gold), #d99700);
  color: var(--bg-deep);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800;
  box-shadow: 0 3px 0 rgba(0,0,0,.25);
}
.amirza-word-chip {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 13px;
}
.amirza-results-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius);
  background: var(--surface-2); margin-bottom: 8px;
}
.amirza-results-row.winner { border: 2px solid var(--gold); }
.ng-letter {
  display: inline-block; width: 36px; height: 36px; line-height: 36px;
  background: var(--gold); color: var(--bg-deep); border-radius: 8px;
  font-weight: 800; font-size: 20px;
}

/* ---------- تور آموزشی اول ورود ---------- */
.onboarding-overlay { position: fixed; inset: 0; z-index: 998; }
.onboarding-highlight {
  position: absolute;
  border: 3px solid var(--gold);
  border-radius: 10px;
  box-shadow: 0 0 0 4000px rgba(13,12,43,.75);
  transition: all .3s ease;
  pointer-events: none;
}
.onboarding-box {
  position: absolute;
  max-width: 280px;
  background: var(--surface);
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: all .3s ease;
  z-index: 999;
}

/* ---------- تراشه‌های سکه/الماس ---------- */
.wallet-chips { display: inline-flex; gap: 8px; flex-wrap: wrap; justify-content: center; vertical-align: middle; }
.wallet-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 20px; padding: 4px 12px; font-size: 13px; font-weight: 700;
  white-space: nowrap; line-height: 1.6;
}
.wallet-chip.coin { color: var(--gold); }
.wallet-chip.gem { color: var(--violet); }

/* ---------- تریلر کوتاه شروع بازی ---------- */
.game-intro-overlay {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(13,12,43,.88);
  display: flex; align-items: center; justify-content: center;
  animation: introFadeIn .3s ease-out;
}
@keyframes introFadeIn { from { opacity: 0; } to { opacity: 1; } }
.game-intro-box {
  background: var(--surface);
  border: 2px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 380px;
  text-align: center;
  box-shadow: 0 0 40px rgba(255,177,0,.25);
}
.game-intro-anim { font-size: 44px; margin-bottom: 14px; min-height: 60px; display: flex; align-items: center; justify-content: center; }

.intro-ttt { display: grid; grid-template-columns: repeat(3, 24px); grid-template-rows: repeat(3, 24px); gap: 4px; }
.intro-ttt div { background: var(--bg-deep); border: 1px solid var(--line); border-radius: 4px; animation: introBlink 1.4s ease-in-out infinite; }
.intro-ttt div:nth-child(1) { animation-delay: 0s; }
.intro-ttt div:nth-child(5) { animation-delay: .2s; }
.intro-ttt div:nth-child(9) { animation-delay: .4s; }
@keyframes introBlink { 0%, 100% { background: var(--bg-deep); } 50% { background: var(--gold); } }

.intro-dice { animation: diceShake 1.2s ease-in-out infinite; }
.intro-token { animation: introBounce 1s ease-in-out infinite; }
@keyframes introBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.intro-cards { display: flex; gap: 6px; }
.intro-cards span { animation: introFlip 1.6s ease-in-out infinite; display: inline-block; }
.intro-cards span:nth-child(2) { animation-delay: .2s; }
.intro-cards span:nth-child(3) { animation-delay: .4s; }
@keyframes introFlip { 0%, 100% { transform: rotateY(0deg); } 50% { transform: rotateY(180deg); } }

.intro-letters { display: flex; gap: 8px; }
.intro-letters span {
  background: var(--gold); color: var(--bg-deep); width: 40px; height: 40px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; font-weight: 800;
  animation: introBounce 1.2s ease-in-out infinite;
}
.intro-letters span:nth-child(2) { animation-delay: .15s; }
.intro-letters span:nth-child(3) { animation-delay: .3s; }
.intro-letters span:nth-child(4) { animation-delay: .45s; }

/* ---------- کانکت ۴ ---------- */
.c4-board {
  display: grid; grid-template-columns: repeat(7, 44px); grid-template-rows: repeat(6, 44px);
  gap: 5px; justify-content: center; margin: 10px auto;
  background: #1a3a8f; padding: 8px; border-radius: 10px; width: max-content;
  direction: ltr; min-height: 300px;
}
.c4-cell { width: 44px; height: 44px; background: var(--bg-deep); border: 2px solid rgba(255,255,255,.2); border-radius: 50%; box-sizing: border-box; }
.c4-cell.red { background: var(--coral); animation: tttPop .25s ease-out; }
.c4-cell.yellow { background: var(--gold); animation: tttPop .25s ease-out; }
.c4-cell.win-cell { box-shadow: 0 0 0 3px #fff, 0 0 14px rgba(255,255,255,.6); }
@media (max-width: 640px) {
  .c4-board { grid-template-columns: repeat(7, 34px); grid-template-rows: repeat(6, 34px); }
  .c4-cell { width: 34px; height: 34px; }
}

/* ---------- منچ ---------- */
.ludo-bases { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 14px; }
.ludo-base {
  border: 2px solid; border-radius: 10px; padding: 8px 10px; min-width: 110px;
  background: var(--surface-2); text-align: center;
}
.ludo-base-label { font-size: 12px; font-weight: 700; margin-bottom: 6px; }
.ludo-base-tokens { display: flex; gap: 4px; justify-content: center; min-height: 18px; margin-bottom: 6px; }
.ludo-home-stretch { display: flex; gap: 3px; justify-content: center; }
.ludo-token-dot { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0,0,0,.3); }
.ludo-stretch-cell { width: 10px; height: 10px; border-radius: 50%; background: var(--bg-deep); border: 1px solid var(--line); }
.ludo-stretch-cell.filled { background: currentColor; }

.ludo-path {
  display: flex; flex-wrap: wrap; gap: 2px; justify-content: center;
  max-width: 480px; margin: 0 auto; direction: ltr; min-height: 160px;
}
.ludo-path-cell {
  width: 18px; height: 18px; background: var(--bg-deep); border: 1px solid rgba(255,255,255,.25);
  border-radius: 3px; position: relative; box-sizing: border-box;
}
.ludo-path-cell.start-0 { background: rgba(255,177,0,.25); }
.ludo-path-cell.start-1 { background: rgba(51,217,178,.25); }
.ludo-path-cell.start-2 { background: rgba(255,93,93,.25); }
.ludo-path-cell.start-3 { background: rgba(124,156,255,.25); }
.ludo-path-token {
  position: absolute; inset: 1px; border-radius: 50%; border: 1px solid rgba(0,0,0,.4);
}

/* ---------- لیدربورد ---------- */
.lb-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 2px solid transparent;
  opacity: 0;
  animation: lbIn .35s ease-out forwards;
  animation-delay: calc(var(--i, 0) * 45ms);
}
@keyframes lbIn {
  from { opacity: 0; transform: translateX(10px); }
  to   { opacity: 1; transform: translateX(0); }
}
.lb-rank { width: 30px; font-weight: 800; font-size: 16px; text-align: center; }
.lb-row.top1 { border-color: var(--gold); background: linear-gradient(90deg, rgba(255,177,0,.14), var(--surface-2)); }
.lb-row.top2 { border-color: #C9CEDA; }
.lb-row.top3 { border-color: #CD8A55; }
.lb-row.me { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(51,217,178,.15); }
.lb-row .lb-name { font-weight: 700; }
.lb-row .lb-tag { font-size: 10px; background: var(--teal); color: var(--bg-deep); padding: 2px 7px; border-radius: 20px; font-weight: 800; }
.lb-row .lb-stats { margin-right: auto; font-size: 12px; color: var(--text-dim); }
.lb-row .lb-score { font-weight: 800; color: var(--teal); font-size: 15px; }
.lb-row.top1 .lb-score { color: var(--gold); }
.medal-shine { display: inline-block; animation: shine 2.2s ease-in-out infinite; }
@keyframes shine {
  0%, 100% { filter: drop-shadow(0 0 0 transparent); transform: scale(1); }
  50%      { filter: drop-shadow(0 0 6px rgba(255,177,0,.7)); transform: scale(1.12); }
}
