/* ================================================
MAIN STYLESHEET - SINGLE SOURCE OF TRUTH
Quantify Unified Design System
================================================ */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

/* ================================================
LIGHT MODE (DEFAULT) - CSS VARIABLES
================================================ */
:root {
  /* Light mode gradient */
  --bg: radial-gradient(circle at center, #B3DAFF 0%, #A3CFFF 35%, #E6F2FF 70%);
  --card: rgba(255, 255, 255, 0.2);
  --text: #2C3E50;
  --text-light: #4A5568;
  --text-muted: #6B7280;
  --border: rgba(255, 255, 255, 0.3);
  --accent: #4A90E2;
  --hover: #5BA0F2;
  --glass: rgba(255, 255, 255, 0.15);
  --glass-hover: rgba(255, 255, 255, 0.25);
  
  /* Alert colors */
  --success: #28a745;
  --success-light: rgba(40, 167, 69, 0.1);
  --success-dark: #1e7e34;
  --danger: #dc3545;
  --danger-light: rgba(220, 53, 69, 0.1);
  --danger-dark: #bd2130;
  --warning: #ffc107;
  --warning-light: rgba(255, 193, 7, 0.1);
  --warning-dark: #e0a800;
  --info: #17a2b8;
  --info-light: rgba(23, 162, 184, 0.1);
  --info-dark: #138496;
}



/* ================================================
BASE STYLES
================================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Roboto', sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding: 0;
  position: relative;
  transition: all 0.3s ease;
}

/* Light mode background overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}



/* ================================================
NAVBAR STYLES
================================================ */
.navbar {
  height: 72px;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  padding: 0.3rem 0.8rem;
  transition: all 0.3s ease;
}

.logo-link img {
  height: 45px;
  width: auto;
  filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
  transition: all 0.3s ease;
}

.logo-link:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.login-link {
  background: var(--accent);
  color: white;
  border: 2px solid white;
  font-weight: 600;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: inline-block;
  text-align: center;
  min-width: 120px;
}

.login-link:hover {
  background: var(--hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.page-content {
  padding-top: 72px;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  margin-top: 72px;
}

/* Navbar dropdown and profile icon styles */
.profile-container {
  position: relative;
}

.profile-icon {
  width: 45px;
  height: 45px;
  background: var(--accent);
  border: 2px solid white;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  user-select: none;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.profile-icon:hover {
  background: var(--hover);
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

.dropdown-menu {
  position: absolute;
  top: 55px;
  right: 0;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1001;
}

.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text);
  text-decoration: none;
  transition: all 0.2s ease;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover {
  background: rgba(74, 144, 226, 0.1);
  color: var(--accent);
}





/* ================================================
UNIVERSAL BUTTON SYSTEM
================================================ */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 120px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  background: var(--accent);
  color: white;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  background: var(--hover);
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

/* Button variants */
.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--hover);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--border);
}

.btn-secondary:hover {
  background: var(--glass-hover);
  border-color: var(--accent);
  color: var(--accent);
}

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

.btn-danger:hover {
  background: var(--danger-dark);
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover {
  background: var(--success-dark);
}

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

.btn-warning:hover {
  background: var(--warning-dark);
}

/* Quiz-specific button styling */
.quiz-btn {
  background: linear-gradient(135deg, var(--accent) 0%, var(--hover) 100%);
  color: white;
  border: none;
  padding: 1rem 2.5rem;
  border-radius: 20px;
  text-decoration: none;
  display: block;
  font-weight: 600;
  transition: all 0.3s ease;
  text-align: center;
  width: auto;
  max-width: 200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  font-family: 'Roboto', sans-serif;
  font-size: 1.1rem;
  box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.quiz-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(74, 144, 226, 0.4);
  background: linear-gradient(135deg, #5BA0F2 0%, #3E6BCA 100%);
}

.quiz-btn.secondary {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--border);
}

.quiz-btn.secondary:hover {
  background: var(--glass-hover);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(74, 144, 226, 0.2);
}

/* ================================================
UNIVERSAL ALERT SYSTEM
================================================ */
.alert {
  padding: 12px 16px;
  margin-bottom: 20px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
}

.alert-success {
  background-color: var(--success-light);
  color: var(--success-dark);
  border-color: var(--success);
}

.alert-success::before {
  content: "✅";
  font-size: 1.1rem;
}

.alert-danger,
.alert-error {
  background-color: var(--danger-light);
  color: var(--danger-dark);
  border-color: var(--danger);
}

.alert-danger::before,
.alert-error::before {
  content: "⚠️";
  font-size: 1.1rem;
}

.alert-warning {
  background-color: var(--warning-light);
  color: var(--warning-dark);
  border-color: var(--warning);
}

.alert-warning::before {
  content: "⏱️";
  font-size: 1.1rem;
}

.alert-info {
  background-color: var(--info-light);
  color: var(--info-dark);
  border-color: var(--info);
}

.alert-info::before {
  content: "ℹ️";
  font-size: 1.1rem;
}

/* Flash Messages Container */
.flash-messages-container {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  max-width: 500px;
  width: 90%;
  pointer-events: none;
}

.flash-messages-container .alert {
  pointer-events: auto;
  margin-bottom: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: slideDown 0.3s ease-out;
}

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

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

/* Success/Error message animations */
.success-message,
.error-message {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-weight: 500;
  animation: slideInFromTop 0.5s ease-out;
}

.success-message {
  background-color: var(--success-light);
  color: var(--success-dark);
  border: 1px solid var(--success);
}

.error-message {
  background-color: var(--danger-light);
  color: var(--danger-dark);
  border: 1px solid var(--danger);
}

@keyframes slideInFromTop {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================================================
LAYOUT UTILITIES
================================================ */
.text-center {
  text-align: center;
}

.centered-content {
  text-align: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.auth-buttons {
  display: flex;
  flex-direction: row;
  gap: 1.5rem;
  justify-content: center;
  align-items: center;
  margin: 1rem auto;
  width: 100%;
  text-align: center;
  flex-wrap: wrap;
}

.flex-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.inline-form {
  display: inline;
}

.no-margin {
  margin: 0;
}

.empty-state {
  text-align: center;
  padding: 20px;
  color: var(--text-muted);
}



/* ================================================
RESPONSIVE DESIGN
================================================ */
.shadow-strong {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* ================================================
QUIZ PAGE LAYOUTS
================================================ */
.index-main {
  padding: 1rem 0;
}

.quiz-title {
  font-family: 'Roboto', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin: 2rem 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.quiz-section {
  margin: 3rem 0;
  padding: 0 1rem;
}

.quiz-section h2 {
  font-size: 2.2rem;
  margin-bottom: 2.5rem;
  text-align: center;
  color: var(--text);
  font-weight: 700;
}

.quiz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 1rem;
}

.quiz-card {
  background: var(--card);
  border-radius: 25px;
  padding: 2.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 10px 20px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.quiz-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.quiz-card:hover::before {
  left: 100%;
}

.quiz-card:hover {
  border-color: var(--accent);
  box-shadow: 
    0 12px 25px rgba(0, 0, 0, 0.15),
    0 25px 50px rgba(0, 0, 0, 0.2),
    0 0 20px rgba(74, 144, 226, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.quiz-card h3 {
  font-family: 'Roboto', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.2rem;
  position: relative;
  z-index: 1;
  text-align: center;
  line-height: 1.3;
}

.quiz-card p {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
  font-weight: 500;
  text-align: center;
  line-height: 1.5;
}

.quiz-info {
  color: var(--text-light);
  margin-bottom: 2rem;
  font-weight: 500;
  position: relative;
  z-index: 1;
  text-align: center;
  font-size: 1rem;
}

/* ================================================
HOMEPAGE ENHANCED STYLES
================================================ */
.homepage-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Welcome Section */
.welcome-section {
  margin-bottom: 3rem;
}

.welcome-content {
  background: var(--card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.welcome-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.user-avatar {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--hover) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(74, 144, 226, 0.3);
}

.welcome-text {
  flex: 1;
}

.welcome-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.welcome-subtitle {
  font-size: 1.2rem;
  color: var(--text-light);
  font-weight: 400;
}

/* Quick Stats */
.quick-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.stat-card {
  background: var(--glass);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(0, 0, 0, 0.25);
  box-shadow: 4px 4px 4px rgba(0, 0, 0, 0.25);
  border-radius: 15px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  background: var(--glass-hover);
}

.stat-icon {
  width: 50px;
  height: 50px;
  background: var(--accent);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
}

.stat-info {
  flex: 1;
}

.stat-number {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  margin-bottom: 0.2rem;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Section Headers */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 2.2rem;
  color: var(--text);
  margin-bottom: 0.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.section-header p {
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

/* Quick Actions Section */
.quick-actions-section {
  margin-bottom: 4rem;
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.action-card {
  background: var(--card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 2rem;
  text-decoration: none;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.action-card:hover {
  transform: translateY(-5px);
  background: var(--glass-hover);
  box-shadow: 0 15px 30px rgba(0,0,0,0.1);
  text-decoration: none;
}

.action-card.admin {
  border-color: var(--warning);
}

.action-card.admin:hover {
  border-color: var(--warning-dark);
}

.action-icon {
  width: 60px;
  height: 60px;
  background: var(--accent);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
}

.action-card.admin .action-icon {
  background: var(--warning);
  color: var(--text);
}

.action-content h3 {
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.action-content p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

/* Quizzes Section */
.quizzes-section {
  margin-bottom: 4rem;
}

/* Simplified Quiz Grid - Fixed 3 columns */
.quiz-grid-simple {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.quiz-card-simple {
  background: var(--card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 1.65rem; /* Increased by 10% from 1.5rem */
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.quiz-card-simple::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s ease;
}

.quiz-card-simple:hover::before {
  left: 100%;
}

.quiz-card-simple:hover {
  transform: translateY(-5px);
  background: var(--glass-hover);
  box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.quiz-title-simple {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.8rem;
  line-height: 1.3;
}

.quiz-questions {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.quiz-btn-simple {
  background: linear-gradient(135deg, var(--accent) 0%, var(--hover) 100%);
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 12px;
  text-decoration: none;
  display: inline-block;
  font-weight: 600;
  transition: all 0.3s ease;
  font-size: 1rem;
  box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.quiz-btn-simple:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(74, 144, 226, 0.4);
  text-decoration: none;
  color: white;
}


/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 20px;
}

.empty-icon {
  font-size: 4rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.empty-state h3 {
  color: var(--text);
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.empty-state p {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 2rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* Statistics Section */
.statistics-section {
  margin-bottom: 4rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.stats-card {
  background: var(--card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
  transition: all 0.3s ease;
}

.stats-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.stats-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.stats-header h3 {
  color: var(--text);
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0;
}

.performance-badge .badge {
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
}

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

.badge.good {
  background: var(--warning-light);
  color: var(--warning-dark);
}

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

.stats-content {
  text-align: center;
}

/* Progress Ring Large */
.progress-ring-large {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 1rem;
}

.progress-circle-large {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(var(--accent) 0deg 0deg, var(--glass) 0deg 360deg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background 1s ease;
}

.progress-circle-large::before {
  content: '';
  position: absolute;
  width: 80px;
  height: 80px;
  background: var(--card);
  border-radius: 50%;
}

.progress-text-large {
  position: relative;
  z-index: 1;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--text);
}

.progress-label {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

/* Streak Display */
.streak-display {
  text-align: center;
  margin-bottom: 1rem;
}

.streak-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.streak-label {
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 500;
}

.streak-bar {
  width: 100%;
  height: 8px;
  background: var(--glass);
  border-radius: 4px;
  overflow: hidden;
}

.streak-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--hover) 100%);
  border-radius: 4px;
  transition: width 1s ease;
}

/* Activity List */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--glass);
  border-radius: 12px;
}

.activity-icon {
  width: 40px;
  height: 40px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
}

.activity-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.activity-title {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
}

.activity-time {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ================================================
TOUCH-FRIENDLY MOBILE ENHANCEMENTS
================================================ */
@media (max-width: 768px) and (pointer: coarse) {
  /* Ensure minimum touch target size of 44px for all interactive elements */
  .btn,
  .quiz-btn,
  .profile-icon,
  .dropdown-item,
  .nav-link,
  .feature-card,
  .category-card,
  .action-card {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Remove hover effects on touch devices */
  .btn:hover,
  .quiz-btn:hover,
  .feature-card:hover,
  .category-card:hover,
  .action-card:hover {
    transform: none;
  }
  
  /* Add active states for better touch feedback */
  .btn:active,
  .quiz-btn:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
  }
  
  /* Increase spacing for better touch ergonomics */
  .form-control,
  .form-select {
    padding: 1rem;
  }
  
  /* Make dropdowns more touch-friendly */
  .dropdown-item {
    padding: 1rem;
  }
}

/* ================================================
RESPONSIVE DESIGN
================================================ */
@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  
  .quiz-grid-simple {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  .container {
    padding: 0 1.5rem;
  }
}

@media (max-width: 1024px) {
  .navbar {
    padding: 1rem 1.5rem;
  }
  
  .page-content {
    padding: 1.5rem;
    margin-top: 80px;
  }
  
  .quiz-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
  }
  
  .quiz-grid-simple {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .form-container {
    max-width: 100%;
    padding: 2rem;
  }
  
  .quiz-card {
    padding: 1.5rem;
    min-height: 220px;
  }
  
  .stats-card {
    padding: 2rem;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 1rem;
    height: auto;
    min-height: 70px;
  }
  
  .nav-right {
    margin-left: auto;
  }
  
  .auth-buttons {
    flex-direction: column;
    gap: 1rem;
  }
  
  .quiz-btn,
  .btn {
    width: 100%;
    min-width: auto;
    padding: 0.8rem 1.5rem;
    font-size: 0.95rem;
  }
  
  .centered-content {
    padding: 0 1rem;
  }
  
  .page-content {
    padding: 1rem;
    margin-top: 70px;
  }
  
  .quiz-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
  }
  
  .quiz-grid-simple {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .quiz-card {
    padding: 2rem;
    min-height: 200px;
  }
  
  .quiz-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
  }
  
  .quiz-card p,
  .quiz-info {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .form-container {
    max-width: 100%;
    padding: 1.5rem;
    margin: 1rem;
  }
  
  .form-group {
    margin-bottom: 1.5rem;
  }
  
  .input-group {
    flex-direction: column;
  }
  
  .input-group-text {
    border-radius: 12px 12px 0 0;
    border-right: 2px solid var(--border);
    border-bottom: none;
  }
  
  .option-input {
    border-radius: 0 0 12px 12px !important;
    border: 2px solid var(--border) !important;
    border-top: none !important;
  }
  
  /* Homepage responsive styles */
  .homepage-container {
    padding: 1rem 0.5rem;
  }
  
  .welcome-content {
    padding: 2rem;
  }
  
  .welcome-header {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  
  .welcome-title {
    font-size: 2rem;
  }
  
  .welcome-subtitle {
    font-size: 1rem;
  }
  
  .quick-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .stat-card {
    padding: 1rem;
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
  
  .stat-number {
    font-size: 1.5rem;
  }
  
  .section-header h2 {
    font-size: 1.8rem;
    flex-direction: column;
    gap: 0.3rem;
  }
  
  .quick-actions-grid {
    grid-template-columns: 1fr;
  }
  
  .action-card {
    padding: 1.5rem;
    text-align: center;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-card {
    padding: 1.5rem;
  }
  
  .progress-ring-large {
    width: 100px;
    height: 100px;
  }
  
  .progress-circle-large::before {
    width: 70px;
    height: 70px;
  }
  
  .progress-text-large {
    font-size: 1.2rem;
  }
  
  .streak-number {
    font-size: 2.5rem;
  }
  
  .quiz-card {
    padding: 1.5rem;
  }
  
  .quiz-header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .quiz-features {
    justify-content: center;
  }
  
  .dropdown-menu {
    position: fixed;
    top: 70px;
    right: 1rem;
    left: auto;
    width: calc(100% - 2rem);
    max-width: 300px;
  }
}

@media (max-width: 480px) {
  .navbar {
    height: 60px;
    padding: 0.5rem 1rem;
  }
  
  .page-content {
    padding: 1rem 0.5rem;
    margin-top: 60px;
  }
  
  .profile-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .logo-link img {
    height: 35px;
  }
  
  .form-container {
    margin: 0.5rem;
    padding: 1rem;
    border-radius: 16px;
  }
  
  .btn {
    padding: 0.7rem 1.2rem;
    font-size: 0.9rem;
  }
  
  .form-control,
  .form-select {
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  .card-header {
    padding: 1rem;
  }
  
  .quiz-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1rem;
  }
  
  .quiz-card {
    padding: 1.5rem;
    min-height: 180px;
  }
  
  .quiz-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
  }
  
  .quiz-card p,
  .quiz-info {
    font-size: 0.9rem;
    margin-bottom: 1.2rem;
  }
  
  .quiz-btn {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .centered-content {
    padding: 0 0.5rem;
  }
  
  .quiz-title {
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
  }
  
  .subtitle {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .glass-card {
    padding: 1.5rem;
    margin: 1.5rem 0 !important;
  }
  
  .action-buttons {
    flex-direction: column;
    gap: 0.8rem;
  }
  
  .action-buttons .btn {
    width: 100%;
    justify-content: center;
  }
  
  /* Homepage mobile styles */
  .homepage-container {
    padding: 0.5rem;
  }
  
  .welcome-content {
    padding: 1.5rem;
  }
  
  .user-avatar {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }
  
  .welcome-title {
    font-size: 1.8rem;
  }
  
  .quick-stats {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }
  
  .stat-card {
    padding: 1rem;
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
  
  .stat-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .stat-number {
    font-size: 1.3rem;
  }
  
  .section-header h2 {
    font-size: 1.5rem;
  }
  
  .action-card {
    padding: 1rem;
    flex-direction: column;
    text-align: center;
    gap: 0.8rem;
  }
  
  .action-icon {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }
  
  .quiz-features {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .feature-badge {
    font-size: 0.8rem;
    padding: 0.3rem 0.8rem;
  }
  
  .progress-ring-large {
    width: 80px;
    height: 80px;
  }
  
  .progress-circle-large::before {
    width: 60px;
    height: 60px;
  }
  
  .progress-text-large {
    font-size: 1rem;
  }
  
  .streak-number {
    font-size: 2rem;
  }
  
  .activity-item {
    padding: 0.8rem;
  }
  
  .activity-icon {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
  }
  
  .quiz-card {
    padding: 1rem;
  }
  
  .quiz-title {
    font-size: 3rem;
  }
  
  .quiz-description {
    font-size: 0.9rem;
  }
  
  .dropdown-menu {
      position: fixed;
      background: rgb(216 234 255);
      top: 70px;
      right: 0.5rem;
      left: 13.5rem;
      width: auto;
      max-width: 20px;
      border: 2px solid rgba(0, 0, 0, 0.258);
  }
}

/* ================================================
EDIT QUESTION PAGE STYLES
================================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.mt-4 {
  margin-top: 2rem;
}

.mb-4 {
  margin-bottom: 2rem;
}

.mb-3 {
  margin-bottom: 1.5rem;
}

.mb-2 {
  margin-bottom: 1rem;
}

.ms-1 {
  margin-left: 0.25rem;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -0.75rem;
}

.col-md-8 {
  flex: 0 0 auto;
  width: 66.66666667%;
  padding: 0 0.75rem;
  max-width: 100%;
}

.justify-content-center {
  justify-content: center;
}

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

.align-items-center {
  align-items: center;
}

.d-flex {
  display: flex;
}

.card {
  background: var(--card);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  overflow: hidden;
}

.card-header {
  background: rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem;
}

.card-header h5 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
}

.card-body {
  padding: 2rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text);
}

.form-select,
.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font-size: 1rem;
  transition: all 0.3s ease;
  font-family: 'Roboto', sans-serif;
}

.form-select:focus,
.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
  background: rgba(255, 255, 255, 1);
}

.form-text {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.text-danger {
  color: var(--danger) !important;
}

.text-muted {
  color: var(--text-muted) !important;
}

.option-row {
  margin-bottom: 1rem;
}

.input-group {
  display: flex;
  width: 100%;
  align-items: stretch;
}

.input-group-text {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  background: rgba(255, 255, 255, 0.7);
  border: 2px solid var(--border);
  border-right: none;
  border-radius: 12px 0 0 12px;
}

.option-input {
  border-radius: 0 !important;
  border-left: none !important;
  border-right: none !important;
}

.input-group .form-control:last-child {
  border-radius: 0 12px 12px 0;
  border-right: 2px solid var(--border);
}

.input-group .input-group-text:last-child {
  border-radius: 0 12px 12px 0;
  border-left: none;
  border-right: 2px solid var(--border);
}

.form-check-input {
  margin-right: 0.5rem;
}

.form-check-label {
  font-size: 0.875rem;
  font-weight: 500;
}

.btn-outline-primary {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.btn-outline-primary:hover {
  background: var(--accent);
  color: white;
}

.btn-outline-danger {
  background: transparent;
  color: var(--danger);
  border: 2px solid var(--danger);
  padding: 0.5rem;
  border-radius: 8px;
}

.btn-outline-danger:hover {
  background: var(--danger);
  color: white;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-success {
  background: var(--success);
  color: white;
  border: none;
}

.btn-success:hover {
  background: var(--success-dark);
}

/* Alert styles */
.alert {
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  border-radius: 12px;
  border: 1px solid transparent;
}

.alert-success {
  background: var(--success-light);
  border-color: var(--success);
  color: var(--success-dark);
}

.alert-danger {
  background: var(--danger-light);
  border-color: var(--danger);
  color: var(--danger-dark);
}

.alert-dismissible {
  position: relative;
  padding-right: 3rem;
}

.btn-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  opacity: 0.5;
}

.btn-close:hover {
  opacity: 1;
}

@media (max-width: 768px) {
  .col-md-8 {
    width: 100%;
  }
  
  .card-body {
    padding: 1.5rem;
  }
  
  .d-flex {
    flex-direction: column;
    gap: 1rem;
  }
  
  .justify-content-between {
    justify-content: center;
  }
}
