/* Quiz Styles */
.quiz-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.95), rgba(168, 85, 247, 0.95));
  z-index: 1000;
  display: none;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(10px);
}

.quiz-container {
  background: white;
  border-radius: 20px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.quiz-header {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: white;
  padding: 30px;
  border-radius: 20px 20px 0 0;
  text-align: center;
}

.quiz-title {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 10px 0;
}

.quiz-subtitle {
  font-size: 16px;
  opacity: 0.9;
  margin: 0;
}

.quiz-progress {
  padding: 20px 30px;
  border-bottom: 1px solid #e5e7eb;
}

.progress-bar {
  background: #f3f4f6;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-fill {
  background: linear-gradient(90deg, #6366f1, #a855f7);
  height: 100%;
  transition: width 0.3s ease;
  border-radius: 4px;
}

.progress-text {
  font-size: 14px;
  color: #6b7280;
  text-align: center;
}

.quiz-content {
  padding: 30px;
}

.quiz-intro {
  text-align: center;
  margin-bottom: 30px;
}

.quiz-intro h3 {
  color: #374151;
  font-size: 24px;
  margin-bottom: 15px;
}

.quiz-intro p {
  color: #6b7280;
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 15px;
}

.likert-scale-info {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
}

.likert-scale-info h4 {
  color: #374151;
  font-size: 18px;
  margin-bottom: 15px;
  text-align: center;
}

.scale-items {
  display: grid;
  gap: 8px;
}

.scale-item {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  background: white;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.scale-number {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  margin-right: 12px;
  flex-shrink: 0;
}

.scale-description {
  color: #374151;
  font-size: 14px;
  flex: 1;
}

.question-container {
  background: #f8fafc;
  border-radius: 16px;
  padding: 25px;
  margin-bottom: 30px;
  border: 1px solid #e2e8f0;
}

.question-number {
  color: #6366f1;
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 10px;
}

.question-text {
  color: #374151;
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 15px;
  line-height: 1.5;
}

.question-notes {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
}

.question-notes h5 {
  color: #ea580c;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.question-notes ul {
  margin: 0;
  padding-left: 20px;
}

.question-notes li {
  color: #9a3412;
  font-size: 14px;
  margin-bottom: 4px;
  line-height: 1.4;
}

.likert-options {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  margin-top: 20px;
}

.likert-option {
  position: relative;
}

.likert-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  margin: 0;
}

.likert-option label {
  display: block;
  text-align: center;
  padding: 15px 8px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
}

.likert-option label:hover {
  border-color: #6366f1;
  background: #f0f9ff;
  transform: translateY(-2px);
}

.likert-option input[type="radio"]:checked + label {
  border-color: #6366f1;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.option-number {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 5px;
}

.option-text {
  font-size: 12px;
  line-height: 1.3;
}

.quiz-actions {
  padding: 20px 30px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quiz-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 16px;
}

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

.btn-primary {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}

.btn-secondary:hover:not(:disabled) {
  background: #e5e7eb;
}

.quiz-results {
  text-align: center;
  padding: 40px 30px;
}

.results-header {
  margin-bottom: 30px;
}

.results-title {
  font-size: 28px;
  font-weight: 700;
  color: #374151;
  margin-bottom: 10px;
}

.results-subtitle {
  font-size: 16px;
  color: #6b7280;
}

.score-display {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 30px;
}

.score-card {
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  border: 1px solid #bae6fd;
  border-radius: 16px;
  padding: 25px;
  text-align: center;
}

.score-label {
  font-size: 14px;
  color: #0369a1;
  font-weight: 600;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.score-value {
  font-size: 32px;
  font-weight: 700;
  color: #0c4a6e;
  margin-bottom: 5px;
}

.score-max {
  font-size: 14px;
  color: #0369a1;
}

.personality-type {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: white;
  border-radius: 16px;
  padding: 30px;
  margin-bottom: 30px;
}

.personality-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 10px;
}

.personality-subtitle {
  font-size: 18px;
  opacity: 0.9;
  margin-bottom: 15px;
}

.personality-description {
  font-size: 16px;
  line-height: 1.6;
  opacity: 0.95;
}

.recommendations {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 25px;
  text-align: left;
}

.recommendations h4 {
  color: #374151;
  font-size: 20px;
  margin-bottom: 20px;
  text-align: center;
}

.recommendation-item {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 15px;
}

.recommendation-item:last-child {
  margin-bottom: 0;
}

.recommendation-item h5 {
  color: #374151;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
}

.recommendation-item p {
  color: #6b7280;
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 768px) {
  .quiz-container {
    width: 95%;
    margin: 10px;
  }
  
  .quiz-header {
    padding: 20px;
  }
  
  .quiz-title {
    font-size: 24px;
  }
  
  .quiz-content {
    padding: 20px;
  }
  
  .likert-options {
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
  }
  
  .likert-option label {
    padding: 10px 4px;
  }
  
  .option-number {
    font-size: 16px;
  }
  
  .option-text {
    font-size: 10px;
  }
  
  .score-display {
    grid-template-columns: 1fr;
  }
  
  .quiz-actions {
    padding: 15px 20px;
    flex-direction: column;
    gap: 10px;
  }
  
  .quiz-btn {
    width: 100%;
  }
}

/* Loading animation for quiz */
.quiz-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
}

.quiz-loading .spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f4f6;
  border-top: 4px solid #6366f1;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}