/* Add Google Fonts Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

/* Modern, mobile-first exam redesign */
:root {
  --exam-primary: #111;
  --exam-secondary: #222;
  --exam-bg: #fff;
  --exam-card-bg: #fff;
  --exam-success: #28a745;
  --exam-fail: #dc3545;
  --exam-shadow: 0 2px 8px rgba(0,0,0,0.04);
  --exam-radius: 14px;
  --exam-timer-bg: #f4f4f4;
  --exam-timer-color: #111;
  --exam-option-bg: #f8f8f8;
  --exam-option-selected: #e0e0e0;
  --exam-option-border: #e0e0e0;
  --exam-btn-radius: 999px;
}

body, html {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: var(--exam-bg);
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  min-height: 100vh;
  width: 100vw;
  overflow-x: hidden;
  color: #111;
}

.exam-nav-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  background: var(--exam-secondary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 54px;
}
.exam-nav-header nav {
  display: flex;
  gap: 1em;
}
.exam-nav-header .btn.small {
  font-size: 1rem;
  padding: 0.5em 1.3em;
  border-radius: var(--exam-btn-radius);
  background: #fff;
  color: var(--exam-primary);
  border: 1px solid var(--exam-option-border);
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
  transition: background 0.2s, color 0.2s;
  margin: 0;
}
.exam-nav-header .btn.small:active,
.exam-nav-header .btn.small:focus {
  background: var(--exam-timer-bg);
  color: #0056b3;
}
.exam-nav-header .btn.small:hover, .exam-nav button:hover {
  background: var(--exam-secondary);
  color: #fff;
  transform: translateY(-2px) scale(1.03);
}
.exam-container {
  background: var(--exam-card-bg);
  border-radius: var(--exam-radius);
  box-shadow: var(--exam-shadow);
  max-width: 420px;
  width: 95vw;
  margin: 80px auto 24px auto;
  padding: 2.2em 1.2em 1.2em 1.2em;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
  box-sizing: border-box;
  background: var(--exam-card-bg);
  backdrop-filter: none;
  box-shadow: var(--exam-shadow);
}
.exam-header {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 0.5em;
}
.exam-header h1 {
  font-size: 1.25rem;
  font-weight: bold;
  margin: 0;
  flex: 1 1 auto;
  word-break: break-word;
}
#exam-timer {
  font-size: 1.05rem;
  font-weight: bold;
  color: var(--exam-timer-color);
  background: var(--exam-timer-bg);
  padding: 0.4em 1.1em;
  border-radius: var(--exam-btn-radius);
  margin-left: 1em;
  margin-top: 0.1em;
  white-space: nowrap;
}
.exam-progress {
  width: 100%;
  margin-bottom: 1em;
}
.exam-progress-bar {
  width: 100%;
  height: 8px;
  background: var(--exam-option-bg);
  border-radius: 6px;
  overflow: hidden;
  margin-top: 0.3em;
}
.exam-progress-bar-inner {
  height: 100%;
  background: var(--exam-primary);
  width: 0%;
  transition: width 0.3s;
}
#exam-question-section {
  min-height: 180px;
}
.exam-question {
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 1.2em;
  text-align: left;
}
.exam-options {
  display: flex;
  flex-direction: column;
  gap: 0.7em;
}
.exam-options label {
  display: flex;
  align-items: center;
  background: var(--exam-option-bg);
  border-radius: var(--exam-btn-radius);
  border: 1.5px solid var(--exam-option-border);
  padding: 1em 1.2em;
  font-size: 1.08rem;
  cursor: pointer;
  transition: background 0.2s, border 0.2s;
  min-height: 48px;
  gap: 1em;
  box-sizing: border-box;
}
.exam-options input[type="radio"] {
  width: 1.3em;
  height: 1.3em;
  margin-right: 0.7em;
}
.exam-options input[type="radio"]:focus + span,
.exam-options label:focus-within {
  outline: 2px solid var(--exam-primary);
  outline-offset: 2px;
}
.exam-options input[type="radio"]:checked + span {
  background: var(--exam-option-selected);
  border-radius: var(--exam-btn-radius);
  padding: 0.2em 0.5em;
}
.exam-nav {
  display: flex;
  gap: 1em;
  margin-top: 1.2em;
}
.exam-nav button {
  flex: 1 1 0;
  padding: 1em 0;
  font-size: 1.08rem;
  border-radius: var(--exam-btn-radius);
  border: none;
  background: var(--exam-primary);
  color: #fff;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  margin: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}
.exam-nav button:disabled {
  background: #b0c4de;
  cursor: not-allowed;
}
#exam-result-section {
  text-align: center;
  font-size: 1.15rem;
  padding: 1.2em 0.2em;
}
#exam-result-section .pass {
  background: var(--exam-primary);
  color: #fff;
  animation: none;
  box-shadow: var(--exam-shadow);
  border-radius: 999px;
  padding: 0.4em 1.2em;
}
#exam-result-section .fail {
  color: var(--exam-fail);
  font-weight: bold;
  font-size: 1.3rem;
  margin-bottom: 0.7em;
}
#exam-result-section a, #exam-result-section button {
  display: inline-block;
  margin-top: 1em;
  padding: 0.9em 2em;
  background: var(--exam-primary);
  color: #fff;
  border-radius: var(--exam-btn-radius);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.08rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}
