/* Font Awesome */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css');

/* Google Fonts — Bangers (display) + Nunito (body) */
@import url('https://fonts.googleapis.com/css2?family=Bangers&family=Nunito:wght@400;500;600;700;800&display=swap');

/* ============================================================
   WAHUY GAME — Main Stylesheet
   Theme: Blue & White | Fonts: Bangers + Nunito
   ============================================================ */

/* ---------------------------------------------------------------
   1. CSS VARIABLES
--------------------------------------------------------------- */
:root {
  --primary:        #1d4ed8;
  --primary-light:  #3b82f6;
  --primary-dark:   #1e3a8a;
  --primary-hover:  #1e40af;

  --white:     #ffffff;
  --gray-50:   #f8fafc;
  --gray-100:  #f1f5f9;
  --gray-200:  #e2e8f0;
  --gray-300:  #cbd5e1;
  --gray-400:  #94a3b8;
  --gray-500:  #64748b;
  --gray-600:  #475569;
  --gray-700:  #334155;
  --gray-800:  #1e293b;
  --gray-900:  #0f172a;

  --success:  #16a34a;
  --success-bg: #dcfce7;
  --error:    #dc2626;
  --error-bg: #fee2e2;
  --warning:  #d97706;
  --warning-bg: #fef3c7;
  --gold:     #f59e0b;
  --gold-dark:#d97706;

  --win-color:  #16a34a;
  --loss-color: #dc2626;

  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-full: 9999px;

  --shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:  0 4px 12px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.07);
  --shadow-lg:  0 10px 30px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.08);
  --shadow-card:0 2px 8px rgba(29,78,216,.10);

  --nav-height:      60px;
  --bottom-nav-height: 64px;
  --transition: .2s ease;
}

/* ---------------------------------------------------------------
   2. RESET & BASE
--------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Nunito', sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
}

/* Bangers display font — game headings & logo */
.auth-logo,
.auth-title,
.nav-brand,
.cards-title,
.page-title,
.modal-title,
.countdown-timer,
.points-value,
.stat-value,
.points-big-value {
  font-family: 'Bangers', cursive;
  letter-spacing: 1px;
}

img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, button, select, textarea { font-family: inherit; }

/* ---------------------------------------------------------------
   3. UTILITY
--------------------------------------------------------------- */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------------
   4. TYPOGRAPHY
--------------------------------------------------------------- */
h1 { font-size: 1.75rem; font-weight: 700; line-height: 1.2; }
h2 { font-size: 1.4rem;  font-weight: 600; line-height: 1.3; }
h3 { font-size: 1.1rem;  font-weight: 600; }

/* ---------------------------------------------------------------
   5. BUTTONS
--------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: .9375rem;
  font-weight: 600;
  border: none;
  transition: background var(--transition), transform var(--transition),
              box-shadow var(--transition), opacity var(--transition);
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }

.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(29,78,216,.30);
}
.btn-primary:hover { background: var(--primary-hover); box-shadow: 0 4px 14px rgba(29,78,216,.38); }

.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
}
.btn-secondary:hover { background: var(--gray-200); }

.btn-danger {
  background: var(--error);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(220,38,38,.25);
}
.btn-danger:hover { background: #b91c1c; }

.btn-full { width: 100%; }

/* ---------------------------------------------------------------
   6. FORM ELEMENTS
--------------------------------------------------------------- */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }

.form-label {
  font-size: .875rem;
  font-weight: 500;
  color: var(--gray-700);
  display: flex;
  align-items: center;
  gap: 6px;
}
.label-hint {
  font-weight: 400;
  color: var(--gray-400);
  font-size: .8rem;
}

.form-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: .9375rem;
  color: var(--gray-800);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-input:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}
.form-input::placeholder { color: var(--gray-400); }
.form-input:disabled { background: var(--gray-100); cursor: not-allowed; }

/* input + toggle-password wrapper */
.input-wrapper { position: relative; }
.input-wrapper .form-input { padding-right: 44px; }
.toggle-password {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; padding: 4px; color: var(--gray-400);
  font-size: 1rem; line-height: 1;
}
.toggle-password:hover { color: var(--primary); }

/* two-column row */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }

/* footer link (forgot password) */
.form-footer-link { text-align: right; margin-top: -8px; margin-bottom: 8px; }

/* checkbox */
.form-group-checkbox { margin-top: 4px; }
.checkbox-label {
  display: flex; align-items: flex-start; gap: 10px; cursor: pointer;
  font-size: .875rem; color: var(--gray-600);
}
.checkbox-label input[type="checkbox"] { display: none; }
.checkbox-custom {
  flex-shrink: 0;
  width: 18px; height: 18px;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-sm);
  background: var(--white);
  transition: all var(--transition);
  margin-top: 2px;
  position: relative;
}
.checkbox-label input:checked ~ .checkbox-custom {
  background: var(--primary); border-color: var(--primary);
}
.checkbox-label input:checked ~ .checkbox-custom::after {
  content: ''; position: absolute;
  left: 4px; top: 1px;
  width: 6px; height: 10px;
  border: 2px solid #fff; border-top: none; border-left: none;
  transform: rotate(45deg);
}

/* ---------------------------------------------------------------
   7. ALERTS
--------------------------------------------------------------- */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: .875rem;
  font-weight: 500;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.alert-success { background: var(--success-bg); color: var(--success); border-left: 3px solid var(--success); }
.alert-error   { background: var(--error-bg);   color: var(--error);   border-left: 3px solid var(--error);   }
.alert-bonus   {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: var(--gold-dark);
  border-left: 3px solid var(--gold);
  font-weight: 600;
}

/* ---------------------------------------------------------------
   8. LINKS
--------------------------------------------------------------- */
.link-primary { color: var(--primary); font-weight: 500; }
.link-primary:hover { text-decoration: underline; }

/* Privacy policy trigger — looks like a link */
button.privacy-policy-btn {
  background: none; border: none; padding: 0;
  font-size: inherit; font-family: inherit;
  cursor: pointer; display: inline;
}
.link-subtle  { color: var(--gray-500); font-size: .875rem; }
.link-subtle:hover { color: var(--primary); }

/* ---------------------------------------------------------------
   9. AUTH PAGES
--------------------------------------------------------------- */
.auth-body {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-container {
  width: 100%;
  max-width: 440px;
}

.auth-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  box-shadow: var(--shadow-lg);
}

.auth-card-centered { text-align: center; }

.auth-header { text-align: center; margin-bottom: 28px; }

