@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

/* Reset e base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Press Start 2P', monospace;
  background: linear-gradient(45deg, #000000, #1a0033);
  color: #fff;
  overflow-x: hidden;
  line-height: 1.6;
}

.game-container {
  min-height: 100vh;
  position: relative;
  padding-bottom: 40px;
}

/* Fundo pixelado */
.game-container::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(138,43,226,0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(138,43,226,0.1) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
  z-index: -1;
}

/* Cabeçalho estilo game */
.game-header {
  background: linear-gradient(90deg, #000000, #4B0082);
  border-bottom: 3px solid #8A2BE2;
  padding: 15px 20px;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 0 20px rgba(138,43,226,0.3);
}

.health-bar {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: center;
}

.player-name {
  font-size: 12px;
  color: #fff;
}

.hp-bar {
  background: #000;
  border: 2px solid #8A2BE2;
  height: 20px;
  width: 200px;
  position: relative;
  overflow: hidden;
}

.hp-fill {
  background: linear-gradient(90deg, #8A2BE2, #9932CC);
  height: 100%;
  width: 100%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.level {
  font-size: 10px;
  color: #fff;
}

/* Navegação lateral */
.nav-menu {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.nav-btn {
  display: block;
  background: linear-gradient(45deg, #000, #4B0082);
  border: 2px solid #8A2BE2;
  color: #fff;
  padding: 10px 15px;
  margin: 5px 0;
  text-decoration: none;
  font-size: 8px;
  cursor: pointer;
  transition: all 0.3s;
  min-width: 100px;
  text-align: center;
  word-wrap: break-word;
}

.nav-btn:hover {
  background: #8A2BE2;
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(138,43,226,0.5);
}

/* Telas principais */
.game-screen {
  margin-top: 80px;
  padding: 20px;
  min-height: calc(100vh - 80px);
}

.section {
  display: none;
  animation: fadeIn 0.5s ease-in;
}

.section.active {
  display: block;
}

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

/* Avatar/Personagem */
.character {
  width: 120px;
  height: 120px;
  background: linear-gradient(45deg, #8A2BE2, #9932CC);
  border: 3px solid #fff;
  margin: 20px auto;
  position: relative;
  animation: bounce 2s infinite;
}

.character::before {
  content: '👨‍💻';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 60px;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Caixas de texto */
.text-box {
  background: linear-gradient(45deg, #000, #4B0082);
  border: 3px solid #8A2BE2;
  padding: 20px;
  margin: 20px auto;
  position: relative;
  box-shadow: 0 0 20px rgba(138,43,226,0.2);
  max-width: 800px;
}

.text-box::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 20px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 10px solid #8A2BE2;
}

.text-box h2 {
  font-size: 14px;
  margin-bottom: 15px;
  text-align: center;
}

.text-box p {
  font-size: 10px;
  line-height: 1.8;
  margin-bottom: 10px;
  text-align: justify;
  word-break: break-word;
}

/* Responsivo */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    bottom: 10px;
    right: 50%;
    left: 50%;
    transform: translate(-50%, 0);
    flex-direction: row;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 12px;
    gap: 5px;
  }

  .nav-btn {
    margin: 0;
    padding: 6px 10px;
    font-size: 6px;
    min-width: auto;
    flex: 1;
  }

  .health-bar {
    justify-content: center;
  }

  .hp-bar {
    width: 150px;
  }

  .character {
    width: 80px;
    height: 80px;
  }

  .character::before {
    font-size: 40px;
  }

  .text-box {
    padding: 15px;
    margin: 15px 10px;
  }

  .text-box h2 {
    font-size: 12px;
  }

  .text-box p {
    font-size: 9px;
  }
}
