:root {
  --bg-dark: #0f172a;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-dark);
  font-family: 'Inter', sans-serif;
  user-select: none;
  touch-action: none;
  overflow-x: hidden;
  transition: background-color 0.3s ease;
}

body:not(.fullscreen-game) {
  overflow-y: auto;
}

body.fullscreen-game {
  overflow: hidden;
}

#game-container {
  position: relative;
  width: 100%;
  height: 100vh;
  background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
  overflow: hidden;
}

#game-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.ui-overlay {
  position: absolute;
  top: 24px;
  left: 24px;
  pointer-events: none;
  z-index: 10;
}

.instructions {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.4);
  font-size: 14px;
  text-align: center;
  pointer-events: none;
  z-index: 10;
  animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 0.3;
  }

  50% {
    opacity: 0.6;
  }
}

.mode-btn {
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.mode-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.mode-btn.active {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
  color: #10b981;
}

.game-controls {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 30;
  display: flex;
  gap: 12px;
}

.control-btn {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 8px 16px;
  border-radius: 99px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  pointer-events: auto;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.control-btn svg {
  width: 18px;
  height: 18px;
}

#exit-fullscreen {
  display: none;
}

body.fullscreen-game #exit-fullscreen {
  display: flex;
}

body.fullscreen-game #enter-fullscreen {
  display: none;
}

body.fullscreen-game header,
body.fullscreen-game footer,
body.fullscreen-game #moretools,
body.fullscreen-game #backtotop {
  display: none !important;
}

#start-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  text-align: center;
  pointer-events: none;
  z-index: 20;
}

#start-hint h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}

#start-hint p {
  font-size: 1.1rem;
  opacity: 0.8;
}
