/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Merriweather:ital,wght@0,300;0,400;0,700;1,400&display=swap');

:root {
  /* --- Palette (Deep Professional Desktop App) --- */
  --primary: #059669;
  --primary-hover: #047857;
  --primary-light: #d1fae5;
  --primary-subtle: rgba(5, 150, 105, 0.08);
  --secondary: #0f172a;
  --secondary-hover: #020617;
  --secondary-light: #1e293b;

  --accent: #f59e0b;
  --accent-light: #fef3c7;

  --danger: #ef4444;
  --danger-light: #fee2e2;

  --success: #10b981;
  --success-light: #ecfdf5;

  --info: #3b82f6;
  --info-light: #eff6ff;

  /* --- Neutrals (Desktop App Refined) --- */
  --bg-main: #f1f5f9;
  --bg-card: #ffffff;
  --bg-elevated: #ffffff;
  --bg-inset: #f8fafc;
  --bg-light: #f8fafc;
  --paper: #ffffff;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --divider: rgba(0, 0, 0, 0.06);

  --text-main: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --text-inverse: #ffffff;

  /* --- Effects (Desktop App Depth) --- */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-focus: 0 0 0 3px rgba(5, 150, 105, 0.15);
  --shadow-card-hover: 0 8px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 10px -4px rgba(0, 0, 0, 0.06);

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* --- Transitions --- */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 300ms cubic-bezier(0.34, 1.56, 0.64, 1);

  --font-serif: 'Merriweather', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  color: var(--secondary);
  font-weight: 700;
  margin-top: 0;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

h1 { font-size: 2rem; font-weight: 800; }
h2 { font-size: 1.5rem; font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }

a {
  text-decoration: none;
  color: var(--primary);
  font-weight: 500;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-hover);
}

p {
  color: var(--text-secondary);
}

/* === CONTAINER === */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* === TOP BAR === */
.top-bar {
  background: var(--secondary);
  color: rgba(255, 255, 255, 0.85);
  padding: 0.4rem 0;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar a {
  color: rgba(255, 255, 255, 0.7);
  transition: color var(--transition-fast);
}

.top-bar a:hover {
  color: white;
}

/* === MAIN NAVBAR (Desktop App Title Bar) === */
.main-navbar {
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 0;
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--transition-smooth);
}

.main-navbar:hover {
  box-shadow: var(--shadow-sm);
}

.main-navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
  position: relative;
}

.navbar-brand {
  font-family: var(--font-sans);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.navbar-brand a {
  color: inherit;
}

.navbar-menu {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav-link {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.88rem;
  padding: 0.5rem 0.85rem;
  position: relative;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

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

.nav-link.active {
  color: var(--primary);
  background: var(--primary-subtle);
  font-weight: 600;
}

.nav-link::after {
  display: none;
}

/* === NAV ACTIONS === */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* === BUTTONS (Desktop App) === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.875rem;
  font-family: var(--font-sans);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  white-space: nowrap;
  line-height: 1.4;
  position: relative;
  overflow: hidden;
}

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

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 1px 3px rgba(5, 150, 105, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border: none;
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  color: white;
  transform: translateY(-1px);
}

.btn-outline {
  background: white;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  box-shadow: var(--shadow-xs);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-subtle);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--danger);
  color: white;
  box-shadow: 0 1px 3px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: none;
}

.btn-ghost:hover {
  background: var(--bg-inset);
  color: var(--text-main);
}

.btn-block {
  display: flex;
  width: 100%;
}

/* === CARDS (Desktop App Panels) === */
.card,
.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

/* Admin cards should not transform on hover and should allow overflow for tables */
.admin-card {
  overflow: visible;
}

.card:hover {
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(5, 150, 105, 0.15);
  transform: translateY(-2px);
}

.admin-card:hover {
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(5, 150, 105, 0.15);
}

.admin-header {
  text-align: center;
  margin-bottom: 2.5rem;
  padding: 1rem 0;
}

