/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Orbitron', monospace;
    background: #000;
    color: #fff;
    overflow: hidden;
    user-select: none;
}

/* Container principal */
#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
}

/* Telas */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
}

.screen.active {
    display: flex;
}

.screen.overlay {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 100;
}

/* Conteúdo dos menus */
.menu-content {
    text-align: center;
    z-index: 10;
    max-width: 600px;
    padding: 2rem;
}

.game-title {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #ff7800, #ffae00, #ff3300);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: lavaGlow 4s ease-in-out infinite;
    text-shadow: 0 0 10px rgba(255, 120, 0, 0.4),
                 0 0 20px rgba(255, 100, 0, 0.3);
}

@keyframes lavaGlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.game-subtitle {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    color: #bbb;
}

/* Animação do título */
@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Botões */
.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.btn {
    padding: 1rem 2rem;
    font-family: 'Orbitron', monospace;
    font-size: 1rem;
    font-weight: 700;
    border: 2px solid;
    background: transparent;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    min-width: 300px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    border-color: #ff7800;
    color: #ff7800;
    box-shadow: 0 0 20px rgba(255, 120, 0, 0.3);
}

.btn-primary:hover {
    background: rgba(255, 120, 0, 0.15);
    box-shadow: 0 0 30px rgba(255, 120, 0, 0.6);
    color: #fff;
    transform: translateY(-2px);
}

.btn-secondary {
    border-color: #888;
    color: #888;
}

.btn-secondary:hover {
    border-color: #fff;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* Fundo animado de estrelas mais realista */
.stars-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000011; /* Azul escuro para profundidade */
    overflow: hidden;
    z-index: -1;
}

/* Camada 1: estrelas pequenas e distantes */
.stars-layer1,
.stars-layer2,
.stars-layer3 {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 200%;
    background-repeat: repeat;
    animation-timing-function: linear;
}

