/* ==========================================================================
   KUIS ADAPTIF INFORMATIKA - SMK MUHAMMADIYAH 1 PADANG
   Modern Educational + Gamification + Professional Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --font-primary: 'Outfit', 'Plus Jakarta Sans', sans-serif;
  
  /* Color Palette - Deep Dark Tech & Gamified Accents */
  --bg-dark: #0b0f19;
  --bg-darker: #070a12;
  --bg-card: #131b2e;
  --bg-card-hover: #1c2742;
  --bg-card-glass: rgba(19, 27, 46, 0.85);
  --bg-sidebar: #0e1626;
  --bg-topbar: rgba(14, 22, 38, 0.9);
  
  /* Primary & Accent Tones */
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.4);
  --primary-light: rgba(99, 102, 241, 0.15);
  
  --secondary: #8b5cf6;
  --secondary-glow: rgba(139, 92, 246, 0.4);
  
  --accent-cyan: #06b6d4;
  --accent-cyan-light: rgba(6, 182, 212, 0.15);
  
  --accent-emerald: #10b981;
  --accent-emerald-light: rgba(16, 185, 129, 0.15);
  
  --accent-amber: #f59e0b;
  --accent-amber-light: rgba(245, 158, 11, 0.15);
  
  --accent-rose: #f43f5e;
  --accent-rose-light: rgba(244, 63, 94, 0.15);
  
  /* Text */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  /* Borders */
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(99, 102, 241, 0.35);
  --border-amber-glow: rgba(245, 158, 11, 0.4);
  
  /* Radius */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 20px -3px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 30px -5px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.25);
  --shadow-gold: 0 0 25px rgba(245, 158, 11, 0.3);
  
  /* Transition */
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-primary);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: #818cf8;
}

/* Layout Grid */
.app-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* Sidebar */
.app-sidebar {
  width: 280px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 110;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
}

.sidebar-header {
  padding: 22px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(14, 22, 38, 0.6);
}

.sidebar-logo-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  box-shadow: var(--shadow-glow);
  flex-shrink: 0;
}

.sidebar-brand h3 {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
  letter-spacing: -0.2px;
}

.sidebar-brand span {
  font-size: 11px;
  color: var(--accent-cyan);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-top: 2px;
}

.sidebar-nav {
  padding: 16px 14px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.nav-section-title {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 12px 14px 6px;
  letter-spacing: 1px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 13.5px;
  transition: var(--transition);
  position: relative;
}

.nav-link i {
  font-size: 17px;
  width: 22px;
  text-align: center;
  color: var(--text-dim);
  transition: var(--transition);
}

.nav-link:hover {
  background-color: var(--primary-light);
  color: var(--text-main);
  transform: translateX(4px);
}

.nav-link:hover i {
  color: var(--primary);
}

.nav-link.active {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.28), rgba(99, 102, 241, 0.05));
  border-left: 3px solid var(--primary);
  color: #fff;
  font-weight: 700;
}

.nav-link.active i {
  color: #818cf8;
}

.sidebar-footer {
  padding: 16px 18px;
  border-top: 1px solid var(--border-color);
  background-color: rgba(11, 15, 25, 0.7);
}

/* Sidebar Backdrop for Mobile */
.sidebar-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 105;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.sidebar-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

/* Main Content Area */
.app-main {
  margin-left: 280px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.05), transparent 40%),
              radial-gradient(circle at bottom left, rgba(6, 182, 212, 0.03), transparent 30%);
}

/* Top Navbar */
.app-navbar {
  height: 72px;
  background-color: var(--bg-topbar);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 90;
  backdrop-filter: blur(12px);
}

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

.navbar-toggle-btn {
  display: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: var(--transition);
}

.navbar-toggle-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.navbar-title h2 {
  font-size: 19px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.3px;
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: 18px;
}

.user-badge-stats {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 700;
  border: 1px solid transparent;
  transition: var(--transition);
}

.stat-pill.points {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
}

.stat-pill.badges {
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.12);
  border-color: rgba(6, 182, 212, 0.3);
}

.stat-pill.level {
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.3);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent-cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  color: #fff;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.3);
  flex-shrink: 0;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-info .name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.user-info .role {
  font-size: 11px;
  color: var(--text-muted);
}

/* Page Body Container */
.page-content {
  padding: 28px;
  flex: 1;
}