.auth-logo {
  width: 60px; height: 60px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
  font-size: 1.75rem;
  font-weight: 700;
  border-radius: var(--radius-lg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  box-shadow: 0 4px 14px rgba(29,78,216,.35);
}

.auth-title    { font-size: 1.5rem; font-weight: 700; color: var(--gray-800); }
.auth-subtitle { font-size: .875rem; color: var(--gray-500); margin-top: 4px; }

.auth-form { margin-bottom: 4px; }

.auth-or {
  display: flex; align-items: center; gap: 12px;
  margin: 16px 0 12px;
  color: var(--gray-400); font-size: .8rem;
}
.auth-or::before, .auth-or::after {
  content: ''; flex: 1; height: 1px; background: var(--gray-100);
}
.btn-google {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 11px 16px;
  background: #fff; border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: .9rem; font-weight: 500; color: #3c4043;
  text-decoration: none; cursor: pointer;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
  margin-bottom: 4px;
}
.btn-google:hover {
  background: #f8f9fa; border-color: #c5c7ca;
  box-shadow: 0 1px 4px rgba(0,0,0,.1);
}
.btn-google-icon { width: 18px; height: 18px; flex-shrink: 0; }

.auth-divider {
  height: 1px;
  background: var(--gray-100);
  margin: 20px 0;
}

.auth-switch {
  text-align: center;
  font-size: .875rem;
  color: var(--gray-500);
}

/* verify page icons */
.verify-icon {
  font-size: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px; height: 72px;
  border-radius: 50%;
  margin: 0 auto 20px;
  font-weight: 700;
}
.verify-icon-success { background: var(--success-bg); color: var(--success); }
.verify-icon-error   { background: var(--error-bg);   color: var(--error);   }

/* password strength */
.password-strength { margin-top: 8px; display: none; }
.password-strength.visible { display: block; }
.strength-bar {
  height: 4px; background: var(--gray-200);
  border-radius: var(--radius-full); overflow: hidden;
}
.strength-fill {
  height: 100%; width: 0;
  border-radius: var(--radius-full);
  transition: width .3s ease, background .3s ease;
}
.strength-label { font-size: .75rem; font-weight: 500; margin-top: 4px; display: block; }

.password-rules {
  list-style: none; margin-top: 8px;
  display: flex; flex-direction: column; gap: 3px;
}
.rule {
  font-size: .78rem;
  color: var(--gray-400);
  padding-left: 18px;
  position: relative;
  transition: color var(--transition);
}
.rule::before {
  content: '○';
  position: absolute; left: 0;
  font-size: .65rem;
  transition: color var(--transition);
}
.rule.passed { color: var(--success); }
.rule.passed::before { content: '✓'; color: var(--success); }

.match-hint { font-size: .78rem; font-weight: 500; margin-top: 4px; display: block; }
.match-hint.match   { color: var(--success); }
.match-hint.no-match{ color: var(--error); }

/* ---------------------------------------------------------------
   10. TOP NAV (Desktop)
--------------------------------------------------------------- */
.top-nav {
  display: none; /* hidden on mobile */
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-height);
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  padding: 0 24px;
  align-items: center;
  justify-content: space-between;
}
@media (min-width: 768px) { .top-nav { display: flex; } }

.nav-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -.5px;
}

.nav-links { display: flex; align-items: center; gap: 4px; }

.nav-link {
  padding: 7px 14px;
  border-radius: var(--radius-md);
  font-size: .9rem;
  font-weight: 500;
  color: var(--gray-600);
  transition: background var(--transition), color var(--transition);
}
.nav-link:hover  { background: var(--gray-100); color: var(--gray-900); }
.nav-link.active { background: var(--primary); color: var(--white); }
.nav-logout { color: var(--error); }
.nav-logout:hover { background: var(--error-bg); color: var(--error); }

/* ---------------------------------------------------------------
   11. BOTTOM NAV (Mobile)
--------------------------------------------------------------- */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  height: var(--bottom-nav-height);
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  box-shadow: 0 -2px 12px rgba(0,0,0,.06);
  display: flex;
  align-items: stretch;
}
@media (min-width: 768px) { .bottom-nav { display: none; } }

.bottom-nav-item {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2px;
  color: var(--gray-400);
  transition: color var(--transition);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.bottom-nav-item:hover  { color: var(--primary); }
.bottom-nav-item.active { color: var(--primary); }
.bottom-nav-icon  { font-size: 1.3rem; line-height: 1; }
.bottom-nav-label { font-size: .65rem; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }

/* ---------------------------------------------------------------
   12. GAME BODY LAYOUT
--------------------------------------------------------------- */
.game-body { padding-top: 0; padding-bottom: var(--bottom-nav-height); }
@media (min-width: 768px) {
  .game-body { padding-top: var(--nav-height); padding-bottom: 0; }
}

.game-main, .page-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px 16px 24px;
}
@media (min-width: 768px) {
  .game-main, .page-main { padding: 24px 24px 32px; }
}

/* ---------------------------------------------------------------
   13. GAME TOP BAR (Points + Countdown)
--------------------------------------------------------------- */
.game-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  box-shadow: var(--shadow-card);
  margin-bottom: 14px;
  gap: 12px;
}

.points-badge {
  display: flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-weight: 700;
}
.points-icon  { font-size: 1rem; }
.points-value { font-size: 1.1rem; }
.points-label { font-size: .75rem; opacity: .85; }

.countdown-wrap { text-align: right; }
.lock-badge {
  display: inline-block;
  background: var(--error-bg);
  color: var(--error);
  font-size: .72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  margin-bottom: 4px;
}
.countdown-label { font-size: .72rem; color: var(--gray-400); font-weight: 500; text-transform: uppercase; letter-spacing: .5px; }
.countdown-timer {
  font-size: 1.5rem; font-weight: 700;
  color: var(--primary);
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
}
.countdown-timer.urgent { color: var(--error); animation: pulse-timer 1s infinite; }

@keyframes pulse-timer {
  0%, 100% { opacity: 1; }
  50%       { opacity: .5; }
}

/* ---------------------------------------------------------------
   14. LOCK BANNER
--------------------------------------------------------------- */
.lock-banner {
  background: var(--warning-bg);
  border: 1px solid #fcd34d;
  border-radius: var(--radius-md);
  padding: 11px 16px;
  font-size: .875rem;
  font-weight: 500;
  color: var(--warning);
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 14px;
}
.lock-icon { font-size: 1rem; }

/* ---------------------------------------------------------------
   14b. CREDIT BANNER
--------------------------------------------------------------- */
.credit-banner {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 14px;
  color: #fff;
  font-size: .875rem;
  font-weight: 500;
}
.credit-banner-body { display: flex; align-items: center; gap: 10px; flex: 1; }
.credit-banner-icon { font-size: .75rem; flex-shrink: 0; }
.credit-amounts {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  padding: 4px 20px 20px;
}
.credit-amount-btn {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 8px;
  width: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), color var(--transition), transform .1s;
  color: var(--text);
}
.credit-amount-btn:hover:not(:disabled) {
  border-color: #a855f7;
  background: #f5f0ff;
  color: #7c3aed;
  transform: translateY(-2px);
}
.credit-amount-btn:active:not(:disabled) { transform: translateY(0); }
.credit-amount-btn:disabled { opacity: .5; cursor: not-allowed; }
.credit-amt-pts  { font-size: 1.05rem; font-weight: 700; line-height: 1.2; }
.credit-amt-label { font-size: .7rem; font-weight: 500; color: var(--gray-400); text-transform: uppercase; letter-spacing: .04em; }

/* ── Fees tab ──────────────────────────────────────────────── */
.pf-tab-badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: #dc2626; color: #fff;
  font-size: .65rem; font-weight: 700;
  width: 18px; height: 18px; border-radius: 50%;
  margin-left: 4px; vertical-align: middle;
}
.pf-fees-notice {
  background: #fef2f2; border: 1px solid #fecaca;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin: 0 20px 4px;
  font-size: .83rem; color: #b91c1c;
  display: flex; align-items: flex-start; gap: 8px;
}
.pf-fees-notice i { margin-top: 2px; flex-shrink: 0; }
.pf-fee-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-card); border: 1px solid #fecaca;
  border-radius: var(--radius-md); padding: 12px 14px;
}

