/* ========================================
   BRAIN ROT QUEST — Premium CSS
   Grade 12 | Ms. Amira Tarek
   ======================================== */

/* ---------- ROOT VARIABLES ---------- */
:root {
  --bg-dark: #0a0a1a;
  --bg-mid: #0d0d2b;
  --accent1: #7c3aed;   /* purple */
  --accent2: #06b6d4;   /* cyan */
  --accent3: #f59e0b;   /* amber */
  --accent4: #10b981;   /* green */
  --accent5: #ef4444;   /* red */
  --glass-bg: rgba(255,255,255,0.05);
  --glass-border: rgba(255,255,255,0.12);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --shadow-glow: 0 0 30px rgba(124,58,237,0.4);
  --radius: 16px;
  --transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

#particleCanvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ---------- SCREENS ---------- */
.screen {
  display: none;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}
.screen.active { display: block; }
.screen.hidden { display: none !important; }
.hidden { display: none !important; }

/* ---------- GLASS CARD ---------- */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius);
}

/* ======================================
   HOME SCREEN
   ====================================== */
.home-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1rem;
  gap: 1.5rem;
}

.logo-area {
  text-align: center;
  animation: fadeInDown 0.8s ease;
}

.brain-icon-animated {
  font-size: 5rem;
  display: inline-block;
  animation: brainPulse 2s ease-in-out infinite;
  filter: drop-shadow(0 0 20px #7c3aed);
}

@keyframes brainPulse {
  0%,100% { transform: scale(1) rotate(-5deg); }
  50% { transform: scale(1.1) rotate(5deg); }
}

.game-title {
  font-family: 'Orbitron', monospace;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 30px rgba(124,58,237,0.8);
  letter-spacing: 4px;
  margin-top: 0.5rem;
}

.highlight {
  background: linear-gradient(135deg, #7c3aed, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.game-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-top: 0.5rem;
  letter-spacing: 1px;
}

.entry-card {
  width: 100%;
  max-width: 480px;
  padding: 2.5rem 2rem;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.entry-heading {
  font-family: 'Orbitron', monospace;
  font-size: 1.3rem;
  color: var(--accent2);
  margin-bottom: 0.4rem;
}

.entry-sub {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.name-input {
  width: 100%;
  padding: 1rem 1.2rem;
  background: rgba(255,255,255,0.08);
  border: 2px solid rgba(124,58,237,0.4);
  border-radius: 12px;
  color: #fff;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  transition: var(--transition);
  outline: none;
}
.name-input:focus {
  border-color: var(--accent1);
  box-shadow: 0 0 20px rgba(124,58,237,0.3);
}
.name-input::placeholder { color: var(--text-muted); }

.avatar-section { margin-top: 1.5rem; }
.avatar-label {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.avatar-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.5rem;
}
.avatar-option {
  font-size: 1.5rem;
  text-align: center;
  padding: 0.5rem;
  border-radius: 12px;
  cursor: pointer;
  border: 2px solid transparent;
  background: rgba(255,255,255,0.05);
  transition: var(--transition);
}
.avatar-option:hover { transform: scale(1.15); background: rgba(124,58,237,0.2); }
.avatar-option.selected {
  border-color: var(--accent1);
  background: rgba(124,58,237,0.3);
  box-shadow: 0 0 15px rgba(124,58,237,0.5);
}

.btn-start {
  width: 100%;
  margin-top: 1.5rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #7c3aed, #06b6d4);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-family: 'Orbitron', monospace;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.btn-start::after {
  content: '';
  position: absolute;
  top: -50%; left: -60%;
  width: 40%; height: 200%;
  background: rgba(255,255,255,0.15);
  transform: skewX(-25deg);
  animation: shimmer 3s infinite;
}
@keyframes shimmer {
  0% { left: -60%; }
  100% { left: 120%; }
}
.btn-start:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(124,58,237,0.5);
}

.error-msg {
  margin-top: 0.75rem;
  color: var(--accent5);
  font-size: 0.9rem;
  text-align: center;
}

.teacher-link-home {
  animation: fadeInUp 0.8s ease 0.4s both;
}
.teacher-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  transition: var(--transition);
}
.teacher-link-btn:hover { color: #fff; background: rgba(255,255,255,0.12); }

/* ======================================
   XP BAR
   ====================================== */
.xp-bar-container {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: rgba(10,10,26,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.xp-bar-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
}
.avatar-display { font-size: 1.3rem; }
.xp-track {
  flex: 1;
  height: 8px;
  background: rgba(255,255,255,0.1);
  border-radius: 99px;
  overflow: hidden;
}
.xp-fill {
  height: 100%;
  background: linear-gradient(90deg, #7c3aed, #06b6d4);
  border-radius: 99px;
  transition: width 0.8s ease;
}
#xpStudentName { font-weight: 600; color: #fff; white-space: nowrap; }
#xpLabel { color: var(--accent2); white-space: nowrap; font-weight: 600; }

/* ======================================
   NOTIFICATION BELL
   ====================================== */
.notif-bell {
  position: fixed;
  top: 12px; right: 16px;
  z-index: 200;
  background: var(--accent1);
  color: #fff;
  width: 42px; height: 42px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  box-shadow: 0 0 20px rgba(124,58,237,0.5);
  transition: var(--transition);
}
.notif-bell:hover { transform: scale(1.1); }
.notif-count {
  position: absolute;
  top: -4px; right: -4px;
  background: var(--accent5);
  color: #fff;
  font-size: 0.65rem;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.notif-panel {
  position: fixed;
  top: 60px; right: 16px;
  width: 320px;
  background: #1a1a3e;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  z-index: 200;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  max-height: 400px;
  overflow-y: auto;
}
.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.notif-header h3 { font-size: 1rem; }
.notif-header button {
  background: none; border: none; color: var(--text-secondary);
  cursor: pointer; font-size: 1rem;
}
.notif-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 0.85rem;
}
.notif-item:last-child { border-bottom: none; }
.notif-item strong { color: var(--accent2); }

/* ======================================
   WORLD MAP
   ====================================== */
.map-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 6rem 1rem 3rem;
}
.map-header {
  text-align: center;
  margin-bottom: 2.5rem;
  animation: fadeInDown 0.6s ease;
}
.map-title {
  font-family: 'Orbitron', monospace;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 900;
}
.map-sub { color: var(--text-secondary); margin-top: 0.5rem; font-size: 1rem; }
.map-sub span { color: var(--accent2); font-weight: 600; }

.missions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.mission-card {
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
  animation: fadeInUp 0.5s ease both;
}
.mission-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: inherit;
  opacity: 0.1;
  border-radius: var(--radius);
}
.mission-card:hover:not(.locked) {
  transform: translateY(-6px) scale(1.03);
  box-shadow: var(--shadow-glow);
}
.mission-card.locked {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.6);
}
.mission-card.completed {
  border-color: var(--accent4);
  box-shadow: 0 0 20px rgba(16,185,129,0.2);
}

.mission-icon { font-size: 2.5rem; margin-bottom: 0.75rem; display: block; }
.mission-label {
  font-family: 'Orbitron', monospace;
  font-size: 0.7rem;
  letter-spacing: 1px;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}
.mission-name {
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}
.mission-xp {
  font-size: 0.8rem;
  color: var(--accent3);
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.mission-progress-bar {
  height: 5px;
  background: rgba(255,255,255,0.1);
  border-radius: 99px;
  overflow: hidden;
}
.mission-progress-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.8s ease;
}
.lock-icon {
  position: absolute;
  top: 0.75rem; right: 0.75rem;
  font-size: 1rem;
  opacity: 0.5;
}

/* LEVEL COLORS */
.level-1 { background: linear-gradient(135deg, rgba(124,58,237,0.25), rgba(124,58,237,0.05)); border-color: rgba(124,58,237,0.5); }
.level-2 { background: linear-gradient(135deg, rgba(6,182,212,0.25), rgba(6,182,212,0.05)); border-color: rgba(6,182,212,0.5); }
.level-3 { background: linear-gradient(135deg, rgba(245,158,11,0.25), rgba(245,158,11,0.05)); border-color: rgba(245,158,11,0.5); }
.level-4 { background: linear-gradient(135deg, rgba(16,185,129,0.25), rgba(16,185,129,0.05)); border-color: rgba(16,185,129,0.5); }
.level-5 { background: linear-gradient(135deg, rgba(239,68,68,0.25), rgba(239,68,68,0.05)); border-color: rgba(239,68,68,0.5); }

.fill-1 { background: #7c3aed; }
.fill-2 { background: #06b6d4; }
.fill-3 { background: #f59e0b; }
.fill-4 { background: #10b981; }
.fill-5 { background: #ef4444; }

/* MAP BOTTOM PANELS */
.map-bottom-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}
@media (max-width: 600px) {
  .map-bottom-panels { grid-template-columns: 1fr; }
}

.leaderboard-panel, .badges-panel {
  padding: 1.25rem;
}
.leaderboard-panel h3, .badges-panel h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
  font-family: 'Orbitron', monospace;
  color: var(--accent3);
}

.leaderboard-list { display: flex; flex-direction: column; gap: 0.5rem; }
.lb-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  font-size: 0.85rem;
  transition: var(--transition);
}
.lb-item:hover { background: rgba(255,255,255,0.08); }
.lb-rank {
  font-family: 'Orbitron', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}
.lb-rank.gold { color: #fbbf24; }
.lb-rank.silver { color: #d1d5db; }
.lb-rank.bronze { color: #d97706; }
.lb-avatar { font-size: 1.1rem; }
.lb-name { flex: 1; font-weight: 500; }
.lb-score { color: var(--accent2); font-weight: 700; }
.lb-dots { display: flex; gap: 2px; }
.lb-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
}
.lb-dot.done { background: var(--accent4); }

.badges-display { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.badge-chip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 99px;
  font-size: 0.8rem;
  transition: var(--transition);
}
.badge-chip:hover { background: rgba(255,255,255,0.12); }
.badge-chip.earned { border-color: var(--accent3); color: var(--accent3); }

/* ======================================
   LEVEL SCREEN
   ====================================== */
.level-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 5.5rem 1rem 3rem;
}

.level-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  animation: fadeInDown 0.5s ease;
}
.btn-back {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text-secondary);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: var(--transition);
}
.btn-back:hover { color: #fff; background: rgba(255,255,255,0.15); }
.level-title-area { flex: 1; }
.level-num {
  font-family: 'Orbitron', monospace;
  font-size: 0.75rem;
  color: var(--text-secondary);
  letter-spacing: 2px;
  text-transform: uppercase;
}
.level-title {
  font-family: 'Orbitron', monospace;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 700;
}
.level-score-display {
  font-family: 'Orbitron', monospace;
  font-size: 1rem;
  color: var(--accent3);
  text-align: right;
}

/* PROGRESS STEPS (5E indicator) */
.step-dots {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  margin-bottom: 1.5rem;
  animation: fadeIn 0.5s ease 0.2s both;
}
.step-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  transition: var(--transition);
}
.step-dot.active { background: var(--accent2); box-shadow: 0 0 10px var(--accent2); }
.step-dot.done { background: var(--accent4); }
.step-line {
  flex: 1;
  height: 2px;
  background: rgba(255,255,255,0.1);
}

/* INFO CARD */
.info-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.5s ease 0.1s both;
}
.info-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: var(--accent2);
}
.info-card p {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.95rem;
}

/* STAT CARDS ROW */
.stat-cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
  animation: fadeInUp 0.5s ease 0.15s both;
}
.stat-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 1.2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}
.stat-card:hover { transform: translateY(-4px); }
.stat-card-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.stat-card-value {
  font-family: 'Orbitron', monospace;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.stat-card-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.stat-card-bar {
  position: absolute;
  bottom: 0; left: 0;
  height: 4px;
  border-radius: 0 0 var(--radius) var(--radius);
  transition: width 1s ease;
}

/* QUIZ SECTION */
.quiz-container { animation: fadeInUp 0.5s ease 0.2s both; }
.quiz-progress {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.quiz-progress-bar {
  height: 5px;
  background: rgba(255,255,255,0.1);
  border-radius: 99px;
  margin-bottom: 1.5rem;
  overflow: hidden;
}
.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #7c3aed, #06b6d4);
  border-radius: 99px;
  transition: width 0.5s ease;
}

.question-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 1rem;
}
.question-number {
  font-size: 0.75rem;
  color: var(--accent2);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.75rem;
}
.question-text {
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
@media (max-width: 500px) { .options-grid { grid-template-columns: 1fr; } }

.option-btn {
  padding: 0.85rem 1rem;
  background: rgba(255,255,255,0.06);
  border: 2px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 0.9rem;
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Inter', sans-serif;
}
.option-btn:hover:not(:disabled) {
  background: rgba(124,58,237,0.2);
  border-color: var(--accent1);
  transform: translateX(4px);
}
.option-btn:disabled { cursor: not-allowed; }

/* CORRECT / WRONG feedback */
.option-btn.correct {
  background: rgba(16,185,129,0.25) !important;
  border-color: #10b981 !important;
  color: #fff !important;
  box-shadow: 0 0 20px rgba(16,185,129,0.4) !important;
  transform: scale(1.02) !important;
}
.option-btn.wrong {
  background: rgba(239,68,68,0.25) !important;
  border-color: #ef4444 !important;
  color: #fff !important;
  box-shadow: 0 0 20px rgba(239,68,68,0.3) !important;
}
.option-btn.correct::after {
  content: ' ✅';
  margin-left: auto;
  flex-shrink: 0;
}
.option-btn.wrong::after {
  content: ' ❌';
  margin-left: auto;
  flex-shrink: 0;
}
.option-letter {
  font-family: 'Orbitron', monospace;
  font-size: 0.75rem;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--accent2);
}

