/* გონების არენა (Mind Arena) — გლობალური სტილები. სუფთა CSS, ბიბლიოთეკების გარეშე. */

:root {
  --bg: #f4f5fb;
  --surface: #ffffff;
  --surface-2: #f0f1fa;
  --border: #e3e5f2;
  --text: #1c1d2e;
  --text-dim: #6b6d85;
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #eef0fe;
  --accent: #facc15;
  --accent-ink: #312e81;
  --success: #16a34a;
  --success-bg: #dcfce7;
  --danger: #dc2626;
  --danger-bg: #fee2e2;
  --warning: #f59e0b;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 20px rgba(30, 30, 60, 0.08);
  --shadow-lg: 0 12px 40px rgba(30, 30, 60, 0.16);
  --header-h: 64px;

  --c-red: #e21b3c;
  --c-blue: #1368ce;
  --c-yellow: #d89e00;
  --c-green: #26890c;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans Georgian", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0 0 8px; line-height: 1.25; }
p { margin: 0 0 12px; color: var(--text-dim); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; }
img { max-width: 100%; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 620px; margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.app-header {
  height: calc(var(--header-h) + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  display: flex;
  align-items: center;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.app-header .container { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 20px; color: var(--text); }
.brand .logo-emoji { width: 24px; height: 24px; border-radius: 6px; display: block; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.header-user { color: var(--text-dim); font-size: 14px; margin-inline-end: 6px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .06s ease, box-shadow .15s ease, background .15s ease, opacity .15s ease;
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 2px 10px rgba(99,102,241,.35); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn-outline:hover { background: var(--surface-2); }
.btn-danger { background: var(--danger-bg); color: var(--danger); }
.btn-danger:hover { background: #fecaca; }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 15px 28px; font-size: 17px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-icon { padding: 8px; border-radius: 10px; }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--text-dim); margin-bottom: 6px; }
.input, select.input, textarea.input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
textarea.input { resize: vertical; min-height: 80px; }
.input-pin {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 6px;
  text-align: center;
}
.hint { font-size: 12px; color: var(--text-dim); margin-top: 4px; }
.error-box {
  background: var(--danger-bg);
  color: var(--danger);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 14px;
  display: none;
}
.error-box.show { display: block; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 24px;
}
.card-pad-lg { padding: 36px; }

.auth-shell {
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}
.auth-card { width: 100%; max-width: 420px; }
.auth-card .logo-emoji { width: 48px; height: 48px; border-radius: 10px; display: block; margin: 0 auto 8px; }
.auth-card h1 { text-align: center; font-size: 24px; }
.auth-card .sub { text-align: center; margin-bottom: 24px; }
.auth-switch { text-align: center; margin-top: 16px; font-size: 14px; color: var(--text-dim); }

/* ---------- Hero (landing) ---------- */
.hero {
  padding: 64px 0 40px;
  text-align: center;
  background: linear-gradient(180deg, #efeffb 0%, var(--bg) 100%);
}
.hero h1 {
  font-size: 44px;
  font-weight: 900;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 12px;
}
.hero p.lead { font-size: 18px; max-width: 560px; margin: 0 auto 28px; }
.join-box { max-width: 380px; margin: 0 auto; }
.join-box .btn { margin-top: 10px; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 56px;
}
.feature-card { text-align: center; padding: 28px 20px; }
.feature-card .icon { font-size: 32px; margin-bottom: 10px; }
.feature-card h3 { font-size: 17px; }
.feature-card p { font-size: 14px; margin: 0; }

/* ---------- Dashboard ---------- */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 20px;
}
.tabs { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 12px; width: fit-content; margin-bottom: 20px; }
.tab-btn {
  border: none; background: transparent; padding: 9px 18px; border-radius: 9px;
  font-weight: 700; font-size: 14px; color: var(--text-dim); cursor: pointer;
}
.tab-btn.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow); }
.search-row { display: flex; gap: 10px; margin-bottom: 18px; }
.search-row .input { max-width: 320px; }

.quiz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.quiz-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform .12s ease, box-shadow .12s ease;
}
.quiz-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.quiz-cover { height: 84px; display: flex; align-items: flex-end; padding: 10px 14px; }
.quiz-cover .badge-public {
  background: rgba(255,255,255,.9); color: var(--text); font-size: 11px; font-weight: 800;
  padding: 3px 9px; border-radius: 20px;
}
.quiz-body { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; }
.quiz-body h3 { font-size: 16px; margin-bottom: 4px; }
.quiz-meta { font-size: 12.5px; color: var(--text-dim); margin-bottom: 12px; }
.quiz-actions { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-dim); }
.empty-state .icon { font-size: 44px; margin-bottom: 10px; }

/* ---------- Editor ---------- */
.editor-meta-card { margin-bottom: 20px; }
.question-list { display: flex; flex-direction: column; gap: 14px; }
.question-card { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 18px; }
.question-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.question-num {
  width: 28px; height: 28px; border-radius: 50%; background: var(--primary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; flex-shrink: 0;
}
.question-card-head .input { flex: 1; font-weight: 600; }
.q-settings-row { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.q-settings-row .field { margin-bottom: 0; flex: 1; min-width: 130px; }
.choices-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px) { .choices-grid { grid-template-columns: 1fr; } }
.choice-row {
  display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 10px;
  border: 1.5px solid var(--border); background: var(--surface-2);
}
.choice-row.is-correct { border-color: var(--success); background: var(--success-bg); }
.choice-row input.input { border: none; background: transparent; padding: 4px 2px; flex: 1; }
.choice-correct-toggle {
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--border); background: #fff;
  cursor: pointer; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; color: transparent;
}
.choice-row.is-correct .choice-correct-toggle { background: var(--success); border-color: var(--success); color: #fff; }
.question-card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }
.add-question-btn { border: 2px dashed var(--border); background: transparent; border-radius: var(--radius); padding: 18px; text-align: center; font-weight: 700; color: var(--text-dim); cursor: pointer; width: 100%; }
.add-question-btn:hover { border-color: var(--primary); color: var(--primary); }
.editor-save-bar {
  position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--border);
  padding: 14px 0; display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px;
}

/* ---------- Host screen ---------- */
.host-shell { min-height: calc(100vh - var(--header-h)); display: flex; flex-direction: column; align-items: center; padding: 30px 16px; }
.pin-card { text-align: center; padding: 40px; }
.pin-label { font-size: 14px; color: var(--text-dim); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.pin-value {
  font-size: 64px; font-weight: 900; letter-spacing: 10px; color: var(--primary); margin: 10px 0;
}
.join-url { font-size: 15px; color: var(--text-dim); margin-bottom: 20px; }
.player-chip-grid { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 20px 0; min-height: 40px; }
.player-chip { background: var(--primary-light); color: var(--primary-dark); padding: 8px 16px; border-radius: 20px; font-weight: 700; font-size: 14px; }
.player-count-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); padding: 6px 14px; border-radius: 20px; font-weight: 700; font-size: 14px; }

.host-question-header { width: 100%; max-width: 900px; text-align: center; margin-bottom: 18px; }
.host-question-header .q-index { color: var(--text-dim); font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.host-question-text { font-size: 28px; font-weight: 800; margin-bottom: 10px; }
.timer-ring-wrap { display: flex; justify-content: center; margin: 14px 0; }
.timer-ring {
  width: 84px; height: 84px; border-radius: 50%; background: var(--primary);
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 900;
  box-shadow: var(--shadow-lg);
}
.answer-progress { max-width: 900px; width: 100%; text-align: center; margin-bottom: 18px; font-weight: 700; color: var(--text-dim); }

.answer-shapes-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px; width: 100%; max-width: 900px;
}
.answer-shape {
  border-radius: var(--radius); padding: 22px; color: #fff; font-size: 18px; font-weight: 800;
  display: flex; align-items: center; gap: 12px; min-height: 72px; border: none; cursor: pointer; text-align: start;
  transition: transform .08s ease, filter .1s ease;
}
.answer-shape:hover { filter: brightness(1.06); }
.answer-shape:active { transform: scale(0.98); }
.answer-shape .shape-icon { font-size: 24px; flex-shrink: 0; }
.shape-0 { background: var(--c-red); }
.shape-1 { background: var(--c-blue); }
.shape-2 { background: var(--c-yellow); }
.shape-3 { background: var(--c-green); }
.answer-shape.dimmed { opacity: .35; }
.answer-shape.correct-reveal { outline: 4px solid #fff; box-shadow: 0 0 0 4px #16a34a; }
.answer-shape .count-badge { margin-inline-start: auto; background: rgba(0,0,0,.2); padding: 3px 10px; border-radius: 20px; font-size: 14px; }

.host-controls { display: flex; gap: 10px; margin-top: 26px; }

/* ---------- Leaderboard ---------- */
.leaderboard-list { list-style: none; margin: 0 auto; padding: 0; max-width: 560px; width: 100%; }
.leaderboard-row {
  display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 10px; box-shadow: var(--shadow);
}
.leaderboard-row.rank-1 { border-color: #facc15; background: #fffbea; }
.leaderboard-row.rank-2 { border-color: #cbd5e1; }
.leaderboard-row.rank-3 { border-color: #fbbf88; }
.rank-num { width: 30px; text-align: center; font-weight: 900; color: var(--text-dim); font-size: 16px; }
.leaderboard-row.rank-1 .rank-num { color: #ca8a04; }
.leaderboard-name { flex: 1; font-weight: 700; }
.leaderboard-score { font-weight: 800; color: var(--primary); }

/* ---------- Player play screen ---------- */
.play-shell { min-height: calc(100vh - var(--header-h)); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; text-align: center; }
.avatar-badge { font-size: 44px; margin-bottom: 10px; }
.status-msg { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.status-sub { color: var(--text-dim); }
.result-flash { font-size: 22px; font-weight: 900; padding: 18px 26px; border-radius: var(--radius); margin: 16px 0; }
.result-flash.correct { background: var(--success-bg); color: var(--success); }
.result-flash.incorrect { background: var(--danger-bg); color: var(--danger); }
.player-score-big { font-size: 40px; font-weight: 900; color: var(--primary); }
.waiting-dots span { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); margin: 0 3px; animation: bounce 1.2s infinite ease-in-out; }
.waiting-dots span:nth-child(2) { animation-delay: .15s; }
.waiting-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .4; } 40% { transform: translateY(-8px); opacity: 1; } }

/* ---------- Results / analytics ---------- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; text-align: center; }
.stat-box .num { font-size: 28px; font-weight: 900; color: var(--primary); }
.stat-box .label { font-size: 12.5px; color: var(--text-dim); font-weight: 700; }
.bar-chart-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.bar-chart-label { width: 200px; font-size: 13px; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-chart-track { flex: 1; background: var(--surface-2); border-radius: 8px; height: 22px; overflow: hidden; }
.bar-chart-fill { height: 100%; background: var(--primary); border-radius: 8px; display: flex; align-items: center; justify-content: flex-end; padding-inline-end: 8px; color: #fff; font-size: 11px; font-weight: 700; min-width: 24px; }
.bar-chart-fill.correct { background: var(--success); }
.session-list-row {
  display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); margin-bottom: 10px; background: var(--surface);
}

/* ---------- Utility ---------- */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.text-center { text-align: center; }
.text-dim { color: var(--text-dim); }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }
.spinner {
  width: 20px; height: 20px; border: 3px solid var(--primary-light); border-top-color: var(--primary);
  border-radius: 50%; animation: spin .7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay { display: flex; align-items: center; justify-content: center; padding: 60px 0; }
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 20px; font-size: 11.5px; font-weight: 800; }
.badge-primary { background: var(--primary-light); color: var(--primary-dark); }
.badge-muted { background: var(--surface-2); color: var(--text-dim); }

/* ---------- Modal (თამაშის დაწყების რეჟიმის არჩევანი და სხვ.) ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(20, 20, 40, 0.5); display: flex; align-items: center;
  justify-content: center; z-index: 1000; padding: 20px; animation: fadeIn .15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 24px;
  max-width: 560px; width: 100%; max-height: 90vh; overflow-y: auto;
}
.launch-mode-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.launch-mode-card {
  border: 2px solid var(--border); border-radius: var(--radius-sm); padding: 14px 10px; text-align: center;
  cursor: pointer; transition: border-color .12s, background .12s;
}
.launch-mode-card:hover { border-color: var(--primary-light); background: var(--surface-2); }
.launch-mode-card.selected { border-color: var(--primary); background: var(--primary-light); }

/* ---------- გუნდური რეჟიმი ---------- */
.team-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 20px;
  font-size: 12.5px; font-weight: 800; color: #fff;
}
.team-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.team-pick-card {
  border: 2px solid var(--border); border-radius: var(--radius-sm); padding: 16px; text-align: center;
  cursor: pointer; font-weight: 800; color: #fff; transition: transform .12s;
}
.team-pick-card:hover { transform: translateY(-2px); }
.team-pick-card.selected { outline: 3px solid var(--text); outline-offset: 2px; }
.team-lobby-group { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 8px; }
.team-lobby-group-head { display: flex; align-items: center; gap: 8px; font-weight: 800; margin-bottom: 6px; }

/* ---------- Grid/Jeopardy რეჟიმი ---------- */
.grid-board { display: flex; gap: 10px; overflow-x: auto; justify-content: center; }
.grid-col { display: flex; flex-direction: column; gap: 8px; min-width: 110px; }
.grid-col-head {
  font-weight: 800; font-size: 12.5px; text-align: center; padding: 8px 6px; border-radius: var(--radius-sm);
  background: var(--surface-2); min-height: 36px; display: flex; align-items: center; justify-content: center;
}
.grid-cell {
  border: none; border-radius: var(--radius-sm); padding: 16px 6px; font-size: 18px; font-weight: 800;
  background: var(--primary); color: #fff; cursor: pointer; transition: transform .12s, opacity .12s;
}
.grid-cell:hover:not(.answered) { transform: translateY(-2px); }
.grid-cell.answered { background: var(--surface-2); color: transparent; cursor: default; opacity: .5; }

/* ---------- ანიმირებული ხატულები და სტიკერები ---------- */

/* მოთამაშის ავატარი — ცოცხალი "bounce-in" შესვლისას და მსუბუქი float ლოდინის დროს */
.avatar-badge {
  animation: avatar-bounce-in .5s cubic-bezier(.34,1.56,.64,1) both, avatar-float 2.6s ease-in-out .5s infinite;
  display: inline-block;
}
@keyframes avatar-bounce-in { 0% { transform: scale(0) rotate(-20deg); opacity: 0; } 70% { transform: scale(1.15) rotate(6deg); opacity: 1; } 100% { transform: scale(1) rotate(0); } }
@keyframes avatar-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* თამაშის რეჟიმის მოდალის ხატულები — მსუბუქი "float" idle ანიმაცია, hover-ზე კი ბაუნსი */
.launch-mode-card > div:first-child { animation: icon-float 3s ease-in-out infinite; display: inline-block; }
.launch-mode-card:nth-child(2n) > div:first-child { animation-delay: .4s; }
.launch-mode-card:nth-child(3n) > div:first-child { animation-delay: .8s; }
.launch-mode-card:hover > div:first-child { animation: icon-bounce .5s ease; }
@keyframes icon-float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-4px) rotate(-4deg); } }
@keyframes icon-bounce { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.3) rotate(-8deg); } 60% { transform: scale(.95) rotate(6deg); } }

