/* Missão Planeta Azul - Styles */

* { box-sizing: border-box; }
html, body, #root { margin: 0; padding: 0; height: 100%; }
body {
  font-family: 'Nunito', system-ui, -apple-system, sans-serif;
  background: #0b1023;
  color: #e2e8f0;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
*::-webkit-scrollbar { width: 0; height: 0; display: none; }
* { scrollbar-width: none; -ms-overflow-style: none; }
html, body { max-width: 100vw; }

h1, h2, h3, h4 {
  font-family: 'Fredoka', 'Nunito', sans-serif;
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.01em;
}

button { font-family: inherit; cursor: pointer; }

/* ---------- Starfield background ---------- */
.starfield {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse at top, #1e1b4b 0%, #0b1023 60%, #050817 100%);
}
.star {
  position: absolute;
  background: white;
  border-radius: 50%;
  opacity: 0.6;
  animation: twinkle 3s ease-in-out infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.2; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* ---------- Screen base ---------- */
.screen {
  position: relative;
  min-height: 100vh;
  width: 100%;
  z-index: 1;
}

.boot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.boot-spinner {
  font-size: 80px;
  animation: spin 2s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0); }
  to { transform: rotate(360deg); }
}

/* ---------- Buttons ---------- */
.btn-primary, .btn-secondary, .btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 16px;
  border: none;
  font-weight: 700;
  font-size: 16px;
  font-family: 'Fredoka', sans-serif;
  transition: transform .12s, box-shadow .15s, background .15s;
  min-height: 48px;
}
.btn-primary {
  background: linear-gradient(135deg, #fb7185 0%, #f97316 100%);
  color: white;
  box-shadow: 0 6px 0 #be123c, 0 12px 24px rgba(251, 113, 133, 0.4);
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 #be123c, 0 16px 28px rgba(251, 113, 133, 0.5);
}
.btn-primary:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #be123c, 0 4px 12px rgba(251, 113, 133, 0.3);
}
.btn-primary:disabled {
  opacity: 0.5;
  box-shadow: 0 6px 0 #64748b;
  cursor: not-allowed;
}
.btn-primary.big {
  padding: 18px 32px;
  font-size: 19px;
  border-radius: 20px;
}
.btn-secondary {
  background: linear-gradient(135deg, #22d3ee 0%, #6366f1 100%);
  color: white;
  box-shadow: 0 6px 0 #4338ca, 0 12px 24px rgba(99, 102, 241, 0.4);
}
.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 #4338ca, 0 16px 28px rgba(99, 102, 241, 0.5);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  border: 2px solid rgba(255, 255, 255, 0.12);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.14);
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  font-size: 22px;
  color: white;
  transition: transform .12s, background .15s;
}
.icon-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-2px);
}

/* ---------- Login ---------- */
.login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.login-card {
  position: relative;
  z-index: 2;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border: 2px solid rgba(99, 102, 241, 0.3);
  border-radius: 28px;
  padding: 28px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.login-logo {
  text-align: center;
  margin-bottom: 24px;
}
.logo-planet {
  font-size: 76px;
  filter: drop-shadow(0 0 20px rgba(34, 211, 238, 0.5));
  animation: float 3s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.login-logo h1 {
  font-size: 36px;
  background: linear-gradient(135deg, #fbbf24 0%, #fb7185 50%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-top: 8px;
}
.login-logo p {
  margin: 8px 0 0;
  color: #94a3b8;
  font-size: 17px;
}
.login-mode { display: flex; flex-direction: column; gap: 16px; }
.returning h3 {
  font-size: 18px;
  color: #cbd5e1;
  margin-bottom: 12px;
}
.user-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
  max-height: 240px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.user-list::-webkit-scrollbar { display: none; }
.user-list-container::-webkit-scrollbar { display: none; }
.user-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(99, 102, 241, 0.12);
  border: 2px solid rgba(99, 102, 241, 0.3);
  border-radius: 16px;
  padding: 10px 14px;
  text-align: left;
  color: #e2e8f0;
  transition: transform .12s, background .15s;
}
.user-chip:hover {
  background: rgba(99, 102, 241, 0.22);
  transform: translateX(4px);
}
.chip-info { display: flex; flex-direction: column; }
.chip-info strong { font-size: 17px; }
.chip-info span { font-size: 13px; color: #94a3b8; }

.login-form { display: flex; flex-direction: column; gap: 16px; }
.login-form h3 { font-size: 22px; color: white; }
.login-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #cbd5e1;
  font-weight: 600;
  font-size: 15px;
}
.login-form input {
  padding: 14px 16px;
  border-radius: 14px;
  border: 2px solid rgba(99, 102, 241, 0.3);
  background: rgba(15, 23, 42, 0.6);
  color: white;
  font-size: 17px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s;
}
.login-form input:focus {
  border-color: #22d3ee;
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.15);
}
.avatar-pick > span {
  display: block;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 10px;
}
.avatar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.avatar-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 3px solid transparent;
  border-radius: 16px;
  color: #cbd5e1;
  font-weight: 700;
  font-size: 13px;
  transition: transform .12s, background .15s;
}
.avatar-btn:hover { background: rgba(255, 255, 255, 0.08); transform: translateY(-2px); }
.avatar-btn.selected {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08);
}
.error {
  color: #fb7185;
  background: rgba(251, 113, 133, 0.1);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
}
.form-actions { display: flex; gap: 10px; margin-top: 4px; }
.form-actions .btn-primary { flex: 1; }