/* FEEDBACK BOX */
.feedback-box {
  padding: 1rem 1.25rem;
  border-radius: 10px;
  margin-top: 1rem;
  font-size: 0.9rem;
  line-height: 1.5;
  animation: slideIn 0.3s ease;
  border-left: 4px solid;
}
.feedback-box.correct-fb {
  background: rgba(16,185,129,0.12);
  border-color: #10b981;
  color: #6ee7b7;
}
.feedback-box.wrong-fb {
  background: rgba(239,68,68,0.12);
  border-color: #ef4444;
  color: #fca5a5;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.btn-next-q {
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #7c3aed, #06b6d4);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-family: 'Orbitron', monospace;
  font-size: 0.85rem;
  letter-spacing: 1px;
  cursor: pointer;
  transition: var(--transition);
}
.btn-next-q:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(124,58,237,0.4); }

/* SCENARIO CARDS */
.scenario-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  animation: fadeInUp 0.5s ease both;
}
.scenario-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.scenario-title {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  color: var(--accent2);
}
.scenario-text {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.scenario-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag {
  padding: 0.25rem 0.6rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(239,68,68,0.15);
  color: #fca5a5;
  border: 1px solid rgba(239,68,68,0.3);
}
.tag.positive {
  background: rgba(16,185,129,0.15);
  color: #6ee7b7;
  border-color: rgba(16,185,129,0.3);
}

/* DRAG AND DROP */
.drag-instructions {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  animation: fadeIn 0.5s ease;
}

.drag-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  min-height: 60px;
  animation: fadeInUp 0.5s ease 0.1s both;
}
.drag-item {
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.07);
  border: 2px dashed rgba(255,255,255,0.2);
  border-radius: 10px;
  cursor: grab;
  font-size: 0.85rem;
  text-align: center;
  transition: var(--transition);
  user-select: none;
}
.drag-item:hover { background: rgba(124,58,237,0.2); border-color: var(--accent1); }
.drag-item.dragging { opacity: 0.4; transform: scale(0.95); }
.drag-item.placed { display: none; }