/* Alert Components */
.alert {
  padding: 14px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.alert-success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.alert-error, .alert-danger {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #fb7185;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fcd34d;
}

/* Cards & Grid Systems */
.grid-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.04), transparent 70%);
  pointer-events: none;
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.stat-icon.indigo { background: linear-gradient(135deg, #6366f1, #4f46e5); box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35); }
.stat-icon.emerald { background: linear-gradient(135deg, #10b981, #059669); box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35); }
.stat-icon.amber { background: linear-gradient(135deg, #f59e0b, #d97706); box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35); }
.stat-icon.rose { background: linear-gradient(135deg, #f43f5e, #e11d48); box-shadow: 0 4px 15px rgba(244, 63, 94, 0.35); }
.stat-icon.cyan { background: linear-gradient(135deg, #06b6d4, #0891b2); box-shadow: 0 4px 15px rgba(6, 182, 212, 0.35); }
.stat-icon.purple { background: linear-gradient(135deg, #a855f7, #7e22ce); box-shadow: 0 4px 15px rgba(168, 85, 247, 0.35); }

.stat-details {
  display: flex;
  flex-direction: column;
}

.stat-details .value {
  font-size: 26px;
  font-weight: 900;
  color: var(--text-main);
  line-height: 1.1;
  letter-spacing: -0.5px;
}

.stat-details .label {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 4px;
}

/* Card General */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

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

.card-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.2px;
}

/* Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}

.table th {
  padding: 13px 16px;
  background-color: rgba(11, 15, 25, 0.6);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border-bottom: 1px solid var(--border-color);
}

.table td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  vertical-align: middle;
}

.table tbody tr {
  transition: var(--transition);
}

.table tbody tr:hover {
  background-color: var(--bg-card-hover);
}

/* Badges & Tags */
.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 700;
}

.badge-tag.mudah, .badge-tag.c1, .badge-tag.c2 {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.badge-tag.sedang, .badge-tag.c3, .badge-tag.c4 {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.badge-tag.sulit, .badge-tag.c5, .badge-tag.c6 {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.35);
}

.badge-tag.primary {
  background: var(--primary-light);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.35);
}

.badge-tag.cyan {
  background: var(--accent-cyan-light);
  color: #67e8f9;
  border: 1px solid rgba(6, 182, 212, 0.35);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 13.5px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-primary);
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #fff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
  color: #fff;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  transform: translateY(-1px);
}

.btn-danger {
  background: linear-gradient(135deg, var(--accent-rose), #e11d48);
  color: #fff;
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.3);
}

.btn-danger:hover {
  opacity: 0.95;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(244, 63, 94, 0.45);
}

.btn-warning {
  background: linear-gradient(135deg, var(--accent-amber), #d97706);
  color: #fff;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

.btn-warning:hover {
  opacity: 0.95;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.45);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.btn-md {
  padding: 10px 20px;
  font-size: 13.5px;
  border-radius: var(--radius-md);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 15.5px;
  border-radius: var(--radius-lg);
  font-weight: 800;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.form-control, .form-select {
  width: 100%;
  padding: 12px 16px;
  background-color: rgba(11, 15, 25, 0.85);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 13.5px;
  font-family: var(--font-primary);
  transition: var(--transition);
}

.form-control:focus, .form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
  background-color: rgba(14, 22, 38, 0.95);
}

.form-text {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ==========================================================================
   GAMIFICATION COMPONENTS (Student Dashboard)
   ========================================================================== */

/* Gamification Hero Banner */
.gamified-hero-banner {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95)),
              radial-gradient(circle at top right, rgba(99, 102, 241, 0.35), transparent 60%);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-xl);
  padding: 32px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-glow);
  position: relative;
  overflow: hidden;
}

.gamified-hero-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 60%);
  pointer-events: none;
  animation: pulseGlow 8s infinite alternate;
}

@keyframes pulseGlow {
  0% { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(1.1); opacity: 1; }
}

.gamified-level-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.85), rgba(14, 22, 38, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.gamified-level-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 140px;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.08));
  pointer-events: none;
}

.level-badge-large {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.xp-progress-wrapper {
  margin-top: 18px;
}

.xp-progress-bar {
  width: 100%;
  height: 12px;
  background: rgba(11, 15, 25, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.xp-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #06b6d4, #10b981);
  border-radius: var(--radius-full);
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.xp-progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmerBar 2.5s infinite;
}

@keyframes shimmerBar {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Mission Checklist Card */
.mission-checklist {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mission-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: rgba(11, 15, 25, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.mission-item:hover {
  background: var(--bg-card-hover);
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateX(4px);
}

.mission-checkbox {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.mission-checkbox.completed {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.mission-checkbox.pending {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
  border: 1px dashed var(--border-color);
}

/* Podium Leaderboard Top 3 */
.podium-container {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 16px;
  padding: 24px 10px 10px;
  margin-bottom: 24px;
}

.podium-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  max-width: 140px;
}

.podium-avatar-wrapper {
  position: relative;
  margin-bottom: 10px;
}

.podium-crown {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 18px;
}

.podium-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  color: #fff;
  border: 3px solid transparent;
}

.podium-step.first .podium-avatar {
  width: 64px;
  height: 64px;
  border-color: #fbbf24;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
}

.podium-step.second .podium-avatar {
  border-color: #94a3b8;
  background: linear-gradient(135deg, #64748b, #475569);
  box-shadow: 0 0 15px rgba(148, 163, 184, 0.35);
}

.podium-step.third .podium-avatar {
  border-color: #b45309;
  background: linear-gradient(135deg, #9a3412, #7c2d12);
  box-shadow: 0 0 15px rgba(180, 83, 9, 0.35);
}

.podium-pillar {
  width: 100%;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 6px;
}

.podium-step.first .podium-pillar {
  height: 105px;
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.25), rgba(245, 158, 11, 0.05));
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.podium-step.second .podium-pillar {
  height: 80px;
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.2), rgba(148, 163, 184, 0.05));
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.podium-step.third .podium-pillar {
  height: 65px;
  background: linear-gradient(180deg, rgba(180, 83, 9, 0.2), rgba(180, 83, 9, 0.05));
  border: 1px solid rgba(180, 83, 9, 0.3);
}

/* Badges Grid Showcase */
.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 20px;
}

.badge-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transition: var(--transition);
  position: relative;
  box-shadow: var(--shadow-sm);
}

.badge-card.unlocked {
  border-color: rgba(245, 158, 11, 0.45);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(245, 158, 11, 0.08));
  box-shadow: var(--shadow-gold);
}

.badge-card.unlocked:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.4);
}

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

.badge-card.locked:hover {
  opacity: 0.6;
}

.badge-card-icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: #fff;
  margin-bottom: 6px;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4);
}

.badge-card.locked .badge-card-icon {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
  box-shadow: none;
}

.badge-card-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
}

