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

body {
  background: #000;
  overflow: hidden;
  font-family: 'Courier New', monospace;
  color: #fff;
  -webkit-tap-highlight-color: transparent;
}

canvas {
  display: block;
  width: 100vw;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
}

#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  z-index: 10;
  transition: opacity 1.5s ease;
}

#overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

#intro {
  text-align: center;
  animation: fadeIn 2s ease;
}

#intro h1 {
  font-size: clamp(2rem, 8vw, 5rem);
  font-weight: 100;
  letter-spacing: 1.5em;
  margin-left: 1.5em;
  background: linear-gradient(135deg, #00f5d4, #7b2ff7, #f72585);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s ease-in-out infinite alternate;
}

.subtitle {
  font-size: clamp(0.6rem, 2vw, 1rem);
  letter-spacing: 0.5em;
  margin-left: 0.5em;
  opacity: 0.5;
  margin-top: 1rem;
}

.hint {
  font-size: clamp(0.5rem, 1.5vw, 0.75rem);
  opacity: 0.3;
  margin-top: 2rem;
}

#start-btn {
  margin-top: 3rem;
  padding: 0.8rem 3rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.6);
  font-family: inherit;
  font-size: 0.8rem;
  letter-spacing: 0.5em;
  cursor: pointer;
  transition: all 0.3s ease;
}

#start-btn:hover {
  border-color: rgba(0, 245, 212, 0.5);
  color: #00f5d4;
  box-shadow: 0 0 30px rgba(0, 245, 212, 0.1);
}

#controls {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  gap: 0.5rem;
  z-index: 5;
  opacity: 0;
  transition: opacity 1s ease;
}

#controls.visible {
  opacity: 1;
}

#controls button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

#controls button:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(0, 245, 212, 0.4);
  color: #00f5d4;
}

#controls button.active {
  border-color: rgba(0, 245, 212, 0.6);
  color: #00f5d4;
  box-shadow: 0 0 15px rgba(0, 245, 212, 0.15);
}

#info {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  font-size: 0.65rem;
  opacity: 0;
  transition: opacity 1s ease;
  z-index: 5;
  display: flex;
  gap: 1.5rem;
  color: rgba(255, 255, 255, 0.25);
  letter-spacing: 0.15em;
}

#info.visible {
  opacity: 1;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
  from { filter: hue-rotate(0deg); }
  to { filter: hue-rotate(30deg); }
}