/* Estrelas pequenas (distantes) */
.stars-layer1 {
    background-image:
        radial-gradient(1px 1px at 20% 30%, #fff, transparent),
        radial-gradient(1px 1px at 40% 70%, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 90% 40%, #ccc, transparent),
        radial-gradient(1px 1px at 60% 10%, #aaa, transparent);
    background-size: 300px 300px;
    animation: moveStars1 100s linear infinite;
}

/* Estrelas médias */
.stars-layer2 {
    background-image:
        radial-gradient(2px 2px at 10% 60%, #fff, transparent),
        radial-gradient(2px 2px at 50% 20%, rgba(255,255,255,0.7), transparent),
        radial-gradient(2px 2px at 80% 80%, #ddd, transparent);
    background-size: 250px 250px;
    animation: moveStars2 60s linear infinite;
}

/* Estrelas maiores (próximas) */
.stars-layer3 {
    background-image:
        radial-gradient(3px 3px at 30% 50%, #fff, transparent),
        radial-gradient(3px 3px at 70% 70%, rgba(255,255,255,0.9), transparent),
        radial-gradient(2px 2px at 90% 10%, #eee, transparent);
    background-size: 200px 200px;
    animation: moveStars3 30s linear infinite;
}

/* Animações de paralaxe */
@keyframes moveStars1 {
    from { transform: translateY(0); }
    to   { transform: translateY(-100px); }
}

@keyframes moveStars2 {
    from { transform: translateY(0); }
    to   { transform: translateY(-200px); }
}

@keyframes moveStars3 {
    from { transform: translateY(0); }
    to   { transform: translateY(-400px); }
}


/* Tela de instruções */
.instructions-content {
    text-align: left;
    margin-bottom: 2rem;
}

.instruction-item {
    margin-bottom: 2rem;
}

.instruction-item h3 {
    color: #ff7800;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem; /* Aumenta o espaçamento entre os grupos de controle */
}

.control-group {
    display: flex;
    align-items: center;
    gap: 1rem; /* Aumenta o espaçamento entre a tecla e o texto */
    font-size: 1.1rem; /* Aumenta o tamanho da fonte do texto */
}

.key {
    background: #333;
    border: 2px solid #555;
    padding: 0.5rem 1rem; /* Aumenta o padding da tecla */
    border-radius: 6px;
    font-family: 'Orbitron', monospace;
    font-weight: bold;
    min-width: 3rem; /* Aumenta a largura mínima da tecla */
    text-align: center;
    font-size: 1.2rem; /* Aumenta o tamanho da fonte da tecla */
}

.instruction-item ul {
    list-style: none;
    padding-left: 1rem;
}

.instruction-item li {
    margin-bottom: 0.5rem;
    position: relative;
}

.instruction-item li::before {
    content: '▶';
    color: #ff7800;
    position: absolute;
    left: -1rem;
}

/* Configurações */
.settings-content {
    text-align: left;
    margin-bottom: 2rem;
}

.setting-item {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.setting-item label {
    font-weight: bold;
    min-width: 150px;
}

.setting-item input[type="range"] {
    flex: 1;
    max-width: 200px;
}

.setting-item select {
    background: #333;
    color: #fff;
    border: 1px solid #555;
    padding: 0.5rem;
    font-family: 'Orbitron', monospace;
}

.setting-item input[type="checkbox"] {
    margin-right: 0.5rem;
}

/* Canvas do jogo */
#game-canvas {
    display: block;
    background: #000;
    width: 100%;
    height: 100%;
}

/* HUD do jogo */
#game-hud {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.hud-top {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.hud-bottom {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.score-display, .level-display, .fps-display, .speed-display {
    background: rgba(0, 0, 0, 0.7);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    border: 1px solid #333;
    font-family: 'Orbitron', monospace;
    font-weight: bold;
}

.score-display .label, .level-display .label, .fps-display .label, .speed-display .label {
    color: #aaa;
    font-size: 0.8rem;
    margin-right: 0.5rem;
}

#score-value {
    color: #ff7800;
    font-size: 1.2rem;
}

#level-value {
    color: #ffaa00;
    font-size: 1.2rem;
}

#fps-value, #speed-value {
    color: #fff;
    font-size: 1rem;
}

/* Barra de combustível */
.fuel-bar {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.fuel-bar .label {
    color: #aaa;
    font-size: 0.8rem;
    font-family: 'Orbitron', monospace;
    font-weight: bold;
}

.bar-container {
    width: 200px;
    height: 10px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid #333;
    border-radius: 5px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff0000, #ffaa00, #00ff00);
    transition: width 0.3s ease;
    width: 100%;
}

/* Botão de pausa */
.pause-button {
    position: absolute;
    top: 80px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid #333;
    color: #fff;
    padding: 0.5rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2rem;
    pointer-events: all;
    transition: all 0.3s ease;
    z-index: 20;
}

.pause-button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

/* Tela de game over */
.final-score {
    margin: 2rem 0;
    text-align: center;
}

.final-score p {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #aaa;
}

#final-score-value {
    font-size: 3rem;
    font-weight: 900;
    color: #ff7800;
    text-shadow: 0 0 20px rgba(255, 120, 0, 0.5);
}

/* Responsividade */
@media (max-width: 768px) {
    .game-title {
        font-size: 2.5rem;
    }

    .menu-content {
        padding: 1rem;
    }

    .btn {
        min-width: 260px;
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    .hud-top, .hud-bottom {
        flex-direction: column;
        gap: 1rem;
    }

    .hud-top {
        align-items: flex-start;
    }

    .hud-bottom {
        align-items: flex-start;
    }

    .bar-container {
        width: 150px;
    }
}

@media (max-width: 480px) {
    .game-title {
        font-size: 2rem;
    }

    .instruction-item {
        margin-bottom: 1.5rem;
    }

    .controls {
        font-size: 0.9rem;
    }

    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Estilos para informações de recursos */
.resource-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.resource-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 1rem;
    width: 180px;
}

.resource-item img {
    width: 80px;
    height: 80px;
    margin-bottom: 0.5rem;
    object-fit: contain;
}

.resource-item p {
    font-size: 0.9rem;
    line-height: 1.3;
}

.resource-item strong {
    color: #ff7800;
}

    /* Estilo de raridades */
    .rarity-row {
      display: grid;
      grid-template-columns: repeat(2, auto);
      gap: 6px 20px;
      margin-top: 8px;
      font-family: Orbitron, Arial, sans-serif;
      font-size: 15px;
    }

    .rarity-item {
      display: flex;
      align-items: center;
      gap: 6px;
      white-space: nowrap;
    }

    .dot {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      animation: blink 1s infinite alternate;
      display: inline-block;
    }

    @keyframes blink {
      0% { opacity: 1; }
      100% { opacity: 0.3; }
    }

    .blue    { background-color: blue; }
    .pink    { background-color: hotpink; }
    .yellow  { background-color: gold; }
    .orange  { background-color: orange; }

    .blue-text    { color: blue; font-weight: bold; }
    .pink-text    { color: hotpink; font-weight: bold; }
    .yellow-text  { color: goldenrod; font-weight: bold; }
    .orange-text  { color: orange; font-weight: bold; }

    /* Fundo de estrelas com paralaxe */
    .stars-bg {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: #000010;
      overflow: hidden;
      z-index: -1;
    }

    .stars-layer1,
    .stars-layer2,
    .stars-layer3 {
      position: absolute;
      top: 0;
      left: 0;
      width: 200%;
      height: 200%;
      background-repeat: repeat;
      animation-timing-function: linear;
    }

    .stars-layer1 {
      background-image:
        radial-gradient(1px 1px at 20% 30%, #fff, transparent),
        radial-gradient(1px 1px at 40% 70%, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 90% 40%, #ccc, transparent),
        radial-gradient(1px 1px at 60% 10%, #aaa, transparent);
      background-size: 300px 300px;
      animation: moveStars1 100s linear infinite;
    }

    .stars-layer2 {
      background-image:
        radial-gradient(2px 2px at 10% 60%, #fff, transparent),
        radial-gradient(2px 2px at 50% 20%, rgba(255,255,255,0.7), transparent),
        radial-gradient(2px 2px at 80% 80%, #ddd, transparent);
      background-size: 250px 250px;
      animation: moveStars2 60s linear infinite;
    }

    .stars-layer3 {
      background-image:
        radial-gradient(3px 3px at 30% 50%, #fff, transparent),
        radial-gradient(3px 3px at 70% 70%, rgba(255,255,255,0.9), transparent),
        radial-gradient(2px 2px at 90% 10%, #eee, transparent);
      background-size: 200px 200px;
      animation: moveStars3 30s linear infinite;
    }

    @keyframes moveStars1 {
      from { transform: translateY(0); }
      to   { transform: translateY(-100px); }
    }

    @keyframes moveStars2 {
      from { transform: translateY(0); }
      to   { transform: translateY(-200px); }
    }

    @keyframes moveStars3 {
      from { transform: translateY(0); }
      to   { transform: translateY(-400px); }
    }
    
.site-gubax-btn {
  position: fixed;
  top: 15px;
  right: 15px;
  z-index: 9999; /* para garantir que fique sobre tudo */
  
  color: white !important;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  cursor: pointer;
  padding: 0.5em 1.5em;
  border-radius: 4px;
  border: 2px solid white;
  background: transparent;
  font-family: Orbitron, Arial, sans-serif;
  font-weight: 700;
  transition: background-color 0.3s, color 0.3s;
}

.site-gubax-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  text-decoration: none;
}
.credits {
  position: fixed;
  bottom: 5px;
  left: 0;
  width: 100%;
  text-align: center;
  font-family: Arial, sans-serif;
  font-size: 11px;
  color: #ccc;
  user-select: none;
  pointer-events: none; /* evita interferência */
  z-index: 10000;
}

.game-title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: 3rem;
  text-align: center;
  margin: 0;
  padding: 0;
}

.version {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: #ffcc00;
  background: rgba(255, 204, 0, 0.15);
  padding: 3px 12px;
  border-radius: 12px;
  box-shadow: 0 0 6px rgba(255, 204, 0, 0.4);
  text-transform: uppercase;
  user-select: none;
  width: fit-content;
  margin: 6px auto 20px auto; /* espaçamento abaixo para o subtítulo */
  text-align: center;
}

.game-subtitle {
  font-family: 'Orbitron', sans-serif;
  font-weight: 400;
  font-size: 1.25rem;
  text-align: center;
  margin: 0 0 30px 0; /* margem inferior para separar dos botões */
  padding: 0;
}

.menu-buttons {
  margin-top: 0; /* pode ajustar se quiser mais espaço */
  display: flex;
  flex-direction: column;
  gap: 12px; /* espaço entre botões */
  align-items: center;
}

    .pause-title {
  margin-top: -30px; /* sobe o título sem afetar os botões */
  margin-bottom: 30px; /* espaço entre título e botões */
}

.pause-title h2 {
  margin: 0; /* remove margem padrão do h2 */
}

.instructions-title {
  margin-top: -30px;  /* sobe o título */
  margin-bottom: 30px; /* separa do conteúdo abaixo */
}

.instructions-title h2 {
  margin: 0;
  padding-top: 25px;
}

.settings-title {
  margin-top: -30px;
  margin-bottom: 30px;
}

.settings-title h2 {
  margin: 0;
}


/* Avisos de Power-ups */
    .powerup-notifications {
        position: absolute;
        top: 120px; /* Ajuste para ficar abaixo da barra de nível */
        left: 20px; /* Alinhar à esquerda */
        transform: translateX(0); /* Remover centralização */
        display: flex;
        flex-direction: column;
        gap: 8px;
        z-index: 15;
        width: auto; /* Ajustar largura automaticamente */
        align-items: flex-start; /* Alinhar itens à esquerda */
    }

    .powerup-notification {
        background: rgba(0, 0, 0, 0.8);
        border: 2px solid;
        border-radius: 8px;
        padding: 8px 12px;
        display: flex;
        align-items: center;
        gap: 8px;
        font-family: 'Orbitron', monospace;
        font-weight: bold;
        font-size: 0.9rem;
        min-width: 200px;
        animation: powerupFadeIn 0.3s ease-in-out;
        max-width: 90%; /* Limita a largura para não ser invasivo */
    }

.powerup-notification.fade-out {
    animation: powerupFadeOut 0.3s ease-in-out forwards;
}

@keyframes powerupFadeIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes powerupFadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-20px);
    }
}

/* Cores específicas para cada power-up */
#infinite-fuel-notification {
    border-color: #00ff00;
    color: #00ff00;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

#super-magnet-notification {
    border-color: #ff00ff;
    color: #ff00ff;
    box-shadow: 0 0 10px rgba(255, 0, 255, 0.3);
}

#score-multiplier-notification {
    border-color: #ffff00;
    color: #ffff00;
    box-shadow: 0 0 10px rgba(255, 255, 0, 0.3);
}

#speed-boost-notification {
    border-color: #00ffff;
    color: #00ffff;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.powerup-icon {
    font-size: 1.2rem;
    min-width: 20px;
    text-align: center;
}

.powerup-text {
    flex: 1;
}

/* Responsividade para avisos de power-up */
@media (max-width: 768px) {
    .powerup-notifications {
        top: 100px; /* Ajuste para ficar abaixo do nível em telas menores */
        left: 20px; /* Alinhar à esquerda */
        transform: translateX(0); /* Remover centralização */
        width: auto; /* Ajustar largura automaticamente */
        max-width: 180px; /* Largura máxima reduzida para minimalista */
        align-items: flex-start; /* Alinhar itens à esquerda */
    }
    
    .powerup-notification {
        padding: 6px 10px;
        font-size: 0.8rem;
        min-width: auto;
        width: 100%;
        text-align: left; /* Alinhar texto à esquerda */
        justify-content: flex-start; /* Alinhar conteúdo à esquerda */
    };
    }
    
    .powerup-icon {
        font-size: 1rem;
        min-width: auto;
    }

    .powerup-text {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .powerup-notifications {
        top: 80px; /* Ajuste para telas de celular */
        left: 10px; /* Alinhar à esquerda */
        transform: translateX(0); /* Remover centralização */
        width: auto; /* Ajustar largura automaticamente */
        max-width: 150px; /* Largura máxima ainda menor para celulares */
        align-items: flex-start; /* Alinhar itens à esquerda */
    }
    
    .powerup-notification {
        padding: 4px 8px;
        font-size: 0.7rem;
        text-align: left; /* Alinhar texto à esquerda */
        justify-content: flex-start; /* Alinhar conteúdo à esquerda */
    }
    
    .powerup-icon {
        font-size: 0.9rem;
    }

    .powerup-text {
        font-size: 0.7rem;
    }
}



/* ===/* Controles Mobile */
.mobile-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    display: none; /* Oculto por padrão no desktop */
    z-index: 20;
    pointer-events: none;
}

.mobile-controls.active {
    display: block;
    pointer-events: auto;
}
.control-button {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 120, 0, 0.3);
    border: 2px solid rgba(255, 120, 0, 0.6);
    color: #ff7800;
    font-size: 24px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    user-select: none;
    touch-action: manipulation;
    transition: all 0.1s ease;
    backdrop-filter: blur(10px);
    font-family: 'Orbitron', monospace;
}

.control-button:active,
.control-button.pressed {
    background: rgba(255, 120, 0, 0.6);
    border-color: #ff7800;
    transform: scale(0.95);
    box-shadow: 0 0 20px rgba(255, 120, 0, 0.8);
}

.control-button.thrust {
    bottom: 60px;
    right: 30px;
    width: 90px;
    height: 90px;
    font-size: 28px;
    background: rgba(255, 120, 0, 0.3);
    border-color: rgba(255, 120, 0, 0.6);
    color: #ff7800;
}

.control-button.thrust:active,
.control-button.thrust.pressed {
    background: rgba(255, 120, 0, 0.6);
    border-color: #ff7800;
    box-shadow: 0 0 20px rgba(255, 120, 0, 0.8);
}

.control-button.brake {
    bottom: 60px;
    right: 140px;
    background: rgba(255, 120, 0, 0.3);
    border-color: rgba(255, 120, 0, 0.6);
    color: #ff7800;
}

.control-button.brake:active,
.control-button.brake.pressed {
    background: rgba(255, 120, 0, 0.6);
    border-color: #ff7800;
    box-shadow: 0 0 20px rgba(255, 120, 0, 0.8);
}

.control-button.left {
    bottom: 60px;
    left: 30px;
}

.control-button.right {
    bottom: 60px;
    left: 140px;
}

/* Responsividade para diferentes tamanhos de tela */
@media (max-width: 768px) {
    .mobile-controls {
        display: block;
    }
    
    .control-button {
        width: 70px;
        height: 70px;
        font-size: 20px;
    }
    
    .control-button.thrust {
        width: 80px;
        height: 80px;
        font-size: 24px;
        bottom: 50px;
        right: 20px;
    }
    
    .control-button.brake {
        bottom: 50px;
        right: 110px;
    }
    
    .control-button.left {
        bottom: 50px;
        left: 20px;
    }
    
    .control-button.right {
        bottom: 50px;
        left: 110px;
    }
}

@media (max-width: 480px) {
    .control-button {
        width: 60px;
        height: 60px;
        font-size: 18px;
    }
    
    .control-button.thrust {
        width: 70px;
        height: 70px;
        font-size: 22px;
        bottom: 40px;
        right: 15px;
    }
    
    .control-button.brake {
        bottom: 40px;
        right: 95px;
    }
    
    .control-button.left {
        bottom: 40px;
        left: 15px;
    }
    
    .control-button.right {
        bottom: 40px;
        left: 95px;
    }
}

/* Ajustes para HUD em mobile */
@media (max-width: 768px) {
    #game-hud {
        padding-bottom: 220px;
    }
    
    .hud-bottom {
        margin-bottom: 200px;
    }
    
    .pause-button {
        top: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 18px;
        z-index: 100; /* Aumentar z-index para garantir visibilidade e clique */
    }
}