/* ── Credit History page ───────────────────────────────────── */
.credit-hist-back {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--primary); font-size: .875rem; font-weight: 500;
  text-decoration: none; margin-bottom: 14px;
}
.credit-hist-back:hover { text-decoration: underline; }
.credit-hist-list { display: flex; flex-direction: column; gap: 10px; }
.credit-hist-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 12px 14px;
}
.credit-hist-icon {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg,#7c3aed,#a855f7);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: .95rem;
}
.credit-hist-mid { flex: 1; min-width: 0; }
.credit-hist-amount { font-weight: 700; font-size: 1rem; color: #7c3aed; }
.credit-hist-meta {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: .78rem; color: var(--gray-500); margin-top: 2px;
}
.credit-hist-sep { color: var(--gray-300); }
.credit-hist-date { font-size: .8rem; font-weight: 500; color: var(--gray-600); text-align: right; flex-shrink: 0; }

/* ---------------------------------------------------------------
   14c. DRAW QUESTION PANEL
--------------------------------------------------------------- */
.draw-question-panel {
  background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin-bottom: 14px;
  color: #fff;
}
.dqp-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px;
}
.dqp-badge {
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: var(--radius-full);
  font-size: .7rem; font-weight: 700;
  padding: 3px 10px;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.dqp-title {
  font-size: .85rem; font-weight: 600;
  opacity: .9;
}
.dqp-text {
  font-family: 'Nunito', sans-serif;
  font-size: 1.05rem; font-weight: 700;
  line-height: 1.5;
  margin: 0 0 6px;
}
.dqp-text--empty {
  font-weight: 400; font-size: .9rem; opacity: .75; font-style: italic;
}
.dqp-hint {
  font-size: .78rem; opacity: .75; margin: 0;
}

/* Last draw question reveal */
.last-draw-question {
  display: flex; flex-direction: column; gap: 3px;
  background: var(--gray-50);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 10px;
}
.question-reveal-label {
  font-size: .72rem; font-weight: 700;
  color: var(--gray-400); text-transform: uppercase; letter-spacing: .5px;
}
.question-reveal-text {
  font-size: .9rem; font-weight: 500; color: var(--gray-700); font-style: italic;
}

/* ---------------------------------------------------------------
   15. LAST DRAW PANEL
--------------------------------------------------------------- */
.last-draw-panel {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
  margin-bottom: 14px;
}
.panel-title {
  font-size: .8rem;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 10px;
  display: flex; align-items: center; justify-content: space-between;
}
.panel-collapse-btn {
  width: 100%; background: none; border: none; cursor: pointer;
  padding: 0; text-align: left;
}
.panel-collapse-icon { font-size: .75rem; color: var(--gray-400); transition: transform .2s; }
.last-draw-content {
  display: flex; align-items: center; gap: 14px;
}
.draw-icon   { font-size: 2rem; }
.draw-num    { font-size: 1.4rem; font-weight: 700; color: var(--primary); }
.draw-name   { font-size: .9rem; font-weight: 500; color: var(--gray-700); }
.last-draw-meta { font-size: .78rem; color: var(--gray-400); margin-top: 6px; }

.last-draw-my-results {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 12px; padding-top: 12px;
  border-top: 1px solid var(--gray-100);
}
.result-chip {
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: .78rem;
  font-weight: 600;
  display: flex; align-items: center; gap: 5px;
}
.result-chip--won  { background: var(--success-bg); color: var(--success); }
.result-chip--lost { background: var(--error-bg);   color: var(--error);   }

/* ---------------------------------------------------------------
   16. CURRENT BETS PANEL
--------------------------------------------------------------- */
.current-bets-panel {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
  margin-bottom: 14px;
}
.bets-count {
  background: var(--primary);
  color: var(--white);
  font-size: .72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}
.current-bets-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.current-bet-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  background: var(--gray-50);
  border-radius: var(--radius-md);
  font-size: .875rem;
}
.bet-icon  { font-size: 1.2rem; }
.bet-name  { flex: 1; font-weight: 500; }
.bet-amount{ font-weight: 600; color: var(--primary); }
.bet-status--pending {
  font-size: .72rem; font-weight: 600; padding: 2px 8px;
  background: var(--warning-bg); color: var(--warning);
  border-radius: var(--radius-full);
}

/* ---------------------------------------------------------------
   17. ANIMAL CARDS GRID
--------------------------------------------------------------- */
.cards-section { margin-top: 20px; }
.cards-title {
  font-size: 1.1rem; font-weight: 700;
  color: var(--gray-800); margin-bottom: 4px;
}
.cards-hint { font-size: .8rem; color: var(--gray-400); margin-bottom: 16px; }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 10px;
}
@media (min-width: 480px) { .cards-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); } }
@media (min-width: 768px) { .cards-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px; } }

.animal-card {
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 10px 6px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition),
              transform var(--transition), background var(--transition);
  position: relative;
  user-select: none;
}
.animal-card:hover {
  border-color: var(--primary-light);
  box-shadow: 0 4px 14px rgba(29,78,216,.18);
  transform: translateY(-2px);
}
.animal-card:active { transform: scale(.95); }

.animal-card--selected {
  border-color: var(--primary);
  background: rgba(29,78,216,.05);
  box-shadow: 0 0 0 3px rgba(29,78,216,.15), 0 4px 14px rgba(29,78,216,.18);
}
.animal-card--bet {
  border-color: var(--success);
  background: var(--success-bg);
  cursor: default;
}
.animal-card--bet:hover { transform: none; box-shadow: none; }

.animal-card--disabled {
  opacity: .45;
  cursor: not-allowed;
  pointer-events: none;
}

.card-number {
  font-size: .7rem; font-weight: 700;
  color: var(--gray-400); margin-bottom: 4px;
}
.card-icon   { font-size: 2rem; line-height: 1; margin-bottom: 5px; }
.card-name   { font-size: .72rem; font-weight: 600; color: var(--gray-700); line-height: 1.3; }
.card-label  { font-size: .65rem; color: var(--gray-400); }

.card-bet-badge {
  position: absolute; top: -6px; right: -6px;
  background: var(--success);
  color: var(--white);
  font-size: .58rem;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

/* ---------------------------------------------------------------
   18. BET MODAL
--------------------------------------------------------------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(15,23,42,.55);
  backdrop-filter: blur(4px);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}
@media (min-width: 600px) {
  .modal-overlay { align-items: center; }
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }

.modal {
  background: var(--white);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 28px 24px 32px;
  width: 100%; max-width: 440px;
  position: relative;
  transform: translateY(40px);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
  max-height: 92vh;
  overflow-y: auto;
}
@media (min-width: 600px) {
  .modal {
    border-radius: var(--radius-xl);
    transform: scale(.92);
  }
}
.modal-overlay.open .modal { transform: translateY(0); }
@media (min-width: 600px) {
  .modal-overlay.open .modal { transform: scale(1); }
}

.modal-close {
  position: absolute; top: 16px; right: 18px;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gray-100); border: none;
  border-radius: 50%; font-size: 1.25rem; color: var(--gray-500);
  transition: background var(--transition), color var(--transition);
}
.modal-close:hover { background: var(--gray-200); color: var(--gray-800); }

.modal-header { text-align: center; margin-bottom: 22px; }
.modal-icon   { font-size: 3.5rem; line-height: 1; margin-bottom: 8px; }
.modal-title  { font-size: 1.2rem; font-weight: 700; color: var(--gray-800); }
.modal-subtitle { font-size: .85rem; color: var(--gray-500); margin-top: 3px; }

.quick-bets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.quick-bet-btn {
  padding: 5px 12px;
  background: var(--gray-100); border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-full);
  font-size: .8rem; font-weight: 600; color: var(--gray-700);
  transition: all var(--transition);
}
.quick-bet-btn:hover { background: var(--primary); border-color: var(--primary); color: var(--white); }

.bet-summary {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: .875rem;
  color: var(--gray-600);
  margin-bottom: 16px;
  text-align: center;
}
.bet-potential { color: var(--success); font-size: 1rem; }

.bet-result {
  padding: 14px;
  border-radius: var(--radius-md);
  text-align: center;
  font-weight: 600;
  margin-top: 12px;
}
.bet-result.success { background: var(--success-bg); color: var(--success); }
.bet-result.error   { background: var(--error-bg);   color: var(--error); }

/* ---------------------------------------------------------------
   19. PAGE HEADER (Leaderboard / Profile)
--------------------------------------------------------------- */
.page-header { margin-bottom: 20px; }
.page-title  { font-size: 1.5rem; font-weight: 700; color: var(--gray-800); }
.page-subtitle { font-size: .875rem; color: var(--gray-400); margin-top: 2px; }

/* ---------------------------------------------------------------
   20. LEADERBOARD
--------------------------------------------------------------- */
.my-rank-banner {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  font-size: .9rem;
  margin-bottom: 16px;
  text-align: center;
}

.leaderboard-wrap {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
}
.leaderboard-table thead th {
  background: var(--gray-50);
  font-size: .75rem;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: .6px;
  padding: 10px 16px;
  text-align: left;
  border-bottom: 1px solid var(--gray-200);
}
.leaderboard-row td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}
.leaderboard-row:last-child td { border-bottom: none; }
.leaderboard-row--me td { background: rgba(29,78,216,.04); }
.leaderboard-row--outside td { border-top: none; }