/* ---------- Map (Home) ---------- */
.map-screen {
  padding: 16px;
  padding-bottom: 40px;
  max-width: 1280px;
  margin: 0 auto;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  border: 2px solid rgba(99, 102, 241, 0.25);
  border-radius: 20px;
  padding: 12px 14px;
  margin-bottom: 16px;
  position: sticky;
  top: 12px;
  z-index: 10;
}
.topbar-left { display: flex; align-items: center; gap: 10px; }
.user-info { display: flex; flex-direction: column; line-height: 1.2; }
.user-info strong { font-size: 17px; color: white; }
.user-info span { font-size: 13px; color: #94a3b8; }
.topbar-right { display: flex; gap: 6px; flex-wrap: wrap; }

.hud {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
}
.hud-card {
  background: rgba(15, 23, 42, 0.7);
  border: 2px solid rgba(99, 102, 241, 0.25);
  border-radius: 18px;
  padding: 12px 14px;
}
.hud-label {
  font-size: 12px;
  color: #94a3b8;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.hud-value {
  font-family: 'Fredoka', sans-serif;
  font-size: 22px;
  color: white;
  margin-top: 4px;
}
.fuel-bar {
  position: relative;
  height: 28px;
  background: rgba(15, 23, 42, 0.8);
  border-radius: 14px;
  overflow: hidden;
  margin-top: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.fuel-fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #22d3ee, #4ade80, #fbbf24);
  border-radius: 14px;
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.fuel-pct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  color: #0f172a;
  text-shadow: 0 0 4px rgba(255, 255, 255, 0.6);
  font-size: 14px;
}

.map-title {
  text-align: center;
  margin-bottom: 20px;
}
.map-title h2 {
  font-size: 32px;
  color: white;
  background: linear-gradient(135deg, #fbbf24 0%, #fb7185 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.map-title p { color: #94a3b8; font-size: 15px; margin: 4px 0 0; }

.missions-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 700px) {
  .missions-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .missions-grid { grid-template-columns: repeat(3, 1fr); }
}

.mission-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  background: rgba(15, 23, 42, 0.7);
  border: 2px solid rgba(99, 102, 241, 0.25);
  border-radius: 22px;
  overflow: hidden;
  transition: transform .15s, box-shadow .2s, border-color .2s;
  padding: 0;
  color: inherit;
}
.mission-card:hover:not(:disabled) {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4);
  border-color: var(--accent);
}
.mission-card.locked { opacity: 0.55; cursor: not-allowed; }
.mission-card.completed::after {
  content: '✓';
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: #4ade80;
  color: #052e16;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 18px;
  z-index: 2;
}
.mission-card { position: relative; }
.mission-bg {
  position: relative;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
}
.mission-bg.bg-gradient-to-br { background: linear-gradient(135deg, var(--from), var(--to)); }
/* gradient via tailwind-like classes */
.mission-bg.from-sky-500 { background: linear-gradient(135deg, #0ea5e9, #1d4ed8); }
.mission-card:nth-child(1) .mission-bg { background: linear-gradient(135deg, #0ea5e9, #1d4ed8); }
.mission-card:nth-child(2) .mission-bg { background: linear-gradient(135deg, #a855f7, #4338ca); }
.mission-card:nth-child(3) .mission-bg { background: linear-gradient(135deg, #10b981, #0f766e); }
.mission-card:nth-child(4) .mission-bg { background: linear-gradient(135deg, #06b6d4, #1d4ed8); }
.mission-card:nth-child(5) .mission-bg { background: linear-gradient(135deg, #22c55e, #15803d); }
.mission-card:nth-child(6) .mission-bg { background: linear-gradient(135deg, #f59e0b, #c2410c); }
.mission-card:nth-child(7) .mission-bg { background: linear-gradient(135deg, #f43f5e, #a21caf); }

.mission-num {
  position: absolute;
  top: 10px;
  left: 14px;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 16px;
}
.mission-icon {
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
  animation: float 3s ease-in-out infinite;
}
.lock-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}
.mission-body { padding: 14px 16px 18px; }
.mission-body h3 { font-size: 19px; color: white; }
.mission-body p { font-size: 14px; color: #94a3b8; margin: 4px 0 12px; }
.mission-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.q-count { font-size: 12px; color: #cbd5e1; font-weight: 600; }
.locked-hint { font-size: 12px; color: #fbbf24; margin-top: 8px; font-weight: 600; }

/* ---------- Star badge ---------- */
.star-badge { display: inline-flex; gap: 2px; }
.star-badge.size-sm { font-size: 18px; }
.star-badge.size-lg { font-size: 36px; }
.star-on { color: #fbbf24; text-shadow: 0 0 8px rgba(251, 191, 36, 0.6); }
.star-off { color: rgba(148, 163, 184, 0.3); }

/* ---------- Quiz ---------- */
.quiz-screen {
  max-width: 760px;
  margin: 0 auto;
  padding: 16px;
  padding-bottom: 40px;
}
.quiz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 16px;
  position: relative;
  z-index: 5;
}
.quiz-progress, .quiz-card, .resume-banner, .streak-badge {
  position: relative;
  z-index: 3;
}
.quiz-header + * { position: relative; z-index: 2; }
.quiz-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  color: white;
  font-family: 'Fredoka', sans-serif;
}
.quiz-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.progress-bar {
  flex: 1;
  height: 14px;
  background: rgba(15, 23, 42, 0.7);
  border-radius: 7px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent, #22d3ee), #a78bfa);
  transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-radius: 7px;
}
.progress-label {
  font-size: 13px;
  color: #cbd5e1;
  font-weight: 700;
  white-space: nowrap;
}

.quiz-card {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  border: 2px solid rgba(99, 102, 241, 0.25);
  border-radius: 24px;
  padding: 20px;
  position: relative;
}
.quiz-card.shake { animation: shake 0.5s; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}
.q-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 12px;
}
.level-badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.level-facil { background: rgba(74, 222, 128, 0.15); color: #4ade80; }
.level-mediana { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.level-dificil { background: rgba(248, 113, 113, 0.15); color: #f87171; }
.level-premium { background: rgba(244, 114, 182, 0.18); color: #f472b6; }
.q-id { font-family: 'Fredoka', sans-serif; font-weight: 600; color: #64748b; }

.q-prompt {
  font-size: 20px;
  color: white;
  line-height: 1.4;
  margin-bottom: 18px;
  text-wrap: pretty;
}

.options { display: flex; flex-direction: column; gap: 10px; }
.options.multi { display: grid; gap: 10px; }
@media (min-width: 600px) {
  .options.multi { grid-template-columns: 1fr 1fr; }
}
.option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  color: #e2e8f0;
  text-align: left;
  font-size: 16px;
  font-weight: 600;
  transition: all .15s;
  min-height: 56px;
}
.option:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent, #22d3ee);
  transform: translateX(4px);
}
.option.selected {
  background: rgba(34, 211, 238, 0.18);
  border-color: var(--accent, #22d3ee);
}
.option.correct {
  background: rgba(74, 222, 128, 0.2);
  border-color: #4ade80;
  color: #d1fae5;
  animation: pop 0.4s;
}
.option.wrong {
  background: rgba(248, 113, 113, 0.2);
  border-color: #f87171;
  color: #fee2e2;
}
@keyframes pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.04); }
  100% { transform: scale(1); }
}
.opt-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  flex-shrink: 0;
}
.opt-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}
.option.selected .opt-check { background: #22d3ee; color: #0f172a; }
.option.correct .opt-check { background: #4ade80; color: #052e16; }
.opt-text { flex: 1; }

/* V/F */
.vf-list { display: flex; flex-direction: column; gap: 10px; }
.vf-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
}
.vf-row.correct { background: rgba(74, 222, 128, 0.12); border-color: #4ade80; }
.vf-row.wrong { background: rgba(248, 113, 113, 0.12); border-color: #f87171; }
.vf-text { flex: 1; font-size: 15px; color: #e2e8f0; }
.vf-buttons { display: flex; gap: 6px; }
.vf-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: white;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 18px;
  transition: all .12s;
}
.vf-btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.12); }
.vf-btn.sel { background: #22d3ee; color: #0f172a; border-color: #22d3ee; }
.vf-btn.right { box-shadow: 0 0 0 3px #4ade80; }

.multi-area { display: flex; flex-direction: column; gap: 10px; }
.multi-hint {
  font-size: 13px;
  color: #cbd5e1;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 12px;
  padding: 8px 12px;
}

.feedback {
  margin-top: 18px;
  padding: 16px;
  border-radius: 18px;
  position: relative;
  overflow: hidden;
  animation: slideUp 0.3s;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.feedback.good {
  background: rgba(74, 222, 128, 0.12);
  border: 2px solid #4ade80;
}
.feedback.bad {
  background: rgba(251, 113, 133, 0.12);
  border: 2px solid #fb7185;
}
.feedback-head { display: flex; gap: 12px; align-items: flex-start; }
.feedback-head strong { display: block; font-family: 'Fredoka', sans-serif; font-size: 18px; color: white; margin-bottom: 4px; }
.feedback-head p { margin: 0; color: #e2e8f0; font-size: 15px; line-height: 1.5; }
.feedback-head .learn-block { margin-top: 6px; padding: 10px 12px; background: rgba(255,255,255,0.06); border-left: 3px solid #fbbf24; border-radius: 8px; }
.feedback-head .study-tip { margin-top: 8px; font-size: 14px; color: #fcd34d; }

.quiz-actions {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}
.quiz-actions .btn-primary { width: 100%; }

/* ---------- Confetti ---------- */
.confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.confetti-piece {
  position: absolute;
  top: -10px;
  width: 8px;
  height: 14px;
  border-radius: 2px;
  animation: confetti-fall linear forwards;
}
@keyframes confetti-fall {
  to { transform: translateY(120vh) rotate(720deg); opacity: 0; }
}

/* ---------- Summary ---------- */
.summary-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
}
.summary-card {
  position: relative;
  z-index: 2;
  background: rgba(15, 23, 42, 0.9);
  border: 3px solid var(--accent, #22d3ee);
  border-radius: 28px;
  padding: 28px;
  text-align: center;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 60px rgba(34, 211, 238, 0.2);
}
.summary-icon { font-size: 80px; animation: float 3s infinite; }
.summary-card h2 {
  font-size: 28px;
  background: linear-gradient(135deg, #fbbf24, #fb7185);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 8px 0;
}
.summary-msg { font-size: 18px; margin: 8px 0; font-weight: 700; }
.summary-msg.great { color: #fbbf24; }
.summary-msg.good { color: #4ade80; }
.summary-msg.ok { color: #22d3ee; }
.summary-msg.low { color: #f87171; }
.big-stars { display: flex; justify-content: center; gap: 8px; margin: 20px 0; }
.big-star {
  font-size: 64px;
  transition: all .3s;
}
.big-star.on {
  color: #fbbf24;
  text-shadow: 0 0 30px rgba(251, 191, 36, 0.8);
  animation: starPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.big-star.off { color: rgba(148, 163, 184, 0.3); }
@keyframes starPop {
  0% { transform: scale(0); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}
.score-line {
  font-size: 18px;
  color: #cbd5e1;
  margin: 12px 0 20px;
}
.score-line strong { color: white; font-family: 'Fredoka', sans-serif; }
.summary-actions { display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 480px) {
  .summary-actions { flex-direction: row; }
  .summary-actions > * { flex: 1; }
}

/* ---------- Share dialog ---------- */
.screen-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 23, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}
.share-dialog {
  background: rgba(15, 23, 42, 0.95);
  border: 3px solid #fbbf24;
  border-radius: 28px;
  padding: 28px;
  text-align: center;
  max-width: 460px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 60px rgba(251, 191, 36, 0.3);
  animation: zoomIn 0.3s;
}
@keyframes zoomIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.share-icon { font-size: 64px; }
.share-dialog h2 {
  font-size: 24px;
  color: white;
  margin: 8px 0;
}
.share-dialog p { color: #cbd5e1; margin: 8px 0; font-size: 15px; }
.share-stars { display: flex; justify-content: center; gap: 4px; margin: 12px 0; }
.share-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}
@media (min-width: 480px) {
  .share-actions { flex-direction: row; }
  .share-actions > * { flex: 1; }
}

/* ---------- Nav Header (shared across secondary screens) ---------- */
.nav-header {
  position: sticky;
  top: 12px;
  z-index: 20;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(12px);
  border: 2px solid rgba(99, 102, 241, 0.35);
  border-radius: 20px;
  padding: 10px 12px;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.nav-back { white-space: nowrap; }
.nav-title {
  font-family: 'Fredoka', sans-serif;
  font-size: 20px;
  color: white;
  margin: 0;
  flex: 1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-tabs {
  display: flex;
  gap: 4px;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 14px;
  padding: 4px;
}
.nav-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: transparent;
  border: none;
  padding: 8px 4px;
  border-radius: 10px;
  color: #94a3b8;
  font-weight: 700;
  font-size: 11px;
  font-family: 'Fredoka', sans-serif;
  transition: all .15s;
  min-width: 0;
}
.nav-tab:hover { background: rgba(255,255,255,0.06); color: #e2e8f0; }
.nav-tab.active {
  background: linear-gradient(135deg, #22d3ee, #6366f1);
  color: white;
  box-shadow: 0 4px 12px rgba(34, 211, 238, 0.3);
}
.nav-tab .nt-icon { font-size: 20px; line-height: 1; }
.nav-tab .nt-label { font-size: 11px; line-height: 1; }
@media (max-width: 480px) {
  .nav-title { font-size: 16px; }
  .nav-tab .nt-label { font-size: 10px; }
  .nav-tab .nt-icon { font-size: 18px; }
}

/* ---------- Glossary / Mural / Trophies ---------- */
.glossary-screen, .mural-screen, .trophies-screen, .videos-screen {
  max-width: 800px;
  margin: 0 auto;
  padding: 16px;
  padding-bottom: 40px;
  position: relative;
  z-index: 2;
}
.glossary-list, .search-box, .mural-list, .video-list,
.empty-mural, .empty-videos, .empty,
.trophy-hero, .badges-grid, .missions-progress,
.video-form, .videos-sub, .mural-sub,
.section-title, .add-video-btn {
  position: relative;
  z-index: 2;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
  border: 2px solid rgba(99, 102, 241, 0.3);
  border-radius: 18px;
  padding: 12px 16px;
  position: sticky;
  top: 12px;
  z-index: 10;
}
.modal-header h2 {
  font-size: 22px;
  color: white;
}
.search-box { margin-bottom: 16px; }
.search-box input {
  width: 100%;
  padding: 14px 18px;
  border-radius: 16px;
  border: 2px solid rgba(99, 102, 241, 0.3);
  background: rgba(15, 23, 42, 0.7);
  color: white;
  font-size: 16px;
  font-family: inherit;
  outline: none;
}
.search-box input:focus { border-color: #22d3ee; }
.glossary-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 700px) {
  .glossary-list { grid-template-columns: 1fr 1fr; }
}
.glossary-item {
  background: rgba(15, 23, 42, 0.7);
  border: 2px solid rgba(99, 102, 241, 0.2);
  border-radius: 16px;
  padding: 14px 16px;
  transition: border-color .15s;
}
.glossary-item:hover { border-color: #22d3ee; }
.glossary-item h4 {
  font-size: 17px;
  color: #fbbf24;
  font-family: 'Fredoka', sans-serif;
  margin-bottom: 4px;
}
.glossary-item p { margin: 0; font-size: 14px; color: #cbd5e1; line-height: 1.5; }
.empty {
  text-align: center;
  padding: 40px 20px;
  color: #94a3b8;
}

.mural-sub { color: #94a3b8; margin: 0 0 16px; font-size: 14px; }
.empty-mural {
  text-align: center;
  padding: 40px 20px;
  color: #94a3b8;
}
.empty-mural .big-emoji { font-size: 64px; margin-bottom: 8px; }
.empty-mural .hint { font-size: 13px; color: #64748b; }
.mural-list { display: flex; flex-direction: column; gap: 10px; }
.mural-card {
  display: flex;
  gap: 12px;
  background: rgba(15, 23, 42, 0.7);
  border: 2px solid;
  border-radius: 18px;
  padding: 14px;
  align-items: flex-start;
}
.mural-body { flex: 1; }
.mural-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.mural-head strong { color: white; font-family: 'Fredoka', sans-serif; font-size: 17px; }
.mural-time { font-size: 12px; color: #64748b; }
.mural-msg { color: #cbd5e1; font-size: 14px; margin-bottom: 6px; }
.mural-msg strong { color: #fbbf24; }
.mural-stars {
  display: flex;
  align-items: center;
  gap: 12px;
}
.mural-score { font-size: 13px; color: #94a3b8; font-weight: 600; }

.trophy-hero {
  text-align: center;
  background: rgba(15, 23, 42, 0.7);
  border: 2px solid rgba(251, 191, 36, 0.3);
  border-radius: 22px;
  padding: 20px;
  margin-bottom: 20px;
}
.trophy-hero h3 {
  font-size: 26px;
  color: white;
  margin-top: 8px;
}
.trophy-hero p { color: #94a3b8; margin: 4px 0 12px; }
.trophy-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
}
.trophy-stats > div {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.trophy-stats strong {
  font-family: 'Fredoka', sans-serif;
  font-size: 24px;
  color: #fbbf24;
}
.trophy-stats span { font-size: 12px; color: #94a3b8; }

.section-title {
  font-size: 18px;
  color: white;
  margin: 16px 0 12px;
}
.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
.badge-card {
  background: rgba(15, 23, 42, 0.7);
  border: 2px solid rgba(99, 102, 241, 0.2);
  border-radius: 18px;
  padding: 14px 10px;
  text-align: center;
  transition: transform .15s;
}
.badge-card.earned {
  border-color: #fbbf24;
  background: rgba(251, 191, 36, 0.08);
}
.badge-card.earned:hover { transform: translateY(-4px) rotate(-2deg); }
.badge-card.locked { opacity: 0.55; }
.badge-icon { font-size: 36px; margin-bottom: 4px; }
.badge-card strong {
  display: block;
  font-family: 'Fredoka', sans-serif;
  font-size: 14px;
  color: white;
  margin-bottom: 4px;
}
.badge-card p {
  margin: 0;
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.4;
}

.missions-progress {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mission-progress-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 14px;
  padding: 10px 14px;
}
.mp-icon { font-size: 22px; }
.mp-title { flex: 1; color: white; font-weight: 600; }

/* ---------- New: kind tabs ---------- */
.kind-tabs {
  display: flex;
  gap: 6px;
  margin: 8px 0 12px;
  flex-wrap: wrap;
}
.kind-tab {
  flex: 1;
  min-width: 80px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.05);
  border: 2px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  color: #cbd5e1;
  font-weight: 700;
  font-size: 13px;
  transition: all .15s;
}
.kind-tab:hover { background: rgba(255,255,255,0.12); }
.kind-tab.active {
  background: linear-gradient(135deg, #22d3ee, #6366f1);
  color: white;
  border-color: transparent;
}
.chip-arrow {
  margin-left: auto;
  font-size: 24px;
  color: #22d3ee;
  font-weight: 900;
}

/* ---------- Avatar bubble (topbar) ---------- */
.avatar-bubble {
  position: relative;
  background: linear-gradient(135deg, #22d3ee 0%, #a78bfa 100%);
  border-radius: 50%;
  padding: 3px;
  animation: avatar-pulse 3s ease-in-out infinite;
}
@keyframes avatar-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(34, 211, 238, 0); }
}

/* ---------- Mission card progress ---------- */
.mini-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 10px;
}
.mini-bar {
  flex: 1;
  height: 8px;
  background: rgba(15,23,42,0.6);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
}
.mini-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.mini-count {
  font-size: 12px;
  color: #cbd5e1;
  font-weight: 700;
  font-family: 'Fredoka', sans-serif;
  min-width: 36px;
  text-align: right;
}
.cta {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent, #22d3ee);
  font-family: 'Fredoka', sans-serif;
}
.cta-resume { color: #fbbf24; animation: pulse-text 1.6s ease-in-out infinite; }
.cta-done { color: #4ade80; }
@keyframes pulse-text {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
.mission-card.in-progress {
  border-color: #fbbf24;
  box-shadow: 0 0 0 1px rgba(251,191,36,0.3), 0 12px 24px rgba(0,0,0,0.3);
}
.completed-ribbon {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #4ade80;
  color: #052e16;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 18px;
  z-index: 3;
  box-shadow: 0 4px 12px rgba(74, 222, 128, 0.5);
}
.progress-pill {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: #fbbf24;
  color: #0f172a;
  border-radius: 999px;
  padding: 4px 10px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 12px;
  z-index: 3;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.5);
}
.lock-emoji { font-size: 48px; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5)); }

/* override: remove the old ::after check (now using .completed-ribbon) */
.mission-card.completed::after { content: none; }

/* ---------- Quiz polish ---------- */
.btn-ghost.small { padding: 8px 14px; font-size: 14px; min-height: 38px; }
.qt-icon { font-size: 24px; }
.resume-banner {
  background: linear-gradient(90deg, #fbbf24, #f97316);
  color: #0f172a;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 12px;
  margin-bottom: 12px;
  text-align: center;
  animation: slideDown 0.4s;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.progress-bar.tall {
  height: 22px;
  position: relative;
  overflow: visible;
}
.progress-bar.tall .progress-fill {
  border-radius: 11px;
  position: relative;
  overflow: hidden;
}
.progress-bar.tall .progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.4) 50%,
    rgba(255,255,255,0) 100%);
  animation: shimmer 2s linear infinite;
}
@keyframes shimmer {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}
.progress-rocket {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 22px;
  transition: left 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.8));
}

.streak-badge {
  display: inline-block;
  background: linear-gradient(135deg, #f97316, #fb7185);
  color: white;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  margin-bottom: 12px;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
  animation: streak-bounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes streak-bounce {
  0% { transform: scale(0); }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.quiz-card.glow-good {
  box-shadow: 0 0 40px rgba(74, 222, 128, 0.4), 0 0 0 2px #4ade80;
  animation: glow-pulse 0.6s;
}
@keyframes glow-pulse {
  0% { box-shadow: 0 0 0 rgba(74, 222, 128, 0); }
  50% { box-shadow: 0 0 60px rgba(74, 222, 128, 0.6), 0 0 0 4px #4ade80; }
  100% { box-shadow: 0 0 40px rgba(74, 222, 128, 0.4), 0 0 0 2px #4ade80; }
}

.q-number {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  color: var(--accent, #22d3ee);
  font-size: 14px;
}

.opt-badge {
  margin-left: auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #4ade80;
  color: #052e16;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}
.opt-badge.wrong { background: #f87171; color: #450a0a; }

/* Bigger confetti pieces / shapes */
.confetti-piece.shape-circle { border-radius: 50%; }
.confetti-piece.shape-star {
  width: 18px;
  height: 18px;
  background: transparent !important;
  font-size: 18px;
  text-align: center;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
}
.confetti.big .confetti-piece {
  width: 12px;
  height: 18px;
}

/* Celebration burst */
.celebration-burst {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 200;
  animation: burst-fade 1.4s forwards;
}
.burst-emoji {
  font-size: 120px;
  animation: burst-pop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.4));
}
.burst-text {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 56px;
  background: linear-gradient(135deg, #fbbf24, #fb7185, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 20px rgba(255,255,255,0.4);
  animation: burst-pop 0.8s 0.1s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
  letter-spacing: 0.04em;
}
@keyframes burst-pop {
  0% { transform: scale(0) rotate(-12deg); opacity: 0; }
  70% { transform: scale(1.15) rotate(2deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
@keyframes burst-fade {
  0%, 70% { opacity: 1; }
  100% { opacity: 0; }
}

/* Shooting stars */
.shooting-star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 0 6px white, -10px 0 30px 1px white;
  animation: shoot 8s linear infinite;
  opacity: 0;
}
.shooting-star.ss1 {
  top: 20%; left: -10%;
  animation-delay: 0s;
}
.shooting-star.ss2 {
  top: 60%; left: -10%;
  animation-delay: 4s;
}
@keyframes shoot {
  0% { transform: translate(0, 0); opacity: 0; }
  5% { opacity: 1; }
  20% { transform: translate(120vw, 30vh); opacity: 0; }
  100% { transform: translate(120vw, 30vh); opacity: 0; }
}

/* ---------- Videos screen ---------- */
.videos-screen {
  max-width: 800px;
  margin: 0 auto;
  padding: 16px;
  padding-bottom: 40px;
}
.videos-sub { color: #94a3b8; margin: 0 0 16px; font-size: 14px; }
.add-video-btn { width: 100%; margin-bottom: 16px; }

.video-form {
  background: rgba(15, 23, 42, 0.85);
  border: 2px solid rgba(99, 102, 241, 0.3);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.video-form h4 { color: white; font-size: 18px; }
.video-form label { display: flex; flex-direction: column; gap: 6px; color: #cbd5e1; font-weight: 600; font-size: 14px; }
.video-form input {
  padding: 12px 14px;
  border-radius: 12px;
  border: 2px solid rgba(99,102,241,0.3);
  background: rgba(15,23,42,0.7);
  color: white;
  font-size: 15px;
  font-family: inherit;
  outline: none;
}
.video-form input:focus { border-color: #22d3ee; }

.empty-videos {
  text-align: center;
  padding: 40px 20px;
  color: #94a3b8;
}
.empty-videos .big-emoji { font-size: 64px; margin-bottom: 8px; }

.video-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.video-card {
  background: rgba(15, 23, 42, 0.75);
  border: 2px solid rgba(99, 102, 241, 0.25);
  border-radius: 18px;
  overflow: hidden;
  transition: border-color .15s;
}
.video-card:hover { border-color: #22d3ee; }
.video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0f172a;
  cursor: pointer;
  overflow: hidden;
}
.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.video-thumb:hover img { transform: scale(1.05); }
.thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  background: linear-gradient(135deg, #6366f1, #a855f7);
}
.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  color: white;
  background: rgba(0,0,0,0.3);
  text-shadow: 0 4px 16px rgba(0,0,0,0.6);
  transition: background .2s;
}
.video-thumb:hover .play-overlay { background: rgba(0,0,0,0.5); }

.video-embed {
  aspect-ratio: 16 / 9;
  background: #000;
}
.video-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
}
.video-meta { padding: 14px 16px; }
.video-meta h4 { color: white; font-size: 17px; margin-bottom: 4px; }
.video-meta p { color: #94a3b8; font-size: 14px; margin: 0 0 10px; }
.video-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.video-actions a, .video-actions button {
  text-decoration: none;
  flex: 1;
  min-width: 100px;
  text-align: center;
}
.btn-ghost.danger { color: #fb7185; border-color: rgba(251, 113, 133, 0.4); }
.btn-ghost.danger:hover { background: rgba(251, 113, 133, 0.15); }

/* ---------- Admin mode ---------- */
.admin-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: linear-gradient(90deg, rgba(251,191,36,0.2), rgba(249,115,22,0.2));
  border: 2px solid #fbbf24;
  border-radius: 14px;
  padding: 10px 14px;
  margin-bottom: 12px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  color: #fbbf24;
  font-size: 14px;
  position: relative;
  z-index: 2;
}
.admin-footer {
  display: flex;
  justify-content: center;
  margin-top: 24px;
  position: relative;
  z-index: 2;
}
.admin-trigger {
  background: rgba(255,255,255,0.04);
  border: 1px dashed rgba(255,255,255,0.15);
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  font-family: 'Fredoka', sans-serif;
  transition: all .15s;
  cursor: pointer;
}
.admin-trigger:hover {
  background: rgba(99,102,241,0.1);
  border-color: rgba(99,102,241,0.3);
  color: #a78bfa;
}
.admin-dialog {
  background: rgba(15, 23, 42, 0.95);
  border: 3px solid #a78bfa;
  border-radius: 24px;
  padding: 28px;
  text-align: center;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 60px rgba(167,139,250,0.3);
  animation: zoomIn 0.3s;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.admin-dialog .big-emoji { font-size: 56px; }
.admin-dialog h2 { font-size: 22px; color: white; margin: 0; }
.admin-dialog p { color: #cbd5e1; margin: 0; }
.admin-dialog input[type="password"] {
  padding: 14px 18px;
  border-radius: 14px;
  border: 2px solid rgba(167,139,250,0.4);
  background: rgba(15,23,42,0.7);
  color: white;
  font-size: 17px;
  font-family: inherit;
  text-align: center;
  letter-spacing: 0.2em;
  outline: none;
}
.admin-dialog input[type="password"]:focus { border-color: #22d3ee; }
.admin-dialog .form-actions { margin-top: 4px; }
.admin-dialog .form-actions button { flex: 1; }
.video-form input[type="file"] {
  padding: 10px;
  background: rgba(15,23,42,0.6);
  border: 2px dashed rgba(99,102,241,0.4);
  border-radius: 12px;
  color: #cbd5e1;
  cursor: pointer;
}
.video-form input[type="file"]::file-selector-button {
  background: linear-gradient(135deg, #22d3ee, #6366f1);
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  margin-right: 10px;
  cursor: pointer;
}
.file-info {
  margin-top: 6px;
  font-size: 13px;
  color: #4ade80;
  font-weight: 600;
}
.muted { color: #94a3b8; font-weight: 400; }
.muted.small { font-size: 12px; }
.video-thumb { position: relative; }
.kind-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(15,23,42,0.85);
  color: white;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  font-family: 'Fredoka', sans-serif;
  letter-spacing: 0.04em;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.15);
  z-index: 2;
}
.kind-pill.yt { background: rgba(220, 38, 38, 0.85); border-color: rgba(255,255,255,0.2); }

/* ---------- Exit confirmation dialog ---------- */
.exit-dialog {
  background: rgba(15, 23, 42, 0.95);
  border: 3px solid #22d3ee;
  border-radius: 24px;
  padding: 28px;
  text-align: center;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 60px rgba(34,211,238,0.3);
  animation: zoomIn 0.3s;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.exit-dialog .big-emoji {
  font-size: 64px;
  animation: float 2s ease-in-out infinite;
}
.exit-dialog h2 {
  font-size: 24px;
  color: white;
  margin: 0;
}
.exit-dialog p {
  color: #cbd5e1;
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
}
.exit-dialog p strong { color: #fbbf24; }
.exit-progress {
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.3);
  border-radius: 14px;
  padding: 12px 16px;
}
.ep-label {
  font-size: 12px;
  color: #94a3b8;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.ep-bar {
  height: 12px;
  background: rgba(15,23,42,0.7);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
}
.ep-fill {
  height: 100%;
  background: linear-gradient(90deg, #22d3ee, #a78bfa);
  border-radius: 6px;
  transition: width 0.4s;
}
.ep-count {
  margin-top: 6px;
  color: white;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 14px;
}
.exit-dialog .form-actions {
  flex-direction: column;
}
.exit-dialog .form-actions button { width: 100%; }
@media (min-width: 480px) {
  .exit-dialog .form-actions { flex-direction: row; }
  .exit-dialog .form-actions button { flex: 1; }
}

/* ---------- Summary v2 (Epic Celebration) ---------- */
.summary-screen.v2 {
  display: block;
  padding: 16px;
  padding-bottom: 60px;
  align-items: unset;
  justify-content: unset;
}
.summary-stack {
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.summary-hero {
  position: relative;
  background: radial-gradient(ellipse at top, rgba(99,102,241,0.35), rgba(15,23,42,0.9) 70%);
  border: 3px solid var(--accent, #22d3ee);
  border-radius: 28px;
  padding: 28px 20px 24px;
  text-align: center;
  box-shadow: 0 0 80px rgba(34,211,238,0.25), 0 20px 60px rgba(0,0,0,0.5);
  overflow: hidden;
}
.summary-hero::before {
  content: '';
  position: absolute;
  inset: -50%;
  background:
    radial-gradient(circle at 20% 30%, rgba(251,191,36,0.15) 0%, transparent 35%),
    radial-gradient(circle at 80% 70%, rgba(244,114,182,0.15) 0%, transparent 35%);
  animation: hero-rotate 18s linear infinite;
  pointer-events: none;
}
@keyframes hero-rotate {
  from { transform: rotate(0); }
  to { transform: rotate(360deg); }
}
.hero-emoji-ring {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ring-orbit {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px dashed rgba(251,191,36,0.5);
  animation: orbit-spin 12s linear infinite;
}
.ring-orbit.r2 {
  inset: 14px;
  border-color: rgba(244,114,182,0.4);
  animation-duration: 8s;
  animation-direction: reverse;
}
@keyframes orbit-spin {
  from { transform: rotate(0); }
  to { transform: rotate(360deg); }
}
.hero-emoji {
  font-size: 90px;
  filter: drop-shadow(0 0 20px rgba(251,191,36,0.6));
  animation: hero-bounce 1.4s cubic-bezier(0.34, 1.56, 0.64, 1) infinite;
  position: relative;
  z-index: 2;
}
@keyframes hero-bounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-10px) scale(1.05); }
}
.hero-title {
  font-family: 'Fredoka', sans-serif;
  font-size: 38px;
  font-weight: 700;
  margin: 8px 0 4px;
  letter-spacing: 0.02em;
  position: relative;
  z-index: 2;
}
.hero-title.great {
  background: linear-gradient(135deg, #fbbf24, #fb7185, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 30px rgba(251,191,36,0.4);
}
.hero-title.good { color: #4ade80; text-shadow: 0 0 20px rgba(74,222,128,0.5); }
.hero-title.ok { color: #22d3ee; text-shadow: 0 0 20px rgba(34,211,238,0.5); }
.hero-title.low { color: #fb7185; text-shadow: 0 0 20px rgba(251,113,133,0.4); }
.hero-sub {
  color: #e2e8f0;
  font-size: 16px;
  margin: 0 0 12px;
  font-weight: 600;
  position: relative;
  z-index: 2;
}
.hero-mission-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 6px 14px;
  border-radius: 999px;
  color: white;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 16px;
  position: relative;
  z-index: 2;
}
.hero-mission-tag .mt-icon { font-size: 20px; }
.big-stars-v2 {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 8px 0 4px;
  position: relative;
  z-index: 2;
}
.new-best-tag {
  display: inline-block;
  margin-top: 12px;
  background: linear-gradient(90deg, #fbbf24, #f97316, #fb7185);
  color: white;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 16px;
  box-shadow: 0 6px 20px rgba(249,115,22,0.5);
  animation: best-pulse 1.6s ease-in-out infinite;
  position: relative;
  z-index: 2;
}
@keyframes best-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 6px 20px rgba(249,115,22,0.5); }
  50% { transform: scale(1.06); box-shadow: 0 8px 30px rgba(249,115,22,0.8); }
}

.attempts-hint {
  display: inline-block;
  margin-top: 10px;
  background: rgba(255,255,255,0.08);
  border: 1px dashed rgba(255,255,255,0.25);
  color: #fde68a;
  font-family: 'Fredoka', sans-serif;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 999px;
  position: relative;
  z-index: 2;
}

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (min-width: 600px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
}
.stat-tile {
  background: rgba(15,23,42,0.85);
  border: 2px solid rgba(99,102,241,0.3);
  border-radius: 18px;
  padding: 14px 10px;
  text-align: center;
  transition: transform .15s;
}
.stat-tile.good {
  border-color: #4ade80;
  background: rgba(74,222,128,0.08);
}
.stat-tile:hover { transform: translateY(-3px); }
.stat-emoji { font-size: 32px; margin-bottom: 4px; }
.stat-num {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 26px;
  color: white;
  line-height: 1;
}
.stat-of { font-size: 14px; color: #94a3b8; font-weight: 500; }
.stat-label {
  font-size: 12px;
  color: #cbd5e1;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 4px;
}

/* Unlock card */
.unlock-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, rgba(251,191,36,0.18), rgba(249,115,22,0.18));
  border: 2px solid #fbbf24;
  border-radius: 20px;
  padding: 14px 18px;
  box-shadow: 0 0 40px rgba(251,191,36,0.3);
  animation: unlock-glow 2s ease-in-out infinite;
}
@keyframes unlock-glow {
  0%, 100% { box-shadow: 0 0 30px rgba(251,191,36,0.3); }
  50% { box-shadow: 0 0 60px rgba(251,191,36,0.6); }
}
.unlock-spark { font-size: 32px; animation: float 2s ease-in-out infinite; }
.unlock-label {
  font-size: 12px;
  color: #fbbf24;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.unlock-mission {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}
.unlock-mission .um-icon { font-size: 28px; }
.unlock-mission strong {
  font-family: 'Fredoka', sans-serif;
  font-size: 18px;
  color: white;
}

/* Path card */
.path-card {
  background: rgba(15,23,42,0.85);
  border: 2px solid rgba(99,102,241,0.3);
  border-radius: 20px;
  padding: 16px;
}
.path-title {
  font-size: 16px;
  color: white;
  margin: 0 0 12px;
  font-family: 'Fredoka', sans-serif;
}
.path-row {
  display: flex;
  gap: 6px;
  justify-content: space-between;
  align-items: center;
  overflow-x: auto;
}
.path-node {
  flex: 1;
  min-width: 60px;
  background: rgba(255,255,255,0.04);
  border: 2px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 8px 4px;
  text-align: center;
  transition: all .2s;
}
.path-node.done {
  background: rgba(74,222,128,0.1);
  border-color: rgba(74,222,128,0.4);
}
.path-node.current {
  background: linear-gradient(135deg, rgba(251,191,36,0.25), rgba(244,114,182,0.25));
  border-color: #fbbf24;
  transform: scale(1.08);
  box-shadow: 0 0 20px rgba(251,191,36,0.5);
}
.path-icon { font-size: 26px; margin-bottom: 2px; }
.path-stars { font-size: 11px; }
.path-stars .mini-on { color: #fbbf24; }
.path-stars .mini-off { color: rgba(148,163,184,0.3); }

/* Actions */
.summary-actions-v2 {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
@media (min-width: 600px) {
  .summary-actions-v2 { flex-direction: row; }
  .summary-actions-v2 > * { flex: 1; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 28px; }
  .hero-emoji { font-size: 72px; }
  .hero-emoji-ring { width: 120px; height: 120px; }
  .stat-num { font-size: 22px; }
  .stat-emoji { font-size: 26px; }
  .path-node { min-width: 50px; }
  .path-icon { font-size: 22px; }
}

/* ---------- Mobile tweaks ---------- */
@media (max-width: 480px) {
  .topbar { flex-wrap: wrap; }
  .topbar-right { flex: 1; justify-content: flex-end; }
  .hud { grid-template-columns: 1fr; }
  .map-title h2 { font-size: 26px; }
  .login-logo h1 { font-size: 28px; }
  .q-prompt { font-size: 18px; }
  .summary-card h2 { font-size: 22px; }
  .big-star { font-size: 48px; }
  .login-card { padding: 20px; }
  .avatar-grid { grid-template-columns: 1fr 1fr; }
}