/* Melhorar visibilidade em telas pequenas */
@media (max-width: 480px) {
    .hud-top {
        font-size: 14px;
    }
    
    .score-display,
    .level-display {
        margin: 5px;
    }
    
    .fuel-bar {
        width: 150px;
    }
}

/* Prevenir zoom em inputs touch */
input, button, select, textarea {
    font-size: 16px;
}

/* Melhorar performance em mobile */
.control-button {
    will-change: transform, background-color;
}

.mobile-controls {
    will-change: opacity;
}



/* Fix para botões de menu em mobile */
.menu-buttons button {
    touch-action: manipulation;
}




@media (max-width: 768px) {
    .hud-bottom {
        position: absolute;
        bottom: 180px; /* Ajusta para ficar acima dos controles mobile */
        left: 20px;
        right: auto; /* Remove o posicionamento direito */
        flex-direction: column; /* Altera para coluna para empilhar combustível e velocidade */
        align-items: flex-start; /* Alinha à esquerda */
        width: auto;
    }

    .fuel-bar {
        width: 100px; /* Reduz o tamanho */
        margin-bottom: 3px; /* Espaçamento entre as barras */
        font-size: 0.5rem; /* Torna o texto menor */
    }

    .fuel-bar .bar-container {
        width: 100%;
        height: 4px; /* Barra mais fina */
    }

    .fuel-bar .label {
        font-size: 0.4rem;
        margin-bottom: 1px;
    }

    .speed-display {
        width: 100px; /* Reduz o tamanho */
        text-align: left; /* Alinha à esquerda */
        font-size: 0.5rem; /* Torna o texto menor */
        padding: 0.1rem 0.2rem; /* Padding menor */
    }

    .speed-display .label {
        font-size: 0.4rem;
    }

    #speed-value {
        font-size: 0.6rem;
    }
}

@media (max-width: 480px) {
    .hud-bottom {
        bottom: 130px; /* Ajuste para telas menores */
        left: 10px;
    }

    .fuel-bar {
        width: 80px;
    }

    .speed-display {
        width: 80px;
    }

    .fuel-bar,
    .speed-display {
        font-size: 0.4rem;
        padding: 0.1rem 0.15rem;
    }

    .fuel-bar .label,
    .speed-display .label {
        font-size: 0.35rem;
    }

    #speed-value {
        font-size: 0.5rem;
    }

    .fuel-bar .bar-container {
        height: 3px;
    }
}




@media (max-width: 768px) {
    .fuel-bar .label,
    .speed-display .label {
        font-size: 0.7rem;
    }

    #speed-value {
        font-size: 0.9rem;
    }

    .bar-container {
        height: 8px;
    }
}

@media (max-width: 480px) {
    .fuel-bar .label,
    .speed-display .label {
        font-size: 0.6rem;
    }

    #speed-value {
        font-size: 0.8rem;
    }

    .bar-container {
        height: 6px;
    }
}




/* Estilos para Notificações de Conquista */
#achievement-notification-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none; /* Permite cliques através do container */
}

.achievement-notification {
    background: rgba(0, 0, 0, 0.85);
    border: 2px solid #ff7800;
    border-radius: 10px;
    padding: 15px 25px;
    color: #fff;
    text-align: center;
    font-family: 'Orbitron', monospace;
    font-size: 1.1rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInSlideUp 0.5s ease-out forwards;
    box-shadow: 0 0 20px rgba(255, 120, 0, 0.5);
    max-width: 300px; /* Largura máxima para desktop */
    box-sizing: border-box;
}

.achievement-notification h3 {
    color: #ffcc00;
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.4rem;
}

.achievement-notification p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.achievement-notification.hide {
    animation: fadeOutSlideDown 0.5s ease-in forwards;
}

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

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

/* Responsividade para mobile */
@media (max-width: 768px) {
    .achievement-notification {
        font-size: 0.9rem;
        padding: 10px 15px;
        max-width: 250px; /* Largura menor para mobile */
    }

    .achievement-notification h3 {
        font-size: 1.2rem;
    }

    .achievement-notification p {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .achievement-notification {
        font-size: 0.8rem;
        padding: 8px 12px;
        max-width: 200px; /* Largura ainda menor para celulares */
    }

    .achievement-notification h3 {
        font-size: 1.1rem;
    }

    .achievement-notification p {
        font-size: 0.7rem;
    }
}



/* Estilos para Sistema de Abas - Responsivo */
.tabs-container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.tabs-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 0 10px;
}

.tab-button {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border: 2px solid #ff7800;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Orbitron', monospace;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  min-width: 100px;
  text-align: center;
  box-shadow: 0 0 15px rgba(255, 120, 0, 0.2);
}

.tab-button:hover {
  background: rgba(255, 120, 0, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 120, 0, 0.3);
}

