/* Game Section Styles */
.game-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.game-section h1 {
  text-align: center;
  margin-bottom: 1rem;
  color: #333;
}

.game-description {
  text-align: center;
  margin-bottom: 2rem;
  color: #666;
}

/* Game Controls */
.game-controls {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.game-controls select,
.game-controls button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.game-controls select {
  background-color: #f0f0f0;
  border: 1px solid #ddd;
}

.game-controls button {
  background-color: #4CAF50;
  color: white;
}

.game-controls button:hover {
  background-color: #45a049;
}

.game-controls button:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

/* Game Stats */
.game-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1rem;
  background-color: #f8f8f8;
  border-radius: 8px;
}

.stat {
  text-align: center;
  padding: 0.5rem;
}

.stat span:first-child {
  display: block;
  font-weight: bold;
  color: #666;
  margin-bottom: 0.25rem;
}

.stat span:last-child {
  font-size: 1.25rem;
  color: #333;
}

/* Game Area */
.game-area {
  position: relative;
  width: 100%;
  height: 600px;
  background-color: #f0f0f0;
  border: 2px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 2rem;
}

/* Falling Number Styles */
.falling-number {
  position: absolute;
  padding: 0.5rem 1rem;
  background-color: #4CAF50;
  color: white;
  border-radius: 4px;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
  transition: transform 0.1s ease;
  animation: fall linear;
}

/* Generate random rotation for each number */
.falling-number:nth-child(3n) {
  transform: rotate(-15deg);
}

.falling-number:nth-child(3n+1) {
  transform: rotate(10deg);
}

.falling-number:nth-child(3n+2) {
  transform: rotate(5deg);
}

.falling-number:hover {
  transform: scale(1.1);
}

@keyframes fall {
  from {
    transform: translateY(-100px);
  }
  to {
    transform: translateY(500px);
  }
}

/* Game Over Screen */
.game-over {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
  text-align: center;
  z-index: 1000;
}

.game-over.hidden {
  display: none;
}

.game-over h2 {
  margin-bottom: 1rem;
  color: #333;
}

.final-stats {
  margin-bottom: 1.5rem;
}

.final-stats p {
  margin: 0.5rem 0;
  color: #666;
}

.final-stats span {
  font-weight: bold;
  color: #333;
}

#restartButton {
  background-color: #4CAF50;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#restartButton:hover {
  background-color: #45a049;
}

/* Game Instructions */
.game-instructions {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  background-color: #f8f8f8;
  border-radius: 8px;
}

.game-instructions h2 {
  text-align: center;
  margin-bottom: 1rem;
  color: #333;
}

.game-instructions ul {
  list-style-type: none;
  padding: 0;
}

.game-instructions li {
  margin: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: #666;
}

.game-instructions li:before {
  content: "•";
  position: absolute;
  left: 0;
  color: #4CAF50;
}

/* Responsive Design */
@media (max-width: 768px) {
  .game-section {
    padding: 1rem;
  }

  .game-controls {
    flex-direction: column;
    align-items: center;
  }

  .game-controls select,
  .game-controls button {
    width: 100%;
    max-width: 300px;
  }

  .game-area {
    height: 400px;
  }

  .game-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .game-stats {
    grid-template-columns: 1fr;
  }

  .game-area {
    height: 300px;
  }
} 