.leaderboard-row--ellipsis td {
  text-align: center;
  padding: 6px 0;
  border-bottom: none;
}
.lb-ellipsis {
  display: inline-block;
  color: var(--gray-300);
  font-size: 1.1rem;
  letter-spacing: 4px;
  line-height: 1;
}

.col-rank { width: 64px; }
.medal         { font-size: 1.4rem; }
.medal-gold    { color: #f5c518; }
.medal-silver  { color: #adb5bd; }
.medal-bronze  { color: #cd7f32; }
.rank-num { font-size: .875rem; font-weight: 700; color: var(--gray-600); }

.player-info { display: flex; align-items: center; gap: 10px; }
.player-avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
  font-weight: 700; font-size: .875rem;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.player-name { font-weight: 500; font-size: .9rem; color: var(--gray-800); display: flex; align-items: center; gap: 6px; }
.you-badge {
  background: var(--primary);
  color: var(--white);
  font-size: .65rem; font-weight: 700;
  padding: 1px 7px; border-radius: var(--radius-full);
}

.col-points { text-align: right; }
.points-pill {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: .82rem; font-weight: 700;
}

.leaderboard-footer {
  text-align: center; margin-top: 14px;
  font-size: .8rem; color: var(--gray-400);
}

/* ---------------------------------------------------------------
   21. PROFILE — Modern redesign
--------------------------------------------------------------- */

/* ── Hero Banner ──────────────────────────────────────────── */
.pf-hero {
  position: relative;
  background: linear-gradient(140deg, #0f172a 0%, #1e3a8a 55%, #1d4ed8 100%);
  border-radius: var(--radius-xl);
  padding: 20px 20px 16px;
  text-align: center;
  color: #fff;
  margin-bottom: 16px;
  box-shadow: 0 8px 32px rgba(29,78,216,.35);
  overflow: hidden;
}
/* decorative circles */
.pf-hero::before,
.pf-hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  opacity: .07;
  background: #fff;
  pointer-events: none;
}
.pf-hero::before { width: 200px; height: 200px; top: -60px; right: -40px; }
.pf-hero::after  { width: 140px; height: 140px; bottom: -50px; left: -30px; }

.pf-av-wrap {
  position: relative;
  display: inline-flex;
  margin-bottom: 8px;
}
.pf-av {
  width: 56px; height: 56px;
  background: rgba(255,255,255,.18);
  border: 3px solid rgba(255,255,255,.45);
  border-radius: 50%;
  font-size: 1.4rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  box-shadow: 0 4px 20px rgba(0,0,0,.25);
}
.pf-av-badge {
  position: absolute;
  bottom: 4px; right: 4px;
  width: 18px; height: 18px;
  background: #22c55e;
  border: 2.5px solid #1e3a8a;
  border-radius: 50%;
}
.pf-hero-name {
  font-size: 1rem; font-weight: 800; letter-spacing: -.3px;
  margin: 0 0 2px;
}
.pf-hero-nick {
  font-size: .8rem; font-weight: 600;
  color: rgba(255,255,255,.65);
  margin-bottom: 4px;
}
.pf-hero-meta {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; flex-wrap: wrap;
  font-size: .72rem; color: rgba(255,255,255,.5);
  margin-bottom: 10px;
}
.pf-hero-meta span { display: flex; align-items: center; gap: 5px; }
.pf-points-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: var(--radius-full);
  padding: 5px 14px;
  backdrop-filter: blur(6px);
}
.pf-points-val {
  font-size: 1.2rem; font-weight: 800; line-height: 1;
  font-family: 'Bangers', cursive; letter-spacing: 1px;
  color: #fbbf24;
}
.pf-points-lbl {
  font-size: .72rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .8px; color: rgba(255,255,255,.6);
}

/* ── Stats Row ────────────────────────────────────────────── */
.pf-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
@media (min-width: 480px) { .pf-stats { grid-template-columns: repeat(4, 1fr); } }

.pf-stat {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 16px 12px 14px;
  text-align: center;
  box-shadow: var(--shadow-card);
  border-top: 3px solid transparent;
  transition: transform .15s, box-shadow .15s;
}
.pf-stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.pf-stat--bets,
.pf-stat--wins,
.pf-stat--loss,
.pf-stat--rate  { border-top-color: var(--primary-light); }

.pf-stat-icon {
  font-size: .85rem; margin-bottom: 6px; color: var(--primary-light);
}

.pf-stat-val {
  font-size: 1.5rem; font-weight: 800; color: var(--gray-800);
  line-height: 1; margin-bottom: 4px;
}

.pf-stat-lbl {
  font-size: .68rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .5px; color: var(--gray-400);
}

/* ── Tabs ─────────────────────────────────────────────────── */
.pf-tabs {
  display: flex; gap: 6px;
  background: var(--gray-100);
  border-radius: var(--radius-full);
  padding: 4px;
  margin-bottom: 16px;
}
.pf-tab {
  flex: 1; border: none; cursor: pointer;
  border-radius: var(--radius-full);
  padding: 9px 10px;
  font-size: .8rem; font-weight: 700;
  font-family: inherit;
  color: var(--gray-500);
  background: transparent;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}
.pf-tab i { font-size: .75rem; }
.pf-tab.active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.pf-tab:not(.active):hover { color: var(--gray-700); }

/* ── Tab Panes ────────────────────────────────────────────── */
.pf-pane { display: none; }
.pf-pane.active { display: block; }

/* ── Section Card ─────────────────────────────────────────── */
.pf-card {
  background: #fff;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  margin-bottom: 16px;
  overflow: hidden;
}
.pf-card-head {
  padding: 18px 20px 0;
  display: flex; align-items: center; gap: 10px;
}
.pf-card-head-icon {
  width: 34px; height: 34px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; flex-shrink: 0;
}
.pf-card-head-icon--blue  { background: #eff6ff; color: var(--primary); }
.pf-card-head-icon--lock  { background: #f0fdf4; color: var(--success); }
.pf-card-head-icon--hist  { background: #fffbeb; color: var(--gold-dark); }
.pf-card-head-icon--out   { background: #f8fafc; color: var(--gray-500); }
.pf-card-head-icon--del   { background: var(--error-bg); color: var(--error); }

.pf-card-title {
  font-size: .92rem; font-weight: 700; color: var(--gray-800);
}
.pf-card-sub {
  font-size: .75rem; color: var(--gray-400); margin-top: 1px;
}
.pf-card-body { padding: 16px 20px 20px; }

/* ── Forms ────────────────────────────────────────────────── */
.pf-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 479px) { .pf-form .form-row { grid-template-columns: 1fr; } }
.pf-form .form-group { margin-bottom: 14px; }
.pf-form .form-label {
  font-size: .78rem; font-weight: 700; color: var(--gray-600);
  display: block; margin-bottom: 5px; text-transform: uppercase; letter-spacing: .4px;
}
.pf-form .form-input {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: .9rem; font-family: inherit;
  color: var(--gray-800);
  background: var(--gray-50);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.pf-form .form-input:focus {
  border-color: var(--primary-light);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}
.pf-form .label-hint {
  font-size: .72rem; color: var(--gray-400); font-weight: 400;
  text-transform: none; letter-spacing: 0;
}
.pf-form .input-wrapper { position: relative; }
.pf-form .input-wrapper .form-input { padding-right: 44px; }
.pf-form .toggle-password {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--gray-400); font-size: .9rem;
  padding: 4px; transition: color var(--transition);
}
.pf-form .toggle-password:hover { color: var(--primary); }

/* ── Bet History — date filter ────────────────────────────── */
.hist-filter-form {
  padding: 12px 20px 0;
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
}
.hist-filter-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.hist-filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 130px;
}
.hist-filter-label {
  font-size: .75rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.hist-filter-input {
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: .875rem;
  font-family: inherit;
  width: 100%;
}
.hist-filter-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}
.hist-filter-actions {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.hist-filter-btn {
  height: 36px;
  padding: 0 14px;
  font-size: .82rem;
  white-space: nowrap;
}
@media (max-width: 480px) {
  .hist-filter-row { flex-direction: column; }
  .hist-filter-group { min-width: 0; }
  .hist-filter-actions { width: 100%; }
  .hist-filter-btn { flex: 1; }
}

/* ── Bet History — card list ──────────────────────────────── */
.pf-bet-list { display: flex; flex-direction: column; gap: 10px; }
.pf-bet-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  border: 1px solid var(--gray-100);
  transition: background var(--transition);
}
.pf-bet-card:hover { background: #f0f7ff; border-color: var(--gray-200); }
.pf-bet-num {
  width: 42px; height: 42px;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: #fff; font-size: .95rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-family: 'Bangers', cursive; letter-spacing: 1px;
}
.pf-bet-num--won  { background: var(--success); }
.pf-bet-num--lost { background: var(--error); }
.pf-bet-num--pending { background: var(--gold-dark); }
.pf-bet-mid { flex: 1; min-width: 0; }
.pf-bet-draw {
  font-size: .8rem; font-weight: 700; color: var(--gray-700);
}
.pf-bet-sub {
  font-size: .72rem; color: var(--gray-400); margin-top: 2px;
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
.pf-bet-period {
  background: var(--gray-200); color: var(--gray-600);
  border-radius: var(--radius-full);
  padding: 1px 7px; font-size: .68rem; font-weight: 600;
}
.pf-bet-win-num {
  color: var(--gold-dark); font-weight: 700; font-size: .72rem;
}
.pf-bet-right { text-align: right; flex-shrink: 0; }
.pf-bet-payout {
  font-size: .95rem; font-weight: 800;
}
.pf-bet-payout--won  { color: var(--success); }
.pf-bet-payout--lost { color: var(--error); }
.pf-bet-payout--pending { color: var(--gold-dark); }
.pf-bet-amount {
  font-size: .72rem; color: var(--gray-400); margin-top: 2px;
}
.pf-bet-badge {
  display: inline-block;
  padding: 3px 8px; border-radius: var(--radius-full);
  font-size: .68rem; font-weight: 700;
  margin-top: 3px;
}
.pf-bet-badge--won     { background: var(--success-bg); color: var(--success); }
.pf-bet-badge--lost    { background: var(--error-bg);   color: var(--error); }
.pf-bet-badge--pending { background: var(--warning-bg); color: var(--warning); }

/* ── Logout + Danger Zone ─────────────────────────────────── */
.pf-actions-row {
  display: grid; grid-template-columns: 1fr; gap: 12px;
  margin-bottom: 16px;
}
@media (min-width: 600px) { .pf-actions-row { grid-template-columns: 1fr 1fr; } }

.pf-danger-zone {
  background: #fff;
  border: 1.5px solid #fecaca;
  border-radius: var(--radius-xl);
  padding: 18px 20px;
  margin-bottom: 16px;
}
.pf-danger-warning {
  font-size: .8rem; color: var(--gray-500); line-height: 1.6; margin-bottom: 14px;
}
.pf-delete-form { margin-top: 16px; padding-top: 16px; border-top: 1px solid #fecaca; }
.pf-delete-actions { display: flex; gap: 10px; margin-top: 4px; }

/* Empty state */
.pf-empty {
  text-align: center; padding: 36px 0; color: var(--gray-400);
  font-size: .9rem;
}
.pf-empty i { font-size: 2rem; display: block; margin-bottom: 10px; opacity: .4; }

/* Keep these for compat with existing pages */
.section-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
  margin-bottom: 16px;
}
.section-card--danger { border: 1.5px solid var(--error-bg); }
.section-title {
  font-size: .9rem; font-weight: 600;
  color: var(--gray-700); margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.section-title--danger { color: var(--error); }
.section-hint { font-weight: 400; color: var(--gray-400); font-size: .78rem; }
.bet-history-wrap { overflow-x: auto; }
.bet-history-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.bet-history-table th { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--gray-400); padding: 8px 10px; border-bottom: 1px solid var(--gray-200); text-align: left; white-space: nowrap; }
.bet-history-table td { padding: 10px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
.bet-row:last-child td { border-bottom: none; }
.bet-card-num { font-weight: 700; color: var(--primary); }
.status-badge { padding: 3px 9px; border-radius: var(--radius-full); font-size: .72rem; font-weight: 600; white-space: nowrap; }
.status-badge--won     { background: var(--success-bg); color: var(--success); }
.status-badge--lost    { background: var(--error-bg);   color: var(--error); }
.status-badge--pending { background: var(--warning-bg); color: var(--warning); }
.payout-won     { color: var(--success); font-weight: 700; }
.payout-lost    { color: var(--error);   font-weight: 700; }
.payout-pending { color: var(--gray-400); }
.draw-date-cell { white-space: nowrap; font-size: .78rem; color: var(--gray-500); }
.draw-period-tag { display: inline-block; background: var(--gray-100); padding: 1px 6px; border-radius: var(--radius-full); font-size: .68rem; color: var(--gray-500); margin-left: 4px; }
.draw-winning-num { color: var(--gold); font-weight: 700; margin-left: 4px; font-size: .78rem; }
.danger-warning { font-size: .875rem; color: var(--gray-600); margin-bottom: 16px; line-height: 1.6; }
.delete-confirm-form { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--error-bg); }
.delete-actions { display: flex; gap: 10px; margin-top: 4px; }
.empty-state { color: var(--gray-400); font-size: .9rem; text-align: center; padding: 24px 0; }
.stat-card { background: var(--white); border-radius: var(--radius-lg); padding: 16px 12px; text-align: center; box-shadow: var(--shadow-card); }
.stat-value { font-size: 1.5rem; font-weight: 700; color: var(--gray-800); }
.stat-label { font-size: .72rem; color: var(--gray-400); font-weight: 500; margin-top: 2px; text-transform: uppercase; letter-spacing: .4px; }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
@media (min-width: 480px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }

/* ---------------------------------------------------------------
   22. ANIMATIONS
--------------------------------------------------------------- */

/* Card selection ripple */
@keyframes card-select {
  0%   { box-shadow: 0 0 0 0 rgba(29,78,216,.4); }
  100% { box-shadow: 0 0 0 12px rgba(29,78,216,0); }
}
.animal-card--selecting { animation: card-select .4s ease-out; }

/* Win celebration */
@keyframes win-pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.15); }
  70%  { transform: scale(.95); }
  100% { transform: scale(1); }
}
.animate-win { animation: win-pop .5s cubic-bezier(.36,.07,.19,.97); }

/* Lose shake */
@keyframes lose-shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}
.animate-lose { animation: lose-shake .5s ease; }

/* Fade in */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fade-in .3s ease forwards; }

/* Points update flash */
@keyframes points-flash {
  0%   { transform: scale(1); color: inherit; }
  30%  { transform: scale(1.25); color: var(--gold); }
  100% { transform: scale(1); color: inherit; }
}
.points-updated { animation: points-flash .6s ease; }

/* ---------------------------------------------------------------
   23. RESPONSIVE BREAKPOINTS (additional overrides)
--------------------------------------------------------------- */
@media (max-width: 480px) {
  .auth-card { padding: 28px 20px; }
  .game-topbar { padding: 10px 14px; }
  .countdown-timer { font-size: 1.2rem; }
  .cards-grid { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
  .card-icon  { font-size: 1.6rem; }
  .delete-actions { flex-direction: column; }
  .pf-delete-actions { flex-direction: column; }
  /* Prevent iOS Safari from zooming on input focus (font-size must be ≥16px) */
  .chat-textarea { font-size: 1rem; }
}

/* Prevent smooth-scroll bounce when tabbing through fixed bottom-nav on mobile */
@media (max-width: 767px) {
  html { scroll-behavior: auto; }
}

@media (min-width: 1024px) {
  .game-main, .page-main { padding: 28px 32px 40px; }
  .cards-grid { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 14px; }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ---------------------------------------------------------------
   26. UNVERIFIED EMAIL BANNER
--------------------------------------------------------------- */
.verify-email-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(37,99,235,.25);
  flex-wrap: wrap;
}
.veb-icon-wrap {
  width: 44px; height: 44px;
  background: rgba(255,255,255,.15);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: #fff;
  flex-shrink: 0;
}
.veb-body {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.veb-title {
  font-size: .75rem;
  font-weight: 700;
  color: rgba(255,255,255,.7);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.veb-sub {
  font-size: .88rem;
  color: #fff;
  line-height: 1.5;
}
.veb-sub strong { color: #fbbf24; }
.veb-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff;
  color: #1e3a8a;
  font-size: .8rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  flex-shrink: 0;
  transition: background var(--transition), transform var(--transition);
}
.veb-btn:hover {
  background: #dbeafe;
  transform: translateY(-1px);
}

/* ---------------------------------------------------------------
   27. PRIVACY POLICY MODAL
--------------------------------------------------------------- */
.reg-consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 16px;
}
.reg-consent-row input[type="checkbox"] {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 3px;
  accent-color: var(--primary);
  cursor: pointer;
}
.reg-consent-text {
  font-size: .82rem;
  color: var(--gray-500);
  text-align: left;
  margin: 0;
  line-height: 1.6;
  cursor: pointer;
}
.reg-consent-link {
  background: none; border: none; padding: 0;
  color: var(--primary); font-size: inherit;
  font-weight: 600; cursor: pointer; text-decoration: underline;
}
.reg-consent-link:hover { color: var(--primary-dark); }

.privacy-modal-overlay {
  position: fixed; inset: 0; z-index: 600;
  background: rgba(15,23,42,.6);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}
.privacy-modal-overlay.open { opacity: 1; pointer-events: auto; }

.privacy-modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  width: 100%; max-width: 560px;
  max-height: 85vh;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: scale(.94);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
}
.privacy-modal-overlay.open .privacy-modal { transform: scale(1); }

.privacy-modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--gray-100);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.privacy-modal-header h2 {
  font-family: 'Bangers', cursive;
  font-size: 1.3rem;
  letter-spacing: 1px;
  color: var(--gray-800);
}
.privacy-modal-close {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gray-100); border: none;
  border-radius: 50%; font-size: 1rem; color: var(--gray-500);
  transition: background var(--transition);
}
.privacy-modal-close:hover { background: var(--gray-200); color: var(--gray-800); }

