/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #ffffff;
  color: #2d3748;
  line-height: 1.6;
}

/* Header Styles */
header {
  background: #ffffff;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2d3748;
  text-decoration: none;
}

header a {
  text-decoration: none;
}

.back-link {
  color: #4a5568;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: #2d3748;
}

/* Navigation */
nav {
  display: flex;
  gap: 2rem;
}

nav a {
  color: #4a5568;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

nav a:hover {
  color: #2d3748;
}

/* Mobile Menu */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #2d3748;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 0;
  flex-direction: column;
  animation: slideDown 0.3s ease;
}

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

.mobile-menu a {
  padding: 1rem 2rem;
  color: #4a5568;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  border-bottom: 1px solid #f0f0f0;
}

.mobile-menu a:last-child {
  border-bottom: none;
}

.mobile-menu a:hover {
  background-color: #f7fafc;
  color: #2d3748;
}

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

/* Button Styles */
.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  display: inline-block;
}

.btn-primary {
  background: #2d3748;
  color: white;
}

.btn-primary:hover {
  background: #1a202c;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
  background: #f7fafc;
  color: #2d3748;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  border: 2px solid #e2e8f0;
  transition: all 0.2s ease;
  display: inline-block;
  cursor: pointer;
}

.btn-secondary:hover {
  background: #edf2f7;
  border-color: #cbd5e0;
  transform: translateY(-1px);
}

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

.section {
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-white {
  background: #ffffff;
}

.section h2 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-align: center;
  color: #2d3748;
}

.section-subtitle {
  text-align: center;
  color: #4a5568;
  font-size: 1.1rem;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Error Message */
.error-message {
  color: #e53e3e;
  background: #fed7d7;
  border: 1px solid #feb2b2;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  display: none;
  text-align: center;
}

/* Footer */
footer {
  background: #2d3748;
  color: white;
  padding: 3rem 2rem 2rem;
  text-align: center;
}

footer p {
  margin-bottom: 1rem;
  color: #a0aec0;
}

footer a {
  color: #63b3ed;
  text-decoration: none;
  margin: 0 1rem;
  transition: color 0.2s ease;
}

footer a:hover {
  color: #90cdf4;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Accessibility */
.btn:focus {
  outline: 2px solid #4299e1;
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  nav {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  .container {
    padding: 1rem;
  }
  
  .section {
    padding: 3rem 1rem;
  }
  
  .section h2 {
    font-size: 2rem;
  }

  .more-quizzes,
  .action-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin: 20px 0;
  }

  .action-buttons .btn,
  .more-quizzes .btn-secondary,
  .quiz-card .btn {
    width: 90%;
    max-width: 300px;
    margin: 8px auto;
    text-align: center;
  }
}

@media (max-width: 480px) {
  header {
    padding: 1rem;
  }
  
  .logo {
    font-size: 1.3rem;
  }
  
  .btn {
    width: 100%;
    max-width: 200px;
    text-align: center;
  }
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}