/* ============================================
   MOHIT SIR'S QUIZ APP — DESIGN SYSTEM
   ============================================ */
:root {
  --primary: #4F46E5;
  /* Professional Indigo */
  --primary-dark: #3730A3;
  --primary-light: #818CF8;
  --accent: #F59E0B;
  --success: #10B981;
  --success-light: #ECFDF5;
  --danger: #EF4444;
  --danger-light: #FEF2F2;
  --warning: #F59E0B;
  --warning-light: #FFFBEB;
  --info: #3B82F6;
  --bg: #F8FAFC;
  /* Softer Slate */
  --surface: #FFFFFF;
  --surface-hover: #F1F5F9;
  --text: #0F172A;
  /* Deeper Slate */
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --border: #E2E8F0;
  --border-light: #F1F5F9;
  --shadow-sm: 0 4px 0 0 rgba(0,0,0,0.1);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.12), 0 8px 0 0 rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.15), 0 10px 0 0 rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 48px rgba(0,0,0,0.2), 0 12px 0 0 rgba(0,0,0,0.12);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 30px;
  --radius-full: 9999px;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Shimmer loading skeleton */
@keyframes shimmerAnim {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.shimmer-block {
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  animation: shimmerAnim 1.5s ease-in-out infinite;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

#app {
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: 1.75rem;
}

h2 {
  font-size: 1.375rem;
}

h3 {
  font-size: 1.125rem;
}

.hidden {
  display: none !important;
}

/* ============ LOADING ============ */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* ============ SNACKBAR ============ */
.snackbar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 12px 24px;
  border-radius: var(--radius-full);
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  z-index: 10000;
  transition: transform 0.3s ease;
  max-width: 90vw;
  text-align: center;
}

.snackbar.show {
  transform: translateX(-50%) translateY(0);
}

.snackbar.error {
  background: var(--danger);
}

.snackbar.success {
  background: var(--success);
}

.snackbar.info {
  background: var(--primary);
}

/* ============ CONFETTI ============ */
#confetti-canvas {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

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

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-warning {
  background: var(--warning);
  color: #fff;
}

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

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
  padding: 10px 20px;
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-ghost {
  background: transparent;
  color: var(--primary-light);
  font-weight: 600;
  width: 100%;
  padding: 14px;
}

.btn-ghost:hover {
  background: rgba(57, 73, 171, 0.05);
}

.btn-text {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px;
}

.btn-block {
  width: 100%;
}

.btn-xl {
  padding: 18px 32px;
  font-size: 1.125rem;
  letter-spacing: 0.5px;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.8125rem;
  border-radius: var(--radius-sm);
}

.btn-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.icon-btn.dark {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text);
}

.icon-btn.dark:hover {
  background: rgba(0, 0, 0, 0.1);
}

/* ============ FORMS ============ */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-group label .material-icons-round {
  font-size: 16px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  transition: border-color var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(57, 73, 171, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.password-wrapper {
  position: relative;
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
}

/* ============ AUTH PAGE ============ */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 24px;
  background: white;
}

.auth-gradient {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 45vh;
  background: linear-gradient(135deg, #4f46e5 0%, #3949ab 100%);
  z-index: 0;
  border-bottom-left-radius: 50% 20%;
  border-bottom-right-radius: 50% 20%;
}

.auth-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.auth-logo-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.auth-logo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
}

.auth-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
  text-align: center;
}

.auth-subtitle {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  margin-bottom: 32px;
}

.auth-card {
  width: 100%;
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-xl);
  animation: slideUp 0.4s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-tabs {
  display: flex;
  background: var(--bg);
  border-radius: var(--radius-full);
  padding: 4px;
  margin-bottom: 24px;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  background: transparent;
  color: var(--text-muted);
  transition: all var(--transition);
}

.auth-tab.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn .btn-text {
  color: inherit;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ============ MODAL ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 32px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-xl);
  animation: slideUp 0.3s ease;
}

.modal-card h3 {
  margin-bottom: 16px;
  text-align: center;
}

/* ============ PAGE LAYOUT ============ */
.page-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #fff;
  background: var(--primary); /* Enforce deep blue globally */
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); /* Subtle shadow for sticky effect */
  min-height: 64px;
}

/* Remove old color overrides to enforce brand consistency */
/* .page-header.indigo and .page-header.dynamic-color are now obsolete but kept for backwards comp */
.page-header.indigo, 
.page-header.dynamic-color, 
.page-header.dark-header {
  background: var(--primary);
}

.page-header.dark-header {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
}

.page-header.dynamic-color {
  background: var(--primary);
}

.header-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.header-center {
  flex: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.header-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin: 0;
  text-shadow: none; /* Force remove any existing blurry shadows */
}

.header-subtitle {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 2px;
  font-weight: 500;
  text-shadow: none;
}

.back-btn {
  flex-shrink: 0;
}

.page-body {
  flex: 1;
  padding: 24px 20px;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.page-body>*:not(.exam-grid):not(.subject-grid):not(.testtype-card):not(.topic-card) {
  width: 100%;
}

.page-footer {
  padding: 16px 20px;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  text-align: center;
}

.section-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  text-align: center;
}

/* ============ CARDS ============ */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--transition);
  border: 1px solid var(--border);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-body {
  padding: 16px;
}

/* ============ EXAM GRID ============ */
.exam-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  width: 100%;
}

.exam-card {
  border-radius: 16px;
  padding: 48px 16px;
  text-align: center;
  cursor: pointer;
  color: #fff;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1), inset 0 -4px 10px rgba(0,0,0,0.1);
}

.exam-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15), inset 0 -4px 10px rgba(0,0,0,0.1);
}

.exam-card:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1), inset 0 -2px 6px rgba(0,0,0,0.1);
  transition-duration: 0.1s;
}

.exam-card .exam-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.exam-card .exam-icon .material-icons-round {
  font-size: 32px;
}

.exam-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}

.exam-card p {
  display: none; /* Hide full name on card as per live app */
}