.badge-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
}

/* ==========================================================================
   IMMERSIVE FULLSCREEN QUIZ INTERFACE
   ========================================================================== */

.quiz-immersive-container {
  min-height: 100vh;
  width: 100vw;
  background-color: var(--bg-dark);
  background-image: radial-gradient(circle at top center, rgba(99, 102, 241, 0.12), transparent 50%),
                    radial-gradient(circle at bottom center, rgba(6, 182, 212, 0.08), transparent 40%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  position: relative;
}

.quiz-fullscreen-card {
  width: 100%;
  max-width: 860px;
  background: var(--bg-card-glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-xl);
  padding: 36px 40px;
  box-shadow: var(--shadow-glow), 0 25px 50px rgba(0, 0, 0, 0.6);
  position: relative;
  z-index: 10;
  transition: var(--transition);
}

.quiz-top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-color);
  gap: 16px;
  flex-wrap: wrap;
}

.quiz-timer-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.5px;
  transition: var(--transition);
}

.quiz-timer-box.normal {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.quiz-timer-box.warning {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fbbf24;
}

.quiz-timer-box.danger {
  background: rgba(244, 63, 94, 0.25);
  border: 1px solid rgba(244, 63, 94, 0.6);
  color: #f43f5e;
  animation: pulseDanger 1.2s infinite;
}

@keyframes pulseDanger {
  0% { transform: scale(1); box-shadow: 0 0 0 rgba(244, 63, 94, 0); }
  50% { transform: scale(1.03); box-shadow: 0 0 16px rgba(244, 63, 94, 0.5); }
  100% { transform: scale(1); box-shadow: 0 0 0 rgba(244, 63, 94, 0); }
}

.quiz-progress-track {
  width: 100%;
  height: 10px;
  background: rgba(11, 15, 25, 0.8);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 28px;
  border: 1px solid var(--border-color);
}

.quiz-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent-cyan));
  border-radius: var(--radius-full);
  transition: width 0.45s ease;
}

.quiz-question-card {
  font-size: 19px;
  font-weight: 600;
  color: #fff;
  line-height: 1.6;
  margin-bottom: 28px;
  padding: 20px 24px;
  background: rgba(11, 15, 25, 0.5);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.options-grid-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 32px;
}