.privacy-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
  font-size: .875rem;
  color: var(--gray-700);
  line-height: 1.7;
}
.privacy-modal-body h3 {
  font-size: .875rem;
  font-weight: 700;
  color: var(--gray-800);
  margin: 16px 0 6px;
}
.privacy-modal-body h3:first-child { margin-top: 0; }
.privacy-modal-body p { margin-bottom: 8px; }
.privacy-modal-body ul { padding-left: 20px; margin-bottom: 8px; }
.privacy-modal-body li { margin-bottom: 4px; }

.privacy-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--gray-100);
  text-align: right;
  flex-shrink: 0;
}

/* Remember Me row */
.remember-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------------------------------------------------------------
   24. TOAST NOTIFICATIONS
--------------------------------------------------------------- */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  width: min(360px, calc(100vw - 40px));
}

.toast {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  pointer-events: auto;
  border-left: 4px solid var(--primary);
  transform: translateX(calc(100% + 40px));
  opacity: 0;
  transition: transform .35s cubic-bezier(.34,1.56,.64,1), opacity .35s ease;
}
.toast.show { transform: translateX(0); opacity: 1; }
.toast.hide { transform: translateX(calc(100% + 40px)); opacity: 0; transition: transform .25s ease, opacity .25s ease; }

.toast--success { border-left-color: var(--success); }
.toast--error   { border-left-color: var(--error); }
.toast--warning { border-left-color: var(--warning); }
.toast--info    { border-left-color: var(--primary); }