/* ============ ACTION BANNERS ============ */
.action-banner {
  border-radius: 20px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  cursor: pointer;
  color: #fff;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.action-banner.bg-dark { background: #2D3E50; }
.action-banner.bg-green { background: #4CAF50; }

.action-banner:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.banner-icon-box {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner-info-box {
  flex: 1;
}

.banner-info-box h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.banner-info-box p {
  font-size: 0.8125rem;
  opacity: 0.8;
  margin: 4px 0 0;
}

.banner-count-bubble {
  background: rgba(255, 255, 255, 0.2);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
}

.banner-chevron .material-icons-round {
  font-size: 24px;
  opacity: 0.7;
}

/* ============ SUBJECT GRID ============ */
.subject-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.subject-card {
  border-radius: 32px;
  padding: 32px 16px;
  text-align: center;
  cursor: pointer;
  color: #fff;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 10px 20px rgba(0,0,0,0.08), 0 6px 6px rgba(0,0,0,0.05);
  position: relative;
  overflow: hidden;
}

.subject-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 30px rgba(0,0,0,0.12), 0 8px 10px rgba(0,0,0,0.08);
}

.subject-card:active {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  transition-duration: 0.1s;
}

.subject-card .subject-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.subject-card .subject-icon .material-icons-round {
  font-size: 32px;
}

.subject-card h3 {
  font-size: 1.1875rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.subject-card p {
  font-size: 0.8125rem;
  opacity: 0.85;
  font-weight: 400;
}

/* ============ TEST TYPE CARDS ============ */
.testtype-card {
  border-radius: var(--radius-lg);
  padding: 24px;
  color: #fff;
  cursor: pointer;
  transition: all 0.25s ease;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.testtype-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.testtype-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.testtype-icon .material-icons-round {
  font-size: 32px;
}

.testtype-info {
  flex: 1;
}

.testtype-info h3 {
  font-size: 1.125rem;
}

.testtype-info p {
  font-size: 0.8125rem;
  opacity: 0.9;
}

.testtype-badge {
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-block;
  margin-top: 6px;
}

.testtype-arrow {
  opacity: 0.7;
}

.testtype-arrow .material-icons-round {
  font-size: 28px;
}

/* Practice Mode (Retakes) — Option Colors */
.quiz-option.correct {
  border-color: var(--success);
  background: rgba(76, 175, 80, 0.1);
}
.quiz-option.correct .option-letter {
  background: var(--success);
  color: #fff;
}
.quiz-option.wrong {
  border-color: var(--danger);
  background: rgba(244, 67, 54, 0.1);
}
.quiz-option.wrong .option-letter {
  background: var(--danger);
  color: #fff;
}
.quiz-option.dimmed {
  opacity: 0.45;
}

/* Inline Telegram Poll Bar (inside quiz-option) */
.quiz-option .telegram-poll-bg {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: rgba(57, 73, 171, 0.08);
  border-radius: var(--radius-md);
  transition: width 0.5s ease;
  z-index: 0;
}
.quiz-option.correct .telegram-poll-bg {
  background: rgba(76, 175, 80, 0.12);
}
.quiz-option.wrong .telegram-poll-bg {
  background: rgba(244, 67, 54, 0.12);
}
.quiz-option .telegram-poll-text {
  margin-left: auto;
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--text-secondary);
  z-index: 1;
  position: relative;
}

/* My Time badge variations */
.stat-badge.my-time {
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-secondary);
}
.stat-badge.my-time.time-fast {
  background: var(--success-light);
  color: var(--success);
}
.stat-badge.my-time.time-slow {
  background: var(--danger-light);
  color: var(--danger);
}
.stat-badge.my-time .material-icons-round { font-size: 14px; }

/* Practice Mode (Retakes) Explanation Box */
.practice-explanation {
  margin-top: 16px;
  background: rgba(33, 150, 243, 0.08);
  border-left: 4px solid var(--info);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 16px;
  animation: slideFadeIn 0.3s ease forwards;
}
.explanation-title {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--info);
  font-weight: 700;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.explanation-title .material-icons-round { font-size: 18px; }
.explanation-content {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-primary);
}

/* Practice Review Panel (full review info during retakes) */
.practice-review-panel {
  margin-top: 20px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
  animation: slideFadeIn 0.3s ease forwards;
}
.practice-review-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-light);
}
.practice-review-header .q-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.9rem;
}
.practice-review-header .q-status.correct { color: var(--success); }
.practice-review-header .q-status.wrong { color: var(--danger); }
.practice-review-header .q-status .material-icons-round { font-size: 20px; }
.practice-stats-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.practice-stats-badges .stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 600;
}
.practice-stats-badges .stat-badge.avg-time {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text);
}
.practice-stats-badges .stat-badge .material-icons-round { font-size: 14px; }
.practice-poll-section {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
}
.poll-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.practice-poll-section .q-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: 6px;
  position: relative;
  overflow: hidden;
  font-size: 0.875rem;
}
.practice-poll-section .q-option.correct-answer {
  border-color: var(--success);
  background: rgba(76, 175, 80, 0.05);
}
.practice-poll-section .q-option.wrong-answer {
  border-color: var(--danger);
  background: rgba(244, 67, 54, 0.05);
}
.practice-poll-section .telegram-poll-bg {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: rgba(57, 73, 171, 0.08);
  border-radius: var(--radius-md);
  transition: width 0.5s ease;
  z-index: 0;
}
.practice-poll-section .telegram-poll-text {
  margin-left: auto;
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--text-secondary);
  z-index: 1;
}
.practice-poll-section .option-letter {
  z-index: 1;
}
.practice-poll-section span {
  z-index: 1;
}
.practice-review-panel .practice-explanation {
  margin-top: 0;
  border-left: none;
  border-radius: 0;
  padding: 14px 16px;
}

/* Explicit Flag Banner for Exam Mode */
.flag-banner {
  position: absolute;
  top: 10px;
  right: 16px;
  background: rgba(255, 152, 0, 0.1);
  color: #e65100;
  border: 1px solid rgba(255, 152, 0, 0.3);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  z-index: 5;
}
.flag-banner .material-icons-round { font-size: 14px; }

/* ============ TOPIC LIST ============ */
.topic-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 12px;
  border: 1px solid var(--border-light);
}

.topic-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}

.topic-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.topic-icon .material-icons-round {
  font-size: 24px;
}

.topic-info {
  flex: 1;
}

.topic-info h4 {
  font-size: 0.9375rem;
  font-weight: 600;
}

.topic-info p {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.topic-count {
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 700;
  margin-top: 4px;
  display: inline-block;
}

/* ============ QUIZ LIST ============ */
.quiz-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  border: 1px solid var(--border-light);
  transition: all var(--transition);
}

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

.quiz-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.quiz-card h4 {
  font-size: 0.9375rem;
  font-weight: 600;
}

.quiz-card p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.quiz-meta {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.quiz-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.quiz-meta-item .material-icons-round {
  font-size: 14px;
}

.quiz-badge {
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 600;
}

.attempted-badge {
  background: #E0E7FF;
  color: #4338CA;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 700;
  border: 1px solid #C7D2FE;
}

.quiz-card.attempted {
  border-left: 4px solid var(--success);
}

.quiz-card-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

.quiz-action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
}

.quiz-action-btn:hover {
  background: var(--surface-hover);
  transform: translateY(-1px);
}

.quiz-action-btn .material-icons-round {
  font-size: 16px;
}

