body {
  font-family: system-ui, sans-serif;
  background-color: #000;   /* pure black */
  text-align: center;
  margin: 20px;
}
/* Shooting star */
.shooting-star {
  position: absolute;
  width: 100px;  /* long along X-axis now */
  height: 2px;   /* thin */
  background: linear-gradient(to right, white, rgba(255,255,255,0)); /* horizontal gradient */
  top: 0;
  left: 0;
  transform: rotate(216.87deg); /* matches movement angle */
  animation: shoot 1.5s linear infinite;
  opacity: 0;
}

/* Keyframes: rotate according to movement */
@keyframes shoot {
  0% {
    transform: translate(0, 0) rotate(216.87deg); /* atan(600/800) ≈ 36.87° */
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    transform: translate(800px, 600px) rotate(216.87deg);
    opacity: 0;
  }
}

h1 {
  color: white;
  text-align: center;
  margin-bottom: 20px;
  text-shadow: 0 0 8px rgba(255,255,255,0.6);
}

.puzzle-grid {
  display: grid;
  grid-template-columns: repeat(4, 120px);
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

.tile {
  border: 2px solid #ddd;
  border-radius: 10px;
  padding: 8px;
  background: white;
  cursor: pointer;
  transition: transform 0.15s, background 0.2s;
}

.tile:hover {
  transform: scale(1.05);
}

.tile.selected {
  background: #ffe066;
  border-color: #ffcc00;
}

.tile.correct {
  background: #caffbf;
  border-color: #70e000;
}

.tile.wrong {
  background: #ffadad;
  border-color: #ff4d6d;
}

#status {
  margin-top: 15px;
  font-weight: bold;
}

.modal {
  display: none; /* hidden by default */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
}

.explanation {
  grid-column: 1 / -1;
  background: #2e7d32;
  color: white;
  padding: 10px;
  border-radius: 8px;
  text-align: center;
  font-weight: bold;
  margin-bottom: 10px;
}

.modal-content {
  background: white;
  padding: 20px 30px;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0,0,0,0.3);
  text-align: center;
}

#roomInput {
  padding: 8px;
  width: 80%;
  margin-top: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

#submitRoom {
  background: #4CAF50;
  color: white;
  border: none;
  padding: 8px 15px;
  margin-top: 12px;
  border-radius: 5px;
  cursor: pointer;
}

#submitRoom:hover {
  background: #45a049;
}