.tab-button.active {
  background: linear-gradient(90deg, #ff7800, #ff9500);
  color: #000000;
}

.tabs-content {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border: 2px solid #ff7800;
  border-radius: 12px;
  padding: 25px;
  min-height: 400px;
  max-height: 500px;
  overflow-y: auto;
  box-shadow: 0 0 25px rgba(255, 120, 0, 0.4);
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

.tab-content.active {
  display: block;
}

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

/* Estilos para Recursos Espaciais */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.resource-card {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 15px;
  text-align: center;
  transition: all 0.3s ease;
}

.resource-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 20px rgba(255, 255, 255, 0.1);
}

.resource-visual {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  position: relative;
}

.resource-visual.basic {
  background: radial-gradient(circle, #4a9eff, #2980b9);
  box-shadow: 0 0 20px rgba(74, 158, 255, 0.5);
}

.resource-visual.rare {
  background: radial-gradient(circle, #e91e63, #c2185b);
  box-shadow: 0 0 20px rgba(233, 30, 99, 0.5);
}

.resource-visual.epic {
  background: radial-gradient(circle, #ffd700, #f39c12);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.resource-visual.legendary {
  background: radial-gradient(circle, #ff6b35, #e74c3c);
  box-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
}

.resource-visual.star-fragment {
  background: radial-gradient(circle, #ffffff, #87ceeb);
  box-shadow: 0 0 25px rgba(135, 206, 235, 0.8);
  animation: starGlow 2s ease-in-out infinite alternate;
}

.resource-visual.ancient-data-capsule {
  background: radial-gradient(circle, #8b4513, #32cd32);
  box-shadow: 0 0 25px rgba(50, 205, 50, 0.8);
  animation: capsuleGlow 2s ease-in-out infinite alternate;
}

@keyframes starGlow {
  0% { box-shadow: 0 0 25px rgba(135, 206, 235, 0.8); }
  100% { box-shadow: 0 0 35px rgba(135, 206, 235, 1); }
}

@keyframes capsuleGlow {
  0% { box-shadow: 0 0 25px rgba(50, 205, 50, 0.8); }
  100% { box-shadow: 0 0 35px rgba(50, 205, 50, 1); }
}

.resource-info h4 {
  margin: 0 0 5px 0;
  color: #ffffff;
  font-family: 'Orbitron', monospace;
  font-size: 20px;
}

.resource-info p {
  margin: 0;
  color: #cccccc;
  font-size: 20px;
}

/* Estilos para Power-ups */
.powerups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.powerup-card {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  transition: all 0.3s ease;
}

.powerup-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
}

.powerup-visual {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  position: relative;
  flex-shrink: 0;
  animation: powerupPulse 2s infinite;
}

@keyframes powerupPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.powerup-visual.infinite-fuel {
  background: radial-gradient(circle, #00ff00, #00cc00);
  box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
}

.powerup-visual.super-magnet {
  background: radial-gradient(circle, #ff00ff, #cc00cc);
  box-shadow: 0 0 20px rgba(255, 0, 255, 0.5);
}

.powerup-visual.score-multiplier {
  background: radial-gradient(circle, #ffff00, #cccc00);
  box-shadow: 0 0 20px rgba(255, 255, 0, 0.5);
}

.powerup-visual.speed-boost {
  background: radial-gradient(circle, #00ffff, #00cccc);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

.powerup-visual.shield-power {
  background: radial-gradient(circle, #4FC3F7, #1976D2);
  box-shadow: 0 0 20px rgba(79, 195, 247, 0.5);
}

.powerup-icon {
  color: #000000;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.3);
}

.powerup-info {
  flex: 1;
}

.powerup-info h4 {
  margin: 0 0 8px 0;
  color: #ffffff;
  font-family: 'Orbitron', monospace;
  font-size: 18px;
  font-weight: 700;
}

.powerup-info p {
  margin: 0 0 5px 0;
  color: #cccccc;
  font-size: 14px;
  line-height: 1.4;
}

.powerup-info p strong {
  color: #ff7800;
}

/* Estilos para Conquistas */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.achievement-card {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 215, 0, 0.3);
  border-radius: 10px;
  padding: 15px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: all 0.3s ease;
}

.achievement-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(255, 215, 0, 0.2);
  border-color: rgba(255, 215, 0, 0.6);
}

.achievement-icon {
  font-size: 32px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 215, 0, 0.1);
  border-radius: 50%;
  flex-shrink: 0;
}

.achievement-info h4 {
  margin: 0 0 5px 0;
  color: #ffd700;
  font-family: 'Orbitron', monospace;
  font-size: 16px;
  font-weight: 600;
  text-align: left;
}

.achievement-info p {
  margin: 0;
  color: #cccccc;
  font-size: 13px;
  text-align: left;
}

/* Estilos para Dicas */
.tips-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 15px;
}

.tip-item {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 15px;
  display: flex;
  align-items: flex-start;
  gap: 15px;
  transition: all 0.3s ease;
}

.tip-item:hover {
  transform: translateX(5px);
  border-color: rgba(255, 120, 0, 0.5);
  box-shadow: 0 3px 15px rgba(255, 120, 0, 0.1);
}

.tip-icon {
  font-size: 28px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 120, 0, 0.1);
  border-radius: 50%;
  flex-shrink: 0;
}

.tip-text h4 {
  margin: 0 0 8px 0;
  color: #ff7800;
  font-family: 'Orbitron', monospace;
  font-size: 16px;
  font-weight: 600;
}

.tip-text p {
  margin: 0;
  color: #cccccc;
  font-size: 14px;
  line-height: 1.4;
}

/* Responsividade Mobile */
@media (max-width: 768px) {
  .tabs-header {
    gap: 5px;
    padding: 0 5px;
  }
  
  .tab-button {
    padding: 10px 15px;
    font-size: 12px;
    min-width: 80px;
  }
  
  .tabs-content {
    padding: 15px;
    max-height: 450px;
  }
  
  .resources-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
  }
  
  .resource-visual {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
  
  .powerups-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .powerup-card {
    padding: 15px;
    gap: 12px;
  }
  
  .powerup-visual {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }
  
  .powerup-info h4 {
    font-size: 16px;
  }
  
  .powerup-info p {
    font-size: 13px;
  }
  
  .achievements-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .achievement-card {
    padding: 12px;
    gap: 10px;
  }
  
  .achievement-icon {
    font-size: 28px;
    width: 45px;
    height: 45px;
  }
  
  .achievement-info h4 {
    font-size: 15px;
  }
  
  .achievement-info p {
    font-size: 12px;
  }
  
  .tip-item {
    padding: 12px;
    gap: 12px;
  }
  
  .tip-icon {
    font-size: 24px;
    width: 45px;
    height: 45px;
  }
  
  .tip-text h4 {
    font-size: 15px;
  }
  
  .tip-text p {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .tabs-header {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .tab-button {
    font-size: 12px;            /* fonte menor */
    padding: 6px 10px;          /* reduz o tamanho visual */
    width: auto;
    max-width: 135px;           /* controla largura */
    white-space: nowrap;        /* impede quebra de linha */
    overflow: hidden;           /* oculta o que passar do botão */
    text-overflow: ellipsis;    /* adiciona "..." se o texto for muito grande */
    text-align: center;
  }
}
  
  
  .tabs-content {
    padding: 12px;
    max-height: 400px;
  }
  
  .resources-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .powerup-card {
    flex-direction: column;
    text-align: center;
    padding: 15px;
  }
  
  .powerup-visual {
    margin: 0 auto;
  }
  
  .achievement-card {
    flex-direction: column;
    text-align: center;
    padding: 15px;
  }
  
  .achievement-icon {
    margin: 0 auto;
  }
  
  .tip-item {
    flex-direction: column;
    text-align: center;
  }
  
  .tip-icon {
    margin: 0 auto;
  }
}

/* Scrollbar personalizada para as abas */
.tabs-content::-webkit-scrollbar {
  width: 8px;
}

.tabs-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.tabs-content::-webkit-scrollbar-thumb {
  background: rgba(255, 120, 0, 0.6);
  border-radius: 4px;
}

.tabs-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 120, 0, 0.8);
}

/* Ajuste para o botão VOLTAR na tela de instruções */
#instructions #back-to-menu {
  margin-top: 30px; /* Adiciona um espaçamento maior acima do botão */
}

/* Estilos para Controles Visuais Redesenhados */
.controls-visual {
  display: flex;
  flex-direction: column;
  gap: 25px;
  margin-top: 15px;
}

.controls-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 120, 0, 0.2);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.controls-section h4 {
  color: #ff7800;
  font-family: 'Orbitron', monospace;
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 15px 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.keyboard-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.key-row {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.key-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 100px;
}

.key-visual {
  width: 50px;
  height: 50px;
  background: linear-gradient(145deg, #444, #222);
  border: 2px solid #666;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Orbitron', monospace;
  font-weight: bold;
  font-size: 18px;
  color: #fff;
  box-shadow: 
    0 4px 8px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
  position: relative;
}

.key-visual:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 6px 12px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border-color: #ff7800;
}

.key-visual.special-key {
  width: 70px;
  background: linear-gradient(145deg, #ff7800, #cc5500);
  border-color: #ff7800;
  color: #000;
  font-weight: 900;
}

.key-visual.special-key:hover {
  background: linear-gradient(145deg, #ff9933, #ff7800);
  box-shadow: 
    0 6px 12px rgba(255, 120, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.key-alt {
  font-size: 14px;
  color: #aaa;
  font-family: 'Orbitron', monospace;
  margin-top: -4px;
}

.key-description {
  font-size: 12px;
  color: #ccc;
  font-family: 'Orbitron', monospace;
  text-align: center;
  font-weight: 500;
  line-height: 1.2;
}

.special-controls {
  display: flex;
  justify-content: center;
}

.key-item.special {
  min-width: 100px;
}

/* Responsividade para Controles Visuais */
@media (max-width: 768px) {
  .controls-visual {
    gap: 20px;
  }
  
  .controls-section {
    padding: 15px;
  }
  
  .controls-section h4 {
    font-size: 14px;
    margin-bottom: 12px;
  }
  
  .key-row {
    gap: 12px;
  }
  
  .key-item {
    min-width: 70px;
    gap: 6px;
  }
  
  .key-visual {
    width: 45px;
    height: 45px;
    font-size: 16px;
  }
  
  .key-visual.special-key {
    width: 60px;
  }
  
  .key-alt {
    font-size: 12px;
  }
  
  .key-description {
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .controls-visual {
    gap: 15px;
  }
  
  .controls-section {
    padding: 12px;
  }
  
  .key-row {
    gap: 8px;
  }
  
  .key-item {
    min-width: 95px;
    gap: 5px;
  }
  
  .key-visual {
    width: 40px;
    height: 40px;
    font-size: 14px;
  }
  
  .key-visual.special-key {
    width: 55px;
  }
  
  .key-alt {
    font-size: 10px;
  }
  
  .key-description {
    font-size: 10px;
  }
  
  .keyboard-layout {
    gap: 8px;
  }
}



/* ===== TELA DE OBSTÁCULOS ===== */
.obstacles-title h2 {
    color: #ff6b35;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
}

.obstacles-content {
    max-width: 800px;
    margin: 0 auto;
}

.obstacle-intro {
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 2rem;
    font-size: 1.1rem;
    line-height: 1.6;
}

.obstacle-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.obstacle-card {
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(74, 0, 128, 0.5);
    border-radius: 15px;
    padding: 1.5rem;
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    transition: all 0.3s ease;
}

.obstacle-card:hover {
    border-color: rgba(74, 0, 128, 0.8);
    box-shadow: 0 0 30px rgba(74, 0, 128, 0.3);
    transform: translateY(-5px);
}

.obstacle-visual {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(74, 0, 128, 0.2), transparent);
    border-radius: 50%;
    position: relative;
}

/* Animação do Buraco Negro */
.blackhole-demo {
    position: relative;
    width: 80px;
    height: 80px;
}

.blackhole-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, #000000, #1a0033, #4a0080);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(74, 0, 128, 0.8);
}

.blackhole-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border: 2px solid #4a0080;
    border-radius: 50%;
    animation: blackhole-pulse 2s ease-in-out infinite;
}

.blackhole-particles {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
}

.blackhole-particles .particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #ffffff;
    border-radius: 50%;
    animation: orbit 3s linear infinite;
}

.blackhole-particles .particle:nth-child(1) {
    animation-delay: 0s;
    top: 10px;
    left: 50%;
}

.blackhole-particles .particle:nth-child(2) {
    animation-delay: 0.75s;
    top: 50%;
    right: 10px;
}

.blackhole-particles .particle:nth-child(3) {
    animation-delay: 1.5s;
    bottom: 10px;
    left: 50%;
}

.blackhole-particles .particle:nth-child(4) {
    animation-delay: 2.25s;
    top: 50%;
    left: 10px;
}

@keyframes blackhole-pulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(74, 0, 128, 0.8);
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        box-shadow: 0 0 40px rgba(74, 0, 128, 1);
        transform: translate(-50%, -50%) scale(1.1);
    }
}

@keyframes orbit {
    0% {
        transform: rotate(0deg) translateX(30px) rotate(0deg);
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        transform: rotate(360deg) translateX(30px) rotate(-360deg);
        opacity: 1;
    }
}

.obstacle-info {
    flex: 1;
    text-align: left;
}

.obstacle-info h3 {
    color: #ff6b35;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px rgba(255, 107, 53, 0.5);
}

.obstacle-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-label {
    font-size: 0.9rem;
    color: #aaa;
    text-transform: uppercase;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: bold;
}

.stat-value.danger {
    color: #ff4444;
    text-shadow: 0 0 10px rgba(255, 68, 68, 0.5);
}

.obstacle-description h4 {
    color: #00d4ff;
    font-size: 1.2rem;
    margin: 1.5rem 0 0.5rem 0;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.obstacle-description ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1rem;
}

.obstacle-description li {
    padding: 0.5rem 0;
    padding-left: 1rem;
    position: relative;
    line-height: 1.5;
}

.obstacle-description li:before {
    content: "▶";
    position: absolute;
    left: 0;
    color: #00d4ff;
}

.warning-box {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.warning-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.warning-text {
    line-height: 1.5;
}

.warning-text strong {
    color: #ff4444;
}

/* Card de "Em Breve" */
.coming-soon-card {
    background: rgba(0, 212, 255, 0.1);
    border: 2px dashed rgba(0, 212, 255, 0.3);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
}

.coming-soon-content h3 {
    color: #00d4ff;
    font-size: 1.6rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.coming-soon-content ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.coming-soon-content li {
    padding: 0.5rem 0;
    font-size: 1.1rem;
}

.version-note {
    color: #aaa;
    font-style: italic;
    margin-top: 1rem;
}

/* Responsividade para obstáculos */
@media (max-width: 768px) {
    .obstacle-card {
        flex-direction: column;
        text-align: center;
    }
    
    .obstacle-visual {
        align-self: center;
    }
    
    .obstacle-info {
        text-align: center;
    }
    
    .obstacle-stats {
        justify-content: center;
    }
    
    .obstacles-title h2 {
        font-size: 2rem;
    }
    
    .obstacle-info h3 {
        font-size: 1.5rem;
    }
}


/* ===== ABA OBSTÁCULOS COMPACTA ===== */
.obstacle-info-compact {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 120, 0, 0.2);
    border-radius: 10px;
    padding: 1rem;
    margin: 1rem 0;
}

.obstacle-info-compact h4 {
    color: #ff7800;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.obstacle-info-compact ul {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0;
}

.obstacle-info-compact li {
    padding: 0.25rem 0;
    padding-left: 1rem;
    position: relative;
    line-height: 1.4;
}

.obstacle-info-compact li:before {
    content: "▶";
    position: absolute;
    left: 0;
    color: #00d4ff;
    font-size: 0.8rem;
}

.obstacle-warning {
    background: rgba(255, 120, 0, 0.1);
    border-radius: 6px;
    border-radius: 6px;
    border-left: 3px solid #ff7800;
    padding: 0.75rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

.obstacle-warning strong {
    color: #ff7800;
}

.future-obstacles {
    background: rgba(0, 212, 255, 0.1);
    border: 1px dashed rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    text-align: center;
}

.future-obstacles h4 {
    color: #00d4ff;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.future-obstacles p {
    color: #aaa;
    font-style: italic;
    margin: 0;
}



/* Estilos para os ícones dos obstáculos na aba 'Obstáculos' */
.obstacle-info-compact .obstacle-visual {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(255, 120, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 10px auto;
    box-shadow: 0 0 10px rgba(255, 120, 0, 0.2);
}

    .obstacle-info-compact .obstacle-icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    }




.achievement-img {
    width: 50px;
    height: 50px;
    vertical-align: middle;
    margin-bottom: 10px;
}


/* ===== Estilos das Abas de Estatísticas ===== */

/* Estilo do conteúdo das abas */
.stats-tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid #ff7800;
    border-radius: 12px;
    padding: 25px;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 0 25px rgba(255, 120, 0, 0.4);
    top: 0;
    left: 0;
    right: 0;
}

/* Quando a aba está ativa */
.stats-tab-content.active {
    display: block;
}

/* ===== Estilos dos Botões de Navegação ===== */

/* Abas de navegação das estatísticas */
.stats-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 30px;
}

/* Estilo dos botões das abas */
.stats-tab-button {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid #ff7800;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Orbitron', monospace;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    min-width: 100px;
    text-align: center;
    box-shadow: 0 0 15px rgba(255, 120, 0, 0.2);
}

/* Efeito de hover para os botões */
.stats-tab-button:hover {
    background: rgba(255, 120, 0, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 120, 0, 0.3);
}

/* Ajuste para o botão ativo */
.stats-tab-button.active {
    background: linear-gradient(90deg, #ff7800, #ff9500); /* Deixe o gradiente do botão ativo igual */
    color: #000000; /* Texto preto quando ativo */
    box-shadow: 0 0 20px rgba(255, 120, 0, 0.5); /* Aumente a sombra para um efeito mais destacado */
    border-color: #ff7800; /* A borda do botão ativo */
}

/* === Ajuste de posicionamento do conteúdo da aba === */
.stats-content {
    min-height: 450px;
    max-height: 450px;
    overflow-y: auto;
    position: relative;
}


/* Grid de estatísticas principais */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(0, 153, 204, 0.1));
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.stat-card:hover::before {
    left: 100%;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 212, 255, 0.6);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.3);
}

.stat-card.highlight {
    border-color: rgba(255, 215, 0, 0.5);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 165, 0, 0.1));
}