.quiz-action-btn.view-result-btn {
  background: rgba(79, 70, 229, 0.05);
  color: var(--primary);
  border-color: rgba(79, 70, 229, 0.2);
}

.quiz-action-btn.retake-btn {
  background: rgba(16, 185, 129, 0.05);
  color: var(--success);
  border-color: rgba(16, 185, 129, 0.2);
}

/* ============ INSTRUCTIONS ============ */
.instructions-body {
  padding-top: 24px;
}

.instruction-topic {
  color: var(--primary);
  font-size: 1.375rem;
}

.instruction-subject {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.rules-grid {
  background: var(--bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 20px;
  margin-bottom: 24px;
}

.rule-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}

.rule-row:last-child {
  border-bottom: none;
}

.rule-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rule-icon.negative {
  background: var(--danger-light);
  color: var(--danger);
}

.rule-icon.normal {
  background: rgba(57, 73, 171, 0.1);
  color: var(--primary);
}

.rule-label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.rule-value {
  font-size: 1rem;
  font-weight: 700;
}

.rule-value.negative {
  color: var(--danger);
}

.instructions-heading {
  margin-bottom: 12px;
}

.instructions-list {
  list-style: none;
}

.instructions-list li {
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.instructions-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
}

/* ============ QUIZ PLAYER ============ */
.quiz-player-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

.quiz-topbar {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  overflow: hidden;
  padding: 12px 16px;
  background: var(--primary-dark);
  color: #fff;
  gap: 8px;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
}

.quiz-timer {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
}

.quiz-topbar-center {
  flex-shrink: 1;
  flex-grow: 1;
  min-width: 0; /* allows truncation */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  font-size: 0.8125rem;
  opacity: 0.85;
}

.quiz-timer-bar {
  height: 4px;
  background: rgba(57, 73, 171, 0.2);
}

.quiz-timer-fill {
  height: 100%;
  background: var(--success);
  transition: width 1s linear;
  width: 100%;
}

.quiz-timer-fill.warning {
  background: var(--warning);
}

.quiz-timer-fill.danger {
  background: var(--danger);
}

.quiz-body {
  flex: 1;
  padding: 20px;
  max-width: 700px;
  width: 100%;
  margin: 0 auto;
  overflow-y: auto;
}

.quiz-question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.question-badge {
  background: var(--bg);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.875rem;
}

.quiz-question-text {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 20px;
  word-break: break-word;
  overflow-wrap: break-word;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  word-break: break-word;
  overflow-wrap: break-word;
}

.quiz-option {
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
}

.quiz-option:hover {
  border-color: var(--primary);
  background: rgba(57, 73, 171, 0.03);
}

.quiz-option.selected {
  border-color: var(--primary);
  background: rgba(57, 73, 171, 0.08);
  font-weight: 600;
}

.quiz-option .option-letter {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: all var(--transition);
}

.quiz-option.selected .option-letter {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.quiz-option.selected .review-tab.active {
  background: #3949ab;
  color: white;
  border-color: #3949ab;
}

/* =========================================
   PARA JUMBLES (JUMBLED SENTENCES)
   ========================================= */
.jumble-container {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid var(--primary);
  border-radius: 12px;
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.jumble-header {
  background: rgba(57, 73, 171, 0.06);
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--primary);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.jumble-header .material-icons-round {
  font-size: 18px;
  color: var(--primary);
}

.jumble-intro {
  padding: 12px 16px 0;
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.5;
}

.jumble-list {
  padding: 12px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.jumble-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #fff;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  transition: all 0.15s ease;
}

.jumble-item:hover {
  border-color: var(--primary);
  box-shadow: 0 1px 4px rgba(57, 73, 171, 0.08);
}

.jumble-letter {
  background: var(--primary);
  color: white;
  width: 30px;
  height: 30px;
  min-width: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.875rem;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(57, 73, 171, 0.25);
}

.jumble-text {
  color: #1e293b;
  font-size: 0.9375rem;
  line-height: 1.6;
  padding-top: 3px;
}

.quiz-nav-bar {
  padding: 10px 12px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quiz-nav-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.top-row {
  justify-content: space-between;
}

.bottom-row {
  justify-content: stretch;
}

/* 2-row buttons with text + icons */
.qnav-btn {
  flex: 1;
  height: 40px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-weight: 600;
  font-size: 0.8125rem;
  padding: 0 10px;
  white-space: nowrap;
}

.qnav-btn .material-icons-round {
  font-size: 18px;
}

.qnav-btn:hover {
  background: var(--bg);
  border-color: var(--text-muted);
}

.qnav-btn:active {
  transform: scale(0.95);
}

/* Clear — red tint */
.qnav-clear {
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.25);
}
.qnav-clear:hover {
  background: rgba(239, 68, 68, 0.06);
  border-color: var(--danger);
}

/* Mark — amber tint */
.qnav-mark {
  color: var(--warning);
  border-color: rgba(245, 158, 11, 0.25);
}
.qnav-mark:hover {
  background: rgba(245, 158, 11, 0.06);
  border-color: var(--warning);
}

/* Prev — neutral */
.qnav-prev {
  color: var(--text-secondary);
}

/* Next / Skip — prominent CTA */
.qnav-next-btn {
  flex: 1;
  min-width: 0;
  height: 42px;
  border: none;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qnav-next-btn:hover {
  background: var(--primary-dark);
  box-shadow: 0 2px 8px rgba(57, 73, 171, 0.3);
}

.qnav-next-btn:active {
  transform: scale(0.98);
}

/* Submit state — danger */
.qnav-next-btn.btn-danger {
  background: var(--danger);
}
.qnav-next-btn.btn-danger:hover {
  background: #dc2626;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

/* Finish Practice state — success */
.qnav-next-btn.btn-success {
  background: var(--success);
}
.qnav-next-btn.btn-success:hover {
  background: #059669;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.students-attempted-badge {
    background: rgba(255,152,0,0.15);
    color: var(--warning);
    padding: 6px 14px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 15px;
    font-weight: 700;
    font-size: 0.8125rem;
    border: 1px solid rgba(255,152,0,0.3);
}

/* Timer chip in topbar */
.timer-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.15);
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.875rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin-left: auto;
  flex-shrink: 0;
}

.quiz-topbar-title {
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
}

.quiz-grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.quiz-grid-panel {
  background: var(--surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 24px;
  width: 100%;
  max-width: 500px;
  max-height: 70vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}

.quiz-grid-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.quiz-grid-legend {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.legend-dot.answered {
  background: var(--success);
}

.legend-dot.unanswered {
  background: var(--border);
}

.legend-dot.marked {
  background: var(--warning);
}

.quiz-question-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.grid-cell {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--surface);
}

.grid-cell.current {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(57, 73, 171, 0.2);
}

.grid-cell.answered {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}

.grid-cell.marked {
  background: var(--warning);
  color: #fff;
  border-color: var(--warning);
}

/* passage area */
.passage-box {
  background: #FFF8E1;
  border: 1px solid #FFE082;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 400px;
  /* Increased from 250px */
}

.passage-header {
  padding: 12px 16px;
  background: rgba(121, 85, 72, 0.05);
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(121, 85, 72, 0.1);
}

.passage-header .material-icons-round {
  font-size: 18px;
  color: #795548;
}

.passage-header span {
  font-weight: 700;
  font-size: 0.8125rem;
  color: #795548;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.passage-content {
  padding: 16px;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: #5D4037;
  overflow-y: auto;
  flex: 1;
  display: block !important;
  word-break: break-word;
  overflow-wrap: break-word;
  /* Ensure visibility */
}

/* Scrollbar for passage box */
.passage-content::-webkit-scrollbar {
  width: 6px;
}

.passage-content::-webkit-scrollbar-track {
  background: transparent;
}

.passage-content::-webkit-scrollbar-thumb {
  background: rgba(121, 85, 72, 0.2);
  border-radius: 3px;
}

.passage-content::-webkit-scrollbar-thumb:hover {
  background: rgba(121, 85, 72, 0.3);
}

/* ============ RESULT SCREEN ============ */
.result-header {
  background: var(--primary) !important;
  padding: 40px 20px 48px;
  text-align: center;
  color: #fff;
}

.result-header.poor {
  background: var(--danger) !important;
}

/* ============ RESULT PAGE (REDESIGN) ============ */

.result-topic-new {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  text-align: center;
  color: var(--text-primary);
  margin: 32px 0 20px 0;
}

.result-header-new {
  background: linear-gradient(135deg, #2b3b5e, #3a4b75, #2b3b5e) !important;
  color: #fff;
  padding: 0;
  border-bottom-left-radius: 24px;
  border-bottom-right-radius: 24px;
}

.result-hero-new {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px 0;
  text-align: center;
  width: 100%;
}

.result-motivational-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 4px;
  text-shadow: none;
}

.result-motivational-subtitle {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 32px;
}

/* Donut Chart */
.score-ring-new {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 0 auto 20px;
}

.score-ring-new svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.score-ring-wrong {
  fill: none;
  stroke: #ff3b5c; /* Red color for wrong */
  stroke-width: 12;
}

.score-ring-correct {
  fill: none;
  stroke: #00d26a; /* Green color for correct */
  stroke-width: 12;
  stroke-dasharray: 301.59; /* Circumference of r=48 (2 * pi * 48) */
  stroke-dashoffset: 301.59; /* Hidden initially */
  stroke-linecap: square;
  transition: stroke-dashoffset 1s ease-out;
}

.score-ring-text-new {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.score-letter {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
}

.score-label-new {
  font-size: 0.85rem;
  opacity: 0.8;
  margin-top: 4px;
  letter-spacing: 1px;
}

/* Penalty Text */
/* Marks Display below Donut */
.result-marks-display {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
  margin-bottom: 4px;
}
.marks-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}
.marks-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.result-penalty {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fb8c00; /* Orange/Warning color */
  font-size: 0.875rem;
  font-weight: 600;
  margin: 10px 0 24px;
}

/* White Summary Card */
.result-summary-card {
  background: #ffffff;
  border-radius: 16px;
  width: 100%;
  max-width: 360px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  transform: translateY(20px); /* Slightly pull down to overlap edge */
}

.summary-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.summary-val {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
}

.summary-lbl {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-top: 4px;
}

.correct-val { color: #388e3c; } /* Dark Green */
.wrong-val { color: #d32f2f; }   /* Dark Red */
.score-val { color: #303f9f; }   /* Dark Blue */

.summary-divider {
  width: 1px;
  height: 30px;
  background: var(--border-light);
}

#tpl-result .page-body {
  padding-top: 24px;
}

/* Accuracy and Comparison Sections */
.comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin: 24px 0;
}

.chart-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.chart-card h4 {
  margin-bottom: 20px;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.chart-container {
  position: relative;
  height: 220px;
  width: 100%;
}

.score-ring-fill {
  fill: none;
  stroke: #fff;
  stroke-width: 8;
  stroke-dasharray: 326.73;
  stroke-dashoffset: 326.73;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.5s ease;
}

.score-ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.score-pct {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
}

.score-label {
  font-size: 0.75rem;
  opacity: 0.85;
}

.result-topic {
  color: #fff;
  margin-bottom: 4px;
}

.result-detail {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.875rem;
  text-align: center;
  width: 100%;
}

.metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
  margin-top: -20px;
}

.metric-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.metric-value {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
}

.metric-label {
  font-size: 0.6875rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
  justify-content: center;
}

.result-pill-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.8125rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  white-space: nowrap;
  font-family: var(--font-body);
}

.result-pill-btn .material-icons-round {
  font-size: 18px;
}

.result-pill-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}

.result-pill-btn:active {
  transform: translateY(0);
}

/* Home — neutral outline */
.result-pill-home {
  background: var(--surface);
  color: var(--text-primary);
  border: 1.5px solid var(--border);
}
.result-pill-home:hover {
  background: var(--bg);
}

/* Rankings — amber/gold */
.result-pill-rankings {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #fff;
}

/* Review — primary indigo */
.result-pill-review {
  background: linear-gradient(135deg, #4F46E5, #3730A3);
  color: #fff;
}

/* Practice — dark slate */
.result-pill-practice {
  background: linear-gradient(135deg, #334155, #1E293B);
  color: #fff;
}

@media (max-width: 420px) {
  .result-actions {
    gap: 8px;
  }
  .result-pill-btn {
    padding: 9px 14px;
    font-size: 0.75rem;
    flex: 1 1 calc(50% - 8px);
    justify-content: center;
  }
}

/* Question cards in results */
.question-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid var(--border-light);
}

.question-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.q-badge {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.8125rem;
  background: var(--bg);
}

.q-status {
  font-weight: 700;
  font-size: 0.8125rem;
}

.q-status.correct {
  color: var(--success);
}

.q-status.wrong {
  color: var(--danger);
}

.q-status.skipped {
  color: var(--warning);
}

.q-text {
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.5;
  margin-bottom: 12px;
}

.q-option {
  padding: 10px 12px;
  margin-bottom: 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 0.875rem;
  position: relative; /* REQUIRED FOR TELEGRAM POLL BG */
  overflow: hidden;
}

/* Telegram Polling Styles */
.telegram-poll-bg {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: rgba(0, 0, 0, 0.05); /* Default */
  border-radius: var(--radius-sm);
  z-index: 0;
  transition: width 0.8s ease-out;
}

.q-option.correct-answer .telegram-poll-bg {
  background: rgba(76, 175, 80, 0.2); /* Tinted green */
}

.q-option.wrong-answer .telegram-poll-bg {
  background: rgba(244, 67, 54, 0.15); /* Tinted red */
}

.telegram-poll-text {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 700;
  color: var(--text-secondary);
  font-size: 0.85rem;
  z-index: 1;
}

.q-option.correct-answer .telegram-poll-text {
  color: var(--success);
}

.q-option.wrong-answer .telegram-poll-text {
  color: var(--danger);
}

/* Ensure existing option content stays above the poll background */
.q-option .option-letter, .q-option span:not(.telegram-poll-bg):not(.telegram-poll-text) {
  position: relative;
  z-index: 1;
}

.q-option.correct-answer {
  background: var(--success-light);
  border-color: var(--success);
}

.q-option.wrong-answer {
  background: var(--danger-light);
  border-color: var(--danger);
}

.q-global-stats {
  display: flex;
  gap: 12px;
  align-items: center;
}

.stat-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
}

.stat-badge .material-icons-round {
  font-size: 14px;
}

.avg-time {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text);
}

.my-time-badge {
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: var(--surface-light);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border-light);
}

.explanation-box {
  margin-top: 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid rgba(57, 73, 171, 0.15);
  overflow: hidden;
}

.explanation-header {
  background: rgba(57, 73, 171, 0.06);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--primary);
  font-size: 0.875rem;
}

