  /* --- Corrida do Axé - estilos gerais --- */

  * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #a7d8f7, #f0f7ff);
    color: #222;
    min-height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  h1 {
    text-align: center;
    color: #114b8c;
    font-weight: 700;
    font-size: 2.2rem;
    margin-bottom: 25px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
  }

  /* === Seleção de Orixás === */

  .orixas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 22px;
    max-width: 960px;
    width: 100%;
    margin-bottom: 25px;
    padding: 0 10px;
  }

  .orixa-card {
    background: #fff;
    border-radius: 16px;
    box-shadow:
      0 8px 14px rgba(0,0,0,0.12),
      inset 0 -5px 10px #72b2f966;
    padding: 20px 16px;
    cursor: pointer;
    text-align: center;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    user-select: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 2px solid transparent;
  }

  .orixa-card:focus-visible {
    outline: none;
    border-color: #1a73e8;
    box-shadow:
      0 0 8px 3px #1a73e8aa,
      inset 0 -5px 10px #72b2f966;
    transform: translateY(-6px) scale(1.07);
  }

  .orixa-card:hover {
    transform: translateY(-6px) scale(1.07);
    box-shadow:
      0 14px 26px rgba(0,0,0,0.2),
      inset 0 -6px 12px #3b7bd866;
    border-color: #2962ff;
  }

  .orixa-img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 16px;
    filter: drop-shadow(0 3px 4px rgba(0,0,0,0.15));
    border-radius: 50%;
    background: #e0f0ff;
    padding: 10px;
    transition: transform 0.35s ease;
  }

  .orixa-card:hover .orixa-img,
  .orixa-card:focus-visible .orixa-img {
    transform: scale(1.15);
  }

  .orixa-nome {
    font-weight: 700;
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: #0f3a6e;
    user-select: none;
  }

  .orixa-habilidade {
    font-size: 1rem;
    color: #555;
    min-height: 50px;
    line-height: 1.3;
    user-select: none;
    font-style: italic;
  }

  /* === Área do Jogo === */

  #gameInfo {
    max-width: 960px;
    width: 100%;
    margin: 0 auto 15px;
    font-size: 1.1em;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 14px;
    color: #1a2e4a;
    font-weight: 600;
  }

  #gameInfo > div {
    background: #d6e8ff;
    padding: 8px 14px;
    border-radius: 10px;
    box-shadow: inset 0 0 8px #a2c1ffcc;
    min-width: 120px;
    text-align: center;
  }

  #gameArea {
    position: relative;
    background: linear-gradient(90deg, #88c8ff, #5392ff);
    border: 3px solid #2962ff;
    height: 220px;
    max-width: 960px;
    width: 100%;
    margin: 0 auto 24px;
    overflow: hidden;
    border-radius: 18px;
    outline: none;
    box-shadow: 0 6px 15px rgba(41, 98, 255, 0.5);
  }

  #player {
  position: absolute;
  bottom: 10px;
  left: 60px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: #fff;
  border: 3px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 15px 4px rgba(255, 255, 255, 0.8);
  z-index: 10;
  transition: bottom 0.3s ease-in-out;
  animation: none !important;
}

  @keyframes pulse {
    0%, 100% {
      transform: scale(1);
      box-shadow: 0 0 15px 4px rgba(255,255,255,0.8);
    }
    50% {
      transform: scale(1.1);
      box-shadow: 0 0 20px 6px rgba(255,255,255,1);
    }
  }

  .inimigo, .powerup {
    position: absolute;
    bottom: 10px;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    animation: moverLinear linear forwards;
    box-shadow: 0 0 10px rgba(0,0,0,0.15);
    transition: transform 0.2s ease;
  }

  .inimigo {
    background: #b22222;
    box-shadow:
      0 0 15px 3px #cc5555,
      inset 0 0 12px 3px #9a1f1f;
    border: 2px solid #770000;
    z-index: 8;
  }

  .inimigo:hover {
    transform: scale(1.1);
  }

  .powerup {
    background: gold;
    border-radius: 50%;
    box-shadow:
      0 0 16px 4px #ffeb3b,
      inset 0 0 12px 3px #fff176;
    z-index: 9;
  }

  @keyframes moverLinear {
    from {
      right: -50px;
    }
    to {
      right: 110%;
    }
  }

  #controls {
  max-width: 960px;
  width: 100%;
  margin: 0 auto 25px;
  text-align: center;
  gap: 14px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}


  #controls button {
    background-color: #2962ff;
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 1.1em;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.15s ease;
    min-width: 140px;
    box-shadow: 0 4px 10px rgba(41,98,255,0.5);
    user-select: none;
    position: relative;
    z-index: 20;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  #controls button:disabled {
    background-color: #999;
    cursor: not-allowed;
    box-shadow: none;
  }

  #controls button:hover:not(:disabled) {
    background-color: #0039cb;
    transform: scale(1.05);
  }

  .modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10, 10, 30, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
  }

  .modal.hidden {
    display: none;
  }

  .modal-content {
    background: #fff;
    padding: 28px 30px;
    border-radius: 18px;
    max-width: 440px;
    text-align: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    color: #222;
  }

  .modal-content h2 {
    margin-top: 0;
    color: #2962ff;
    font-weight: 700;
    margin-bottom: 20px;
  }

  .modal-content p {
    line-height: 1.4;
    margin: 12px 0;
    font-size: 1rem;
  }

  .modal-content button {
    margin-top: 22px;
    padding: 12px 26px;
    font-size: 1.1em;
    border-radius: 10px;
    border: none;
    background-color: #2962ff;
    color: white;
    cursor: pointer;
    user-select: none;
    box-shadow: 0 4px 10px rgba(41, 98, 255, 0.6);
    transition: background-color 0.3s ease;
  }

  .modal-content button:hover {
    background-color: #0039cb;
  }

  @media (max-width: 480px) {
    body {
      padding: 15px 10px;
    }

    h1 {
      font-size: 1.8rem;
    }

    .orixas-grid {
      grid-template-columns: repeat(auto-fit,minmax(110px,1fr));
      gap: 14px;
      margin-bottom: 18px;
    }

    .orixa-img {
      width: 80px;
      height: 80px;
      margin-bottom: 10px;
    }

    .orixa-card {
      padding: 14px 10px;
    }

    #gameArea {
      height: 180px;
    }

    #player {
      left: 45px !important;
      width: 36px !important;
      height: 36px !important;
      bottom: 8px !important;
    }

    .inimigo, .powerup {
      width: 26px !important;
      height: 26px !important;
      bottom: 8px !important;
      border-radius: 6px !important;
    }

    #gameInfo {
      flex-direction: column !important;
      gap: 8px !important;
      font-size: 1rem !important;
      max-width: 90vw !important;
      margin-bottom: 15px !important;
      align-items: center !important;
      text-align: center !important;
    }

    #gameInfo > div {
      min-width: unset !important;
      width: 100% !important;
      padding: 8px 12px !important;
      box-shadow: inset 0 0 8px #a2c1ffcc !important;
    }

    #controls {
  position: absolute;
  bottom: 10px;
  left: 0;
  width: 100%;
  padding: 0 12px;
  display: flex;
  justify-content: space-between;
  z-index: 50;
  pointer-events: none;
}