.admin-header h1 {
  font-size: 2rem;
  margin-bottom: 0.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* === FORMS & INPUTS (Desktop App) === */
.admin-form-group,
.form-group {
  margin-bottom: 1.25rem;
}

.admin-label,
label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.85rem;
  letter-spacing: 0.01em;
}

.admin-input,
.input,
select,
textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.925rem;
  color: var(--text-main);
  background: var(--bg-card);
  transition: all var(--transition-fast);
  box-sizing: border-box;
  line-height: 1.5;
}

.admin-input:focus,
.input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--shadow-focus);
  background: white;
}

.admin-input::placeholder,
.input::placeholder {
  color: var(--text-light);
}

/* === TABLES (Desktop App Data Grid) === */
.dashboard-table-container {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.dashboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.dashboard-table thead {
  background: var(--bg-inset);
  border-bottom: 1px solid var(--border);
}

.dashboard-table th {
  padding: 0.85rem 1.25rem;
  text-align: left;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.dashboard-table td {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-main);
  vertical-align: middle;
}

.dashboard-table tr:last-child td {
  border-bottom: none;
}

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

.dashboard-table tbody tr:hover {
  background: var(--bg-inset);
}

/* Action Buttons */
.action-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: all var(--transition-fast);
  background: transparent;
  border: none;
  cursor: pointer;
}

.action-btn:hover {
  background: var(--bg-inset);
  color: var(--primary);
}

.action-btn.delete:hover {
  background: var(--danger-light);
  color: var(--danger);
}

/* === BADGES === */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.badge-primary {
  background: var(--primary-light);
  color: var(--primary);
}

.badge-danger {
  background: var(--danger-light);
  color: var(--danger);
}

.badge-success {
  background: var(--success-light);
  color: var(--success);
}

.badge-info {
  background: var(--info-light);
  color: var(--info);
}

/* === USER DROPDOWN (Desktop App) === */
.user-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.user-btn {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}

.user-btn:hover,
.user-dropdown:hover .user-btn {
  border-color: var(--primary);
  background: var(--primary-subtle);
  color: var(--primary);
}

.user-dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 0.5rem;
  background: white;
  min-width: 220px;
  box-shadow: var(--shadow-xl);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 0.4rem;
  z-index: 1000;
  animation: dropdownShow 0.15s ease-out;
}

@keyframes dropdownShow {
  from { opacity: 0; transform: translateY(-6px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.user-dropdown-content::before {
  content: '';
  position: absolute;
  top: -0.6rem;
  left: 0;
  width: 100%;
  height: 0.6rem;
  background: transparent;
}

.user-dropdown:hover .user-dropdown-content {
  display: block;
}

.user-dropdown-content a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.88rem;
  transition: all var(--transition-fast);
}

.user-dropdown-content a:hover {
  background: var(--bg-inset);
  color: var(--primary);
}

/* === ALERTS (Desktop App Notifications) === */
.alert {
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 500;
  animation: alertSlideIn 0.25s ease-out;
}

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

.alert-success {
  background: var(--success-light);
  border-color: rgba(16, 185, 129, 0.15);
  color: #065f46;
}

.alert-error,
.alert-danger {
  background: var(--danger-light);
  border-color: rgba(239, 68, 68, 0.15);
  color: #991b1b;
}

.alert-info {
  background: var(--info-light);
  border-color: rgba(59, 130, 246, 0.15);
  color: #1e40af;
}

.alert-warning {
  background: var(--accent-light);
  border-color: rgba(245, 158, 11, 0.15);
  color: #92400e;
}

/* === COURSE CARDS === */
.course-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-smooth);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.course-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(5, 150, 105, 0.2);
}