.drop-zones {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  animation: fadeInUp 0.5s ease 0.2s both;
}
@media (max-width: 500px) { .drop-zones { grid-template-columns: 1fr; } }

.drop-zone {
  min-height: 180px;
  border-radius: var(--radius);
  padding: 1rem;
  border: 2px dashed;
  transition: var(--transition);
}
.drop-zone.rot-zone {
  background: rgba(239,68,68,0.07);
  border-color: rgba(239,68,68,0.3);
}
.drop-zone.healthy-zone {
  background: rgba(16,185,129,0.07);
  border-color: rgba(16,185,129,0.3);
}
.drop-zone.drag-over {
  background: rgba(124,58,237,0.15) !important;
  border-color: var(--accent1) !important;
  box-shadow: 0 0 20px rgba(124,58,237,0.3);
}
.drop-zone-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.drop-zone-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 60px;
}
.dropped-item {
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.07);
}
.dropped-item:hover { background: rgba(255,255,255,0.12); }
.dropped-item.correct { background: rgba(16,185,129,0.2); border-color: #10b981; color: #6ee7b7; }
.dropped-item.wrong { background: rgba(239,68,68,0.2); border-color: #ef4444; color: #fca5a5; }

.btn-check-drop {
  margin-top: 1.25rem;
  padding: 0.85rem 1.75rem;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-family: 'Orbitron', monospace;
  font-size: 0.9rem;
  letter-spacing: 1px;
  cursor: pointer;
  transition: var(--transition);
  display: block;
  width: 100%;
}
.btn-check-drop:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(245,158,11,0.4); }

/* MATCHING GAME */
.matching-instruction {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  animation: fadeIn 0.5s ease;
}
.matching-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  animation: fadeInUp 0.5s ease 0.1s both;
}
@media (max-width: 500px) { .matching-container { grid-template-columns: 1fr; } }