/* "სტიკერის" ამოხტომა — სწორი/არასწორი პასუხის, ან სპეციალური მოვლენის დროს
   (host.js/play.js-ის showSticker()-ით გამოძახებული) */
.sticker-pop-layer {
  position: fixed; inset: 0; pointer-events: none; z-index: 1500;
  display: flex; align-items: center; justify-content: center;
}
.sticker-pop {
  font-size: 96px; animation: sticker-pop-anim 1.1s cubic-bezier(.22,1.4,.4,1) forwards;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,.25));
}
@keyframes sticker-pop-anim {
  0% { transform: scale(0) rotate(-25deg); opacity: 0; }
  35% { transform: scale(1.35) rotate(8deg); opacity: 1; }
  55% { transform: scale(1) rotate(-4deg); }
  80% { transform: scale(1) rotate(0); opacity: 1; }
  100% { transform: scale(.85) translateY(-30px); opacity: 0; }
}

/* კონფეტის აფეთქება — გამარჯვების/საბოლოო ლიდერბორდის დროს (showConfetti()) */
.confetti-layer { position: fixed; inset: 0; pointer-events: none; z-index: 1400; overflow: hidden; }
.confetti-piece {
  position: absolute; top: -20px; width: 10px; height: 14px; opacity: .95;
  animation: confetti-fall linear forwards;
}
@keyframes confetti-fall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(105vh) rotate(540deg); opacity: .3; }
}

/* ლიდერბორდის 1-ლი ადგილის მსუბუქი ვარსკვლავისებრი ციმციმი */
.leaderboard-row.rank-1 { animation: rank1-glow 1.8s ease-in-out infinite; }
@keyframes rank1-glow { 0%, 100% { box-shadow: none; } 50% { box-shadow: 0 0 0 2px #ca8a0455 inset; } }