.exam-footer {
  width: 100vw;
  background: var(--exam-secondary);
  padding: 0.7em 0.2em 0.7em 0.2em;
  margin-top: 1em;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.04);
  text-align: center;
}
.exam-footer nav {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 1em;
  margin-bottom: 0.3em;
}
.exam-footer .footer-link {
  font-size: 1rem;
  padding: 0.5em 1.3em;
  border-radius: var(--exam-btn-radius);
  background: #fff;
  color: var(--exam-primary);
  border: 1px solid var(--exam-option-border);
  margin: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
  transition: background 0.2s, color 0.2s;
  display: inline-block;
}
.exam-footer .footer-link:active,
.exam-footer .footer-link:focus {
  background: var(--exam-timer-bg);
  color: #0056b3;
}
.exam-footer p {
  font-size: 0.95rem;
  margin-top: 0.5em;
  color: #888;
}
@media (max-width: 600px) {
  .exam-container {
    max-width: 100vw;
    width: 100vw;
    margin: 70px 0 0 0;
    border-radius: 0;
    box-shadow: none;
    padding: 1.2em 0.2em 1.2em 0.2em;
  }
  .exam-header h1 {
    font-size: 1.05rem;
  }
  #exam-timer {
    font-size: 0.98rem;
    padding: 0.3em 0.7em;
  }
  .exam-question {
    font-size: 1.05rem;
  }
  .exam-options label {
    font-size: 1.05rem;
    padding: 0.8em 0.7em;
    min-height: 44px;
  }
  .exam-nav button {
    font-size: 1.05rem;
    padding: 0.9em 0;
  }
  #exam-result-section {
    font-size: 1.05rem;
    padding: 0.7em 0.2em;
  }
  .exam-footer nav {
    gap: 0.5em;
  }
  .exam-footer .footer-link {
    font-size: 0.98rem;
    padding: 0.5em 1em;
  }
}
/* Slide/fade in for exam cards */
@keyframes fadeInUpPremium {
  0% { opacity: 0; transform: translateY(40px) scale(0.98); }
  100% { opacity: 1; transform: none; }
}
.exam-container {
  animation: none;
}

/* Shimmer for pass badge */
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
#exam-result-section .pass {
  background: var(--exam-primary);
  color: #fff;
  animation: none;
  box-shadow: var(--exam-shadow);
  border-radius: 999px;
  padding: 0.4em 1.2em;
}

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

/* DARK BACKGROUND: white text */
.exam-nav-header, .exam-footer {
  color: #fff !important;
}

/* LIGHT BACKGROUND: black text */
.exam-container, .exam-header, .exam-question, .exam-options label, .exam-nav button, #exam-result-section, #exam-result-section .pass, #exam-result-section .fail, .exam-footer .footer-link {
  color: #111 !important;
} 