.match-col { display: flex; flex-direction: column; gap: 0.6rem; }
.match-col-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
  font-weight: 600;
}
.match-item {
  padding: 0.9rem 1rem;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.87rem;
  line-height: 1.4;
  transition: var(--transition);
  border: 2px solid;
}
.match-strategy {
  background: rgba(124,58,237,0.1);
  border-color: rgba(124,58,237,0.35);
  color: #c4b5fd;
}
.match-definition {
  background: rgba(6,182,212,0.1);
  border-color: rgba(6,182,212,0.35);
  color: #67e8f9;
}
.match-item:hover:not(.matched):not(.wrong-match) {
  transform: translateX(4px);
  filter: brightness(1.15);
}
.match-item.selected {
  border-color: var(--accent3) !important;
  background: rgba(245,158,11,0.15) !important;
  box-shadow: 0 0 15px rgba(245,158,11,0.3);
}
.match-item.matched {
  background: rgba(16,185,129,0.2) !important;
  border-color: #10b981 !important;
  color: #6ee7b7 !important;
  cursor: default;
}
.match-item.matched::after { content: ' ✅'; }
.match-item.wrong-match {
  animation: shake 0.4s ease;
  border-color: #ef4444 !important;
  background: rgba(239,68,68,0.15) !important;
}
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%,60% { transform: translateX(-6px); }
  40%,80% { transform: translateX(6px); }
}