.toast-icon { font-size: 1rem; flex-shrink: 0; margin-top: 2px; }
.toast--success .toast-icon { color: var(--success); }
.toast--error   .toast-icon { color: var(--error); }
.toast--warning .toast-icon { color: var(--warning); }
.toast--info    .toast-icon { color: var(--primary); }

.toast-body    { flex: 1; min-width: 0; }
.toast-message { font-size: .875rem; font-weight: 500; color: var(--gray-700); line-height: 1.5; }

.toast-close {
  background: none; border: none;
  color: var(--gray-400); font-size: .75rem;
  padding: 2px 4px; cursor: pointer;
  flex-shrink: 0; margin-top: 2px;
  transition: color var(--transition);
}
.toast-close:hover { color: var(--gray-700); }

/* ---------------------------------------------------------------
   25. FORM INPUT ICONS
--------------------------------------------------------------- */
.input-icon-wrap {
  position: relative;
}
.input-prefix-icon {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: .875rem;
  pointer-events: none;
  z-index: 1;
}
.form-input.has-icon { padding-left: 40px; }

/* ---------------------------------------------------------------
   28. PROFILE TABS (legacy compat — new design uses .pf-* classes)
--------------------------------------------------------------- */
.profile-nick  { font-size: .85rem; color: var(--primary); font-weight: 600; margin: 2px 0; }
.profile-email { font-size: .82rem; color: var(--gray-400); margin: 2px 0; }
.profile-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 14px; }
.profile-tab { padding: 8px 16px; border-radius: var(--radius-full); font-size: .82rem; font-weight: 600; background: var(--gray-100); color: var(--gray-500); border: none; cursor: pointer; transition: background var(--transition), color var(--transition); }
.profile-tab.active, .profile-tab:hover { background: var(--primary); color: var(--white); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ---------------------------------------------------------------
   29. MODAL VARIANTS (small)
--------------------------------------------------------------- */
.modal--sm { max-width: 380px; }
.modal-actions {
  display: flex; gap: 10px; justify-content: flex-end;
  padding: 0 24px 20px;
}

/* ---------------------------------------------------------------
   30. ANNOUNCEMENT PAGE
--------------------------------------------------------------- */
.announce-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 60%, #2563eb 100%);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  color: #fff;
  margin-bottom: 16px;
  text-align: center;
}
.announce-draw-badge {
  display: inline-block;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: var(--radius-full);
  font-size: .75rem; font-weight: 700;
  padding: 4px 14px; letter-spacing: .6px;
  text-transform: uppercase; margin-bottom: 14px;
}
.announce-riddle-label {
  font-size: .78rem; opacity: .7; text-transform: uppercase;
  letter-spacing: .8px; margin-bottom: 8px;
}
.announce-riddle {
  font-family: 'Nunito', sans-serif;
  font-size: 1.2rem; font-weight: 700;
  line-height: 1.6; margin: 0 0 18px;
}
.announce-countdown {
  display: flex; justify-content: center; gap: 16px; margin: 18px 0 8px;
}
.announce-time-block {
  display: flex; flex-direction: column; align-items: center;
  background: rgba(255,255,255,.1);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  min-width: 70px;
}
.announce-time-num {
  font-family: 'Bangers', cursive;
  font-size: 2.4rem; line-height: 1;
  color: #facc15;
  letter-spacing: 2px;
}
.announce-time-label {
  font-size: .65rem; opacity: .7; text-transform: uppercase;
  letter-spacing: .5px; margin-top: 4px;
}
.announce-status {
  display: inline-block;
  padding: 6px 18px; border-radius: var(--radius-full);
  font-size: .8rem; font-weight: 700;
  background: rgba(74,222,128,.2); color: #4ade80;
  border: 1px solid rgba(74,222,128,.4);
}
.announce-status--locked {
  background: rgba(248,113,113,.2); color: #f87171;
  border-color: rgba(248,113,113,.4);
}

