
.quiz-main {
  max-width: 900px;
  margin: 20px auto;
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  overflow: hidden;
  animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.header {
  background: linear-gradient(135deg, #6f8aa1 0%, #736179 100%);
  padding: 25px;
  text-align: center;
  color: white;
}

.header h1 {
  font-size: 2.3em;
  margin-bottom: 10px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.stats {
  display: flex;
  justify-content: right;
}

.stat-item {
  background: rgba(0,0,0,0.2);
  padding: 10px;
  border-radius: 15px;
  text-align: center;
  margin-top: 20px;
  width: 140px;
  color: white;
}

.stat-number {
  font-size: 2em;
  font-weight: bold;
  display: block;
}

.main-content {
  padding: 35px;
}

.category-selection {
  text-align: center;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.category-card {
  background: linear-gradient(135deg, #4d4faf 0%, #3f4481 100%);
  color: white;
  padding: 25px;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  font-size: 1.1em;
  font-weight: 600;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

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

#notes {
  margin: 20px 0;
  font-family:'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
}

.explanation-el > li {
  margin-left: 20px;
  padding: 10px 0;
  font-size: 1.3rem;
  list-style: none;
  line-height: 1.8rem;
}

.highlight {
  color: #3c356f;
  font-weight: 700;
}

.quiz-container {
  display: none;
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.question-card {
  background: #f4f4f45b;
  border-radius: 15px;
  padding: 30px;
  margin-bottom: 30px;
  border-left: 5px solid #6f8bbe;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.quiz-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.question-number, .question-level {
  color: rgb(54, 57, 107);
  font-size: 1.2em;
  margin-bottom: 15px;
  font-weight: 700;
}

.timer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 200px;
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 50%;
}

.timer-label {
    color: rgb(33, 36, 122);
    font-size: 1.1em;
    font-weight: 600;
}

.timer-display {
    color: rgb(14, 14, 14);
    font-size: 2em;
    font-weight: bold;
    width: 70px;
    border: #333 2px solid;
    border-radius: 50%;
    padding: 10px;
    text-align: center;
    animation: pulse 1s ease-in-out infinite;
}

.timer-display.warning {
    color: #fa515f;
    animation: pulse-fast 0.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes pulse-fast {
    0%, 100% { transform: scale(1); color: #ff4757; }
    50% { transform: scale(1.15); color: #ff6b81; }
}

.category-card.completed {
    background: #b4b8d1;
    position: relative;
    color: #333;
}

.category-card.completed::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5em;
    color: rgb(11, 10, 10);
    font-weight: bold;
}

.question-text {
  font-size: 1.3em;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.4;
  display: inline-block;
}

.options {
  display: grid;
  gap: 15px;
}

.option {
  background: white;
  color: #333;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.1em;
  text-align: left;
}

.option:hover {
  border-color: #6a849a;
  background: #b5b5b58a;
  transform: translateX(5px);
}

.option.selected {
  border-color: #4facfe;
  background: #4facfe;
  color: white;
}

.option.correct {
  border-color: #28a745;
  background: #28a745;
  color: white;
}

.option.incorrect {
  border-color: #dc3545;
  background: #dc3545;
  color: white;
}

.modal {
  display: none;
  position: fixed;
  top: 60%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 25px;
  background-color: #e5e5e5bd;
  border-radius: 15px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
  z-index: 1000;
}

.show {
  display: block;
}

#modalInfo {
  padding: 10px;
  font-size: 1.3rem;
  color: #2d3251;
}

.controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 30px;
}

.btn {
  padding: 15px 30px;
  border: none;
  border-radius: 10px;
  font-size: 1.1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  user-select: none;
}

.btn-primary {
  background: linear-gradient(135deg, #406684 0%, #46438f 100%);
  color: white;
}

.btn-secondary {
  background: #de2d53;
  color: white;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.results {
  display: none;
  text-align: center;
  padding: 40px;
  animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.05); }
  70% { transform: scale(0.9); }
  100% { transform: scale(1); opacity: 1; }
}

.results h2 {
  font-size: 2.5em;
  margin-bottom: 20px;
  color: #4facfe;
}

.img-cont {
  width: 120px;
  height: 120px;
  margin: 15px auto;
  display: block;
}

#logo {
  width: 100%;
  height: 100%;
  border-radius: 7px;
}

.score-display {
  font-size: 3em;
  font-weight: bold;
  color: #28a745;
  margin: 30px 0;
}

.message-badge {
  display: inline-block;
  background: linear-gradient(135deg, #b168b9 0%, #f5576c 100%);
  color: white;
  padding: 10px 25px;
  border-radius: 25px;
  font-size: 1.2em;
  font-weight: 600;
  margin: 20px 0;
}

.progress-bar {
  width: 100%;
  height: 10px;
  background: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
  margin: 10px 0 25px 0;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(135deg, #a0cb96 0%, #91b89a 100%);
  transition: width 0.3s ease;
}

.hidden {
  display: none !important;
}

#performanceMessage {
  font-size: 18px;
  font-weight: 700;
}

@media (max-width: 620px) {
  .quiz-main {
    width: 100%;
    margin: 10px 0 10px 0;
    border-radius: 15px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
  }

  #quiz-container {
    padding: 0 5px;
  }

  .header {
    padding: 15px;
  }

  .header h1 {
    font-size: 1.5em;
  }

  .main-content {
    padding: 20px 15px;
    width: 100%;
  }

  .stats {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
  }

  .explanation-el >li {
    margin-left: 10px;
    font-size: 1.1rem;
    line-height: 1.7rem;
  }

  .question-card {
    padding: 5px 10px;
    margin-bottom: 25px;
  }

  .quiz-header {
    align-items: flex-start;
    margin-bottom: 15px;
  }

  .question-number,
  .question-level {
    font-size: 1.1em;
  }

  .timer-container {
    max-width: 130px;
    margin-bottom: 15px;
    padding: 5px;
    border-radius: 14px;
  }

  .timer-label {
    font-size: 0.7em;
  }

  .timer-display {
    font-size: 1.7em;
    font-weight: bold;
    min-width: 30px;
  }

  .question-text {
    font-size: 1.1em;
    line-height: 1.3;
    margin-bottom: 15px;
  }

  .option {
    padding: 10px 20px;
    font-size: 1.1em;
  }

  .controls {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    align-items: center;
    margin-top: 25px;
    gap: 20px;
  }

  #backBtn {
    order: 2;
  }

  #nextBtn {
    order: 1;
  }

  .results h2 {
    font-size: 1.7em;
    margin-bottom: 15px;
  }
}