/* Modern Glassmorphic Dark Design System for Sınav Hazırlık Platformu */
:root {
  --bg-main: #0b0f19;
  --bg-card: rgba(18, 26, 43, 0.85);
  --bg-card-hover: rgba(28, 39, 64, 0.95);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #6366f1;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --primary: #6366f1;
  --primary-glow: rgba(99, 102, 241, 0.25);
  --danger: #ef4444;
  --warning: #f59e0b;
  --success: #10b981;
  --info: #38bdf8;
  --radius: 16px;
  --radius-sm: 10px;
  --font: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  background-color: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(16, 185, 129, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(245, 158, 11, 0.05) 0%, transparent 60%);
  background-attachment: fixed;
}

/* Container */
.app-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 20px;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 28px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 0 20px var(--primary-glow);
}

.brand-text h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(to right, #ffffff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-text p {
  font-size: 13px;
  color: var(--text-secondary);
}

.header-badges {
  display: flex;
  gap: 12px;
}

.stat-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.stat-pill strong {
  color: #38bdf8;
}

/* Nav Tabs - Desktop Optimized Segmented Grid */
.nav-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 10px;
  margin-bottom: 24px;
  background: rgba(15, 23, 42, 0.6);
  padding: 8px;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
}

.tab-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: normal;
  text-align: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1.3;
}

.tab-btn:hover {
  background: var(--bg-card-hover);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.tab-btn.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(139, 92, 246, 0.2));
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 0 15px var(--primary-glow);
}

/* Tab Views */
.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

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

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.grid-5 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

/* Cards */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.card-title {
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Priority Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-red { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.4); }
.badge-orange { background: rgba(249, 115, 22, 0.2); color: #fb923c; border: 1px solid rgba(249, 115, 22, 0.4); }
.badge-yellow { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }
.badge-green { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.4); }
.badge-blue { background: rgba(56, 189, 248, 0.2); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.4); }

/* Progress bar */
.progress-container {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  margin: 10px 0;
}
.progress-bar {
  height: 100%;
  border-radius: 10px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Course Selector Bar */
.course-selector {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.course-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 10px 18px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.course-btn:hover {
  background: var(--bg-card-hover);
  color: #fff;
}

.course-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
}

/* Tables */
.table-wrapper {
  overflow-x: auto;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

table.data-table th {
  text-align: left;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
}

table.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

table.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Question List & Accordion */
.question-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 18px;
  margin-bottom: 14px;
  transition: border-color 0.2s;
}

.question-item:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.q-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.q-stem {
  font-size: 15px;
  font-weight: 600;
  color: #f1f5f9;
  line-height: 1.5;
}

.q-meta {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.q-answer-box {
  background: rgba(16, 185, 129, 0.1);
  border-left: 3px solid #10b981;
  padding: 10px 14px;
  border-radius: 0 8px 8px 0;
  font-size: 13px;
  margin-top: 10px;
  color: #a7f3d0;
}

/* Flashcard / Active Learning */
.flashcard {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.7);
  min-height: 380px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.flashcard-topic {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #818cf8;
  font-weight: 700;
  margin-bottom: 12px;
}

.flashcard-content h3 {
  font-size: 20px;
  margin-bottom: 16px;
  color: #ffffff;
}

.flashcard-body {
  font-size: 15px;
  color: #cbd5e1;
  line-height: 1.7;
}

.flashcard-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.btn {
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #ffffff;
  box-shadow: 0 4px 15px var(--primary-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-success { background: #10b981; color: #fff; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-secondary { background: rgba(255, 255, 255, 0.1); color: #e2e8f0; }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.18); }

.btn-accent {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}
.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.45);
}

.btn-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}
.btn-warning:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45);
}

