:root {
  --bg-mobile: #040d22;
  --card-bg: rgba(10, 26, 58, 0.92);
  --border-subtle: rgba(255, 255, 255, 0.12);
  --primary: #1565c0;
  --brand-navy: #0b3d8c;
  --brand-sky: #22b0f0;
  --brand-green: #2e9e44;
  --brand-gold: #f0b429;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  --opt-red: #ef4444;
  --opt-blue: #3b82f6;
  --opt-yellow: #f59e0b;
  --opt-green: #10b981;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  background: radial-gradient(circle at 50% 0%, #0e2f6b 0%, #071a3d 45%, #040d22 100%);
  color: var(--text-main);
  min-height: 100vh;
  min-height: -webkit-fill-available;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.mobile-app-wrapper {
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  padding: 1.2rem;
}

/* App Header */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1.2rem;
}

.header-logos {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.35rem 0.8rem;
  border-radius: 9999px;
  backdrop-filter: blur(8px);
}

.brand-text-main {
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-text-sep {
  color: rgba(255, 255, 255, 0.4);
  font-weight: 700;
  font-size: 0.75rem;
}

.brand-text-sub {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, #f43f5e 0%, #fb923c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-user-tag {
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.4);
  padding: 0.35rem 0.8rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #a5b4fc;
}

/* Screen Sections */
.mobile-screen {
  display: none;
  flex: 1;
  flex-direction: column;
  animation: fadeIn 0.3s ease forwards;
}

.mobile-screen.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.pause-banner {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  text-align: center;
  font-weight: 800;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
  animation: pulse 1.5s infinite;
}

/* Photo Capture Section */
.photo-capture-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.4rem;
}

.photo-preview-circle {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(30, 41, 59, 0.8);
  border: 3px dashed rgba(99, 102, 241, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  position: relative;
}

#photoPlaceholderIcon {
  font-size: 2.2rem;
  opacity: 0.8;
}

.photo-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-btn {
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.5);
  color: #c7d2fe;
  padding: 0.5rem 1.1rem;
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.photo-btn:hover {
  background: rgba(99, 102, 241, 0.35);
}

.photo-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.lobby-timer-badge {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  padding: 0.5rem 1.2rem;
  border-radius: 9999px;
  font-size: 1.05rem;
}

.lobby-user-photo-box {
  display: flex;
  justify-content: center;
}

.lobby-photo-frame {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--primary);
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.5);
}

.lobby-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =========================================
   1. REGISTRATION / JOIN SCREEN
   ========================================= */
.join-card {
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 1.8rem 1.4rem;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  margin-top: auto;
  margin-bottom: auto;
}

.join-title {
  font-size: 1.8rem;
  font-weight: 900;
  text-align: center;
  background: linear-gradient(135deg, #ffffff, #c7d2fe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.join-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: -0.8rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-input {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
  font-family: inherit;
  font-size: 1.05rem;
  color: white;
  outline: none;
  transition: all 0.2s ease;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

.join-submit-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  font-family: inherit;
  font-size: 1.25rem;
  font-weight: 800;
  padding: 1rem;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
  margin-top: 0.5rem;
  transition: transform 0.15s ease;
}

.join-submit-btn:active {
  transform: scale(0.98);
}

/* =========================================
   2. WAITING LOBBY SCREEN
   ========================================= */
.lobby-screen-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1.5rem;
}

.lobby-pulse-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  box-shadow: 0 0 40px rgba(99, 102, 241, 0.6);
  animation: floatAvatar 3s ease-in-out infinite;
}

@keyframes floatAvatar {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.lobby-status-title {
  font-size: 2rem;
  font-weight: 900;
}

.lobby-instruction {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 320px;
}

.lobby-tip-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  padding: 1rem 1.2rem;
  border-radius: 14px;
  font-size: 0.9rem;
  color: #a5b4fc;
}

/* =========================================
   3. QUESTION SCREEN
   ========================================= */
.q-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}

.q-badge {
  font-size: 0.95rem;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  padding: 0.35rem 0.8rem;
  border-radius: 9999px;
}

.q-timer-badge {
  font-size: 1.15rem;
  font-weight: 900;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  padding: 0.35rem 0.9rem;
  border-radius: 9999px;
}