.match-count {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-align: center;
}

/* PEER CHALLENGES & FEEDBACK */
.peer-section {
  margin-top: 2rem;
  animation: fadeInUp 0.5s ease both;
}
.peer-section h3 {
  font-family: 'Orbitron', monospace;
  font-size: 1rem;
  color: var(--accent3);
  margin-bottom: 1.25rem;
}
.peer-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.peer-card h4 {
  margin-bottom: 1rem;
  color: var(--accent2);
  font-size: 0.95rem;
}
.peer-input {
  width: 100%;
  padding: 0.85rem 1rem;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  outline: none;
  transition: var(--transition);
}
.peer-input:focus { border-color: var(--accent2); }

.peer-select {
  width: 100%;
  padding: 0.85rem 1rem;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  outline: none;
  cursor: pointer;
  appearance: none;
}
.peer-select option { background: #1a1a3e; }

.star-rating { display: flex; gap: 0.5rem; margin-bottom: 0.75rem; }
.star-btn {
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
  background: none;
  border: none;
  padding: 0;
  filter: grayscale(1);
}
.star-btn:hover, .star-btn.active { filter: grayscale(0); transform: scale(1.2); }

.btn-submit-peer {
  padding: 0.7rem 1.5rem;
  background: linear-gradient(135deg, #7c3aed, #06b6d4);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-family: 'Orbitron', monospace;
  font-size: 0.8rem;
  letter-spacing: 1px;
  cursor: pointer;
  transition: var(--transition);
}
.btn-submit-peer:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(124,58,237,0.4); }

/* VR SCENE PLANNER */
.vr-planner {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  animation: fadeInUp 0.5s ease 0.2s both;
}
.vr-planner h3 {
  font-family: 'Orbitron', monospace;
  font-size: 1rem;
  color: var(--accent3);
  margin-bottom: 1rem;
}
.theme-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
@media (max-width: 500px) { .theme-grid { grid-template-columns: 1fr; } }

.theme-option {
  padding: 1rem;
  text-align: center;
  background: rgba(255,255,255,0.04);
  border: 2px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.85rem;
}
.theme-option:hover { background: rgba(124,58,237,0.15); border-color: var(--accent1); }
.theme-option.selected { background: rgba(124,58,237,0.25); border-color: var(--accent1); box-shadow: 0 0 15px rgba(124,58,237,0.3); }
.theme-option-icon { font-size: 1.5rem; margin-bottom: 0.4rem; }
.theme-option-name { font-weight: 600; color: #fff; }

.trigger-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.25rem; }
.trigger-tag {
  padding: 0.4rem 0.85rem;
  border-radius: 99px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
}
.trigger-tag:hover { border-color: var(--accent2); color: var(--accent2); }
.trigger-tag.selected { background: rgba(6,182,212,0.15); border-color: var(--accent2); color: var(--accent2); }

.vr-textarea {
  width: 100%;
  padding: 1rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  resize: vertical;
  min-height: 100px;
  outline: none;
  transition: var(--transition);
}
.vr-textarea:focus { border-color: var(--accent2); }

/* ======================================
   LEVEL COMPLETE SCREEN
   ====================================== */
.complete-container {
  max-width: 520px;
  margin: 0 auto;
  padding: 3rem 2rem;
  text-align: center;
  margin-top: 10vh;
}
.star-burst {
  font-size: 3rem;
  margin-bottom: 1rem;
  animation: starBurst 0.6s ease;
}
@keyframes starBurst {
  0% { transform: scale(0) rotate(-30deg); }
  60% { transform: scale(1.2) rotate(5deg); }
  100% { transform: scale(1) rotate(0); }
}
.complete-title {
  font-family: 'Orbitron', monospace;
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: 0.75rem;
}
.complete-msg {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}
.complete-score-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
}
.score-ring {
  width: 110px;
  height: 110px;
  position: relative;
  flex-shrink: 0;
}
.score-ring svg {
  width: 100%; height: 100%;
  transform: rotate(-90deg);
}
.ring-bg { fill: none; stroke: rgba(255,255,255,0.08); stroke-width: 10; }
.ring-fill {
  fill: none;
  stroke: url(#ringGrad);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 339.3;
  stroke-dashoffset: 339.3;
  transition: stroke-dashoffset 1.2s ease;
}
.score-text {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Orbitron', monospace;
  font-size: 1.2rem;
  font-weight: 700;
}
.complete-stats { text-align: left; }
.stat-row {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.stat-row:last-child { border-bottom: none; }
.stat-label { color: var(--text-secondary); font-size: 0.9rem; }
.stat-val { font-weight: 700; color: var(--accent2); font-size: 0.9rem; }

.new-badges-area {
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
}
.new-badges-area h4 { color: var(--accent3); margin-bottom: 0.5rem; font-size: 0.9rem; }
.new-badge-items { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }

.complete-btns { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }
.btn-next {
  padding: 0.85rem 1.75rem;
  background: linear-gradient(135deg, #7c3aed, #06b6d4);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-family: 'Orbitron', monospace;
  font-size: 0.85rem;
  letter-spacing: 1px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-next:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(124,58,237,0.5); }
.btn-next.btn-secondary { background: rgba(255,255,255,0.1); }
.btn-next.btn-secondary:hover { background: rgba(255,255,255,0.18); }

/* CONFETTI */
.confetti-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 999;
}

/* TOASTS */
.toast-container {
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 320px;
}
.toast {
  padding: 0.9rem 1.25rem;
  border-radius: 10px;
  background: #1a1a3e;
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 0.88rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  animation: toastIn 0.4s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.toast.success { border-color: rgba(16,185,129,0.4); }
.toast.error { border-color: rgba(239,68,68,0.4); }
.toast.info { border-color: rgba(6,182,212,0.4); }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(40px); }
}

/* ANIMATIONS */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* SCROLLBAR */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: rgba(255,255,255,0.03); }
::-webkit-scrollbar-thumb { background: rgba(124,58,237,0.4); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(124,58,237,0.6); }

/* RESPONSIVE */
@media (max-width: 640px) {
  .entry-card { padding: 1.75rem 1.25rem; }
  .avatar-grid { grid-template-columns: repeat(4, 1fr); }
  .map-container { padding: 5rem 0.75rem 2rem; }
  .level-container { padding: 5rem 0.75rem 2rem; }
}