.course-thumbnail {
  height: 180px;
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.course-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.course-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.course-badge {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.course-title {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--secondary);
  line-height: 1.35;
  font-weight: 600;
}

.course-card.locked {
  opacity: 0.6;
  filter: grayscale(0.9);
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* === PROGRESS METRO === */
.progress-metro-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 2.5rem 0;
  position: relative;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.progress-metro-line::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--border);
  z-index: 0;
  transform: translateY(-50%);
}

.metro-stop {
  width: 30px;
  height: 30px;
  background: white;
  border: 2px solid var(--border);
  border-radius: 50%;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: all var(--transition-smooth);
}

.metro-stop.active {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
  transform: scale(1.15);
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12);
}

/* === EXAM INTERFACE === */
.exam-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.exam-header-sticky {
  position: sticky;
  top: 64px;
  background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
  color: white;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  z-index: 100;
  box-shadow: var(--shadow-lg);
  animation: slideDown 0.3s ease-out;
}

.exam-title {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  flex: 1;
}

.exam-timer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.15rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.12);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  font-family: 'Courier New', monospace;
  flex-shrink: 0;
}

.timer-icon {
  font-size: 1rem;
}

.exam-timer.warning {
  background: rgba(245, 158, 11, 0.25);
  animation: pulse 1s infinite;
}

.exam-timer.critical {
  background: rgba(239, 68, 68, 0.3);
  animation: pulse 0.5s infinite;
}

.exam-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.question-card {
  background: var(--bg-card);
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-smooth);
}

.question-card:hover {
  box-shadow: var(--shadow-md);
}

.question-header {
  display: flex;
  gap: 1.25rem;
}

.question-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.question-content {
  flex: 1;
}

.question-text {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.question-options {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.option-label {
  display: flex;
  align-items: center;
  padding: 0.85rem 1rem;
  background: var(--bg-inset);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-weight: 500;
  color: var(--text-main);
  user-select: none;
  font-size: 0.92rem;
}

.option-label:hover {
  background: white;
  border-color: var(--primary);
}

.option-radio {
  width: 18px;
  height: 18px;
  margin-right: 0.85rem;
  cursor: pointer;
  accent-color: var(--primary);
}

.option-label:has(input[type="radio"]:checked) {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 2px var(--primary-light);
}

.option-label:has(input[type="radio"]:checked) span {
  color: var(--primary);
  font-weight: 600;
}

.gap-fill-input {
  width: 100%;
  padding: 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  background: white;
  color: var(--text-main);
}

.gap-fill-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--shadow-focus);
}

.exam-submit-btn {
  padding: 0.85rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  margin-top: 0.5rem;
  border: none;
  border-radius: var(--radius);
  background: var(--primary);
  color: white;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.exam-submit-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.exam-submit-btn:active {
  transform: translateY(0);
}

/* === EXAM TEXT & GAP === */
.exam-text {
  font-size: 1.05rem;
  line-height: 2;
  color: var(--text-main);
  text-align: justify;
}

.exam-gap-input,
.gap-input {
  border: none;
  border-bottom: 2px solid var(--border);
  color: var(--primary);
  font-weight: 600;
  text-align: center;
  padding: 0 0.35rem;
  font-size: 1rem;
  background: transparent;
  transition: all var(--transition-fast);
  width: 120px;
  font-family: 'Courier New', monospace;
}

.exam-gap-input:focus,
.gap-input:focus {
  outline: none;
  border-bottom-color: var(--primary);
  background: var(--primary-subtle);
}

/* === RESULT PAGE === */
.result-container {
  max-width: 650px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.result-header {
  text-align: center;
  animation: slideUp 0.6s ease-out;
  margin-bottom: 1.5rem;
}

.result-icon {
  font-size: 72px;
  margin-bottom: 1rem;
}

.result-icon.success {
  color: var(--success);
  animation: bounce 0.6s ease-out;
}

.result-icon.fail,
.result-icon.failed {
  color: var(--danger);
}

.result-title {
  font-family: var(--font-sans);
  color: var(--secondary);
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
}

.result-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.score-card,
.result-score-card {
  padding: 2rem;
  margin: 1.5rem 0;
  background: white;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.score-label,
.result-score-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
  font-weight: 600;
}

.score-value,
.result-score-value {
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.score-bar-container,
.result-progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.score-bar-fill,
.result-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--success));
  transition: width 0.8s ease-out;
}