.reveals-list { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.reveal-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
  display: flex; gap: 16px; align-items: flex-start;
}
.reveal-answer {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  min-width: 64px; text-align: center;
  flex-shrink: 0;
}
.reveal-answer-icon { font-size: 1.6rem; color: var(--gray-700); }
.reveal-answer-num  { font-family: 'Bangers', cursive; font-size: 1.1rem; color: var(--primary); margin: 2px 0; }
.reveal-answer-name { font-size: .7rem; font-weight: 700; color: var(--gray-600); }
.reveal-meta { flex: 1; min-width: 0; }
.reveal-draw-label {
  font-size: .7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--primary); margin-bottom: 4px;
}
.reveal-riddle {
  font-size: .9rem; font-style: italic;
  color: var(--gray-700); line-height: 1.5;
  margin-bottom: 4px;
}
.reveal-date { font-size: .72rem; color: var(--gray-400); }

/* ---------------------------------------------------------------
   31. FORUM / CHAT PAGE  (modern WhatsApp-style)
--------------------------------------------------------------- */

/* Page layout — fills between top nav and bottom nav */
.forum-page .chat-app {
  position: fixed;
  top: 0;                           /* mobile: top-nav is hidden */
  bottom: var(--bottom-nav-height); /* mobile: bottom-nav is shown */
  left: 0; right: 0;
  display: flex; flex-direction: column;
  background: #f0f2f5;
  overflow: hidden;
}
@media (min-width: 768px) {
  .forum-page .chat-app {
    top: var(--nav-height); /* desktop: top-nav is shown */
    bottom: 0;              /* desktop: bottom-nav is hidden */
  }
}


/* ── Chat header ─────────────────────────────────── */
.chat-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  box-shadow: 0 2px 8px rgba(0,0,0,.20);
  flex-shrink: 0;
  gap: 12px;
}
.chat-header-left  { display: flex; align-items: center; gap: 12px; min-width: 0; }
.chat-header-right { flex-shrink: 0; }

.chat-header-icon {
  width: 40px; height: 40px;
  background: rgba(255,255,255,.18);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem; color: #fff;
  flex-shrink: 0;
}
.chat-header-info { min-width: 0; }
.chat-header-title {
  font-weight: 700; font-size: .95rem; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chat-header-sub {
  display: flex; align-items: center; gap: 6px;
  font-size: .72rem; color: rgba(255,255,255,.75);
}

/* live green pulse dot */
.chat-live-pulse {
  display: inline-block;
  width: 7px; height: 7px; border-radius: 50%;
  background: #4ade80;
  animation: chatPulse 1.4s ease-in-out infinite;
}
@keyframes chatPulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .55; transform: scale(1.35); }
}

/* "You" chip top-right */
.chat-you-chip {
  display: flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius-full);
  padding: 4px 10px 4px 5px;
}
.chat-you-av {
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255,255,255,.30);
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 700; color: #fff;
}
.chat-you-nick { font-size: .78rem; font-weight: 600; color: #fff; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Messages area ───────────────────────────────── */
.chat-messages {
  flex: 1; overflow-y: auto;
  padding: 12px 12px 6px;
  display: flex; flex-direction: column;
  scroll-behavior: smooth;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 2px; }

/* Loading skeleton (typing dots) */
.chat-loading {
  display: flex; align-items: center; gap: 5px;
  padding: 10px 0; align-self: center;
}
.chat-typing-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gray-400);
  animation: chatTyping 1.1s ease-in-out infinite;
}
.chat-typing-dot:nth-child(2) { animation-delay: .18s; }
.chat-typing-dot:nth-child(3) { animation-delay: .36s; }
@keyframes chatTyping {
  0%,60%,100% { transform: translateY(0); opacity: .5; }
  30%          { transform: translateY(-6px); opacity: 1; }
}

/* Empty state */
.chat-empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: var(--gray-400); font-size: .9rem;
  text-align: center; gap: 10px;
  padding: 40px 20px;
  pointer-events: none;
}
.chat-empty i { font-size: 2.4rem; opacity: .35; }

/* Date separator */
.chat-date-sep {
  display: flex; align-items: center; gap: 10px;
  margin: 10px 0;
  font-size: .7rem; color: var(--gray-500); font-weight: 600;
  text-transform: uppercase; letter-spacing: .4px;
}
.chat-date-sep::before,
.chat-date-sep::after {
  content: ''; flex: 1;
  border-top: 1px solid var(--gray-300);
}

/* ── Message rows ────────────────────────────────── */
.chat-row {
  display: flex; align-items: flex-end; gap: 7px;
  margin-bottom: 6px;
  max-width: 82%;
}
.chat-row--me    { align-self: flex-end; flex-direction: row-reverse; }
.chat-row--other { align-self: flex-start; }
.chat-row--grouped { margin-bottom: 2px; }

/* Avatar column */
.chat-av-wrap {
  width: 32px; flex-shrink: 0;
  display: flex; align-items: flex-end;
}
.chat-av {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 700; color: #fff;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,.20);
}

/* Bubble column */
.chat-col {
  display: flex; flex-direction: column;
  min-width: 0; max-width: 100%;
}
.chat-row--me .chat-col { align-items: flex-end; }

.chat-msg-nick {
  font-size: .7rem; font-weight: 700;
  margin-bottom: 2px; padding: 0 4px;
}

.chat-bubble {
  padding: 8px 12px;
  border-radius: 16px;
  font-size: .88rem; line-height: 1.5;
  word-break: break-word; white-space: pre-wrap;
  max-width: 100%;
  box-shadow: 0 1px 2px rgba(0,0,0,.10);
}
.chat-row--other .chat-bubble {
  background: #fff;
  color: var(--gray-800);
  border-bottom-left-radius: 4px;
}
.chat-row--me .chat-bubble {
  background: #2563eb;
  color: #fff;
  border-bottom-right-radius: 4px;
}

