/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: #2d3748;
  line-height: 1.6;
}

/* Header Styles */
.question-header {
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.question-utility {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.question,
.timer {
  text-align: center;
  padding: 0.5rem 1rem;
  background: rgba(102, 126, 234, 0.1);
  border-radius: 12px;
  border: 1px solid rgba(102, 126, 234, 0.2);
  min-width: 120px;
}

.question h3,
.timer h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.question-tracker,
.timer-display {
  font-size: 1.25rem;
  font-weight: 700;
  color: #667eea;
}

/* Main Content Styles */
.question-container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 2rem;
}

.question-content {
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.question-text {
  padding: 2.5rem 2rem 1.5rem;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-bottom: 1px solid #e2e8f0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #2d3748;
  line-height: 1.6;
  text-align: center;
}

.question-options {
  padding: 2rem;
}

/* Option Styles (for when options are added) */
.option {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

.option:hover {
  border-color: #667eea;
  background: #f0f4ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.option:active {
  transform: translateY(0);
}

.selected {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-color: #667eea;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.selected:hover {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-color: #667eea;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}
.option.correct {
  background: linear-gradient(135deg, #48bb78, #38a169);
  border-color: #48bb78;
  color: white;
}

.option.incorrect {
  background: linear-gradient(135deg, #f56565, #e53e3e);
  border-color: #f56565;
  color: white;
}

/* Loading and Empty States */

.loading {
  text-align: center;
  padding: 3rem;
  color: #718096;
  font-size: 1.1rem;
}

.loading::after {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #e2e8f0;
  border-top: 2px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 0.5rem;
}

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


.controls {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.controls button {
  background: white;
  border: none;
  border-radius: 12px;
  padding: 1rem 2rem;
  color: #4a5568;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
  position: relative;
  overflow: hidden;
}

.controls button:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 24px rgba(102, 126, 234, 0.3);
}

.prev-button {
  position: absolute;
  left: -28%;
}

.next-button {
  position: absolute;
  right: -28%;
}


/* Result Container */
.result-container {
  display: none; /* Hidden by default, shown after quiz submission */
  margin-top: 5rem; 
  max-width: 800px;
  margin: 3rem auto;
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.show {
  display: block;
}

.result-header {
  text-align: center;
  margin-bottom: 2rem;
}

.result-header img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.result-header h1 {
  font-size: 2rem;
  color: #667eea;
}

.quiz-score {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.25;
  background-image: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.quiz-remarks {
  font-size: 1.2rem;
  margin: auto;
  margin-bottom: 2rem;
  color: #4a5568;
  max-width: 75%;
}

/* Summary Section */
.quiz-summary{
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 80%;
    margin: auto;
    margin-top: 5rem;
    margin-bottom: 1rem;
    padding: 1rem 0;
}

.summary-title{
    position: relative;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 500;
    color: #4a5568;
}

span {
    position: absolute;
    top: -2rem;
    left: 50%;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 800;
    color: #4a5568;
}

#correct-answers {
    color: #38a169;
}

#incorrect-answers {
    color: #e53e3e;
}

#unanswered-questions {
    color: #ed8936;
}

.quiz-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}



.quiz-actions a {
  background: #667eea;
  border: none;
  text-decoration: none;
  border-radius: 12px;
  padding: 1rem 2rem;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.quiz-actions a:hover {
  background: #5a67d8;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
  .header-container {
    padding: 1rem;
    flex-direction: column;
    text-align: center;
  }

  .question-utility {
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .question-container {
    margin: 1rem auto;
    padding: 0 1rem;
  }

  .question-text {
    padding: 2rem 1.5rem 1rem;
    font-size: 1.1rem;
  }

  .question-options {
    padding: 1.5rem;
  }

  .logo-text {
    font-size: 1.25rem;
  }

  .prev-button{
    left: -17%;
  }
  .next-button{
    right: -17%;
  }
}

@media (max-width: 480px) {
  .question,
  .timer {
    min-width: 100px;
    padding: 0.5rem;
  }

  .question h3,
  .timer h3 {
    font-size: 0.75rem;
  }

  .total-question,
  .time-left {
    font-size: 1rem;
  }

  .option {
    padding: 0.875rem 1rem;
    font-size: 0.9rem;
  }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles for keyboard navigation */
.option:focus {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .question-header {
    background: white;
    border-bottom: 2px solid #000;
  }

  .question-content {
    border: 2px solid #000;
  }

  .option {
    border: 2px solid #000;
  }
}