.result-passing-score {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.result-passing-score strong {
  color: var(--secondary);
  font-weight: 600;
}

.pass-info-box {
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  background: var(--success-light);
  border-left: 3px solid var(--success);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #065f46;
  font-weight: 600;
  font-size: 0.9rem;
}

.result-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* === HERO SLIDER === */
.hero-slider {
  position: relative;
  height: 550px;
  overflow: hidden;
  background: var(--secondary);
}

.slide {
  position: relative;
  height: 100%;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.75) 0%, rgba(5, 150, 105, 0.25) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: white;
  max-width: 680px;
  padding: 2rem;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-content h1 {
  font-size: 3rem;
  font-weight: 800;
  color: white;
  margin-bottom: 1rem;
  line-height: 1.15;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.hero-content p {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
}

/* === MODALS (Desktop App Dialog) === */
.custom-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  justify-content: center;
  align-items: center;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(6px);
}

.custom-modal.active {
  display: flex;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: white;
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 92%;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
  animation: modalShow 0.2s ease-out;
  position: relative;
}

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

.modal-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-inset);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
  font-size: 1.15rem;
  color: var(--text-muted);
}

.modal-icon.warning {
  background: var(--danger-light);
  color: var(--danger);
}

.modal-title {
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
  color: var(--secondary);
  font-weight: 700;
}

.modal-message {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.5;
  font-size: 0.92rem;
}

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

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

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

@keyframes zoomIn {
  from { transform: scale(1.04); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

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

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

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

/* === MOBILE MENU TOGGLE === */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.35rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.4rem;
  margin-left: auto;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.mobile-menu-toggle:hover {
  background: var(--bg-inset);
  color: var(--primary);
}

/* === SCROLLBAR (Desktop App) === */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* === SELECTION === */
::selection {
  background: rgba(5, 150, 105, 0.15);
  color: var(--primary-hover);
}

/* === RESPONSIVE: HERO === */
@media (max-width: 768px) {
  .hero-slider {
    height: 380px;
  }
  .hero-content h1 {
    font-size: 1.85rem;
  }
  .hero-content p {
    font-size: 0.95rem;
  }
}

/* === RESPONSIVE: EXAM === */
@media (max-width: 768px) {
  .exam-container {
    padding: 1rem;
  }
  .exam-header-sticky {
    flex-direction: column;
    text-align: center;
    top: 60px;
  }
  .exam-title {
    font-size: 1.1rem;
  }
  .exam-timer {
    width: 100%;
    justify-content: center;
  }
  .question-card {
    padding: 1.25rem;
  }
  .question-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .question-number {
    width: 38px;
    height: 38px;
    font-size: 0.9rem;
  }
  .question-text {
    font-size: 0.95rem;
  }
  .option-label {
    padding: 0.7rem 0.85rem;
    font-size: 0.9rem;
  }
  .exam-submit-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .exam-header-sticky {
    padding: 1rem;
    margin-bottom: 1rem;
  }
  .exam-title {
    font-size: 0.95rem;
  }
  .exam-timer {
    font-size: 1rem;
    padding: 0.45rem 0.85rem;
  }
  .question-card {
    padding: 1rem;
    border-radius: var(--radius);
  }
  .question-number {
    width: 34px;
    height: 34px;
    font-size: 0.85rem;
  }
  .option-label {
    padding: 0.6rem 0.75rem;
    font-size: 0.88rem;
  }
  .option-radio {
    width: 16px;
    height: 16px;
    margin-right: 0.65rem;
  }
  .gap-fill-input {
    padding: 0.7rem;
    font-size: 0.9rem;
  }
}