@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700;900&family=Rajdhani:wght@500;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
}

body, html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #050510;
  font-family: 'Rajdhani', sans-serif;
  color: #ffffff;
}

#canvas-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* ================= HUD ================= */
#hud {
  position: absolute;
  top: 20px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  z-index: 10;
  pointer-events: none;
  padding: 0 20px;
}

.hud-box {
  background: rgba(10, 15, 30, 0.75);
  border: 1px solid rgba(0, 240, 255, 0.4);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.2), inset 0 0 10px rgba(0, 240, 255, 0.1);
  padding: 8px 18px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  backdrop-filter: blur(8px);
}

.hud-label {
  font-family: 'Orbitron', monospace;
  font-size: 0.65rem;
  letter-spacing: 2px;
  color: #00f0ff;
  margin-bottom: 2px;
  text-transform: uppercase;
}

.hud-value {
  font-family: 'Orbitron', monospace;
  font-size: 1.4rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.hud-btn {
  pointer-events: auto;
  background: rgba(15, 20, 40, 0.85);
  border: 1px solid rgba(255, 0, 128, 0.5);
  box-shadow: 0 0 10px rgba(255, 0, 128, 0.2);
  color: #fff;
  font-size: 1.2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.hud-btn:hover {
  transform: scale(1.1);
  border-color: #ff007f;
  box-shadow: 0 0 18px rgba(255, 0, 128, 0.6);
}

/* ================= SCREENS & OVERLAYS ================= */
.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at center, rgba(15, 12, 35, 0.85) 0%, rgba(5, 5, 15, 0.95) 100%);
  z-index: 20;
  backdrop-filter: blur(10px);
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.screen-content {
  background: rgba(15, 20, 40, 0.7);
  border: 2px solid rgba(0, 240, 255, 0.5);
  box-shadow: 0 0 35px rgba(0, 240, 255, 0.25), inset 0 0 20px rgba(0, 240, 255, 0.1);
  padding: 40px;
  border-radius: 16px;
  text-align: center;
  max-width: 480px;
  width: 90%;
  animation: floatIn 0.4s ease-out;
}

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

.game-title {
  font-family: 'Orbitron', monospace;
  font-size: 2.8rem;
  font-weight: 900;
  letter-spacing: 4px;
  color: #ffffff;
  text-shadow: 0 0 15px rgba(0, 240, 255, 0.8), 0 0 30px rgba(0, 240, 255, 0.4);
  margin-bottom: 8px;
}

.game-title .highlight {
  color: #ff007f;
  text-shadow: 0 0 15px rgba(255, 0, 127, 0.8), 0 0 30px rgba(255, 0, 127, 0.4);
}

.game-subtitle {
  color: #9ab4d0;
  font-size: 1.1rem;
  margin-bottom: 25px;
}

/* ================= CONTROLS GUIDE ================= */
.controls-guide {
  background: rgba(5, 8, 20, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 25px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.control-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1rem;
  color: #d0e0f0;
}

.key {
  background: #1a2238;
  border: 1px solid #00f0ff;
  box-shadow: 0 2px 0 #0088aa;
  padding: 3px 8px;
  border-radius: 4px;
  font-family: 'Orbitron', monospace;
  font-size: 0.8rem;
  color: #00f0ff;
  font-weight: bold;
}

.mouse-icon {
  font-size: 1.1rem;
}

/* ================= BUTTONS ================= */
.primary-btn {
  font-family: 'Orbitron', monospace;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 2px;
  padding: 14px 32px;
  background: linear-gradient(135deg, #ff007f 0%, #aa00ff 100%);
  border: none;
  border-radius: 30px;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(255, 0, 128, 0.5), inset 0 0 10px rgba(255, 255, 255, 0.3);
  transition: all 0.25s ease;
  width: 100%;
}

.primary-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 30px rgba(255, 0, 128, 0.8), inset 0 0 15px rgba(255, 255, 255, 0.5);
}

.primary-btn:active {
  transform: translateY(1px);
}

.high-score-display {
  margin-top: 15px;
  font-size: 0.95rem;
  color: #ffe600;
  font-family: 'Orbitron', monospace;
  letter-spacing: 1px;
}

/* ================= GAME OVER ================= */
.gameover-title {
  font-family: 'Orbitron', monospace;
  font-size: 2rem;
  color: #ff3344;
  text-shadow: 0 0 20px rgba(255, 51, 68, 0.8);
  margin-bottom: 5px;
}

.gameover-subtitle {
  color: #8c9cb0;
  margin-bottom: 20px;
}

.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 25px;
}

.result-card {
  background: rgba(10, 15, 30, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
}

.result-card.full-width {
  grid-column: span 2;
}

.result-label {
  font-size: 0.8rem;
  color: #8c9cb0;
  margin-bottom: 4px;
}

.result-value {
  font-family: 'Orbitron', monospace;
  font-size: 1.3rem;
  font-weight: 700;
  color: #ffffff;
}

.result-value.highlight {
  font-size: 1.8rem;
  color: #00f0ff;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.6);
}

.record-card {
  background: rgba(255, 230, 0, 0.15);
  border: 1px solid #ffe600;
  color: #ffe600;
  font-family: 'Orbitron', monospace;
  font-weight: bold;
  font-size: 0.9rem;
  padding: 10px;
  animation: pulse 1s infinite alternate;
}

@keyframes pulse {
  from { opacity: 0.8; }
  to { opacity: 1; text-shadow: 0 0 10px #ffe600; }
}

/* Responsividade */
@media (max-width: 600px) {
  .screen-content {
    padding: 24px 20px;
  }
  .game-title {
    font-size: 2rem;
  }
  .hud-value {
    font-size: 1.1rem;
  }
  .hud-box {
    padding: 6px 12px;
  }
}