.stat-card.highlight:hover {
    border-color: rgba(255, 215, 0, 0.8);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

.stat-info h3 {
    color: #00d4ff;
    font-size: 2rem;
    font-weight: 900;
    margin: 0.5rem 0;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.stat-card.highlight .stat-info h3 {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.stat-info p {
    color: #aaa;
    font-size: 0.9rem;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Seções de estatísticas */
.stats-section {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.stats-section h3 {
    color: #00d4ff;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    text-align: center;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}


#stats-screen #back-to-menu-stats {
  margin-top: 30px;
}


/* Barra de progresso de conquistas */
.achievement-progress {
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00d4ff, #0099cc);
    border-radius: 10px;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

#achievement-progress-text {
    color: #00d4ff;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Container de conquistas */
.achievements-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
    justify-content: flex-start;
}

.achievement-item {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.3));
    border: 2px solid rgba(0, 212, 255, 0.4);
    border-radius: 15px;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    text-align: left;
    gap: 1.5rem;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 500px;
    min-height: 100px;
    position: relative;
    overflow: hidden;
}

.achievement-item.unlocked {
    border-color: rgba(255, 215, 0, 0.8);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 165, 0, 0.05));
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.achievement-item.unlocked::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.achievement-item:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 212, 255, 0.8);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.3);
}

.achievement-item.unlocked:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 215, 0, 1);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.5);
}

.achievement-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 212, 255, 0.2);
    border: 2px solid rgba(0, 212, 255, 0.5);
}

.achievement-item.unlocked .achievement-icon {
    background: rgba(255, 215, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.8);
}

.achievement-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.achievement-title {
    color: #00d4ff;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.achievement-item.unlocked .achievement-title {
    color: #ffd700;
}

.achievement-description {
    color: #aaa;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.4;
}

.achievement-status {
    color: #666;
    font-size: 0.8rem;
    font-style: italic;
    margin: 0;
}

.achievement-item.unlocked .achievement-status {
    color: #ffd700;
    font-weight: 600;
}

.achievement-item:not(.unlocked) {
    opacity: 0.6;
}

.achievement-item:not(.unlocked) .achievement-icon {
    filter: grayscale(100%);
}
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.achievement-details h4 {
    color: #00d4ff;
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.achievement-item.unlocked .achievement-details h4 {
    color: #ffd700;
}

.achievement-details p {
    color: #aaa;
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
}

.achievement-date {
    color: #666;
    font-size: 0.8rem;
    font-style: italic;
}

@media (max-width: 600px) {
  .achievement-item {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding: 1rem 1.2rem;
    gap: 0.8rem;
  }

  .achievement-item .achievement-icon {
    align-self: center;
  }

  .achievement-item .achievement-text {
    font-size: 0.95rem;
    line-height: 1.4;
  }

  .achievements-container {
    padding: 0.5rem;
  }
}


/* Grid de recordes */
.records-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.record-section {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 10px;
    padding: 1.5rem;
    text-align: left; /* Garante que o texto padrão seja alinhado à esquerda */
}

.record-section h3 {
    color: #00d4ff;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    text-align: center; /* Mantém o h3 centralizado */
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.record-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
}

.record-item:last-child {
    border-bottom: none;
}

.record-item span:first-child {
    color: #aaa;
    font-size: 0.9rem;
}

.record-item span:last-child {
    color: #00d4ff;
    font-weight: 600;
    font-size: 1rem;
}

/* Estatísticas detalhadas */
.detailed-stats {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.detailed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(0, 212, 255, 0.1);
}

.detail-item span:first-child {
    color: #aaa;
    font-size: 0.9rem;
}

.detail-item span:last-child {
    color: #00d4ff;
    font-weight: 600;
}

/* Ranking pessoal */
.ranking-info {
    text-align: center;
}

.rank-badge {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 165, 0, 0.2));
    border: 2px solid rgba(255, 215, 0, 0.5);
    border-radius: 15px;
    padding: 2rem;
    display: inline-block;
    min-width: 200px;
}