/* Detailed Explanation Drawer */
.flashcard-detail-drawer {
  margin-top: 20px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 14px;
  padding: 24px;
  animation: slideDownFade 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

@keyframes slideDownFade {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.drawer-title {
  font-size: 16px;
  font-weight: 700;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 8px;
}

.drawer-section {
  margin-bottom: 14px;
  line-height: 1.65;
  font-size: 14.5px;
  color: #e2e8f0;
}

.drawer-mnemonic-box {
  background: rgba(99, 102, 241, 0.12);
  border-left: 4px solid #818cf8;
  padding: 12px 16px;
  border-radius: 0 10px 10px 0;
  margin-top: 14px;
  font-size: 13.5px;
  color: #c7d2fe;
}

.drawer-example-box {
  background: rgba(10, 15, 29, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-left: 4px solid #38bdf8;
  padding: 14px 18px;
  border-radius: 0 10px 10px 0;
  margin-top: 14px;
  font-family: 'Consolas', 'Fira Code', 'Courier New', monospace;
  font-size: 13.5px;
  color: #7dd3fc;
  white-space: pre-wrap;
  line-height: 1.6;
  overflow-x: auto;
}

.drawer-trap-box {
  background: rgba(239, 68, 68, 0.1);
  border-left: 4px solid #ef4444;
  padding: 12px 16px;
  border-radius: 0 10px 10px 0;
  margin-top: 10px;
  font-size: 13.5px;
  color: #fca5a5;
}

/* Past Exam Questions Drawer inside Active Learning */
.flashcard-past-drawer {
  margin-top: 20px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 14px;
  padding: 24px;
  animation: slideDownFade 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5);
}

.past-q-card {
  background: rgba(30, 41, 59, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 18px;
  transition: all 0.2s ease;
}

.past-q-card:hover {
  border-color: rgba(245, 158, 11, 0.3);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.past-q-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.past-q-exam-badge {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.past-q-stem {
  font-size: 15px;
  font-weight: 600;
  color: #f8fafc;
  line-height: 1.6;
  margin-bottom: 14px;
}

.past-options-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.past-opt-btn {
  width: 100%;
  text-align: left;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 14px;
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 13.5px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.past-opt-btn:hover:not(.correct):not(.wrong) {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.4);
  color: #ffffff;
  transform: translateX(4px);
}

.past-opt-letter {
  display: inline-flex;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
  flex-shrink: 0;
}

.past-opt-btn.correct {
  background: rgba(16, 185, 129, 0.2) !important;
  border-color: #10b981 !important;
  color: #34d399 !important;
  font-weight: 600;
}

.past-opt-btn.correct .past-opt-letter {
  background: #10b981 !important;
  color: #ffffff !important;
}

.past-opt-btn.wrong {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: #ef4444 !important;
  color: #fca5a5 !important;
}

.past-opt-btn.wrong .past-opt-letter {
  background: #ef4444 !important;
  color: #ffffff !important;
}

.past-q-explanation {
  background: rgba(16, 185, 129, 0.1);
  border-left: 4px solid #10b981;
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  font-size: 13px;
  color: #a7f3d0;
  line-height: 1.5;
  animation: slideDownFade 0.25s ease;
  margin-top: 10px;
}

/* Option Choices in Quiz/Mock */
.option-btn {
  width: 100%;
  text-align: left;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  margin-bottom: 10px;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 12px;
}

.option-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.option-btn.selected {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--primary);
  color: #fff;
}

.option-btn.correct {
  background: rgba(16, 185, 129, 0.25) !important;
  border-color: #10b981 !important;
  color: #a7f3d0 !important;
}

.option-btn.wrong {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: #ef4444 !important;
  color: #fca5a5 !important;
}

/* Schedule Timeline */
.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, #6366f1, #10b981, #f59e0b);
}

.timeline-item {
  position: relative;
  margin-bottom: 24px;
}

.timeline-dot {
  position: absolute;
  left: -32px;
  top: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-main);
  border: 3px solid var(--primary);
}

.timeline-time {
  font-size: 12px;
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: 4px;
}

.timeline-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.timeline-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Alert / Callout Boxes */
.alert-box {
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.alert-danger { background: rgba(239, 68, 68, 0.12); border-left: 4px solid #ef4444; color: #fecaca; }
.alert-warning { background: rgba(245, 158, 11, 0.12); border-left: 4px solid #f59e0b; color: #fef3c7; }
.alert-info { background: rgba(56, 189, 248, 0.12); border-left: 4px solid #38bdf8; color: #e0f2fe; }
.alert-success { background: rgba(16, 185, 129, 0.12); border-left: 4px solid #10b981; color: #d1fae5; }

/* Code blocks inside cards */
pre.code-block {
  background: #050811;
  padding: 14px;
  border-radius: 8px;
  font-family: 'Fira Code', monospace;
  font-size: 13px;
  color: #38bdf8;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin: 10px 0;
  overflow-x: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .header { flex-direction: column; align-items: flex-start; gap: 16px; }
  .header-badges { flex-wrap: wrap; }
  .grid-2, .grid-3, .grid-5 { grid-template-columns: 1fr; }
}

/* ==========================================================================
   🎮 GAMIFICATION HUD & PROGRESSIVE SKILL TREE STYLES
   ========================================================================== */

/* Top HUD Bar */
.gamification-hud {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: var(--radius);
  padding: 16px 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

.gamification-hud::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, #6366f1, #ec4899, #f59e0b, #10b981);
}

.hud-player-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hud-level-badge {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hud-level-badge .lv-num {
  font-size: 16px;
  line-height: 1;
  color: #fff;
}

.hud-level-badge .lv-label {
  font-size: 9px;
  text-transform: uppercase;
  color: #c7d2fe;
}

.hud-xp-block {
  min-width: 220px;
}

.hud-xp-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.hud-xp-bar-bg {
  height: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.hud-xp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #38bdf8);
  border-radius: 10px;
  transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

.hud-stats-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hud-stat-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 14px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
}

.hud-stat-pill i {
  font-size: 18px;
}

/* Tier Selector Tabs inside Active Learning & Skill Tree */
.tier-selector-container {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.tier-tab-btn {
  flex: 1;
  min-width: 200px;
  padding: 14px 18px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
}

.tier-tab-btn:hover:not(.locked) {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(99, 102, 241, 0.4);
  color: #fff;
  transform: translateY(-2px);
}

.tier-tab-btn.active {
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.15), rgba(79, 70, 229, 0.25));
  border-color: #6366f1;
  color: #fff;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.25);
}

.tier-tab-btn.locked {
  opacity: 0.5;
  cursor: not-allowed;
  border-style: dashed;
  background: rgba(15, 23, 42, 0.4);
}

.tier-icon-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: rgba(255, 255, 255, 0.08);
}

.tier-tab-btn.active .tier-icon-circle {
  background: #6366f1;
  color: #fff;
}

/* Locked Card Overlay */
.tier-locked-banner {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(15, 23, 42, 0.9));
  border: 1px dashed rgba(239, 68, 68, 0.4);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  margin-top: 20px;
}

.tier-locked-icon {
  font-size: 48px;
  color: #f87171;
  margin-bottom: 12px;
}

/* 🏆 Badges Grid */
.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.badge-card {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.2s;
}

.badge-card.unlocked {
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.12), rgba(30, 41, 59, 0.7));
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.15);
}

.badge-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.badge-card.unlocked .badge-card-icon {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}

.badge-card.locked {
  filter: grayscale(1);
  opacity: 0.5;
}

/* ⏱️ EXAM SIMULATOR STYLES */
.exam-sim-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 14px;
}

.exam-timer {
  font-size: 20px;
  font-weight: 800;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(56, 189, 248, 0.1);
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.exam-timer.warning {
  color: #f87171;
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
  animation: pulse 1s infinite;
}

.exam-q-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.palette-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.palette-btn.active {
  border-color: #6366f1;
  background: #6366f1;
  color: #fff;
}

.palette-btn.answered {
  background: rgba(16, 185, 129, 0.25);
  border-color: #10b981;
  color: #34d399;
}

.palette-btn.flagged {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.2);
}

/* Exam Score Card */
.exam-result-card {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}

.result-grade-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin: 0 auto 20px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  font-size: 28px;
  font-weight: 800;
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.4);
}

.result-grade-circle.fail {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.4);
}

/* Modal Popup & Confetti */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.2s ease;
}

.modal-box {
  background: linear-gradient(145deg, #1e293b, #0f172a);
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  animation: scaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleUp {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Floating XP Toast */
.xp-toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: linear-gradient(135deg, #6366f1, #38bdf8);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  padding: 12px 20px;
  border-radius: 30px;
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.5);
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: slideUpFade 0.3s ease;
}

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