body {
  background-color: #1a1a1a;
  color: #fff;
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  padding: 0;
  text-align: center;
}

header {
  background: linear-gradient(to right, #ff6600, #cc0000);
  padding: 20px;
}

section {
  margin: 40px 0;
}

.game-section, .card-section, .door-section {
  padding: 20px;
  border: 2px dashed orange;
  border-radius: 10px;
  max-width: 600px;
  margin: auto;
}

#candy-area {
  position: relative;
  height: 300px;
  background-color: #333;
  overflow: hidden;
  border-radius: 10px;
  margin-top: 10px;
}

.candy {
  position: absolute;
  width: 50px;
  animation: float 5s linear infinite;
  cursor: pointer;
}

@keyframes float {
  0% { top: 100%; }
  100% { top: -50px; }
}

.card {
  width: 200px;
  height: 100px;
  margin: auto;
  perspective: 1000px;
  position: relative;
}

.card div {
  width: 100%;
  height: 100%;
  position: absolute;
  backface-visibility: hidden;
  transition: transform 0.6s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5em;
  border-radius: 10px;
}

.front {
  background: orange;
}

.back {
  background: purple;
  transform: rotateY(180deg);
}

.card:hover .front {
  transform: rotateY(180deg);
}

.card:hover .back {
  transform: rotateY(360deg);
}

#door {
  padding: 10px 20px;
  font-size: 1.2em;
  background-color: #ff6600;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

footer {
  margin-top: 40px;
  padding: 20px;
  background-color: #222;
}
