body {
  background-color: #1a1a1a;
  color: #fff;
  font-family: 'Georgia', serif;
  text-align: center;
  padding-top: 60px;
  transition: background-color 1.5s ease;
   overflow-y: auto;
}

h1 {
  font-size: 3rem;
  margin-bottom: 10px;
}

h2 {
  font-size: 2rem;
  margin-bottom: 20px;
}

button {
  font-size: 1.2rem;
  padding: 10px 20px;
  background-color: #4b2e83;
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-top: 20px;
}

button:hover {
  background-color: #372063;
}

#house {
  font-size: 2.5rem;
  margin-top: 40px;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 1s ease, transform 1s ease;
}

#house.show {
  opacity: 1;
  transform: scale(1);
}

.gryffindor { color: #ae0001; }
.hufflepuff { color: #f4a460; }
.ravenclaw  { color: #00ffff; }
.slytherin  { color: #2a623d; }

#crest {
  margin-top: 20px;
  width: 130px;
  opacity: 0;
  transition: opacity 1.5s ease;
}

#thinking {
  font-style: italic;
  margin-top: 20px;
  opacity: 0.5;
  animation: blink 1s infinite;
  display: none;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

#stars {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: -1;
  overflow: hidden;
  opacity: 0.8;
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: white;
  animation: twinkle infinite;
  opacity: 0.8;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.2; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.5); }
}

#quiz-container {
  background-color: #2c2c2c;
  padding: 20px;
  border-radius: 12px;
  margin: 30px auto;
  width: 80%;
  max-width: 600px;
  color: #fff;
}

#quiz-container p {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

#quiz-container label {
  display: block;
  margin-bottom: 8px;
  cursor: pointer;
}

#score {
  font-size: 1.2rem;
  margin-top: 10px;
  color: #f4a460;
}