* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #121212;
  color: #e0e0e0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 2rem;
}

.container {
  background: #1e1e1e;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.7);
  width: 100%;
  max-width: 700px;
  transition: background 0.3s ease;
}

#timer {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #2c2c2c;
  color: #e0e0e0;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  font-weight: bold;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.7);
  z-index: 1000;
  transition: background 0.3s ease-in-out;
}
#timer.flash {
  animation: flash-blink 1s infinite;
}
@keyframes flash-blink {
  0%, 100% { background: #2c2c2c; }
  50%      { background: #b00020; }
}

h1, h2, h3 {
  text-align: center;
  margin-bottom: 1rem;
  color: #f5f5f5;
}

.btn {
  display: block;
  width: fit-content;
  margin: 2rem auto 0;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 8px;
  background: #bb86fc;
  color: #121212;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease;
}
.btn:hover {
  background: #9a67ea;
}

.question-block {
  margin-top: 2rem;
  padding: 1rem;
  background: #2a2a2a;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}
.question-block .question {
  margin-bottom: 0.5rem;
  color: #f0f0f0;
}

.options {
  list-style: none;
  padding-left: 0;
}
.options li {
  margin: 0.2rem 0;
}
.options label {
  cursor: pointer;
  color: #e0e0e0;
}
.options input {
  accent-color: #bb86fc;
}

.results {
  margin-top: 2rem;
  background: #1f1f1f;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.7);
}
.result-item {
  font-size: 1rem;
  margin: 0.5rem 0;
  line-height: 1.5;
  color: #e0e0e0;
}

.results ul {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
}
.results li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #121212;
}

.results li.correct   { background: #4caf50; }
.results li.wrong     { background: #e57373; }
.results li.unattempt { background: #ffd54f; }