.mobile-q-card {
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 1.3rem 1.2rem;
  margin-bottom: 1.2rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.mobile-q-text {
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.35;
  color: white;
}

/* Mobile 4 Options Buttons */
.mobile-options-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  flex: 1;
}

.mobile-option-btn {
  border: none;
  border-radius: 16px;
  padding: 1.1rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: inherit;
  font-size: 1.15rem;
  font-weight: 700;
  color: white;
  cursor: pointer;
  text-align: left;
  transition: transform 0.12s ease, filter 0.15s ease;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  position: relative;
}

.mobile-option-btn:active {
  transform: scale(0.97);
}

.mobile-option-btn.opt-0 { background: linear-gradient(135deg, #ef4444, #dc2626); }
.mobile-option-btn.opt-1 { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.mobile-option-btn.opt-2 { background: linear-gradient(135deg, #f59e0b, #d97706); }
.mobile-option-btn.opt-3 { background: linear-gradient(135deg, #10b981, #059669); }

.m-opt-symbol {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 900;
  flex-shrink: 0;
}

.m-opt-text {
  flex: 1;
  line-height: 1.25;
}

/* Submitted State */
.mobile-option-btn.selected {
  outline: 4px solid #ffffff;
  filter: brightness(1.2);
}

.mobile-option-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.mobile-option-btn.selected:disabled {
  opacity: 1;
}

.answer-locked-banner {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.5);
  padding: 0.8rem 1rem;
  border-radius: 12px;
  text-align: center;
  color: #6ee7b7;
  font-weight: 700;
  font-size: 0.95rem;
  margin-top: 0.8rem;
  display: none;
}

/* =========================================
   4. ROUND RESULT SCREEN
   ========================================= */
.round-result-card {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 2rem 1.4rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  margin-top: auto;
  margin-bottom: auto;
}

.result-icon {
  font-size: 4rem;
}

.result-heading {
  font-size: 2.2rem;
  font-weight: 900;
}

.result-heading.correct { color: #10b981; }
.result-heading.wrong { color: #ef4444; }

.points-pill {
  font-size: 1.4rem;
  font-weight: 900;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  padding: 0.5rem 1.4rem;
  border-radius: 9999px;
}

.streak-pill {
  font-size: 1rem;
  font-weight: 700;
  color: #f97316;
}

.mobile-explanation {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 1rem;
  font-size: 0.92rem;
  color: #cbd5e1;
  text-align: left;
  line-height: 1.45;
  width: 100%;
}

/* =========================================
   5. FINAL PODIUM & CERTIFICATE
   ========================================= */
.final-screen-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.2rem;
  padding-bottom: 2rem;
}

.final-trophy {
  font-size: 4.5rem;
  margin-top: 1rem;
  animation: bounce 2s infinite ease-in-out;
}

.final-rank-tag {
  font-size: 2.4rem;
  font-weight: 900;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Certificate Preview Canvas */
.cert-preview-card {
  width: 100%;
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  margin-top: 0.5rem;
}

#certCanvas {
  width: 100%;
  height: auto;
  display: block;
}

.download-cert-btn {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
  border: none;
  font-family: inherit;
  font-size: 1.15rem;
  font-weight: 800;
  padding: 0.95rem 1.6rem;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  text-decoration: none;
}

/* Anti-Cheating Warning Banner */
.cheat-warning-banner {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: white;
  padding: 0.85rem 1.2rem;
  font-size: 0.88rem;
  font-weight: 700;
  text-align: center;
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
  animation: slideDown 0.3s ease;
  z-index: 100;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.5);
  line-height: 1.4;
}

@keyframes slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}


/* ===== Brand logos (real images) ===== */
.brand-logos {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #ffffff;
  padding: 0.35rem 0.7rem;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.brand-logo-img { height: 30px; width: auto; display: block; }
.brand-logo-img.yuvion { height: 26px; }
.brand-logo-sep { display: inline-block; width: 2px; height: 26px; border-radius: 2px; background: linear-gradient(180deg, rgba(100,116,139,0.1), #94a3b8 30%, #94a3b8 70%, rgba(100,116,139,0.1)); margin: 0 2px; }

.join-notice {
  background: rgba(240, 180, 41, 0.15);
  border: 1px solid rgba(240, 180, 41, 0.5);
  color: #fcd34d;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  text-align: center;
  margin-top: -0.6rem;
}

.cert-tip { font-size: 0.8rem; color: var(--text-muted); margin-top: -0.4rem; }

/* Brand-coloured buttons */
.join-submit-btn {
  background: linear-gradient(135deg, #2e9e44 0%, #1f7a32 100%);
  box-shadow: 0 8px 20px rgba(46, 158, 68, 0.45);
}
.download-cert-btn {
  background: linear-gradient(135deg, #1e88e5 0%, #0b3d8c 100%);
  box-shadow: 0 8px 24px rgba(30, 136, 229, 0.45);
}
.lobby-photo-frame { border-color: var(--brand-sky); box-shadow: 0 0 30px rgba(34, 176, 240, 0.5); }
.lobby-pulse-avatar { background: linear-gradient(135deg, #1e88e5, #0b3d8c); box-shadow: 0 0 40px rgba(30, 136, 229, 0.6); }
.q-badge { color: #7dd3fc; background: rgba(34, 176, 240, 0.18); }
.header-user-tag { background: rgba(34, 176, 240, 0.18); border-color: rgba(34, 176, 240, 0.45); color: #bae6fd; }
.join-title { background: linear-gradient(135deg, #ffffff, #bae6fd); -webkit-background-clip: text; }
.points-pill { color: #fcd34d; background: rgba(240, 180, 41, 0.15); }
.final-rank-tag { background: linear-gradient(135deg, #fcd34d, #f0b429); -webkit-background-clip: text; }
.lobby-tip-card { color: #bae6fd; }
.form-input:focus { border-color: var(--brand-sky); box-shadow: 0 0 0 3px rgba(34, 176, 240, 0.3); }
#joinForm { display: flex; flex-direction: column; gap: 1rem; }
.join-submit-btn { width: 100%; }

.next-in-pill { background: rgba(240,180,41,0.15); border: 1px solid rgba(240,180,41,0.5); color: #fcd34d; font-weight: 800; padding: 0.5rem 1rem; border-radius: 9999px; font-size: 0.95rem; }

/* =========================================
   v11: Submit button + 10s timer + responsive
   ========================================= */
.q-timer-badge { min-width: 76px; text-align: center; transition: background 0.2s, border-color 0.2s, transform 0.2s; }
.q-timer-badge.urgent { background: rgba(239, 68, 68, 0.35); border-color: #ef4444; color: #fff; animation: timerPulse 0.5s ease infinite alternate; }
@keyframes timerPulse { from { transform: scale(1); } to { transform: scale(1.08); } }

.q-timer-track { height: 6px; background: rgba(255,255,255,0.1); border-radius: 9999px; overflow: hidden; margin-bottom: 0.9rem; }
.q-timer-fill { height: 100%; width: 100%; background: linear-gradient(90deg, #22b0f0, #2e9e44); border-radius: 9999px; transition: width 0.1s linear; }
.q-timer-badge.urgent ~ .q-timer-track .q-timer-fill,
.q-meta-bar:has(.urgent) + .q-timer-track .q-timer-fill { background: linear-gradient(90deg, #ef4444, #f59e0b); }

.mobile-options-list { flex: 0 0 auto; }
.mobile-option-btn.selected { outline: 4px solid #ffffff; filter: brightness(1.15); transform: scale(1.015); }
.mobile-option-btn.selected::after { content: '✓'; position: absolute; right: 0.9rem; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; background: #fff; color: #0b3d8c; font-weight: 900; display: flex; align-items: center; justify-content: center; font-size: 1rem; }
.mobile-option-btn.selected .m-opt-text { padding-right: 2.2rem; }

.submit-answer-btn {
  margin-top: 1rem; width: 100%; border: none; border-radius: 16px;
  padding: 1.05rem 1rem; font-family: inherit; font-size: 1.15rem; font-weight: 900; letter-spacing: 0.02em;
  background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.45); border: 1px dashed rgba(255,255,255,0.25);
  cursor: not-allowed; transition: all 0.2s ease;
}
.submit-answer-btn.ready {
  background: linear-gradient(135deg, #f0b429, #f59e0b); color: #1a1200; border-color: transparent; cursor: pointer;
  box-shadow: 0 8px 24px rgba(240, 180, 41, 0.45); animation: submitGlow 1.2s ease infinite alternate;
}
.submit-answer-btn.ready:active { transform: scale(0.97); }
.submit-answer-btn:disabled.ready { animation: none; }
@keyframes submitGlow { from { box-shadow: 0 8px 24px rgba(240,180,41,0.35); } to { box-shadow: 0 10px 32px rgba(240,180,41,0.7); } }
.submit-hint { text-align: center; color: var(--text-muted); font-size: 0.78rem; margin-top: 0.6rem; line-height: 1.35; }

/* Responsive: small & short phones */
@media (max-width: 380px) {
  .mobile-app-wrapper { padding: 0.8rem; }
  .mobile-q-text { font-size: 1.1rem; }
  .mobile-option-btn { padding: 0.85rem 0.9rem; font-size: 1rem; gap: 0.7rem; }
  .m-opt-symbol { width: 30px; height: 30px; font-size: 1rem; }
  .q-badge { font-size: 0.85rem; }
  .join-card { padding: 1.4rem 1.1rem; }
}
@media (max-height: 700px) {
  .app-header { padding: 0.5rem 0; margin-bottom: 0.7rem; }
  .mobile-q-card { padding: 0.9rem 1rem; margin-bottom: 0.8rem; }
  .mobile-q-text { font-size: 1.1rem; }
  .mobile-options-list { gap: 0.55rem; }
  .mobile-option-btn { padding: 0.75rem 0.9rem; font-size: 1rem; border-radius: 12px; }
  .submit-answer-btn { padding: 0.85rem 1rem; font-size: 1.05rem; margin-top: 0.7rem; }
  .submit-hint { font-size: 0.72rem; margin-top: 0.4rem; }
  .round-result-card { padding: 1.4rem 1.1rem; gap: 0.8rem; }
}
/* Tablets / desktop viewing the join page */
@media (min-width: 768px) {
  .mobile-app-wrapper { max-width: 560px; padding: 1.6rem; }
  .mobile-q-text { font-size: 1.5rem; }
}
.conn-banner { background: rgba(245,158,11,0.18); border: 1px solid rgba(245,158,11,0.5); color: #fde68a; font-weight: 700; font-size: 0.85rem; text-align: center; padding: 0.55rem 0.8rem; border-radius: 10px; margin-bottom: 0.9rem; }
.build-tag { text-align: center; font-size: 0.68rem; color: #475569; margin-top: auto; padding-top: 0.6rem; }
/* v11.2 polish */
.mobile-option-btn { box-shadow: 0 6px 16px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.18); }
.mobile-option-btn:not(.selected):not(:disabled):active { filter: brightness(1.1); }
.answer-locked-banner { animation: fadeIn 0.25s ease; }

.closed-card{text-align:center}.closed-icon{font-size:3rem;margin-bottom:.6rem}
.closed-dots{display:flex;justify-content:center;gap:.4rem;margin-top:1.2rem}.closed-dots span{width:8px;height:8px;border-radius:50%;background:#22b0f0;animation:dotPulse 1.2s ease infinite}.closed-dots span:nth-child(2){animation-delay:.2s}.closed-dots span:nth-child(3){animation-delay:.4s}
@keyframes dotPulse{0%,100%{opacity:.2;transform:scale(.8)}50%{opacity:1;transform:scale(1.1)}}


/* ---- Lobby: last-20-seconds urgency + auto-start notice ---- */
.lobby-timer-badge.urgent { background: rgba(239, 68, 68, 0.18); border-color: rgba(239, 68, 68, 0.75); color: #fecaca; animation: lobbyUrgentPulse 1s ease-in-out infinite; }
.lobby-timer-badge.urgent strong { color: #fca5a5; font-size: 1.25em; }
@keyframes lobbyUrgentPulse { 0%,100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239,68,68,0.5); } 50% { transform: scale(1.03); box-shadow: 0 0 0 10px rgba(239,68,68,0); } }
.lobby-autostart { margin-top: 0.6rem; background: linear-gradient(135deg, #16a34a, #15803d); color: #fff; font-weight: 800; font-size: 1rem; padding: 0.7rem 1rem; border-radius: 14px; text-align: center; box-shadow: 0 8px 22px rgba(22,163,74,0.45); animation: lobbyUrgentPulse 1s ease-in-out infinite; }
.lobby-autostart strong { font-size: 1.5em; font-family: monospace; }

/* ---- Certificate recovery ---- */
.cert-recover-link { margin-top: 1rem; width: 100%; background: transparent; border: 1px dashed rgba(240,180,41,0.55); color: #fcd34d; font-weight: 700; font-size: 0.85rem; padding: 0.65rem 0.8rem; border-radius: 12px; cursor: pointer; }
.cert-recover-modal { position: fixed; inset: 0; background: rgba(2,6,23,0.85); backdrop-filter: blur(6px); z-index: 9000; display: flex; align-items: center; justify-content: center; padding: 1.2rem; }
.cert-recover-card { width: 100%; max-width: 420px; background: #0f172a; border: 1px solid rgba(255,255,255,0.12); border-radius: 18px; padding: 1.3rem; display: flex; flex-direction: column; gap: 0.8rem; }
.cert-recover-card h3 { margin: 0; font-size: 1.2rem; }
.cert-recover-card p { margin: 0; color: var(--text-muted); font-size: 0.9rem; }
.cert-recover-msg { font-size: 0.85rem; font-weight: 700; padding: 0.55rem 0.8rem; border-radius: 10px; background: rgba(239,68,68,0.15); color: #fca5a5; border: 1px solid rgba(239,68,68,0.5); }
.cert-recover-msg.ok { background: rgba(22,163,74,0.15); color: #86efac; border-color: rgba(22,163,74,0.5); }
.cert-recover-actions { display: flex; flex-direction: column; gap: 0.5rem; }
.cert-recover-cancel { background: transparent; border: 1px solid rgba(255,255,255,0.15); color: #cbd5e1; padding: 0.6rem; border-radius: 12px; font-weight: 600; cursor: pointer; }

/* ---- Organiser announcement + notice + help ---- */
.announce-banner { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 9500; width: calc(100% - 1.6rem); max-width: 480px; background: linear-gradient(135deg, #0b3d8c, #1e88e5); color: #fff; font-weight: 700; font-size: 0.95rem; padding: 0.8rem 1rem; border-radius: 14px; box-shadow: 0 14px 40px rgba(0,0,0,0.5); display: flex; gap: 0.6rem; align-items: flex-start; animation: announceIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
.announce-ico { font-size: 1.3rem; line-height: 1; }
@keyframes announceIn { from { transform: translate(-50%, -30px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.org-notice { margin: 0.6rem 0.8rem 0; background: rgba(240,180,41,0.14); border: 1px solid rgba(240,180,41,0.5); color: #fde68a; font-weight: 600; font-size: 0.88rem; padding: 0.6rem 0.9rem; border-radius: 12px; text-align: center; }
.help-link { margin-top: 0.6rem; width: 100%; background: transparent; border: none; color: #93c5fd; font-weight: 600; font-size: 0.82rem; padding: 0.4rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.cert-recover-card select.form-input, .cert-recover-card textarea.form-input { width: 100%; font-family: inherit; }
.cert-recover-card textarea.form-input { resize: vertical; min-height: 90px; }

/* =========================================
   AFTER-QUIZ CALL-TO-ACTION (e.g. "Join our WhatsApp group")
   ========================================= */
.end-cta {
  width: 100%;
  max-width: 360px;
  margin: 0.4rem auto 0;
  background: linear-gradient(135deg, rgba(37, 211, 102, 0.16), rgba(16, 185, 129, 0.08));
  border: 1px solid rgba(37, 211, 102, 0.5);
  border-radius: 16px;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  animation: endCtaIn 0.8s ease-out;
}
.end-cta-msg { margin: 0; font-size: 1rem; font-weight: 700; color: #d1fae5; line-height: 1.45; }
.end-cta-btn {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff; text-decoration: none; font-weight: 800; font-size: 1.05rem;
  padding: 0.9rem 1.2rem; border-radius: 12px;
  box-shadow: 0 8px 22px rgba(37, 211, 102, 0.35);
}
.end-cta-btn:active { transform: scale(0.98); }
@keyframes endCtaIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
