body {
  font-family: Arial, sans-serif;
  margin: 0; 
  padding: 0;
  background: #f4f4f4;
}

.container {
  max-width: 800px;
  margin: auto;
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0px 4px 8px rgba(0,0,0,0.2);
}

h1 { 
  text-align: center; 
}

.question {
  margin-bottom: 20px;
}

.options label {
  display: block;
  background: #eee;
  margin: 8px 0;
  padding: 10px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s;
}

.options label:hover {
  background: #dcdcdc;
}

.options input { 
  margin-right: 10px; 
}

.navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  gap: 10px;
}

button {
  flex: 1;
  padding: 10px 20px;
  border: none;
  background: #007bff;
  color: white;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s;
}

button:hover:not(:disabled) {
  background: #0056b3;
}

button:disabled {
  background: gray;
  cursor: not-allowed;
}

#result {
  display: none;
  text-align: center;
  font-size: 1.2em;
  margin-top: 20px;
  padding: 15px;
  background: #e6ffe6;
  border: 1px solid #00a300;
  border-radius: 5px;
}

#timer {
  font-weight: bold; 
  color: red; 
  text-align: center; 
  margin: 10px 0;
  font-size: 1.2em;
}

/* =============================
   Responsive Design
   ============================= */
@media (max-width: 768px) {
  .container {
    width: 95%;
    padding: 15px;
  }

  h1 {
    font-size: 22px;
  }

  .navigation {
    flex-direction: column;
  }

  button {
    width: 100%;
    margin-bottom: 10px;
  }

  #timer {
    font-size: 1em;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 20px;
  }

  .options label {
    font-size: 14px;
    padding: 8px;
  }

  button {
    font-size: 14px;
    padding: 8px;
  }

  #timer {
    font-size: 0.9em;
  }
}

/* Sticky Exam Header */
.exam-header {
  position: sticky;
  top: 0;
  background: #007bff;
  color: white;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.exam-header h2 {
  margin: 0;
  font-size: 20px;
}

#timer {
  font-weight: bold; 
  color: yellow; 
  font-size: 1.1em;
}

/* Responsive header */
@media (max-width: 768px) {
  .exam-header {
    flex-direction: column;
    text-align: center;
  }

  #timer {
    margin-top: 5px;
    font-size: 1em;
  }
}