/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #f3f4f6;
  color: #111827;
  line-height: 1.6;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Navigation */
nav {
  background: #1f2937;
  border-radius: 8px;
  margin-bottom: 20px;
  position: relative;
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
}

nav a, .info-button {
  text-decoration: none;
  color: #f9fafb;
  padding: 10px 16px;
  border-radius: 6px;
  transition: background 0.3s, color 0.3s;
  font-weight: 600;
}

nav a:hover, .info-button:hover {
  background: #2563eb;
  color: #fff;
}

.info-button {
  background: #10b981;
  border: none;
  cursor: pointer;
}

/* Hamburger Menu Button */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 24px;
  cursor: pointer;
}

.hamburger div {
  width: 100%;
  height: 4px;
  background: #f9fafb;
  border-radius: 2px;
  transition: all 0.3s;
}

/* Hide menu by default on mobile */
nav ul {
  flex-direction: row;
}

nav ul.collapsed {
  display: none;
}

/* Header */
h1, h2, h3 {
  color: #111827;
  margin-bottom: 15px;
  text-align: center;
}

/* Certificate Preview */
.certificate-preview-section {
  margin-bottom: 30px;
}

.certificate-preview-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.cert-thumb {
  max-width: 250px;
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: transform 0.3s;
}

.cert-thumb:hover {
  transform: scale(1.05);
}

/* Modal Preview */
.modal-preview {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.7);
  padding: 40px 20px;
}

.modal-preview .modal-content-preview {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 80%;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.close-preview {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #f9fafb;
  font-size: 36px;
  font-weight: bold;
  cursor: pointer;
}

.close-preview:hover {
  color: #ff4d4f;
}

/* Buttons */
button {
  background: #2563eb;
  color: #f9fafb;
  padding: 10px 20px;
  margin: 5px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s, transform 0.2s;
}

button:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
}

button:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

/* Quiz Container */
#questionContainer {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  margin: 20px auto;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  max-width: 800px;
}

/* Progress */
#progress {
  font-weight: 600;
  color: #374151;
}

/* Results */
#result, #quizResults {
  background: #e0f2fe;
  border-radius: 10px;
  padding: 20px;
  margin: 20px auto;
  max-width: 800px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.hidden {
  display: none;
}

/* Certificate Modal */
#certificateModal {
  background: #fef3c7;
  border-radius: 10px;
  padding: 30px;
  max-width: 600px;
  margin: 50px auto;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  position: relative;
}

#certificateModal button {
  background: #10b981;
}

#certificateModal button:hover {
  background: #059669;
}

/* Exam Info Modal */
.exam-info-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  background-color: rgba(0,0,0,0.6);
  padding: 50px 20px;
}

.exam-info-modal .modal-content {
  background: #fff;
  border-radius: 10px;
  max-width: 900px;
  margin: auto;
  padding: 30px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
  position: relative;
}

.exam-info-modal .close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 32px;
  font-weight: bold;
  cursor: pointer;
}

.career-impact-box {
  background: #e0f2fe;
  padding: 15px 20px;
  border-radius: 10px;
  margin-top: 20px;
}

/* Footer */
footer {
  background: #1f2937;
  color: #f9fafb;
  padding: 15px 20px;
  margin-top: 40px;
  border-radius: 8px;
}

footer a {
  color: #2563eb;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
    position: absolute;
    top: 15px;
    right: 20px;
  }

  nav ul {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 0;
  }

  nav ul.collapsed {
    display: none;
  }

  nav ul li, nav ul button {
    width: 100%;
    margin: 5px 0;
  }

  .certificate-preview-grid {
    flex-direction: column;
    align-items: center;
  }

  button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 10px;
  }

  #questionContainer, #result, #quizResults {
    padding: 15px;
  }

  .exam-info-modal .modal-content {
    padding: 20px;
  }
}