#controls button {
  pointer-events: all;
}

    #controls button {
      min-width: 130px !important;
      padding: 12px 20px !important;
      font-size: 1em !important;
      border-radius: 8px !important;
      box-shadow: 0 3px 8px rgba(41,98,255,0.6) !important;
    }

    .modal-content {
      max-width: 90vw !important;
      padding: 20px 18px !important;
      border-radius: 12px !important;
      font-size: 0.95rem !important;
    }
  }

  body, html {
    overflow-x: hidden;
    max-width: 100vw;
  }

  @viewport {
    width: device-width;
    initial-scale: 1.0;
    user-scalable: no;
  }

  @media screen and (max-width: 480px) {
    body {
      touch-action: manipulation;
    }
  }
#btnPular.active {
  background-color: #0039cb !important;
  transform: scale(0.95);
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  transition: background-color 0.15s ease, transform 0.15s ease;
}.pulando {
  bottom: 160px !important; /* 10 + 150px (jumpHeight) */
  transition: bottom 0.3s ease-in-out;
}
#player:active {
  transform: scale(1.2);
}
#player.pulando {
  
  bottom: 140px !important;
  transition: bottom 0.25s ease;
}

/* Animação do pulo */
.pulando {
  animation: pulo 0.6s ease forwards;
}

@keyframes pulo {
  0% { bottom: 10px; }
  50% { bottom: 160px; }
  100% { bottom: 10px; }
}

.invisivel {
  opacity: 0.3 !important;
  transition: opacity 0.5s ease;
}

.escudo {
  box-shadow: 0 0 15px 5px #00f;
  border-radius: 10px;
  transition: box-shadow 0.3s ease;
}

.ventania {
  animation: ventoAnim 0.5s ease-out;
  filter: brightness(1.5);
}

@keyframes ventoAnim {
  0% { transform: translateX(0); }
  100% { transform: translateX(-20px); opacity: 0; }
}

.tempoLento {
  filter: brightness(0.6);
  transition: filter 0.5s ease;
}

.powerup-acelerado {
  background-color: rgba(255, 255, 0, 0.1);
}

.saltoDuplo {
  box-shadow: 0 0 20px 8px #8bc34a;
}

.impacto {
  animation: impactoAnim 1s ease;
  box-shadow: 0 0 30px 15px #f44336;
}

@keyframes impactoAnim {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

#btnVoltarContainer {
  max-width: 960px;
  width: 100%;
  margin-bottom: 15px;
  text-align: left;
}

#btnVoltarMenu {
  background-color: #2962ff;
  color: white;
  border: none;
  padding: 10px 22px;
  font-size: 1em;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(41, 98, 255, 0.5);
  user-select: none;
  transition: background-color 0.3s ease, transform 0.15s ease;
}

#btnVoltarMenu:hover {
  background-color: #0039cb;
  transform: scale(1.05);
}