.explanation-header .material-icons-round {
  font-size: 18px;
  color: var(--warning);
}

.explanation-text {
  padding: 16px;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text);
}

.time-row {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.time-row span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ============ REVIEW TABS ============ */
.review-tabs,
.ranking-tabs {
  display: flex;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.review-tab,
.ranking-tab {
  flex: 1;
  padding: 12px;
  border: none;
  background: transparent;
  font-weight: 600;
  font-size: 0.8125rem;
  cursor: pointer;
  color: var(--text-muted);
  border-bottom: 3px solid transparent;
  transition: all var(--transition);
}

.review-tab.active,
.ranking-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ============ STUDENT HOME ============ */
.home-header {
  flex-direction: column;
  align-items: stretch;
  padding-bottom: 16px;
}

.home-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.home-header-actions {
  display: flex;
  gap: 8px;
}

.home-rank-bar {
  margin-top: 16px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.global-rank-badge {
  background: white;
  color: #1a237e;
  padding: 6px 10px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 65px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.rank-num { font-size: 1.1rem; font-weight: 900; line-height: 1.1; }
.rank-lbl { font-size: 0.55rem; font-weight: 700; text-transform: uppercase; opacity: 0.8; }

.rank-icon {
  font-size: 24px;
}

.rank-info {
  flex: 1;
}

.rank-title {
  font-weight: 700;
  font-size: 0.875rem;
}

.rank-progress-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 100px;
  margin-top: 4px;
}

.rank-progress-fill {
  height: 100%;
  background: #FFD54F;
  border-radius: 3px;
  transition: width 0.5s ease;
}

.rank-next {
  font-size: 0.6875rem;
  opacity: 0.7;
}

.has-bottom-nav .page-body {
  padding-bottom: 80px;
}

/* Daily capsule */
.capsule-card {
  background: linear-gradient(135deg, #FF6F00, #FF8F00);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
  color: #fff;
}

.capsule-type {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 4px;
}

.capsule-headline {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 6px;
}

.capsule-detail {
  font-size: 0.8125rem;
  opacity: 0.9;
}

/* Performance overview */
.performance-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.perf-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.perf-value {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
}

.perf-label {
  font-size: 0.6875rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Quick actions */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.quick-action-btn {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.quick-action-btn:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.quick-action-btn .material-icons-round {
  font-size: 28px;
}

.quick-action-btn span:last-child {
  font-size: 0.8125rem;
  font-weight: 600;
}

/* Recent quizzes */
.recent-quiz-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  border: 1px solid var(--border-light);
  transition: all var(--transition);
}

.recent-quiz-card:hover {
  box-shadow: var(--shadow-sm);
}

.recent-quiz-score {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.8125rem;
  color: #fff;
  flex-shrink: 0;
}

.recent-quiz-info {
  flex: 1;
}

.recent-quiz-info h4 {
  font-size: 0.875rem;
  font-weight: 600;
}

.recent-quiz-info p {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ============ BOTTOM NAV ============ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  z-index: 50;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.625rem;
  font-weight: 600;
  transition: color var(--transition);
  padding: 4px;
}

.bottom-nav-item .material-icons-round {
  font-size: 22px;
}

.bottom-nav-item.active {
  color: var(--primary);
}

/* ============ ADMIN ============ */
.admin-tabs {
  display: flex;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.admin-tab {
  flex: 1;
  padding: 12px 16px;
  border: none;
  background: transparent;
  font-weight: 600;
  font-size: 0.8125rem;
  cursor: pointer;
  color: var(--text-muted);
  border-bottom: 3px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all var(--transition);
  white-space: nowrap;
}

.admin-tab .material-icons-round {
  font-size: 18px;
}

.admin-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

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

.stat-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

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

.stat-icon {
  font-size: 28px;
  margin-bottom: 8px;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ============ ADMIN EXAM CHECKBOX GRID ============ */
.exam-checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0;
}

.exam-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  user-select: none;
}

.exam-chip:hover {
  border-color: var(--primary-light);
  background: rgba(79, 70, 229, 0.04);
}

.exam-chip input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
}

.exam-chip.checked,
.exam-chip:has(input:checked) {
  border-color: var(--primary);
  background: rgba(79, 70, 229, 0.08);
  color: var(--primary);
}

.exam-alias-note {
  margin-top: 10px;
  padding: 10px 14px;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: #92400E;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.4;
}

.exam-alias-note .material-icons-round {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.admin-form-section {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border-light);
  margin-bottom: 20px;
}

.admin-form-section h3 {
  margin-bottom: 16px;
}

.manage-quiz-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid var(--border-light);
}

.manage-quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.manage-quiz-header h4 {
  font-size: 0.9375rem;
}

.manage-quiz-meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.manage-quiz-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.manage-quiz-actions .btn {
  font-size: 0.75rem;
  padding: 6px 12px;
}

/* ============ RANKINGS ============ */
.podium-section {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
  padding: 24px 16px 32px;
  background: var(--primary);
}

.podium-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #fff;
  text-align: center;
}

.podium-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 8px;
}

.podium-item.first .podium-avatar {
  width: 60px;
  height: 60px;
  font-size: 1.25rem;
  background: #FFD54F;
  color: #5D4037;
}

.podium-name {
  font-size: 0.75rem;
  font-weight: 600;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.podium-score {
  font-size: 0.6875rem;
  opacity: 0.8;
}

.podium-bar {
  width: 60px;
  margin-top: 8px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 8px;
  font-weight: 800;
  font-size: 1.25rem;
}

.podium-item.first .podium-bar {
  background: #FFD54F;
  color: #5D4037;
}

.podium-item.second .podium-bar {
  background: #B0BEC5;
  color: #37474F;
}

.podium-item.third .podium-bar {
  background: #BCAAA4;
  color: #4E342E;
}

.rank-list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  background: var(--surface);
}

.rank-list-item.me {
  background: rgba(57, 73, 171, 0.05);
}

.rank-number {
  font-weight: 800;
  font-size: 1rem;
  min-width: 28px;
  color: var(--text-muted);
}

.rank-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--primary);
}

