body {
  min-height: 80vh;
  margin: 0;
  font-family: "Segoe UI", "Roboto", Arial, sans-serif;
  color: #f5f6fa;
  background: linear-gradient(135deg, #3a1c71, #d76d77, #ffaf7b);
  background-attachment: fixed;
  line-height: 1.6;
  padding-top: 80px;
}

/* Navigation */
.navbar {
  background: rgba(44, 62, 80, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 0;
  margin-bottom: 5rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.navbar-content {
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1rem;
  position: relative;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.navbar-home-btn {
  background: rgba(46, 204, 113, 0.9);
  color: #fff;
  border-radius: 5px;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-home-btn:hover {
  background: rgba(46, 204, 113, 1);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.navbar-action-btn {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  white-space: nowrap;
}

.navbar-action-btn:hover {
  background: linear-gradient(135deg, #2980b9, #3498db);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.navbar-action-btn.primary {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.navbar-action-btn.primary:hover {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}

.navbar-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-title i {
  color: #3498db;
}

/* Container Layouts */
.quiz-setup-container {
  max-width: 70dvw;
  margin: 3rem auto 2rem auto;
  padding: 0 1rem;
}

.questions-container {
  max-width: 900px;
  margin: 0 auto 2rem auto;
  padding: 0 1rem;
}

.save-section {
  max-width: 800px;
  margin: 0 auto 0 auto;
  padding: 0 1rem;
}

/* Form Sections */
.form-section {
  background: rgba(44, 62, 80, 0.95);
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  margin-bottom: 2rem;
}

.form-section h2 {
  color: #fff;
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0 0 1.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-section h2 i {
  color: #2ecc71;
}

/* Section Headers */
.section-header {
  text-align: center;
  margin-bottom: 2rem;
}

.section-header h2 {
  color: #fff;
  font-size: 1.8rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.section-header h2 i {
  color: #2ecc71;
}

.section-subtitle {
  color: #ddd;
  font-size: 1rem;
  margin: 0;
  opacity: 0.9;
}

/* Input Groups */
.input-group {
  margin-bottom: 2rem;
  width: 100%;
  box-sizing: border-box;
}

.input-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.input-group label i {
  color: #2ecc71;
  width: 16px;
}

/* Input Styles */
.quiz-title-input {
  width: 100%;
  font-size: 1.2rem;
  font-weight: 500;
  background: rgba(53, 59, 72, 0.9);
  color: #f5f6fa;
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.quiz-title-input:focus {
  background: rgba(72, 84, 96, 0.95);
  border-color: #2ecc71;
  outline: none;
  box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.2);
}

/* Category Controls */
.category-controls {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.quiz-category-select {
  flex: 1;
  min-width: 200px;
  background: rgba(53, 59, 72, 0.9);
  color: #f5f6fa;
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.quiz-category-select:focus {
  background: rgba(72, 84, 96, 0.95);
  border-color: #2ecc71;
  outline: none;
}

/* Grade Level Select */
.quiz-grade-level-select {
  width: 100%;
  background: rgba(53, 59, 72, 0.9);
  color: #f5f6fa;
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.quiz-grade-level-select:focus {
  background: rgba(72, 84, 96, 0.95);
  border-color: #2ecc71;
  outline: none;
}

/* Curated Toggle Styles */
.curated-controls {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.curated-toggle-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.curated-checkbox {
  display: none;
}

.curated-toggle-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
}

.toggle-slider {
  position: relative;
  width: 60px;
  height: 30px;
  background: rgba(127, 140, 141, 0.3);
  border-radius: 15px;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  background: #fff;
  border-radius: 50%;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.curated-checkbox:checked + .curated-toggle-label .toggle-slider {
  background: linear-gradient(135deg, #f39c12, #e67e22);
}

.curated-checkbox:checked + .curated-toggle-label .toggle-slider::before {
  transform: translateX(30px);
}

.toggle-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.curated-text {
  font-weight: 600;
  color: #f39c12;
  font-size: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  position: absolute;
}

.uncurated-text {
  font-weight: 500;
  color: #95a5a6;
  font-size: 0.9rem;
  opacity: 1;
  transition: opacity 0.3s ease;
  position: relative;
}

.curated-checkbox:checked + .curated-toggle-label .curated-text {
  opacity: 1;
  position: relative;
}

.curated-checkbox:checked + .curated-toggle-label .uncurated-text {
  opacity: 0;
  position: absolute;
}

.curated-info {
  margin-top: 0.5rem;
}

.curated-info small {
  color: #bbb;
  font-size: 0.85rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  line-height: 1.4;
}

.curated-info small i {
  color: #f39c12;
  margin-top: 0.1rem;
  flex-shrink: 0;
}

.quiz-category-input {
  width: 100%;
  background: rgba(53, 59, 72, 0.9);
  color: #f5f6fa;
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  margin-top: 1rem;
  transition: all 0.3s ease;
}

.quiz-category-input:focus {
  background: rgba(72, 84, 96, 0.95);
  border-color: #2ecc71;
  outline: none;
}

/* Upload Controls */
.upload-info {
  margin-bottom: 1rem;
}

.upload-info small {
  color: #bbb;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.upload-info i {
  color: #3498db;
}

.upload-controls {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.quiz-file-input {
  flex: 1;
  min-width: 200px;
  background: rgba(53, 59, 72, 0.9);
  color: #f5f6fa;
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.quiz-file-input:focus {
  background: rgba(72, 84, 96, 0.95);
  border-color: #2ecc71;
  outline: none;
}

.progress-container {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

progress {
  width: 200px;
  height: 8px;
  border-radius: 4px;
  background: rgba(53, 59, 72, 0.9);
  accent-color: #2ecc71;
}

#uploadProgressText {
  color: #bbb;
  font-size: 0.9rem;
  font-weight: 500;
}

.image-preview {
  max-width: 100%;
  max-height: 200px;
  border-radius: 8px;
  margin-top: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Questions List */
.questions-list {
  margin-bottom: 2rem;
}

/* Collapsed Questions */
.question-block.collapsed {
  padding: 1rem 1.5rem;
}

.question-block.collapsed .choices-container,
.question-block.collapsed .correct-answer-select,
.question-block.collapsed .add-choice-btn {
  display: none;
}

.question-block .collapse-toggle {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(52, 152, 219, 0.2);
  color: #3498db;
  border: 1px solid rgba(52, 152, 219, 0.3);
  border-radius: 6px;
  padding: 0.5rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
}

.question-block .collapse-toggle:hover {
  background: rgba(52, 152, 219, 0.3);
  border-color: rgba(52, 152, 219, 0.5);
}

/* Question Block */
.question-block {
  background: rgba(44, 62, 80, 0.95);
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  padding: 2rem;
  margin-bottom: 2rem;
  position: relative;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.question-block:hover {
  border-color: rgba(46, 204, 113, 0.3);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

.question-block label {
  color: #fff;
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.question-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.delete-question-btn {
  background: rgba(231, 112, 85, 0.9);
  border: none;
  color: #fff;
  font-size: 1.1rem;
  padding: 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.delete-question-btn:hover {
  background: rgba(214, 48, 49, 1);
  transform: scale(1.05);
}

/* Question Input */
.quiz-question-input {
  flex: 1;
  padding: 1rem 1.25rem;
  border: 2px solid transparent;
  border-radius: 10px;
  background: rgba(241, 242, 246, 0.95);
  color: #2c3e50;
  font-size: 1.1rem;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.quiz-question-input:focus {
  background: #fff;
  border-color: #2ecc71;
  outline: none;
  box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.2);
}

/* Choices */
.choices-container {
  margin: 1.5rem 0;
}

.choice-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.quiz-choice-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid transparent;
  border-radius: 8px;
  background: rgba(53, 59, 72, 0.9);
  color: #f5f6fa;
  font-size: 1rem;
  font-weight: 400;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.quiz-choice-input:focus {
  background: rgba(72, 84, 96, 0.95);
  border-color: #2ecc71;
  outline: none;
  box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.2);
}

.choice-row button {
  background: rgba(231, 112, 85, 0.9);
  border: none;
  color: #fff;
  font-size: 1rem;
  padding: 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.choice-row button:hover {
  background: rgba(214, 48, 49, 1);
  transform: scale(1.05);
}

/* Correct Answer Select */
.correct-answer-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 2px solid transparent;
  background: rgba(53, 59, 72, 0.9);
  color: #2ecc71;
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.correct-answer-select:focus {
  background: rgba(72, 84, 96, 0.95);
  border-color: #2ecc71;
  outline: none;
}

/* Add Choice Button in Question Block */
.question-block .add-choice-btn {
  background: none;
  border: none;
  color: #2ecc71;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.question-block .add-choice-btn:hover {
  color: #27ae60;
  transform: translateX(4px);
}

.question-block .add-choice-btn i {
  font-size: 1.2rem;
}

/* Action Buttons */
.action-buttons {
  text-align: center;
  margin: 2rem 0;
}

.save-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Button Styles */
.primary-button,
.secondary-button,
.danger-button {
  border: none;
  border-radius: 12px;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  min-width: 140px;
  justify-content: center;
}

.primary-button {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  color: #fff;
}

.primary-button:hover {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.secondary-button {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: #fff;
}

.secondary-button:hover {
  background: linear-gradient(135deg, #2980b9, #3498db);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.danger-button {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: #fff;
}

.danger-button:hover {
  background: linear-gradient(135deg, #c0392b, #e74c3c);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.danger-button:disabled {
  background: #7f8c8d;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.danger-button:disabled:hover {
  background: #7f8c8d;
  transform: none;
}

/* Legacy button support */
#addQuestionBtn,
.green-button,
#saveQuizBtn {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0.5rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

#addQuestionBtn:hover,
.green-button:hover,
#saveQuizBtn:hover {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

#uploadImageBtn,
#addCategoryBtn {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#uploadImageBtn:hover,
#addCategoryBtn:hover {
  background: linear-gradient(135deg, #2980b9, #3498db);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Notification */
.notification {
  position: fixed;
  top: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: none;
}

.notification.show {
  display: block;
  animation: slideInDown 0.4s ease-out;
}

#notificationBox {
  background: rgba(44, 62, 80, 0.95);
  color: #2ecc71;
  padding: 1.25rem 2rem;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  border: 2px solid #2ecc71;
  cursor: pointer;
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 300px;
  justify-content: center;
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-30px) translateX(-50%);
  }
  to {
    opacity: 1;
    transform: translateY(0) translateX(-50%);
  }
}

/* Footer */
.page-footer {
  text-align: center;
  padding: 1rem;
}

.page-footer p {
  color: #bbb;
  font-size: 0.9rem;
  margin: 0;
  opacity: 0.8;
}

/* Quiz Selection Interface */

.quiz-browser {
  background: rgba(44, 62, 80, 0.95);
  padding: 1.5rem 1.5rem;
  border-radius: 12px;
  max-width: 80dvw;
  max-height: 80dvh;
  height: 75dvh;
  margin: 1.5rem auto 1rem auto;
}

.search-controls {
  margin-bottom: 1.5rem;
  width: 100%;
  box-sizing: border-box;
}

.filter-controls {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.search-input {
  background: rgba(52, 73, 94, 0.8);
  border: 2px solid rgba(127, 140, 141, 0.3);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: #ecf0f1;
  font-size: 1rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.search-input::placeholder {
  color: #95a5a6;
}

.filter-select {
  background: rgba(52, 73, 94, 0.8);
  border: 2px solid rgba(127, 140, 141, 0.3);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: #ecf0f1;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 180px;
}

.filter-select:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.filter-select option {
  background: #34495e;
  color: #ecf0f1;
}

.quiz-list-container {
  max-height: 50dvh;
  overflow-y: auto;
  border: 2px solid rgba(127, 140, 141, 0.2);
  border-radius: 8px;
  background: rgba(52, 73, 94, 0.4);
}

.quiz-list {
  padding: 0;
}

.quiz-item {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(127, 140, 141, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
  background: transparent;
}

.quiz-item:hover {
  background: rgba(52, 152, 219, 0.1);
}

.quiz-item:last-child {
  border-bottom: none;
}

.quiz-item.selected {
  background: rgba(52, 152, 219, 0.2);
  border-left: 4px solid #3498db;
}

.quiz-item-image {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  margin-right: 1rem;
  background: rgba(127, 140, 141, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.quiz-item-image.no-image {
  color: #95a5a6;
  font-size: 1.5rem;
}

.quiz-item-content {
  flex: 1;
}

.quiz-item-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #ecf0f1;
  margin: 0 0 0.25rem 0;
}

.quiz-item-details {
  display: flex;
  gap: 1rem;
  font-size: 0.9rem;
  color: #95a5a6;
  margin: 0;
}

.quiz-item-meta {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Curated status in quiz list */
.quiz-item-meta.curated-status {
  font-weight: 600;
}

.quiz-item-meta.curated-status.is-curated {
  color: #f39c12;
}

.quiz-item-meta.curated-status.is-curated i {
  color: #f39c12;
}

.quiz-item-meta.curated-status.not-curated {
  color: #95a5a6;
}

.quiz-item-meta.curated-status.not-curated i {
  color: #95a5a6;
}

.quiz-item-actions {
  display: flex;
  gap: 0.5rem;
}

.quiz-item-select-btn {
  background: #3498db;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.quiz-item-select-btn:hover {
  background: #2980b9;
  transform: translateY(-1px);
}

.loading-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #95a5a5;
  font-size: 1.1rem;
}

.loading-state i {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: block;
}

.no-quizzes-message {
  text-align: center;
  padding: 3rem 1rem;
  color: #95a5a6;
}

.no-quizzes-message i {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
  color: #7f8c8d;
}

.no-quizzes-message p {
  font-size: 1.1rem;
  margin: 0;
}

.no-quizzes-message a {
  color: #3498db;
  text-decoration: none;
  font-weight: 500;
}

.no-quizzes-message a:hover {
  text-decoration: underline;
}

.selected-quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.selected-quiz-header h2 {
  margin: 0;
}

/* Quiz Details Collapse Functionality */
.header-buttons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.toggle-details-btn {
  background: rgba(52, 152, 219, 0.2);
  color: #3498db;
  border: 1px solid rgba(52, 152, 219, 0.3);
  border-radius: 6px;
  padding: 0.5rem;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
}

.toggle-details-btn:hover {
  background: rgba(52, 152, 219, 0.3);
  border-color: rgba(52, 152, 219, 0.5);
}

.toggle-details-btn i {
  transition: transform 0.3s ease;
}

.toggle-details-btn.collapsed i {
  transform: rotate(180deg);
}

.quiz-details-content {
  overflow: hidden;
  transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
  max-height: 2000px;
  opacity: 1;
}

.quiz-details-content.collapsed {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
}

/* Undo Notification */
.undo-notification {
  background: rgba(231, 76, 60, 0.95) !important;
  color: #fff !important;
  border: 2px solid #e74c3c !important;
  justify-content: space-between !important;
  min-width: 400px !important;
}

.undo-btn {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.undo-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
}

.undo-btn i {
  font-size: 0.8rem;
}

/* Responsive Design */
@media (max-width: 900px) {
  .quiz-setup-container,
  .questions-container,
  .save-section {
    padding: 0 1rem;
  }

  .form-section {
    padding: 1.5rem;
  }

  .question-block {
    padding: 1.5rem;
  }
}

@media (max-width: 768px) {
  .page-header h1 {
    font-size: 2rem;
  }

  .page-header {
    padding: 1.5rem 1rem;
  }

  .category-controls,
  .upload-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .quiz-category-select,
  .quiz-file-input {
    min-width: auto;
  }

  .question-row {
    flex-direction: column;
    align-items: stretch;
  }

  .delete-question-btn {
    align-self: flex-end;
    margin-top: 0.5rem;
  }

  .save-controls {
    flex-direction: column;
    align-items: center;
  }

  .primary-button,
  .secondary-button,
  .danger-button {
    width: 100%;
    max-width: 300px;
  }

  .filter-controls {
    flex-direction: column;
  }

  .quiz-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .quiz-item-image {
    margin-right: 0;
  }

  .selected-quiz-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}

@media (max-width: 500px) {
  .page-header h1 {
    font-size: 1.8rem;
  }

  .navbar-title {
    font-size: 1.2rem;
  }

  .navbar-content {
    padding: 0.75rem;
  }

  .navbar-home-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }

  .navbar-action-btn {
    padding: 0.5rem 0.8rem;
    font-size: 0.8rem;
    gap: 0.3rem;
  }

  .navbar-actions {
    gap: 0.5rem;
  }

  .form-section {
    padding: 1rem;
  }

  .search-input {
    font-size: 0.9rem;
    padding: 0.6rem 0.8rem;
  }

  .filter-controls {
    flex-direction: column;
    gap: 0.5rem;
  }

  .question-block {
    padding: 1rem;
  }

  .progress-container {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  progress {
    width: 100%;
  }
}

/* Very small screens - make navbar action buttons icon-only on mobile */
@media (max-width: 400px) {
  .navbar-action-btn {
    padding: 0.5rem;
    font-size: 0;
    min-width: auto;
    width: 40px;
    height: 40px;
    justify-content: center;
  }

  .navbar-action-btn i {
    font-size: 1rem;
    margin-right: 0 !important;
  }

  .navbar-actions {
    gap: 0.4rem;
  }

  .navbar-title {
    font-size: 1rem;
  }

  .navbar-content {
    padding: 0.5rem;
  }
}

/* Legacy styles for backward compatibility */
.red-button {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0.5rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.red-button:hover {
  background: linear-gradient(135deg, #c0392b, #e74c3c);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.red-button:disabled {
  background: #7f8c8d;
  cursor: not-allowed;
  transform: none;
}

.red-button:disabled:hover {
  background: #7f8c8d;
  transform: none;
}