.option-select-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: rgba(11, 15, 25, 0.6);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.option-select-card:hover:not(.locked) {
  background: var(--bg-card-hover);
  border-color: var(--primary);
  transform: translateX(4px);
}

.option-select-card.locked {
  cursor: default !important;
  pointer-events: none !important;
}

.option-select-card.correct {
  background: rgba(16, 185, 129, 0.16) !important;
  border-color: #10b981 !important;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.3) !important;
  animation: answerCorrectPop 0.35s ease forwards;
}

.option-select-card.correct .option-letter-badge {
  background: #10b981 !important;
  color: #fff !important;
  border-color: transparent !important;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.6) !important;
}

.option-select-card.correct-highlight {
  background: rgba(16, 185, 129, 0.14) !important;
  border-color: #10b981 !important;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.25) !important;
}

.option-select-card.correct-highlight .option-letter-badge {
  background: #10b981 !important;
  color: #fff !important;
  border-color: transparent !important;
}

.option-select-card.incorrect {
  background: rgba(244, 63, 94, 0.16) !important;
  border-color: #f43f5e !important;
  box-shadow: 0 0 20px rgba(244, 63, 94, 0.3) !important;
  animation: answerIncorrectShake 0.4s ease forwards;
}

.option-select-card.incorrect .option-letter-badge {
  background: #f43f5e !important;
  color: #fff !important;
  border-color: transparent !important;
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.6) !important;
}

.option-select-card.dimmed {
  opacity: 0.35;
  filter: grayscale(30%);
}

.option-status-icon {
  margin-left: auto;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Animations */
@keyframes answerCorrectPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

@keyframes answerIncorrectShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

/* Center-Screen Quiz Feedback Overlay */
.center-feedback-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(5, 8, 18, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.center-feedback-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.center-feedback-modal {
  width: 100%;
  max-width: 440px;
  background: rgba(19, 27, 46, 0.96);
  border-radius: 28px;
  padding: 40px 32px;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  transform: scale(0.65);
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.center-feedback-overlay.show .center-feedback-modal {
  transform: scale(1);
  opacity: 1;
}

/* Correct State */
.center-feedback-modal.correct {
  border: 2px solid rgba(16, 185, 129, 0.6);
  box-shadow: 0 0 50px rgba(16, 185, 129, 0.35), 0 25px 60px rgba(0, 0, 0, 0.8);
}

/* Incorrect State */
.center-feedback-modal.incorrect {
  border: 2px solid rgba(244, 63, 94, 0.6);
  box-shadow: 0 0 50px rgba(244, 63, 94, 0.35), 0 25px 60px rgba(0, 0, 0, 0.8);
  animation: centerShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.center-feedback-icon-wrap {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  margin: 0 auto 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  font-weight: 900;
  animation: centerIconPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.center-feedback-modal.correct .center-feedback-icon-wrap {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.6);
}

.center-feedback-modal.incorrect .center-feedback-icon-wrap {
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  color: #fff;
  box-shadow: 0 0 30px rgba(244, 63, 94, 0.6);
}

.center-feedback-title {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.center-feedback-modal.correct .center-feedback-title {
  color: #34d399;
}

.center-feedback-modal.incorrect .center-feedback-title {
  color: #fb7185;
}

.center-feedback-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

.center-feedback-xp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 900;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.2);
  border: 1.5px solid rgba(245, 158, 11, 0.5);
  padding: 8px 24px;
  border-radius: var(--radius-full);
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.35);
  animation: centerBounce 0.4s ease forwards;
}

.center-feedback-correct-answer-box {
  display: inline-block;
  padding: 12px 24px;
  background: rgba(16, 185, 129, 0.14);
  border: 1.5px solid rgba(16, 185, 129, 0.4);
  border-radius: var(--radius-md);
  font-size: 15px;
  color: #a7f3d0;
  font-weight: 800;
}

@keyframes centerIconPop {
  0% { transform: scale(0); opacity: 0; }
  70% { transform: scale(1.18); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes centerShake {
  10%, 90% { transform: translate3d(-3px, 0, 0); }
  20%, 80% { transform: translate3d(5px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
  40%, 60% { transform: translate3d(6px, 0, 0); }
}

@keyframes centerBounce {
  0% { transform: translateY(12px); opacity: 0; }
  60% { transform: translateY(-4px); opacity: 1; }
  100% { transform: translateY(0); opacity: 1; }
}

.option-select-card input[type="radio"] {
  display: none;
}

.option-letter-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  color: var(--text-muted);
  transition: var(--transition);
  flex-shrink: 0;
}

.option-select-card input[type="radio"]:checked + .option-letter-badge {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 0 14px rgba(99, 102, 241, 0.6);
}

.option-select-card:has(input[type="radio"]:checked) {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.14);
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.2);
}

.option-text-content {
  font-size: 15px;
  color: var(--text-main);
  line-height: 1.5;
}

/* Security Modal & Warning Overlays */
.security-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(10px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.security-modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.security-modal-box {
  background: var(--bg-card);
  border: 1px solid rgba(244, 63, 94, 0.5);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  max-width: 520px;
  width: 100%;
  text-align: center;
  box-shadow: 0 0 40px rgba(244, 63, 94, 0.35);
  animation: modalPop 0.3s ease-out;
}

@keyframes modalPop {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.violation-pill-counter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #fb7185;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 20px;
}

/* Loading Overlay for Question Submit */
.quiz-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(11, 15, 25, 0.75);
  backdrop-filter: blur(6px);
  z-index: 5000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.quiz-loading-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.quiz-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   RESULT PAGE & GAMIFICATION CELEBRATION
   ========================================================================== */

.result-celebration-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-xl);
  padding: 40px 30px;
  text-align: center;
  margin-bottom: 28px;
  box-shadow: var(--shadow-glow);
  position: relative;
  overflow: hidden;
}

.result-score-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.25), rgba(15, 23, 42, 0.8));
  border: 3px solid var(--primary);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.4);
  margin: 20px 0;
  animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.result-score-number {
  font-size: 54px;
  font-weight: 900;
  line-height: 1;
  color: #fff;
}