.rank-user-info {
  flex: 1;
}

.rank-user-name {
  font-weight: 600;
  font-size: 0.875rem;
}

.rank-user-meta {
  font-size: 0.6875rem;
  color: var(--text-secondary);
}

.rank-user-score {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.9375rem;
}

/* ============ PROFILE ============ */
.profile-avatar-section {
  text-align: center;
  padding: 32px 20px;
  margin-bottom: 16px;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2rem;
  font-weight: 800;
  margin: 0 auto 12px;
  box-shadow: var(--shadow-md);
}

.profile-name {
  font-size: 1.25rem;
  font-weight: 700;
}

.profile-email {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.profile-rank-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.8125rem;
  margin-top: 8px;
}

.info-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--border-light);
}

.info-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.info-card-icon .material-icons-round {
  font-size: 20px;
}

.info-card-content {
  flex: 1;
}

.info-card-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.info-card-value {
  font-weight: 600;
  font-size: 0.9375rem;
}

.section-header {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin: 20px 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Empty states */
.empty-state {
  text-align: center;
  padding: 64px 32px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border);
  margin: 20px 0;
}

.empty-state .material-icons-round {
  font-size: 56px;
  color: var(--primary-light);
  margin-bottom: 20px;
  opacity: 0.5;
}

.empty-state h3 {
  color: var(--text-primary);
  font-size: 1.125rem;
  margin-bottom: 12px;
  font-weight: 700;
}