/* Grouped: tighter radius, no gap */
.chat-row--grouped.chat-row--other .chat-bubble { border-top-left-radius: 4px; }
.chat-row--grouped.chat-row--me    .chat-bubble { border-top-right-radius: 4px; }

.chat-msg-time {
  font-size: .63rem; color: var(--gray-400);
  margin-top: 3px; padding: 0 4px;
}

/* ── Unverified bar ──────────────────────────────── */
.chat-unverified-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  background: #fffbeb;
  border-top: 1px solid #fde68a;
  color: #92400e;
  font-size: .85rem;
}
.chat-unverified-bar i { color: #f59e0b; font-size: 1rem; flex-shrink: 0; }
.chat-unverified-link { color: #b45309; font-weight: 600; text-decoration: underline; }
.chat-unverified-link:hover { color: #92400e; }

/* ── Input bar ───────────────────────────────────── */
.chat-input-bar {
  display: flex; align-items: flex-end; gap: 10px;
  padding: 10px 12px;
  background: #fff;
  border-top: 1px solid var(--gray-200);
  flex-shrink: 0;
}
.chat-input-wrap {
  flex: 1; min-width: 0;
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: 8px 14px 4px;
  transition: border-color var(--transition);
}
.chat-input-wrap:focus-within {
  border-color: var(--primary);
  background: #fff;
}
.chat-textarea {
  display: block; width: 100%;
  resize: none; overflow: hidden;
  min-height: 24px; max-height: 120px;
  background: transparent;
  border: none; outline: none;
  font-size: .9rem; font-family: inherit;
  line-height: 1.5; color: var(--gray-800);
}
.chat-textarea::placeholder { color: var(--gray-400); }
.chat-input-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 3px;
}
.chat-char-count { font-size: .68rem; color: var(--gray-400); }
.chat-hint { font-size: .68rem; color: var(--gray-400); display: flex; align-items: center; gap: 4px; }

/* Send button */
.chat-send-btn {
  width: 44px; height: 44px;
  border-radius: 50%; border: none;
  background: var(--primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; cursor: pointer;
  flex-shrink: 0;
  transition: background var(--transition), transform .1s;
  box-shadow: 0 2px 8px rgba(37,99,235,.35);
}
.chat-send-btn:hover  { background: var(--primary-hover); transform: scale(1.05); }
.chat-send-btn:active { transform: scale(.95); }
.chat-send-btn:disabled { background: var(--gray-300); box-shadow: none; cursor: not-allowed; transform: none; }

/* ── legacy stub ── */
.forum-empty { text-align: center; color: var(--gray-400); font-style: italic; padding: 40px 20px; font-size: .9rem; }

/* ── Load-more button ───────────────────────────────────── */
.chat-load-more-btn {
  display: block;
  width: calc(100% - 24px);
  margin: 8px 12px 4px;
  padding: 8px 14px;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-full);
  font-size: .78rem; font-weight: 700; font-family: inherit;
  color: var(--gray-600);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.chat-load-more-btn:hover  { background: var(--gray-50); border-color: var(--primary); color: var(--primary); }
.chat-load-more-btn:disabled { opacity: .6; cursor: not-allowed; }

/* ── Context menu ───────────────────────────────────────── */
.chat-ctx-menu {
  position: fixed; z-index: 9999;
  display: none;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: 0 6px 24px rgba(0,0,0,.16), 0 1px 4px rgba(0,0,0,.08);
  min-width: 150px;
  overflow: hidden;
  border: 1px solid var(--gray-100);
  animation: ctxIn .13s cubic-bezier(.2,.8,.4,1) both;
}
@keyframes ctxIn { from { opacity:0; transform:scale(.92) translateY(-4px); } to { opacity:1; transform:none; } }
.chat-ctx-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; border: none; background: none;
  padding: 10px 16px;
  font-size: .85rem; font-family: inherit; font-weight: 600;
  color: var(--gray-700); cursor: pointer; text-align: left;
  transition: background var(--transition);
}
.chat-ctx-item i { width: 14px; text-align: center; color: var(--gray-400); }
.chat-ctx-item:hover { background: var(--gray-50); }
.chat-ctx-item--danger { color: var(--error); }
.chat-ctx-item--danger i { color: var(--error); }
.chat-ctx-item--danger:hover { background: var(--error-bg); }
.chat-ctx-sep { height: 1px; background: var(--gray-100); margin: 2px 0; }

/* Delete animation */
@keyframes chatRowOut { to { opacity:0; transform:translateX(30px) scaleY(.7); } }
.chat-row--deleting { animation: chatRowOut .3s ease forwards; pointer-events: none; }

/* ── @mention highlights in bubbles ────────────────────── */
.chat-mention {
  background: rgba(99,102,241,.13);
  color: #4f46e5;
  border-radius: 4px;
  padding: 1px 4px;
  font-weight: 700;
  white-space: nowrap;
}
.chat-mention--me {
  background: rgba(245,158,11,.18);
  color: #b45309;
}
/* Mentions inside the sender's own blue bubble — force white so they're visible */
.chat-row--me .chat-bubble .chat-mention,
.chat-row--me .chat-bubble .chat-mention--me {
  background: rgba(255,255,255,.25);
  color: #fff;
}

/* ── @mention autocomplete dropdown ────────────────────── */
.chat-input-wrap { position: relative; }
.chat-mention-dropdown {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0; right: 0;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: 0 -4px 20px rgba(0,0,0,.12), 0 1px 6px rgba(0,0,0,.07);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  max-height: 224px; overflow-y: auto;
  z-index: 200;
  animation: ctxIn .13s cubic-bezier(.2,.8,.4,1) both;
}
.chat-mention-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; border: none; background: none;
  padding: 9px 14px;
  cursor: pointer; font-family: inherit;
  transition: background var(--transition);
}
.chat-mention-item:hover,
.chat-mention-item--active { background: var(--gray-50); }
.chat-mention-av {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 700; color: #fff; flex-shrink: 0;
}
.chat-mention-nick { font-size: .875rem; font-weight: 600; color: var(--gray-800); }

/* ── Soft-deleted message bubble ────────────────────────── */
.chat-bubble--deleted {
  background: var(--gray-100) !important;
  color: var(--gray-400) !important;
  font-style: italic;
  font-size: .825rem;
  padding: 6px 12px;
  border: 1px dashed var(--gray-300) !important;
  box-shadow: none !important;
}
.chat-row--me .chat-bubble--deleted {
  background: rgba(37,99,235,.08) !important;
  border-color: rgba(37,99,235,.2) !important;
  color: rgba(37,99,235,.5) !important;
}

/* ── Inline message action buttons ─────────────────────── */
.chat-actions {
  display: flex;
  gap: 2px;
  margin-top: 3px;
  opacity: 0;
  transition: opacity .15s;
}
/* Show on hover (desktop) */
.chat-row:hover .chat-actions { opacity: 1; }
/* Always show on touch devices */
@media (hover: none) { .chat-actions { opacity: 1; } }

.chat-row--me  .chat-actions { justify-content: flex-end; }
.chat-row--other .chat-actions { justify-content: flex-start; padding-left: 2px; }

.chat-action-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px;
  background: none; border: none; cursor: pointer;
  border-radius: var(--radius-sm);
  font-size: .72rem;
  color: var(--gray-400);
  transition: color .15s, background .15s;
  padding: 0;
}
.chat-action-btn:hover { background: var(--gray-100); color: var(--gray-600); }
.chat-action-btn--del:hover { color: var(--error); background: var(--error-bg); }
