body {
  margin: 0;
  padding: 0;
  background: #111;
  font-family: 'Orbitron', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.arcade-wrapper {
  position: relative;
  width: 100vw;
  max-width: 430px;
  aspect-ratio: 9/16;
  margin: 0 auto;
  background: transparent;
  overflow: visible;
}

.arcade-bg {
  position: absolute;
  left: -8px;
  top: -8px;
  width: calc(100% + 12px);
  height: calc(100% + 12px);
  z-index: 0;
  pointer-events: none;
  user-select: none;
  display: block;
  object-fit: contain;
  object-position: top center;
  aspect-ratio: 9/16;
}


#game-canvas {
  position: absolute;
  left: 14%;
  top: 22%;
  width: 70%;
  height: 36%;
  min-width: 140px;
  min-height: 140px;
  max-width: 100%;
  max-height: 100%;
  z-index: 10;
  background: transparent;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.3);
  display: block;
}

@media (max-width: 600px) {
  .arcade-wrapper {
    width: 100vw;
    max-width: 100vw;
    aspect-ratio: 9/16;
    margin: 0;
  }
  #game-canvas {
    min-width: 120px;
    min-height: 120px;
  }
}

#score-display {
  position: absolute;
  left: 8%;
  top: 14%;
  color: #ff4a4a;
  font-size: 1.1em;
  font-family: 'Orbitron', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-weight: bold;
  text-shadow: 0 2px 8px #111, 0 0px 2px #fff;
  z-index: 2;
  user-select: none;
  pointer-events: none;
  background: rgba(17,17,17,0.3);
  padding: 0.2em 0.6em;
  border-radius: 8px;
  letter-spacing: 1px;
}

#level-display {
  position: absolute;
  right: 10%;
  top: 14%;
  color: #3ec6ff;
  font-size: 1.1em;
  font-family: 'Orbitron', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-weight: bold;
  text-shadow: 0 2px 8px #111, 0 0px 2px #fff;
  z-index: 2;
  user-select: none;
  pointer-events: none;
  background: rgba(17,17,17,0.3);
  padding: 0.2em 0.6em;
  border-radius: 8px;
  letter-spacing: 1px;
  text-align: right;
}

#o-circle {
  display: inline-block;
  width: 1.2em;
  height: 1.2em;
  border-radius: 50%;
  background: #222;
  color: #3ec6ff;
  font-weight: bold;
  font-size: 1.1em;
  box-shadow: 0 0 8px #3ec6ff, 0 0 16px #3ec6ff99;
  text-align: center;
  line-height: 1.2em;
  margin-right: 0.2em;
  font-family: 'Orbitron', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#intro-overlay {
  position: absolute;
  left: 17%;
  top: 22%;
  width: 71%;
  height: 36%;
  z-index: 20;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(17,17,17,0.75);
}

#intro-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.3);
  display: block;
}

#restart-btn {
  position: absolute;
  left: 64%;
  top: 65%;
  transform: translate(-50%, -50%);
  width: 54px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(227,255,222,0);
  box-shadow: 0 0 0 0 transparent;
  cursor: pointer;
  z-index: 10;
  outline: none;
  transition: background 0.2s;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
#restart-btn::after {
  content: '';
  display: block;
  width: 26px;
  height: 26px;
  mask: url('data:image/svg+xml;utf8,<svg fill="white" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6h-2c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8z"/></svg>') center/contain no-repeat;
  background: white;
  opacity: 0.7;
  pointer-events: none;
}
#restart-btn.pulsing {
  animation: btnPulseRestart 1.2s infinite;
  pointer-events: auto;
}
@keyframes btnPulseRestart {
  0%   { background: rgba(255,104,66,0.08);}
  50%  { background: rgba(255,104,66,0.48);}
  100% { background: rgba(255,104,66,0.08);}
}

#ai-btn {
  position: absolute;
  left: 78%; /* Ajusta conforme necessário */
  top: 65%;  /* Igual ao de reset para alinhar */
  transform: translate(-50%, -50%);
  width: 54px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 120, 0); /* Transparente por padrão */
  box-shadow: 0 0 0 0 transparent;
  cursor: pointer;
  z-index: 10;
  outline: none;
  transition: background 0.2s;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Orbitron', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-weight: bold;
  font-size: 1.1em;
  color: #ffe066;
  letter-spacing: 2px;
  text-shadow: 0 2px 8px #111, 0 0px 2px #fff;
}

#ai-btn.pulsing {
  animation: btnPulseAI 1.2s infinite;
  pointer-events: auto;
}

@keyframes btnPulseAI {
  0%   { background: rgba(255, 224, 102, 0.08);}
  50%  { background: rgba(255, 224, 102, 0.48);}
  100% { background: rgba(255, 224, 102, 0.08);}
}


/* Top 10 Table */
#top10-container {
  width: 100%;
  max-width: 430px;
  margin: 40px auto 60px auto;
  background: rgba(17, 17, 17, 0.95);
  border-radius: 14px;
  box-shadow: 0 4px 32px rgba(0,0,0,0.25);
  padding: 1.5em 1em 2em 1em;
  text-align: center;
}
#top10-container h2 {
  color: #e3ffde;
  font-family: 'Orbitron', sans-serif;
  margin-bottom: 1em;
  font-size: 1.3em;
  letter-spacing: 1px;
}
#top10 {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Orbitron', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
#top10 th,
#top10 td {
  padding: 0.6em 0.3em;
  border-bottom: 1px solid #222;
  color: #e3ffde;
  font-size: 1em;
}
#top10 th {
  background: #222;
  font-weight: bold;
}
#top10 tr:nth-child(even) {
  background: rgba(34, 34, 34, 0.6);
}

/* Modals */
.modal-bg {
  position: fixed;
  z-index: 9999;
  left: 0; top: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-content {
  background: #222;
  color: #fff;
  border-radius: 8px;
  padding: 24px 32px;
  text-align: center;
  box-shadow: 0 4px 32px #000a;
  min-width: 240px;
  font-family: 'Orbitron', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.modal-content input[type="text"] {
  font-size: 1.5em;
  width: 80px;
  text-align: center;
  margin-bottom: 10px;
  text-transform: uppercase;
  font-family: 'Orbitron', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  border: 1px solid #4caf50;
  border-radius: 4px;
  padding: 4px 8px;
  background: #111;
  color: #e3ffde;
  outline: none;
}
.modal-content button {
  margin: 6px 10px 0 10px;
  padding: 6px 16px;
  font-size: 1em;
  border: none;
  border-radius: 4px;
  background: #4caf50;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
  font-family: 'Orbitron', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.modal-content button:hover {
  background: #388e3c;
}