.rank-title {
    display: block;
    color: #ffd700;
    font-size: 1.5rem;
    font-weight: 900;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    margin-bottom: 0.5rem;
}

.rank-subtitle {
    display: block;
    color: #aaa;
    font-size: 0.9rem;
    font-style: italic;
}

/* Responsividade para mobile */
@media (max-width: 768px) {
    /* Garantir que o conteúdo das estatísticas seja visível no mobile */
    .stats-content {
        min-height: 400px;
        display: block !important;
    }
    
    .stats-tab-content {
        display: none;
    }
    
    .stats-tab-content.active {
        display: block !important;
    }
    
    .stats-tabs {
        gap: 0.3rem;
    }
    
    .stats-tab-button {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-info h3 {
        font-size: 1.5rem;
    }
    
    .achievements-container {
        grid-template-columns: 1fr;
        max-height: 300px;
    }
    
    .records-grid {
        grid-template-columns: 1fr;
    }
    
    .detailed-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .stats-tab-button {
        padding: 0.5rem 0.8rem;
        font-size: 0.7rem;
    }
    
    .stat-card {
        padding: 0.8rem;
    }
    
    .stat-icon {
        font-size: 2rem;
    }
    
    .stat-info h3 {
        font-size: 1.3rem;
    }
    
    .achievement-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar personalizada para as áreas de scroll */
.achievements-container::-webkit-scrollbar,
.detailed-stats::-webkit-scrollbar {
    width: 8px;
}

.achievements-container::-webkit-scrollbar-track,
.detailed-stats::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.achievements-container::-webkit-scrollbar-thumb,
.detailed-stats::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.5);
    border-radius: 4px;
}

.achievements-container::-webkit-scrollbar-thumb:hover,
.detailed-stats::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 212, 255, 0.7);
}




/* Estilos para a janela de confirmação de reset */
.reset-confirmation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.reset-confirmation-overlay.active {
    opacity: 1;
    visibility: visible;
}

.reset-confirmation-box {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 2px solid #ff7800;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    max-width: 400px;
    box-shadow: 0 0 30px rgba(255, 120, 0, 0.5);
    font-family: 'Orbitron', monospace;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.reset-confirmation-overlay.active .reset-confirmation-box {
    transform: scale(1);
}

.reset-confirmation-box h3 {
    color: #ff7800;
    font-size: 1.8rem;
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(255, 120, 0, 0.3);
}

.reset-confirmation-box p {
    color: #ccc;
    font-size: 1.1rem;
    margin-bottom: 30px;
    line-height: 1.5;
}

.reset-confirmation-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.reset-confirmation-buttons .btn {
    min-width: 120px;
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
}

.btn-confirm-reset {
    border-color: #ff0000;
    color: #ff0000;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.3);
}

.btn-confirm-reset:hover {
    background: rgba(255, 0, 0, 0.15);
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.6);
    color: #fff;
}

.btn-cancel-reset {
    border-color: #00ff00;
    color: #00ff00;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
}

.btn-cancel-reset:hover {
    background: rgba(0, 255, 0, 0.15);
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.6);
    color: #fff;
}

@media (max-width: 480px) {
    .reset-confirmation-box {
        padding: 20px;
        margin: 0 15px;
    }

    .reset-confirmation-box h3 {
        font-size: 1.5rem;
    }

    .reset-confirmation-box p {
        font-size: 1rem;
    }

    .reset-confirmation-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .reset-confirmation-buttons .btn {
        min-width: unset;
        width: 100%;
    }
}




/* Novos estilos para a imagem da conquista na notificação */
.achievement-icon-notification {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(45deg, #ffcc00, #ff7800);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 10px;
    box-shadow: 0 0 15px rgba(255, 204, 0, 0.5);
    animation: pulse 1.5s infinite alternate;
}

.achievement-img-notification {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

.achievement-info-notification {
    text-align: left;
}

/* Animação de pulso para o ícone da conquista */
@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 15px rgba(255, 204, 0, 0.5); }
    100% { transform: scale(1.05); box-shadow: 0 0 25px rgba(255, 204, 0, 0.8); }
}

/* Ajustes na notificação para acomodar a imagem */
.achievement-notification {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Alinha o conteúdo à esquerda */
    padding: 15px 20px; /* Ajusta o padding */
    max-width: 350px; /* Aumenta um pouco a largura máxima */
}

@media (max-width: 768px) {
    .achievement-notification {
        flex-direction: row; /* Mantém em linha no mobile */
        text-align: left; /* Alinha o texto à esquerda */
        max-width: 300px;
    }
    .achievement-icon-notification {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .achievement-notification {
        max-width: 250px;
        padding: 10px 15px;
    }
    .achievement-icon-notification {
        width: 40px;
        height: 40px;
    }
    .achievement-notification h3 {
        font-size: 1rem;
    }
    .achievement-notification p {
        font-size: 0.75rem;
    }
}

/* Estilos para o Ranking Pessoal no HUD */
#player-rank-hud {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    border: 1px solid #333;
    font-family: 'Orbitron', monospace;
    font-weight: bold;
    color: #fff;
    text-align: right;
    z-index: 10;
    display: none; /* Oculto por padrão, será exibido via JS */
}

/* Ocultar ranking pessoal no modo Time Attack */
body[data-game-mode="timeAttack"] #player-rank-hud {
    display: none !important;
}

#player-rank-hud .rank-title-hud {
    color: #ffd700;
    font-size: 1.2rem;
    margin: 0;
}

#player-rank-hud .rank-subtitle-hud {
    color: #aaa;
    font-size: 0.8rem;
    margin: 0;
}

/* Responsividade para mobile */
@media (max-width: 768px) {
    #player-rank-hud {
        top: 100px; /* Ajusta a posição para não colidir com outros elementos no topo */
        right: 10px;
        padding: 0.4rem 0.8rem;
    }
    #player-rank-hud .rank-title-hud {
        font-size: 1rem;
    }
    #player-rank-hud .rank-subtitle-hud {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    #player-rank-hud {
        top: 80px; /* Ajusta ainda mais para telas menores */
        right: 5px;
        padding: 0.3rem 0.6rem;
    }
    #player-rank-hud .rank-title-hud {
        font-size: 0.9rem;
    }
    #player-rank-hud .rank-subtitle-hud {
        font-size: 0.6rem;
    }
}




/* ===== ESTILOS PARA ABA DE PATENTES ===== */

/* Grid de patentes */
.patents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    margin-top: 20px;
}

/* Card individual de patente */
.patent-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.patent-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 120, 0, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Ícone da patente */
.patent-icon {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.patent-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

/* Informações da patente */
.patent-info {
    flex: 1;
}

.patent-info h4 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Orbitron', monospace;
}

/* Requisitos da patente */
.patent-requirements {
    margin-bottom: 1rem;
}

.patent-requirements p {
    font-size: 0.9rem;
    color: #ff7800;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.patent-requirements ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.patent-requirements li {
    font-size: 0.9rem;
    color: #ddd;
    margin-bottom: 0.3rem;
    padding-left: 1rem;
    position: relative;
}

.patent-requirements li::before {
    content: '•';
    color: #ff7800;
    position: absolute;
    left: 0;
    font-weight: bold;
}

.patent-requirements strong {
    color: #fff;
    font-weight: 700;
}

/* Descrição da patente */
.patent-description {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.patent-description p {
    font-size: 0.9rem;
    color: #bbb;
    line-height: 1.5;
    font-style: italic;
    margin: 0;
}

/* Informações adicionais */
.patents-info {
    background: rgba(255, 120, 0, 0.1);
    border: 1px solid rgba(255, 120, 0, 0.3);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.patents-info h4 {
    font-size: 1.2rem;
    color: #ff7800;
    margin-bottom: 1rem;
    font-family: 'Orbitron', monospace;
    font-weight: 700;
}

.patents-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.patents-info li {
    font-size: 0.9rem;
    color: #ddd;
    margin-bottom: 0.5rem;
    padding-left: 1.2rem;
    position: relative;
    line-height: 1.4;
}

.patents-info li::before {
    content: '→';
    color: #ff7800;
    position: absolute;
    left: 0;
    font-weight: bold;
}

.patents-info strong {
    color: #fff;
    font-weight: 700;
}

/* Responsividade para patentes */
@media (max-width: 768px) {
    .patents-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .patent-card {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
    }
    
    .patent-icon {
        align-self: center;
        margin-bottom: 0.5rem;
    }
    
    .patent-info h4 {
        font-size: 1.1rem;
    }
    
    .patents-info {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .patent-card {
        padding: 0.8rem;
    }
    
    .patent-icon {
        width: 48px;
        height: 48px;
    }
    
    .patent-img {
        width: 36px;
        height: 36px;
    }
    
    .patent-info h4 {
        font-size: 1rem;
    }
    
    .patent-requirements li,
    .patent-description p,
    .patents-info li {
        font-size: 0.8rem;
    }
}



/* Estilos para Conquistas */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.achievement-card {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 215, 0, 0.3);
  border-radius: 10px;
  padding: 15px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: all 0.3s ease;
}

.achievement-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(255, 215, 0, 0.2);
  border-color: rgba(255, 215, 0, 0.6);
}

.achievement-icon {
  font-size: 32px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 215, 0, 0.1);
  border-radius: 50%;
  flex-shrink: 0;
}

