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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(135deg, #1a4b9c 0%, #2c5530 50%, #1a4b9c 100%);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#app {
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

#app canvas {
  display: block;
  width: 100vw;
  height: 100vh;
  border-radius: 8px;
}

/* Game overlay elements */
.game-overlay {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  font-weight: 500;
}

.game-controls {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.control-button {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 8px 16px;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  font-weight: 500;
}

.control-button:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.control-button:active {
  transform: translateY(0);
}

/* Loading screen */
.loading-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a4b9c 0%, #2c5530 50%, #1a4b9c 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  color: white;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top: 3px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Win screen */
.win-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1500;
  color: white;
  text-align: center;
}

.win-screen h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: #ffd700;
}

.win-screen p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.win-button {
  background: linear-gradient(45deg, #ffd700, #ffed4e);
  border: none;
  border-radius: 25px;
  padding: 12px 24px;
  color: #333;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.win-button:hover {
  transform: translateY(-2px);
}

/* Tooltips */
.tooltip {
  position: absolute;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  pointer-events: none;
  z-index: 1001;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.tooltip.show {
  opacity: 1;
}

/* Responsive design */
@media (max-width: 768px) {
  .game-overlay {
    top: 10px;
    left: 10px;
    padding: 12px;
    font-size: 14px;
  }
  
  .game-controls {
    top: 10px;
    right: 10px;
  }
  
  .control-button {
    padding: 6px 12px;
    font-size: 12px;
  }
}
