:root {
  --primary-color: #0056b3;
  --secondary-color: #003d82;
  --accent-color: #ff6b6b;
  --success-color: #4CAF50;
  --warning-color: #ffc107;
  --text-color: #333;
  --light-bg: #f8f9fa;
  --white: #ffffff;
  --header-height: 80px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background-color: var(--light-bg);
  color: var(--text-color);
  line-height: 1.6;
}

/* Header Styles */
.header {
  background: var(--white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  height: 50px;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-color);
  cursor: pointer;
  padding: 0.5rem;
  width: 44px;
  height: 44px;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.menu-toggle:hover {
  background: rgba(0, 86, 179, 0.1);
}

.menu-toggle i {
  display: block;
  width: 24px;
  height: 24px;
  line-height: 24px;
  text-align: center;
}

.nav-menu {
  display: flex;
  gap: 2rem;
}

.nav-menu a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.nav-menu a:hover {
  color: var(--primary-color);
  background: rgba(0, 86, 179, 0.1);
}

/* Main Content */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.8rem 20px 2rem; /* Added moderate top padding of 0.8rem */
  margin-top: var(--header-height);
}

.page-title {
  text-align: center;
  margin-bottom: 1.2rem; /* Slightly increased from 1rem to 1.2rem */
}

.page-title h1 {
  color: var(--primary-color);
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.page-title p {
  color: var(--text-color);
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto;
}

/* Content Sections */
.content-section {
  background: var(--white);
  border-radius: 10px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.content-section:hover {
  transform: translateY(-5px);
}

.content-section h2 {
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
  border-bottom: 2px solid var(--light-bg);
  padding-bottom: 0.5rem;
}

.content-section p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

.content-section ul {
  list-style: none;
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.content-section li {
  margin-bottom: 0.8rem;
  position: relative;
  padding-left: 1.5rem;
}

.content-section li:before {
  content: "•";
  color: var(--primary-color);
  position: absolute;
  left: 0;
  font-weight: bold;
}

.content-section li strong {
  color: var(--primary-color);
}

/* Summary Card */
.summary-card {
  background: var(--white);
  border-radius: 10px;
  padding: 1.5rem;
  margin: 2rem 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  border-left: 4px solid var(--primary-color);
  transition: transform 0.3s ease;
}

.summary-card:hover {
  transform: translateY(-3px);
}

.summary-card h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
}

.summary-card h3:before {
  content: "📌";
  margin-right: 0.5rem;
}

.summary-card ul {
  list-style: none;
  padding-left: 1.5rem;
}

.summary-card li {
  margin-bottom: 0.8rem;
  position: relative;
  padding-left: 1.5rem;
}

.summary-card li:before {
  content: "✓";
  color: var(--success-color);
  position: absolute;
  left: 0;
  font-weight: bold;
}

/* Quiz Section */
.quiz-section {
  background: var(--white);
  border-radius: 10px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  max-width: 800px;
  margin: 0 auto;
}

.quiz-section:hover {
  transform: translateY(-3px);
}

.quiz-section h2 {
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
  border-bottom: 2px solid var(--light-bg);
  padding-bottom: 0.5rem;
  text-align: center;
}

/* Hide quiz title when completion card is active */
.completion-card.active ~ .quiz-section h2 {
  display: none;
}

.difficulty-level {
  margin-bottom: 2rem;
  background: var(--light-bg);
  padding: 1.5rem;
  border-radius: 8px;
  transition: transform 0.3s ease;
  display: none;
}

.difficulty-level.active {
  display: block;
}

.difficulty-level h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.difficulty-level h3:before {
  content: "🎯";
  margin-right: 0.5rem;
}

.question {
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
  display: none;
}

.question.active {
  display: block;
}

.question p {
  margin-bottom: 1.5rem;
  font-weight: 500;
  color: var(--text-color);
  font-size: 1.2rem;
}

/* Quiz Options */
.options {
  display: grid;
  gap: 1rem;
}

.option {
  display: flex;
  align-items: center;
  padding: 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: var(--light-bg);
  border: 2px solid transparent;
}

.option:hover {
  background: rgba(0, 86, 179, 0.1);
  transform: translateX(5px);
  border-color: var(--primary-color);
}

.option.correct {
  background: rgba(76, 175, 80, 0.1);
  border-color: var(--success-color);
  color: var(--success-color);
}

.option.incorrect {
  background: rgba(255, 107, 107, 0.1);
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.option.selected {
  background: rgba(0, 86, 179, 0.1);
  border-color: var(--primary-color);
}

.quiz-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 2px solid var(--light-bg);
}

.nav-btn {
  display: inline-block;
  background: var(--primary-color);
  color: var(--white);
  padding: 0.8rem 1.5rem;
  border-radius: 5px;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-btn:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.nav-btn:disabled {
  background: var(--light-bg);
  color: var(--text-color);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.progress-indicator {
  text-align: center;
  margin-bottom: 1rem;
  font-weight: 500;
  color: var(--primary-color);
}

.submit-btn {
  display: inline-block;
  background: var(--primary-color);
  color: var(--white);
  padding: 1rem 2rem;
  border-radius: 5px;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  width: 100%;
  text-align: center;
}

.submit-btn:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Feedback Card */
.feedback-card {
  background: var(--white);
  border-radius: 10px;
  padding: 1.5rem;
  margin: 1rem 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  display: none;
  animation: slideIn 0.3s ease;
}

.feedback-card.correct {
  border-left: 4px solid var(--success-color);
}

.feedback-card.incorrect {
  border-left: 4px solid var(--accent-color);
}

.feedback-card h4 {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
}

.feedback-card.correct h4:before {
  content: "✅";
  margin-right: 0.5rem;
}

.feedback-card.incorrect h4:before {
  content: "❌";
  margin-right: 0.5rem;
}

.feedback-card p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.feedback-card .tips {
  background: var(--light-bg);
  padding: 1rem;
  border-radius: 5px;
  margin-top: 1rem;
}

.feedback-card .tips h5 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.feedback-card .tips ul {
  list-style: none;
  padding-left: 1.5rem;
}

.feedback-card .tips li {
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 1.5rem;
}

.feedback-card .tips li:before {
  content: "💡";
  position: absolute;
  left: 0;
}

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

/* Button Styles */
.evaluate-btn,
.return-btn,
.continue-btn {
  padding: 0.8rem 1.5rem;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  font-size: 1rem;
  width: 180px;
  text-align: center;
}

.evaluate-btn {
  background: var(--primary-color);
  color: var(--white);
}

.return-btn {
  background: var(--light-bg);
  color: var(--text-color);
  text-decoration: none;
  border: 1px solid var(--primary-color);
}

.continue-btn {
  background: var(--success-color);
  color: var(--white);
}

.evaluate-btn:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.return-btn:hover {
  background: var(--primary-color);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.continue-btn:hover {
  background: #45a049;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

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

/* Study Notes and Summary Cards */
.study-notes {
  background: var(--white);
  border-radius: 10px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  display: none;
}

.study-notes.active {
  display: block;
}

.study-notes h3 {
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.study-notes h3:before {
  content: "📚";
  margin-right: 0.5rem;
}

.study-notes ul {
  list-style: none;
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.study-notes li {
  margin-bottom: 1rem;
  position: relative;
  padding-left: 1.5rem;
  line-height: 1.6;
}

.study-notes li:before {
  content: "•";
  color: var(--primary-color);
  position: absolute;
  left: 0;
  font-weight: bold;
}

/* Completion Card */
.completion-card {
  background: var(--white);
  border-radius: 10px;
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  border-left: 4px solid var(--success-color);
  transition: transform 0.3s ease;
  display: none;
  text-align: center;
}

.completion-card.active {
  display: block;
}

.completion-card h3 {
  color: var(--success-color);
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.completion-card h3:before {
  content: "🎉";
  margin-right: 0.5rem;
}

.completion-card p {
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.completion-card ul {
  list-style: none;
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: left;
}

.completion-card li {
  margin-bottom: 1rem;
  position: relative;
  padding-left: 1.5rem;
  line-height: 1.6;
}

.completion-card li:before {
  content: "✓";
  color: var(--success-color);
  position: absolute;
  left: 0;
  font-weight: bold;
}

/* Add new styles for the restructured sections */
.level-section {
  display: none;
  margin-bottom: 2rem;
}

.level-section.active {
  display: block;
}

.content-section,
.questions-section,
.summary-section {
  display: none;
  background: var(--white);
  border-radius: 10px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.content-section.active,
.questions-section.active,
.summary-section.active {
  display: block;
}

.summary-section .achievement-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.summary-section .achievement-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.2rem;
  padding-left: 2rem;
  position: relative;
}

.summary-section .achievement-item::before {
  content: "✓";
  color: var(--success-color);
  position: absolute;
  left: 0;
  font-size: 1.2rem;
  font-weight: bold;
}

.summary-section .achievement-title {
  font-weight: 600;
  color: var(--primary-color);
  margin-right: 0.5rem;
}

.summary-section .achievement-description {
  color: var(--text-color);
  flex: 1;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .header-container {
    flex-direction: row;
    height: var(--header-height);
    padding: 0 15px;
  }

  .logo {
    height: 40px;
    margin-bottom: 0;
  }

  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--white);
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    flex-direction: column;
    align-items: center;
    z-index: 1000;
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-menu a {
    width: 100%;
    text-align: center;
    padding: 0.8rem;
    margin: 0.2rem 0;
  }

  .container {
    padding: 0.6rem 15px 2rem; /* Added moderate top padding of 0.6rem for mobile */
    margin-top: var(--header-height); /* Keep the margin-top to prevent content from going under header */
  }

  .page-title {
    margin-bottom: 0.8rem; /* Increased from 0.5rem to 0.8rem for mobile */
  }

  .page-title h1 {
    font-size: 1.8rem;
    margin-bottom: 0.7rem; /* Increased from 0.5rem to 0.7rem */
  }

  .page-title p {
    font-size: 1rem;
  }

  .content-section {
    padding: 1.5rem;
  }

  .content-section h2 {
    font-size: 1.5rem;
  }

  .quiz-section {
    padding: 1.5rem;
  }

  .quiz-section h2 {
    font-size: 1.5rem;
  }

  .difficulty-level h3 {
    font-size: 1.2rem;
  }

  .question {
    padding: 0.8rem;
  }

  .submit-btn {
    width: 100%;
    text-align: center;
  }

  .summary-section {
    padding: 1.5rem;
  }

  .summary-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  .summary-section p {
    font-size: 0.95rem;
    line-height: 1.5;
  }

  .summary-section .achievement-item {
    flex-direction: column;
    margin-bottom: 1.5rem;
    padding-left: 1.8rem;
  }

  .summary-section .achievement-item::before {
    font-size: 1.1rem;
    top: 0.2rem;
  }

  .summary-section .achievement-title {
    margin-bottom: 0.3rem;
    display: block;
    font-size: 0.95rem;
  }

  .summary-section .achievement-description {
    font-size: 0.9rem;
    line-height: 1.4;
  }

  .summary-section .button-container {
    flex-direction: column;
    gap: 0.8rem;
  }

  .summary-section .button-container button {
    width: 100%;
    padding: 0.8rem;
    font-size: 0.95rem;
  }
}