.achievement-info h4 {
  margin: 0 0 5px 0;
  color: #ffd700;
  font-family: 'Orbitron', monospace;
  font-size: 16px;
  font-weight: 600;
  text-align: left;
}

.achievement-info p {
  margin: 0;
  color: #cccccc;
  font-size: 13px;
  text-align: left;
}

/* Estilos para Notificações de Conquista */
#achievement-notification-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none; /* Permite cliques através do container */
}

.achievement-notification {
    background: rgba(0, 0, 0, 0.85);
    border: 2px solid #ff7800;
    border-radius: 10px;
    padding: 15px 25px;
    color: #fff;
    text-align: center;
    font-family: 'Orbitron', monospace;
    font-size: 1.1rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInSlideUp 0.5s ease-out forwards;
    box-shadow: 0 0 20px rgba(255, 120, 0, 0.5);
    max-width: 300px; /* Largura máxima para desktop */
    box-sizing: border-box;
}

.achievement-notification h3 {
    color: #ffcc00;
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.4rem;
}

.achievement-notification p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.achievement-notification.hide {
    animation: fadeOutSlideDown 0.5s ease-in forwards;
}

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

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

/* Responsividade para mobile */
@media (max-width: 768px) {
    .achievement-notification {
        font-size: 0.9rem;
        padding: 10px 15px;
        max-width: 250px; /* Largura menor para mobile */
    }

    .achievement-notification h3 {
        font-size: 1.2rem;
    }

    .achievement-notification p {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .achievement-notification {
        font-size: 0.8rem;
        padding: 8px 12px;
        max-width: 200px; /* Largura ainda menor para celulares */
    }

    .achievement-notification h3 {
        font-size: 1.1rem;
    }

    .achievement-notification p {
        font-size: 0.7rem;
    }
}

/* Novos estilos para a imagem da conquista na notificação */
.achievement-icon-notification {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(45deg, #ffcc00, #ff7800);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 10px;
    box-shadow: 0 0 15px rgba(255, 204, 0, 0.5);
    animation: pulse 1.5s infinite alternate;
}

.achievement-img-notification {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

.achievement-info-notification {
    text-align: left;
}

/* Animação de pulso para o ícone da conquista */
@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 15px rgba(255, 204, 0, 0.5); }
    100% { transform: scale(1.05); box-shadow: 0 0 25px rgba(255, 204, 0, 0.8); }
}

/* Ajustes na notificação para acomodar a imagem */
.achievement-notification {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Alinha o conteúdo à esquerda */
    padding: 15px 20px; /* Ajusta o padding */
    max-width: 350px; /* Aumenta um pouco a largura máxima */
}

@media (max-width: 768px) {
    .achievement-notification {
        flex-direction: row; /* Mantém em linha no mobile */
        text-align: left; /* Alinha o texto à esquerda */
        max-width: 300px;
    }
    .achievement-icon-notification {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .achievement-notification {
        max-width: 250px;
        padding: 10px 15px;
    }
    .achievement-icon-notification {
        width: 40px;
        height: 40px;
    }
    .achievement-notification h3 {
        font-size: 1rem;
    }
    .achievement-notification p {
        font-size: 0.75rem;
    }
}

.achievement-img {
    width: 50px;
    height: 50px;
    vertical-align: middle;
    margin-bottom: 10px;
}

/* Barra de progresso de conquistas */
.achievement-progress {
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00d4ff, #0099cc);
    border-radius: 10px;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

#achievement-progress-text {
    color: #00d4ff;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Container de conquistas */
.achievements-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
    justify-content: flex-start;
}

.achievement-item {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.3));
    border: 2px solid rgba(0, 212, 255, 0.4);
    border-radius: 15px;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    text-align: left;
    gap: 1.5rem;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 500px;
    min-height: 100px;
    position: relative;
    overflow: hidden;
}

.achievement-item.unlocked {
    border-color: rgba(255, 215, 0, 0.8);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 165, 0, 0.05));
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.achievement-item.unlocked::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.achievement-item:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 212, 255, 0.8);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.3);
}

.achievement-item.unlocked:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 215, 0, 1);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.5);
}

.achievement-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 212, 255, 0.2);
    border: 2px solid rgba(0, 212, 255, 0.5);
}

.achievement-item.unlocked .achievement-icon {
    background: rgba(255, 215, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.8);
}

.achievement-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.achievement-title {
    color: #00d4ff;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.achievement-item.unlocked .achievement-title {
    color: #ffd700;
}

.achievement-description {
    color: #aaa;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.4;
}

.achievement-status {
    color: #666;
    font-size: 0.8rem;
    font-style: italic;
    margin: 0;
}

.achievement-item.unlocked .achievement-status {
    color: #ffd700;
    font-weight: 600;
}

.achievement-item:not(.unlocked) {
    opacity: 0.6;
}

.achievement-item:not(.unlocked) .achievement-icon {
    filter: grayscale(100%);
}

@media (max-width: 600px) {
  .achievement-item {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding: 1rem 1.2rem;
    gap: 0.8rem;
  }

  .achievement-item .achievement-icon {
    align-self: center;
  }

  .achievement-item .achievement-text {
    font-size: 0.95rem;
    line-height: 1.4;
  }

  .achievements-container {
    padding: 0.5rem;
  }
}




/* Novos estilos para a imagem da conquista na notificação */
.achievement-icon-notification {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(45deg, #ffcc00, #ff7800);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 10px;
    box-shadow: 0 0 15px rgba(255, 204, 0, 0.5);
    animation: pulse 1.5s infinite alternate;
}

.achievement-img-notification {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

.achievement-info-notification {
    text-align: left;
}

/* Animação de pulso para o ícone da conquista */
@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 15px rgba(255, 204, 0, 0.5); }
    100% { transform: scale(1.05); box-shadow: 0 0 25px rgba(255, 204, 0, 0.8); }
}

/* Ajustes na notificação para acomodar a imagem */
.achievement-notification {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Alinha o conteúdo à esquerda */
    padding: 15px 20px; /* Ajusta o padding */
    max-width: 350px; /* Aumenta um pouco a largura máxima */
}

@media (max-width: 768px) {
    .achievement-notification {
        flex-direction: row; /* Mantém em linha no mobile */
        text-align: left; /* Alinha o texto à esquerda */
        max-width: 300px;
    }
    .achievement-icon-notification {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .achievement-notification {
        max-width: 250px;
        padding: 10px 15px;
    }
    .achievement-icon-notification {
        width: 40px;
        height: 40px;
    }
    .achievement-notification h3 {
        font-size: 1rem;
    }
    .achievement-notification p {
        font-size: 0.75rem;
    }
}




/* Efeito de vidro para conquistas ativas */
.achievement-item.unlocked {
    backdrop-filter: blur(5px); /* Efeito de desfoque */
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 165, 0, 0.05)); /* Fundo semi-transparente */
    border: 2px solid rgba(255, 215, 0, 0.8); /* Borda sutil */
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3); /* Sombra brilhante */
    transition: all 0.5s ease-in-out;
}

.achievement-item.unlocked::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.2), transparent); /* Efeito de brilho */
    animation: glassShimmer 2s infinite linear; /* Animação de brilho */
}

@keyframes glassShimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}



/* Estilos para o motivo do Game Over */
.game-over-reason {
    margin-top: 30px;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 8px;
}

.game-over-reason p {
    color: #ff6b6b;
    font-size: 1.1rem;
    font-weight: bold;
    margin: 0;
}

/* Estilos para o popup de resumo da sessão */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.popup-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid #00d4ff;
    border-radius: 12px;
    max-width: 600px;
    max-height: 80vh;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
    display: flex;
    flex-direction: column;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(0, 212, 255, 0.3);
    flex-shrink: 0; /* Impede que o cabeçalho encolha */
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 12px 12px 0 0;
    z-index: 10;
}

.popup-header h3 {
    color: #00d4ff;
    font-size: 1.5rem;
    margin: 0;
}

.close-popup-btn {
    background: none;
    border: none;
    color: #00d4ff;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-popup-btn:hover {
    background: rgba(0, 212, 255, 0.1);
    transform: scale(1.1);
}

.popup-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1; /* Permite que o corpo ocupe o espaço restante */
}

.summary-section {
    margin-bottom: 2rem;
}

.summary-section:last-child {
    margin-bottom: 0;
}

.summary-section h4 {
    color: #00d4ff;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
}

.summary-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    border-left: 3px solid #00d4ff;
}

.summary-label {
    color: #ccc;
    font-size: 0.95rem;
}

.summary-value {
    color: #fff;
    font-weight: bold;
    font-size: 1rem;
}

/* Responsividade para mobile */
@media (max-width: 768px) {
    .popup-content {
        width: 95%;
        max-height: 85vh;
    }
    
    .popup-header {
        padding: 1rem;
    }
    
    .popup-header h3 {
        font-size: 1.3rem;
    }
    
    .popup-body {
        padding: 1rem;
    }
    
    .summary-section h4 {
        font-size: 1.1rem;
    }
    
    .summary-item {
        padding: 0.6rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }
    
    .summary-label {
        font-size: 0.9rem;
    }
    
    .summary-value {
        font-size: 0.95rem;
        align-self: flex-end;
    }
}



/* ===== SISTEMA DE PATENTES EM TEMPO REAL ===== */