.empty-state p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  max-width: 280px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ============ RESPONSIVE ============ */
@media (min-width: 768px) {
  .exam-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .subject-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .quiz-question-grid {
    grid-template-columns: repeat(8, 1fr);
  }

  .performance-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 480px) {
  .exam-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .subject-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .testtype-card {
    flex-direction: column;
    text-align: center;
  }

  .testtype-icon {
    margin: 0 auto;
  }

  .testtype-arrow {
    display: none;
  }
}

/* ============ ANIMATIONS ============ */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-in {
  animation: fadeIn 0.3s ease;
}

.animate-slide {
  animation: slideInRight 0.3s ease;
}

/* Confirm dialog */
.confirm-dialog {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.confirm-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-xl);
}

.confirm-card h3 {
  margin-bottom: 8px;
}

.confirm-card p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 20px;
}

.confirm-actions {
  display: flex;
  gap: 12px;
}

.confirm-actions .btn {
  flex: 1;
}
/* =============================================
   LEADERBOARD STYLES
   ============================================= */
.leaderboard-header {
    background: var(--primary) !important;
    padding-bottom: 0 !important;
}
.leaderboard-header-top {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
}
.leaderboard-tabs {
    display: flex;
    justify-content: center;
    gap: 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.leaderboard-tab {
    padding: 12px 20px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    position: relative;
    flex: 1;
    text-align: center;
}
.leaderboard-tab.active {
    color: #fff;
}
.leaderboard-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 10%;
    width: 80%;
    height: 3px;
    background: var(--warning);
    border-radius: 3px 3px 0 0;
}

.leaderboard-hero {
    background: var(--primary);
    padding: 30px 20px 60px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 10px;
}

.podium-card {
    background: rgba(255,255,255,0.2);
    border-radius: 12px;
    padding: 15px 10px;
    width: 30%;
    max-width: 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
}

.podium-card.rank-1 {
    background: var(--warning);
    padding-bottom: 30px;
    margin-bottom: 0;
    z-index: 2;
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    color: #fff;
}
.podium-card.rank-2 { background: #E0E0E0; color: #444; }
.podium-card.rank-3 { background: #CD7F32; color: #fff; }

.podium-avatar-container {
    position: relative;
    margin-bottom: 10px;
}
.podium-avatar {
    width: 50px;
    height: 50px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--primary);
    border: 3px solid rgba(255,255,255,0.3);
}
.podium-rank-badge {
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 22px;
    height: 22px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    color: #222;
}

.podium-name {
    font-weight: 700;
    font-size: 0.8125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    text-align: center;
    margin-bottom: 4px;
}
.podium-score {
    font-weight: 800;
    font-size: 1rem;
}

.leaderboard-body {
    margin-top: -30px;
    background: #fff;
    border-radius: 30px 30px 0 0;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.1);
    padding-top: 20px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
}
.rank-num {
    width: 32px;
    height: 32px;
    border: 1px solid #eee;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #888;
    margin-right: 15px;
    flex-shrink: 0;
}
.user-info {
    flex: 1;
}
.user-name {
    font-weight: 700;
    font-size: 1.0625rem;
    color: #222;
}
.user-tier {
    font-size: 0.75rem;
    color: #888;
}
.user-score {
    font-weight: 800;
    font-size: 1.125rem;
    color: var(--primary);
}

/* ============ RESPONSIVE FIXES (MOBILE OVERFLOW) ============ */
@media (max-width: 480px) {
  .quiz-topbar {
    padding: 8px 4px;
    gap: 4px;
  }
  .quiz-topbar .icon-btn {
    width: 32px;
    height: 32px;
  }
  .quiz-topbar .icon-btn .material-icons-round {
    font-size: 18px;
  }
  .quiz-timer {
    font-size: 1rem;
  }
  .timer-chip {
    padding: 4px 8px;
  }
  .quiz-topbar-title {
    font-size: 0.8rem;
    margin: 0 4px;
  }
}

/* ═══════════════════════════════════════
   FULL MOCK TEST ENGINE STYLES
   ═══════════════════════════════════════ */

/* ── Full Mock Hero Banner ── */
.action-banner.bg-mock-hero {
  background: linear-gradient(135deg, #6366F1, #4F46E5, #7C3AED);
  border: none;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
  position: relative;
  overflow: hidden;
}
.action-banner.bg-mock-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20px;
  width: 120px;
  height: 200%;
  background: rgba(255,255,255,0.06);
  transform: skewX(-15deg);
}
.action-banner.bg-mock-hero:hover {
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.5);
  transform: translateY(-4px);
}

