:root {
  --app-primary: #2c5282; /* Your app's main theme color */
}

.qbank-main-container, .selection-container, .bookmarks-container, .questions-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Back Button Styling */
.back-button {
  position: absolute;
  top: 0.5rem;    /* Add this to set the distance from the top */
  left: 0.5rem; 
  padding: 0.5rem;
  margin-bottom: 1rem;
  background: #2c5282;
  border: 2px solid #2c5282;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.back-button:hover {
  background: #2c5282;
  color: white;
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(44, 82, 130, 0.3);
}

.back-button i {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.9);
  transition: color 0.3s ease;
}

.back-button:hover i {
  color: white;
}


/* Header adjustments to accommodate back button */
header .header-content {
  position: relative;
  padding-left: 4rem;
}

header .header-content h1 {
  margin-left: 1rem;
}

.welcome-section {
  text-align: center;
  margin-bottom: 3rem;
}

.welcome-section h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 0.5rem;
}

.welcome-section p {
  font-size: 1.1rem;
  color: #6b7280;
  font-weight: 500;
}

/* Main Options Grid */
.main-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.option-card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  border: 2px solid transparent;
}

/* Your original unchanged styles */
.option-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: #2c5282;
}

.bookmark-card:hover {
  border-color: #f59e0b;
}

.quiz-card:hover {
  border-color: #16a34a;
}

.option-icon {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
}

.bookmark-card .option-icon {
  background: var(--app-primary);
  color: #ffffff;  /* Set icon color to theme */
}

.bookmark-card .option-icon i {
  color: inherit;
}

.quiz-card .option-icon {
  background: var(--app-primary);
  color: #ffffff;  /* Set icon color to theme */
}

.test-card .option-icon {
  background: var(--app-primary);
  color: #ffffff;  /* Set icon color to theme */
}


.option-content {
  flex: 1;
}

.option-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 0.5rem;
}

.option-content p {
  color: #6b7280;
  margin-bottom: 0.75rem;
}

.count-badge {
  background: #e5e7eb;
  color: #374151;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
}

.option-arrow {
  flex-shrink: 0;
  color: #9ca3af;
  font-size: 1.2rem;
}

/* Modified stats section only */
.stats-section {
  background: white;
  border-radius: 12px;
  padding: 1rem; /* Reduced from 2rem */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.stat-item {
  text-align: center;
  padding: 0.75rem; /* Reduced from 1rem */
  position: relative;
}

/* Add right border to all stat items except last */
.stat-item:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -0.5rem; /* Half of gap */
  top: 25%;
  height: 50%;
  width: 1px;
  background-color: #e5e7eb;
}

.stat-item i {
  font-size: 2rem;
  color: #2c5282;
  margin-bottom: 0.5rem; /* Reduced from 1rem */
}

.stat-number {
  display: block;
  font-size: 1.75rem; /* Slightly reduced from 2rem */
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 0.25rem;
}

.stat-label {
  color: #6b7280;
  font-size: 0.875rem;
  font-weight: 500;
}
/* Platforms Grid */
.platforms-grid, .subjects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.platform-card, .subject-card {
  background: white;
  border-radius: 12px;
  padding: 0.8rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  border: 2px solid transparent;
}

.platform-card:hover, .subject-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: #2c5282;
}

.subject-card.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  position: relative;
}

.subject-card.disabled:hover {
  transform: none;
  border-color: transparent;
}

.platform-icon, .subject-icon {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2c5282, #1a365d);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
}

.platform-content, .subject-content {
  flex: 1;
}

.platform-content h3, .subject-content h3 {
  font-size: 1.4rem;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 0.5rem;
}

.platform-content p, .subject-content p {
  color: #6b7280;
  margin-bottom: 0.5rem;
}

.subject-count {
  background: #e5e7eb;
  color: #374151;
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.875rem;
  font-weight: 500;
}

.coming-soon-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #f59e0b;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Chapters Grid */
.chapters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

/* Loading and Error States */
.loading-container, .error-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  text-align: center;
}

.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.loading-spinner i {
  font-size: 3rem;
  color: #2c5282;
}

.loading-spinner p {
  color: #6b7280;
  font-size: 1.1rem;
}

.error-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.error-content i {
  font-size: 4rem;
  color: #ef4444;
}

.error-content h3 {
  font-size: 1.5rem;
  color: #374151;
  margin: 0;
}

.error-content p {
  color: #6b7280;
  margin: 0;
}

/* Bookmark Groups */
.bookmark-groups {
  display: grid;
  gap: 1.5rem;
}

.bookmark-group-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 2px solid transparent;
}

.bookmark-group-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  border-color: #f59e0b;
}

.group-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.platform-badge {
  background: linear-gradient(135deg, #2c5282, #1a365d);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
}

.subject-info h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 0.25rem;
}

.question-count {
  color: #6b7280;
  font-size: 0.875rem;
}

.group-arrow {
  color: #9ca3af;
  font-size: 1.2rem;
}

/* Questions List */
.questions-list {
  display: grid;
  gap: 1.5rem;
}

.question-item {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.question-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  border-color: #2c5282;
}

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

.question-number {
  background: #2c5282;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
}

.remove-btn {
  background: #ef4444;
  color: white;
  border: none;
  padding: 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.remove-btn:hover {
  background: #dc2626;
  transform: scale(1.1);
}

.question-text {
  color: #374151;
  line-height: 1.6;
  font-size: 1rem;
  margin: 0;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: #6b7280;
}

.empty-icon {
  font-size: 4rem;
  color: #d1d5db;
  margin-bottom: 1.5rem;
}

.empty-state h3 {
  font-size: 1.5rem;
  color: #374151;
  margin-bottom: 0.5rem;
}

.empty-state p {
  margin-bottom: 2rem;
}

.action-btn {
  background: linear-gradient(135deg, #2c5282, #1a365d);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(44, 82, 130, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
  .qbank-main-container, .selection-container, .bookmarks-container, .questions-container {
    padding: 1rem;
  }

  header .header-content {
    padding-left: 3rem;
  }

  .back-button {
    left: 0.5rem;
    padding: 0.5rem;
    font-size: 1rem;
  }

  .welcome-section h2 {
    font-size: 2rem;
  }

  .main-options-grid, .platforms-grid, .subjects-grid, .chapters-grid {
    grid-template-columns: 1fr;
  }

  .option-card, .platform-card, .subject-card {
    padding: 1.5rem;
  }

  .option-icon, .platform-icon, .subject-icon {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }

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

  .stat-item {
    padding: 0.5rem;
  }

  .stat-item i {
    font-size: 1.5rem;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .group-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .question-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .question-item {
    padding: 1rem;
  }
}