/* Animação de rank up para o HUD */
.rank-up-animation {
    animation: rankUpPulse 2s ease-in-out;
    transform-origin: center;
}

@keyframes rankUpPulse {
    0% { 
        transform: scale(1); 
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
    }
    25% { 
        transform: scale(1.1); 
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
    }
    50% { 
        transform: scale(1.05); 
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
    }
    75% { 
        transform: scale(1.08); 
        box-shadow: 0 0 25px rgba(255, 215, 0, 0.7);
    }
    100% { 
        transform: scale(1); 
        box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
    }
}

/* Estilos para notificação de rank up */
.rank-up-notification {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.95), rgba(255, 165, 0, 0.95));
    border: 3px solid #ffd700;
    border-radius: 15px;
    padding: 20px 30px;
    color: #000;
    text-align: center;
    font-family: 'Orbitron', monospace;
    box-shadow: 
        0 0 30px rgba(255, 215, 0, 0.8),
        inset 0 0 20px rgba(255, 255, 255, 0.2);
    animation: rankUpSlideIn 0.6s ease-out;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 300px;
    position: relative;
    overflow: hidden;
}

.rank-up-notification::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: rankUpShimmer 2s infinite;
}

.rank-up-notification.fade-out {
    animation: rankUpSlideOut 0.5s ease-in forwards;
}

.rank-up-icon {
    font-size: 3rem;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    animation: rankUpIconSpin 2s ease-in-out infinite;
}

.rank-up-content h3 {
    font-size: 1.5rem;
    font-weight: 900;
    margin: 0 0 5px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.rank-up-content p {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Animações para notificação de rank up */
@keyframes rankUpSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-50px) scale(0.8);
    }
    50% {
        opacity: 1;
        transform: translateY(0) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes rankUpSlideOut {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-30px) scale(0.9);
    }
}

@keyframes rankUpShimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes rankUpIconSpin {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(5deg) scale(1.1); }
    50% { transform: rotate(0deg) scale(1.05); }
    75% { transform: rotate(-5deg) scale(1.1); }
}

/* Estilos específicos para cada classe de patente no HUD */
.rank-cadete-espacial {
    border-color: #888 !important;
    background: rgba(136, 136, 136, 0.1) !important;
}

.rank-cadete-espacial .rank-title-hud {
    color: #888 !important;
}

.rank-piloto-trainee {
    border-color: #4a9eff !important;
    background: rgba(74, 158, 255, 0.1) !important;
}

.rank-piloto-trainee .rank-title-hud {
    color: #4a9eff !important;
}

.rank-piloto-oficial {
    border-color: #e91e63 !important;
    background: rgba(233, 30, 99, 0.1) !important;
}

.rank-piloto-oficial .rank-title-hud {
    color: #e91e63 !important;
}

.rank-comandante-espacial {
    border-color: #ffd700 !important;
    background: rgba(255, 215, 0, 0.1) !important;
}

.rank-comandante-espacial .rank-title-hud {
    color: #ffd700 !important;
}

.rank-capitao-estelar {
    border-color: #ff6b35 !important;
    background: rgba(255, 107, 53, 0.1) !important;
    box-shadow: 0 0 15px rgba(255, 107, 53, 0.3) !important;
}

.rank-capitao-estelar .rank-title-hud {
    color: #ff6b35 !important;
    text-shadow: 0 0 10px rgba(255, 107, 53, 0.5) !important;
}

.rank-almirante-galactico {
    border-color: #9c27b0 !important;
    background: linear-gradient(135deg, rgba(156, 39, 176, 0.2), rgba(233, 30, 99, 0.1)) !important;
    box-shadow: 0 0 20px rgba(156, 39, 176, 0.5) !important;
    animation: almirante-glow 3s ease-in-out infinite alternate !important;
}

.rank-almirante-galactico .rank-title-hud {
    color: #9c27b0 !important;
    text-shadow: 0 0 15px rgba(156, 39, 176, 0.8) !important;
}

@keyframes almirante-glow {
    0% { 
        box-shadow: 0 0 20px rgba(156, 39, 176, 0.5);
        border-color: #9c27b0;
    }
    100% { 
        box-shadow: 0 0 30px rgba(156, 39, 176, 0.8);
        border-color: #e91e63;
    }
}

/* Responsividade para notificações de rank up */
@media (max-width: 768px) {
    .rank-up-notification {
        min-width: 250px;
        padding: 15px 20px;
        flex-direction: column;
        gap: 10px;
    }
    
    .rank-up-icon {
        font-size: 2.5rem;
    }
    
    .rank-up-content h3 {
        font-size: 1.3rem;
    }
    
    .rank-up-content p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .rank-up-notification {
        min-width: 200px;
        padding: 12px 15px;
    }
    
    .rank-up-icon {
        font-size: 2rem;
    }
    
    .rank-up-content h3 {
        font-size: 1.1rem;
        letter-spacing: 1px;
    }
    
    .rank-up-content p {
        font-size: 0.9rem;
    }
}

/* Melhorias no HUD de patentes */
#player-rank-hud {
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

#player-rank-hud .rank-info-hud {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

#player-rank-hud .rank-title-hud {
    font-size: 0.9rem;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#player-rank-hud .rank-subtitle-hud {
    font-size: 0.7rem;
    opacity: 0.8;
    margin: 0;
    font-style: italic;
}

#player-rank-hud .rank-icon-hud {
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-right: 8px;
}

/* Efeito de brilho para patentes superiores */
.rank-capitao-estelar,
.rank-almirante-galactico {
    position: relative;
}

.rank-capitao-estelar::after,
.rank-almirante-galactico::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    border-radius: inherit;
    z-index: -1;
    animation: prestigeGlow 4s linear infinite;
}

@keyframes prestigeGlow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}



/* Botão de Contato Flutuante */
.btn-contact-floating {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    background: rgba(255, 120, 0, 0.8);
    border: 2px solid #ff7800;
    color: #fff;
    padding: 10px 15px;
    border-radius: 8px;
    font-family: 'Orbitron', monospace;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(255, 120, 0, 0.5);
}

.btn-contact-floating:hover {
    background: #ff7800;
    box-shadow: 0 0 25px rgba(255, 120, 0, 0.8);
    transform: translateY(-2px);
}

.btn-contact-floating.hidden {
    display: none;
}

@media (max-width: 768px) {
    .btn-contact-floating {
        bottom: 15px;
        right: 15px;
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}




/* Estilos para o Formulário de Contato no Pop-up */
.form-group {
    margin-bottom: 1rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #ff7800;
    font-family: 'Orbitron', monospace;
    font-size: 0.9rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #333;
    border-radius: 5px;
    background-color: #1a1a2e;
    color: #fff;
    font-family: 'Orbitron', monospace;
    font-size: 0.9rem;
    box-sizing: border-box; /* Garante que padding e border sejam incluídos na largura */
    user-select: text !important; /* Permite seleção de texto nos campos */
    pointer-events: auto !important; /* Garante que os eventos de mouse funcionem */
    -webkit-user-select: text !important; /* Compatibilidade com Safari */
    -moz-user-select: text !important; /* Compatibilidade com Firefox */
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #ff7800;
    outline: none;
    box-shadow: 0 0 8px rgba(255, 120, 0, 0.5);
}

.form-group select option {
    background-color: #1a1a2e;
    color: #fff;
}

.form-group textarea {
    resize: vertical; /* Permite redimensionar verticalmente */
    min-height: 100px;
}

.popup-body .btn.btn-primary {
    width: 100%;
    margin-top: 1.5rem;
}

/* Garantir que o pop-up de contato permita interação completa */
#contact-popup {
    user-select: auto !important;
    pointer-events: auto !important;
}

#contact-popup .popup-content {
    user-select: auto !important;
    pointer-events: auto !important;
}

#contact-popup .popup-body {
    user-select: auto !important;
    pointer-events: auto !important;
}

#contact-popup form {
    user-select: auto !important;
    pointer-events: auto !important;
}



/* Regras específicas para ocultar o botão de contato durante o jogo */
#game-screen.active ~ #contact-btn,
body.game-active #contact-btn,
.game-screen-active #contact-btn {
    display: none !important;
}

/* Garantir que o botão só apareça no menu principal */
#main-menu.active ~ #contact-btn {
    display: block;
}

/* Ocultar durante todas as telas que não sejam o menu principal */
#instructions.active ~ #contact-btn,
#settings.active ~ #contact-btn,
#stats-screen.active ~ #contact-btn,
#pause-screen.active ~ #contact-btn,
#game-over.active ~ #contact-btn {
    display: none !important;
}


/* Botão de Contato Flutuante */
#contact-btn {
    position: fixed;
    top: 20px;               
    right: 20px;
    background: linear-gradient(135deg, #ff7800, #ff9500);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 20px;
    font-family: 'Orbitron', monospace;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(255, 120, 0, 0.4);
    transition: all 0.3s ease;
    display: block;
}

#contact-btn:hover {
    background: linear-gradient(135deg, #ff9500, #ffb000);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 120, 0, 0.6);
}

#contact-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(255, 120, 0, 0.4);
}

#contact-btn i {
    margin-right: 8px;
    font-size: 1rem;
}

/* Ajuste Mobile (para telas menores que 768px) */
@media (max-width: 768px) {
    #contact-btn {
        padding: 10px 16px;
        font-size: 0.8rem;
        border-radius: 40px;
        top: 15px;
        right: 15px;
        box-shadow: 0 3px 10px rgba(255, 120, 0, 0.3);
    }
}