/* ── Mock List Cards ── */
.mock-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: all 0.25s ease;
}
.mock-card:hover {
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.15);
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.3);
}
.mock-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}
.mock-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.mock-badge-live {
  background: linear-gradient(135deg, #10B981, #059669);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}
.mock-badge-section {
  background: #EEF2FF;
  color: #4F46E5;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  margin-top: 4px;
  display: inline-block;
}
.mock-stat-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.mock-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-weight: 500;
}
.mock-stat .material-icons-round { font-size: 16px; }
.mock-stat.correct-stat { color: #10B981; }
.mock-stat.wrong-stat { color: #EF4444; }
.mock-subjects-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.mock-subject-pill {
  background: #F1F5F9;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
}
.mock-card-btn {
  width: 100%;
  background: linear-gradient(135deg, #4F46E5, #6366F1);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}
.mock-card-btn:hover {
  background: linear-gradient(135deg, #3730A3, #4F46E5);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.4);
}
.mock-card-btn:active { transform: translateY(0); }

/* ── Instructions Subject Breakdown ── */
.mock-subject-breakdown {
  background: var(--bg);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.mock-subject-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}
.mock-subject-row:last-child { border-bottom: none; }
.mock-subject-row:hover { background: var(--surface); }
.mock-subject-name { font-weight: 600; font-size: 0.9rem; color: var(--text); }
.mock-subject-count { font-size: 0.8125rem; color: var(--text-secondary); font-weight: 500; }

/* ── Mock Player Layout ── */
.mock-player-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.mock-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--primary);
  color: #fff;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
}
.mock-topbar-center {
  flex: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.mock-subject-label {
  font-size: 0.75rem;
  opacity: 0.75;
  font-weight: 500;
}
.mock-q-counter {
  font-size: 0.9rem;
  font-weight: 700;
}
.mock-timer-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,0.15);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.875rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* Timer bar */
.mock-timer-bar {
  height: 3px;
  background: rgba(79, 70, 229, 0.2);
  flex-shrink: 0;
}
.mock-timer-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366F1, #4F46E5);
  transition: width 1s linear;
}
.mock-timer-fill.warning { background: linear-gradient(90deg, #F59E0B, #D97706); }
.mock-timer-fill.danger { background: linear-gradient(90deg, #EF4444, #DC2626); animation: pulse-bar 0.5s ease infinite alternate; }
@keyframes pulse-bar { from { opacity: 1; } to { opacity: 0.6; } }

/* Subject tabs */
.mock-tabs-bar {
  display: flex;
  overflow-x: auto;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 8px;
  scrollbar-width: none;
  flex-shrink: 0;
}
.mock-tabs-bar::-webkit-scrollbar { display: none; }
.mock-tab {
  padding: 10px 14px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.mock-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.mock-tab-count {
  font-size: 0.7rem;
  font-weight: 500;
  opacity: 0.7;
}

/* Question body */
.mock-body {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}
.mock-q-flag-row { margin-bottom: 8px; min-height: 24px; }
.mock-flag-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #FFF7ED;
  color: #C2410C;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid #FED7AA;
}
.mock-q-text {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 20px;
}
.mock-options { display: flex; flex-direction: column; gap: 10px; }
.mock-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}
.mock-option:hover {
  border-color: var(--primary-light);
  background: #F5F3FF;
}
.mock-option.selected {
  border-color: var(--primary);
  background: #EEF2FF;
}
.mock-option-letter {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: all 0.2s;
}
.mock-option.selected .mock-option-letter {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.mock-option-text { flex: 1; font-size: 0.9375rem; color: var(--text); line-height: 1.4; }
.mock-option-check { color: var(--primary); font-size: 20px; flex-shrink: 0; }

/* Bottom nav */
.mock-nav-bar {
  position: sticky;
  bottom: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 10px 16px;
  display: flex;
  gap: 8px;
  align-items: center;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.08);
}
.mock-nav-bar .btn-primary { flex: 1; padding: 12px; }

/* ── Mock Result Screen ── */
.mock-result-hero {
  background: linear-gradient(160deg, #4F46E5 0%, #7C3AED 100%);
  padding: 32px 20px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  color: #fff;
}
.mock-result-title {
  font-size: 1.5rem;
  font-weight: 800;
  text-align: center;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.mock-score-ring {
  position: relative;
  display: inline-block;
}
.mock-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.mock-ring-grade {
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1;
}
.mock-ring-pct {
  font-size: 0.875rem;
  font-weight: 600;
  opacity: 0.85;
}
.mock-score-display {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.mock-score-val {
  font-size: 2.5rem;
  font-weight: 900;
  color: #fff;
}
.mock-score-max {
  font-size: 1rem;
  opacity: 0.75;
  color: #fff;
}
.mock-result-summary {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.result-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 18px;
  border-radius: 12px;
  min-width: 72px;
}
.result-pill span:first-child { font-size: 1.5rem; font-weight: 800; }
.result-pill span:last-child { font-size: 0.7rem; font-weight: 600; opacity: 0.8; text-transform: uppercase; letter-spacing: 0.5px; }
.correct-pill { background: rgba(16, 185, 129, 0.25); color: #fff; }
.wrong-pill { background: rgba(239, 68, 68, 0.25); color: #fff; }
.skipped-pill { background: rgba(255,255,255,0.15); color: #fff; }
.time-pill { background: rgba(255,255,255,0.15); color: #fff; }

/* Subject analysis table */
.mock-subject-analysis {
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 20px;
}
.mock-analysis-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.mock-analysis-table th {
  background: #F8FAFC;
  padding: 10px 12px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}
.mock-analysis-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text);
}
.mock-analysis-table tr:last-child td { border-bottom: none; }
.mock-result-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 8px 0 16px;
}

/* ── Mock Review Screen ── */
.mock-subject-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 16px;
  scrollbar-width: none;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.mock-subject-chips::-webkit-scrollbar { display: none; }
.review-chip {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
}
.review-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.review-card {
  background: var(--surface);
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.review-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.review-q-num { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); }
.review-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}
.review-badge.correct { background: #ECFDF5; color: #059669; }
.review-badge.wrong { background: #FEF2F2; color: #DC2626; }
.review-badge.skipped { background: #F9FAFB; color: #6B7280; }
.review-q-text { font-size: 0.9rem; font-weight: 500; color: var(--text); line-height: 1.5; margin-bottom: 12px; }
.review-opts { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.review-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  background: var(--bg);
}
.review-opt.correct { background: #ECFDF5; color: #065F46; font-weight: 600; }
.review-opt.wrong { background: #FEF2F2; color: #991B1B; }
.review-opt-letter {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
}
.review-explanation {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  background: #FFFBEB;
  border-radius: 8px;
  border-left: 3px solid #F59E0B;
  font-size: 0.8125rem;
  color: #78350F;
  line-height: 1.5;
}
.review-explanation .material-icons-round { font-size: 16px; color: #F59E0B; flex-shrink: 0; margin-top: 1px; }

/* ============ NEWS SHORTS ============ */
.shorts-page {
  width: 100%;
  height: 100vh;
  background: #000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.shorts-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent);
  color: #fff;
}

.shorts-header h1 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin: 0;
}

.shorts-live-dot {
  width: 8px; height: 8px;
  background: #EF4444;
  border-radius: 50%;
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.shorts-container {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.shorts-loading, .shorts-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  gap: 16px;
}

.shorts-loading p, .shorts-empty p, .shorts-empty h3 {
  color: rgba(255,255,255,0.7);
  font-size: 1rem;
  text-align: center;
}

.shorts-empty .material-icons-round {
  font-size: 64px;
  color: rgba(255,255,255,0.3);
}

.shorts-spinner {
  width: 40px; height: 40px;
  border: 3px solid rgba(255,255,255,0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Short card */
.short-card {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
}

/* Cinematic gradient overlay */
.short-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0,0,0,0.2) 35%,
    rgba(0,0,0,0.75) 65%,
    rgba(0,0,0,0.95) 100%
  );
  pointer-events: none;
}

/* Top bar */
.short-topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 56px 16px 14px;
}

.short-category-pill {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.short-counter {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.7);
  background: rgba(0,0,0,0.4);
  padding: 4px 10px;
  border-radius: 20px;
}

/* TikTok icon column */
.short-actions-col {
  position: absolute;
  right: 16px;
  bottom: 130px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.short-action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.short-action-item:hover { transform: scale(1.1); }
.short-action-item:active { transform: scale(0.95); }

.short-action-icon {
  width: 50px; height: 50px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.short-action-icon .material-icons-round { color: #fff; font-size: 22px; }
.short-action-icon.quiz-icon .material-icons-round { color: #FFD700; }

.short-action-label {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.8);
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.shorts-btn-spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,215,0,0.3);
  border-top-color: #FFD700;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* Bottom content */
.short-content {
  position: relative;
  z-index: 10;
  padding: 0 16px 24px;
  max-width: calc(100% - 80px); /* leave room for side icons */
  flex-shrink: 0;
}

.short-exam-pill {
  display: inline-block;
  background: rgba(245, 158, 11, 0.88);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
  margin-bottom: 10px;
  letter-spacing: 0.3px;
}

.short-title {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.3;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
  margin: 0 0 10px 0;
}

.short-summary-wrap { position: relative; }

.short-summary {
  color: rgba(255,255,255,0.85);
  font-size: 0.875rem;
  line-height: 1.55;
  text-shadow: 0 1px 4px rgba(0,0,0,0.7);
  margin: 0;
  transition: max-height 0.3s ease;
}

.short-summary.collapsed {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

.short-see-more {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  padding: 4px 0 0;
  display: block;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
  transition: color 0.2s;
}

.short-see-more:hover { color: #FFD700; }

/* Navigation arrows */
.short-nav-arrows {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.short-nav-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
}

.short-nav-btn:disabled { opacity: 0.2; cursor: not-allowed; }
.short-nav-btn:not(:disabled):hover { background: rgba(255,255,255,0.3); }

/* ============================================
   UI/UX POLISH v3 — Professional Overhaul
   ============================================ */

/* --- Bottom Nav: Prevent content overlap --- */
.has-bottom-nav .page-body {
  padding-bottom: 80px;
}

/* --- Compact Exam Cards --- */
.exam-card {
  padding: 28px 16px;
}
.exam-card .exam-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 12px;
}
.exam-card .exam-icon .material-icons-round {
  font-size: 26px;
}

/* --- Compact Subject Cards --- */
.subject-card {
  border-radius: 20px;
  padding: 24px 16px;
}
.subject-card .subject-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 10px;
}
.subject-card .subject-icon .material-icons-round {
  font-size: 26px;
}

/* --- Section titles: left-aligned, smaller --- */
.page-body .section-title {
  text-align: left;
  font-size: 1.0625rem;
  margin-bottom: 12px;
}
.page-body .section-desc {
  text-align: left;
  font-size: 0.8125rem;
  margin-bottom: 16px;
}

/* --- Quick Action Banners (replacing icon grid) --- */
.quick-action-banners {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}
.qa-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
  border: 1px solid var(--border-light);
  background: var(--surface);
}
.qa-banner:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.qa-banner .qa-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.qa-banner .qa-icon .material-icons-round {
  font-size: 22px;
  color: #fff;
}
.qa-banner .qa-text h4 {
  font-size: 0.9375rem;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}
.qa-banner .qa-text p {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin: 2px 0 0;
}
.qa-banner .qa-arrow {
  margin-left: auto;
  color: var(--text-muted);
}
.qa-banner.qa-practice {
  background: linear-gradient(135deg, #4F46E5 0%, #6366F1 100%);
  border-color: transparent;
  color: #fff;
}
.qa-banner.qa-practice .qa-icon {
  background: rgba(255,255,255,0.2);
}
.qa-banner.qa-practice .qa-text h4 { color: #fff; }
.qa-banner.qa-practice .qa-text p { color: rgba(255,255,255,0.8); }
.qa-banner.qa-practice .qa-arrow { color: rgba(255,255,255,0.8); }

/* --- Performance Trend: empty state --- */
.perf-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: var(--text-muted);
  text-align: center;
  gap: 8px;
}
.perf-empty-state .material-icons-round {
  font-size: 40px;
  opacity: 0.4;
}
.perf-empty-state p {
  font-size: 0.8125rem;
}


/* --- Test type cards: tighter --- */
.testtype-card {
  padding: 18px 20px;
}
.testtype-icon {
  width: 48px;
  height: 48px;
}
.testtype-icon .material-icons-round {
  font-size: 24px;
}

/* --- Topic cards: more professional --- */
.topic-card {
  padding: 14px 16px;
  border-radius: 12px;
  margin-bottom: 10px;
}

/* --- Quiz cards: cleaner --- */
.quiz-card {
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
}

/* --- Performance stats card: tighter --- */
.home-perf-card {
  border-radius: 14px;
  overflow: hidden;
}
.home-perf-card .card-body {
  padding: 14px;
}

/* --- Home header rank bar polish --- */
.home-rank-bar {
  margin-top: 8px;
}

/* --- Bottom nav z-index enforcement --- */
.bottom-nav {
  z-index: 100;
}