.result-performance-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-top: 10px;
}

/* ==========================================================================
   Pagination Styling (Custom & Responsive)
   ========================================================================== */
.pagination-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 18px 4px 4px 4px;
}

.pagination-wrapper.simple {
  justify-content: flex-end;
}

.pagination-info {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination-info strong {
  color: var(--text-main);
  font-weight: 600;
}

.pagination-list {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.pagination-item {
  display: inline-flex;
}

.pagination-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  user-select: none;
}

.pagination-link i {
  font-size: 12px;
}

.pagination-link:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: #fff;
  transform: translateY(-1px);
}

.pagination-item.active .pagination-link {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.pagination-item.disabled .pagination-link {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--border-color);
  color: var(--text-dim);
  transform: none;
}

.pagination-link.pagination-dots {
  background: transparent;
  border-color: transparent;
  cursor: default;
  color: var(--text-dim);
}

nav[role="navigation"] svg,
.pagination svg {
  width: 14px !important;
  height: 14px !important;
  max-width: 14px !important;
  max-height: 14px !important;
  display: inline-block;
  vertical-align: middle;
}

/* Media & Video Display in Materi */
.media-upload-section {
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 22px;
}

.media-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

.video-responsive-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  background: #000;
}

.video-responsive-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.materi-illustration-box {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  margin-bottom: 20px;
}

.materi-image-display {
  max-width: 100%;
  max-height: 420px;
  width: auto;
  height: auto;
  border-radius: var(--radius-sm);
  object-fit: contain;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  display: inline-block;
  vertical-align: middle;
}

.file-attachment-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(6, 182, 212, 0.08));
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: var(--radius-md);
  margin: 16px 0;
  transition: var(--transition);
  min-width: 0;
}

.file-attachment-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.25);
  transform: translateY(-1px);
}

.file-attachment-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.file-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--primary);
  flex-shrink: 0;
}

.file-attachment-info {
  min-width: 0;
  flex: 1;
}

.file-attachment-info h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.file-attachment-info span {
  font-size: 12px;
  color: var(--text-muted);
  display: block;
}

.lms-layout-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}

.lms-main-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.lms-sidebar-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */

@media (max-width: 1024px) {
  .lms-layout-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 992px) {
  .app-sidebar {
    transform: translateX(-100%);
  }
  .app-sidebar.show {
    transform: translateX(0);
  }
  .app-main {
    margin-left: 0;
  }
  .navbar-toggle-btn {
    display: flex;
  }
}

@media (max-width: 768px) {
  .page-content {
    padding: 18px 14px;
  }
  .app-navbar {
    padding: 0 16px;
    height: 64px;
  }
  .user-badge-stats {
    display: none;
  }
  .quiz-fullscreen-card {
    padding: 24px 18px;
  }
  .quiz-top-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .gamified-hero-banner {
    padding: 22px 18px;
  }
}
