/* IMPORTANDO FONTES */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Roboto:wght@300;400;700&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }

/* BLOQUEIO DE ZOOM E SCROLL ELÁSTICO */
html, body {
    width: 100%; height: 100%; overflow: hidden;
    background-color: #000;
    font-family: 'Orbitron', sans-serif;
    touch-action: none; /* Crucial para mobile games */
}

canvas { display: block; background-color: #1a1a1a; cursor: crosshair; }

/* --- EFEITO DE NÉVOA --- */
body::after {
    content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at center, transparent 30%, rgba(0,0,0,0.8) 60%, #000 95%);
    pointer-events: none; z-index: 8;
}

/* --- TIPOGRAFIA & UI GERAL --- */
.titulo-tech { color: #00e5ff; font-size: 2.5rem; text-shadow: 0 0 10px #00e5ff; margin-bottom: 10px; font-weight: 900; text-align: center; }
h2 { color: #00e5ff; margin-bottom: 15px; text-shadow: 0 0 5px #00e5ff; }

.texto-tech, p, li, .card-desc { 
    font-family: 'Roboto', sans-serif; color: #ccc; font-size: 1rem; line-height: 1.5;
}
.card-desc { font-size: 0.85rem; color: #d0d0d0; margin-top: 5px; }

button { 
    padding: 12px 20px; margin: 5px; border: 2px solid transparent; border-radius: 5px; 
    font-size: 1rem; font-weight: bold; cursor: pointer; font-family: 'Orbitron', sans-serif; 
    text-transform: uppercase; transition: all 0.2s; background: transparent; 
}
button:active { transform: scale(0.95); }
.btn-neon { border-color: #00e5ff; color: #00e5ff; box-shadow: 0 0 10px rgba(0, 229, 255, 0.2); }
.btn-neon-azul { border-color: #2979ff; color: #2979ff; } 
.btn-neon-vermelho { border-color: #ff1744; color: #ff1744; }
.btn-padrao { border-color: #666; color: #ccc; }

/* LOGO */
.logo-jogo { width: 380px; max-width: 90%; height: auto; margin-bottom: 15px; filter: drop-shadow(0 0 10px rgba(0, 229, 255, 0.5)); animation: flutuarLogo 3s ease-in-out infinite; }
@keyframes flutuarLogo { 0% { transform: translateY(0px); } 50% { transform: translateY(-10px); } 100% { transform: translateY(0px); } }

/* HUD DE JOGO */
.xp-container { position: absolute; top: 0; left: 0; width: 100%; height: 5px; background: #000; z-index: 20; }
#barra-xp-fill { width: 0%; height: 100%; background: #00e5ff; box-shadow: 0 0 10px #00e5ff; transition: width 0.2s; }

.barra-superior { 
    position: absolute; top: 5px; left: 0; display: flex; justify-content: space-between; align-items: center; 
    background: rgba(0, 20, 40, 0.8); border-bottom: 1px solid #00e5ff; padding: 5px 15px; width: 100%; 
    color: #fff; font-size: 0.8rem; z-index: 20; font-family: 'Roboto', sans-serif; font-weight: bold; 
}
.info-grupo { display: flex; align-items: center; gap: 10px; }
.barra-vida-container { width: 120px; height: 10px; background: #111; border: 1px solid #555; transform: skewX(-20deg); overflow: hidden; }
#barra-vida-fill { width: 100%; height: 100%; background: linear-gradient(90deg, #ff9100, #ffea00); transition: width 0.2s; }
.barra-escudo-container { width: 120px; height: 5px; background: #000; border: 1px solid #004455; transform: skewX(-20deg); margin-top: 2px; }
#barra-escudo-fill { width: 0%; height: 100%; background: #00e5ff; box-shadow: 0 0 5px #00e5ff; transition: width 0.2s; }
#contador-tempo { font-family: 'Orbitron', sans-serif; font-size: 1.2rem; }

/* TELAS GERAIS */
.tela { 
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; 
    display: flex; flex-direction: column; justify-content: center; align-items: center; 
    background: rgba(0, 0, 0, 0.92); z-index: 30; color: white; padding: 20px; 
}
.oculto { display: none !important; }

/* --- LOJA CYBERPUNK --- */
#cabecalho-loja {
    display: flex; align-items: center; justify-content: center; gap: 15px;
    width: 100%; max-width: 600px; margin-bottom: 15px;
}
.vendedor-img {
    width: 80px; height: 80px; border-radius: 50%; border: 2px solid #aaff00;
    object-fit: cover; background: #111;
}
.balao-fala {
    background: rgba(20, 40, 20, 0.9); border: 1px solid #aaff00; color: #aaff00;
    padding: 10px; border-radius: 10px; font-family: 'Roboto', sans-serif; font-size: 0.9rem;
    position: relative; max-width: 70%;
}
.balao-fala::before {
    content: ""; position: absolute; left: -10px; top: 50%; transform: translateY(-50%);
    border-width: 10px 10px 10px 0; border-style: solid; border-color: transparent #aaff00 transparent transparent;
}
#container-loja { 
    display: flex; flex-wrap: wrap; justify-content: center; gap: 15px; 
    max-height: 55vh; overflow-y: auto; padding: 10px; width: 100%; 
    /* Dica visual de scroll */
    border-top: 1px solid rgba(255,255,255,0.1); border-bottom: 1px solid rgba(255,255,255,0.1);
}
.item-loja { background: #111; border: 1px solid #444; padding: 10px; width: 140px; text-align: center; border-radius: 8px; flex-shrink: 0; }
.item-loja.comprado { border-color: #00ff00; opacity: 0.6; }
.btn-comprar { width: 100%; font-size: 0.9rem; padding: 8px; margin-top: 5px; background: #00e5ff; color: black; border: none; }
.btn-comprar:disabled { background: #333; color: #555; }

/* LEVEL UP & CARDS */
#container-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 15px; margin-bottom: 20px; width: 100%; }
.card-upgrade { 
    background: rgba(0, 30, 50, 0.95); border: 1px solid #00e5ff; border-radius: 8px; 
    padding: 15px; width: 160px; cursor: pointer; text-align: center; margin-bottom: 10px; 
    transition: transform 0.2s; 
}
.card-upgrade:hover { transform: scale(1.05); background: rgba(0, 50, 80, 1); }

/* TUTORIAL & TERMINAL */
.terminal-container {
    background: rgba(0, 15, 25, 0.98); border: 2px solid #00e5ff;
    box-shadow: 0 0 25px rgba(0, 229, 255, 0.25), inset 0 0 30px rgba(0, 229, 255, 0.05);
    padding: 15px 25px; max-width: 950px; width: 95%; max-height: 95vh; overflow-y: auto;
    border-radius: 8px; position: relative; display: flex; flex-direction: column;
}
.terminal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 5px; }
.term-sec { background: rgba(0, 229, 255, 0.05); padding: 8px 12px; border-left: 2px solid #00e5ff; border-radius: 0 4px 4px 0; }
.term-sec h3 { font-family: 'Orbitron', sans-serif; color: #00e5ff; margin: 0 0 5px 0; font-size: 0.9rem; display: flex; align-items: center; gap: 6px; text-transform: uppercase; }
.term-sec ul { list-style: none; padding-left: 2px; margin: 0; }
.term-sec li { margin-bottom: 3px; position: relative; padding-left: 10px; font-size: 0.8rem; color: #ccc; line-height: 1.3; }
.term-sec li::before { content: "►"; color: #00e5ff; position: absolute; left: 0; font-size: 0.6rem; top: 3px; }
.tutorial-icon { width: 20px; height: auto; vertical-align: middle; margin-right: 5px; }

@media (max-width: 768px) { 
    .terminal-grid { grid-template-columns: 1fr; gap: 10px; } 
    .terminal-container { padding: 10px; max-height: 85vh; }
}

/* JOYSTICK */
#joystick-container { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); width: 120px; height: 120px; z-index: 25; }
#joystick-base { width: 100%; height: 100%; background: rgba(255, 255, 255, 0.1); border: 2px solid rgba(255, 255, 255, 0.3); border-radius: 50%; position: relative; }
#joystick-stick { width: 50px; height: 50px; background: rgba(0, 229, 255, 0.6); border-radius: 50%; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); pointer-events: none; }
@media (pointer: fine) { #joystick-container { display: none; } }