andy-gg's picture
Upload 2477 files
7e9dc27 verified
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<title>Luar RP - Loading & Login</title>
<style>
@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;700&display=swap');
body, html {
margin: 0; padding: 0;
width: 100%; height: 100%;
overflow: hidden;
font-family: 'Rajdhani', sans-serif;
background-color: #000;
user-select: none;
}
/* --- CONTROLE DE VOLUME (MELHORADO) --- */
#audio-wrapper {
position: fixed;
top: 30px;
right: 30px;
z-index: 10001;
display: flex;
align-items: center;
background: rgba(0, 0, 0, 0.7);
padding: 12px 15px;
border-radius: 4px;
border-left: 3px solid #00ccff;
backdrop-filter: blur(15px);
transition: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
width: 32px; /* Escondido */
overflow: hidden;
}
#audio-wrapper:hover {
width: 180px;
}
#vol-icon {
font-size: 18px;
color: #00ccff;
cursor: pointer;
min-width: 32px;
display: flex;
justify-content: center;
}
/* BARRA DE VOLUME VISÍVEL */
#volume-slider {
-webkit-appearance: none;
width: 100px;
height: 4px;
background: rgba(255, 255, 255, 0.15); /* Fundo da barra */
border-radius: 2px;
outline: none;
margin-left: 15px;
cursor: pointer;
opacity: 0;
transition: 0.3s;
/* Gradiente para mostrar o nível do volume */
background-image: linear-gradient(#00ccff, #00ccff);
background-size: 50% 100%; /* Inicia em 50% */
background-repeat: no-repeat;
}
#audio-wrapper:hover #volume-slider { opacity: 1; }
#volume-slider::-webkit-slider-thumb {
-webkit-appearance: none;
width: 14px;
height: 14px;
background: #fff;
border-radius: 50%;
box-shadow: 0 0 10px #00ccff;
cursor: pointer;
}
/* --- TELA DE INTRO --- */
#intro-overlay {
position: fixed;
top: 0; left: 0;
width: 100%; height: 100%;
z-index: 9999;
background: black;
display: flex;
align-items: center;
justify-content: center;
transition: opacity 1s ease-out;
}
#video-entrada {
position: absolute;
top: 0; left: 0;
width: 100%; height: 100%;
object-fit: cover;
}
/* ENQUADRAMENTO PERFEITO DO CARREGAMENTO NO RODAPÉ */
.intro-content {
position: absolute;
bottom: 40px; /* Distância do fundo */
left: 50%;
transform: translateX(-50%); /* Centraliza horizontalmente */
z-index: 10000;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 300px; /* Largura fixa para enquadrar */
}
.modern-loader {
width: 70px;
height: 70px;
border: 4px solid rgba(255, 255, 255, 0.05);
border-left: 4px solid #00ccff;
border-radius: 50%;
box-shadow: 0 0 20px rgba(0, 204, 255, 0.2);
animation: rotation 1s linear infinite;
}
.loader-subtext {
color: #00ccff;
font-size: 14px;
margin-top: 15px;
letter-spacing: 10px;
text-transform: uppercase;
font-weight: 700;
text-shadow: 0 0 10px rgba(0, 204, 255, 0.4);
margin-right: -10px; /* Compensa o letter-spacing para centralizar o texto */
}
@keyframes rotation { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
/* Botão Iniciar (Fica no lugar do loader) */
#btn-iniciar {
display: none;
padding: 15px 50px;
font-size: 24px;
background: transparent;
color: #00ccff;
border: 2px solid #00ccff;
cursor: pointer;
font-family: 'Rajdhani', sans-serif;
font-weight: 800;
text-transform: uppercase;
letter-spacing: 4px;
transition: 0.3s;
backdrop-filter: blur(10px);
}
#btn-iniciar:hover { background: #00ccff; color: #000; box-shadow: 0 0 30px rgba(0, 204, 255, 0.4); }
/* --- TELA DE LOGIN --- */
#main-login-area {
width: 100vw; height: 100vh;
display: none;
align-items: center;
justify-content: flex-end;
padding-right: 8%;
}
#bg-video-login { position: fixed; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; opacity: 0.8; }
.login-card {
width: 380px;
padding: 0 0 30px 0;
background: rgba(8, 20, 40, 0.85);
backdrop-filter: blur(12px);
border: 1px solid rgba(0, 140, 255, 0.3);
border-radius: 12px;
color: white;
text-align: center;
animation: slideIn 0.8s ease-out;
}
@keyframes slideIn { from { transform: translateX(80px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.banner-img { width: 100%; border-bottom: 1px solid rgba(0, 140, 255, 0.3); margin-bottom: 20px; }
#feedback-msg { font-weight: bold; font-size: 15px; margin-bottom: 15px; min-height: 20px; display: block; color: transparent; }
.input-box { width: 85%; margin: 0 auto 15px auto; }
input { width: 100%; padding: 15px; background: rgba(0, 0, 0, 0.4); border: 1px solid rgba(255, 255, 255, 0.1); color: white; border-radius: 6px; font-family: 'Rajdhani', sans-serif; font-size: 16px; outline: none; box-sizing: border-box; }
input:focus { border-color: #008cff; box-shadow: 0 0 15px rgba(0, 140, 255, 0.4); }
.btn { width: 85%; padding: 15px; cursor: pointer; border: none; border-radius: 6px; font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 18px; text-transform: uppercase; transition: 0.3s; margin-top: 5px; }
.btn-entrar { background: linear-gradient(90deg, #0066ff, #00ccff); color: white; }
.btn-registrar { background: transparent; border: 1px solid #444; color: #ccc; margin-top: 10px; font-size: 14px; }
.loading { opacity: 0.6; pointer-events: none; filter: grayscale(0.5); }
</style>
</head>
<body>
<!-- VOLUME MINIMALISTA COM BARRA DE PROGRESSO -->
<div id="audio-wrapper">
<div id="vol-icon" onclick="toggleMute()">🔊</div>
<input type="range" id="volume-slider" min="0" max="1" step="0.01" value="0.5">
</div>
<!-- MÚSICA EM LOOP -->
<audio id="musica" loop preload="auto">
<source src="music.mp3" type="audio/mpeg">
</audio>
<!-- INTRO -->
<div id="intro-overlay">
<video id="video-entrada" autoplay loop muted>
<source src="ENTRADA.mp4" type="video/mp4">
</video>
<div class="intro-content">
<div id="loader-area">
<div class="modern-loader"></div>
<div class="loader-subtext">Sincronizando</div>
</div>
<button id="btn-iniciar" onclick="finalizarIntro()">Iniciar Conexão</button>
</div>
</div>
<!-- LOGIN -->
<div id="main-login-area">
<img src="FUNDO.gif" id="bg-video-login" alt="Fundo">
<div class="login-card" id="card">
<img src="banner.gif" class="banner-img" alt="Luar RP">
<h2>Portal de Acesso</h2>
<div id="feedback-msg">Aguardando...</div>
<div class="input-box"><input type="text" id="user" placeholder="Carregando..." disabled style="opacity: 0.7;"></div>
<div class="input-box"><input type="password" id="pass" placeholder="Sua Senha"></div>
<button class="btn btn-entrar" onclick="enviar('login')">CONECTAR</button>
<button class="btn btn-registrar" onclick="enviar('registro')">CRIAR CONTA</button>
</div>
</div>
<script>
const audio = document.getElementById("musica");
const volIcon = document.getElementById("vol-icon");
const volSlider = document.getElementById("volume-slider");
let lastVolume = 0.5;
// --- CORREÇÃO DA MÚSICA E BARRA ---
function updateSliderColor(val) {
const percent = val * 100;
volSlider.style.backgroundSize = percent + '% 100%';
}
volSlider.addEventListener('input', (e) => {
const val = e.target.value;
audio.volume = val;
audio.muted = false;
updateSliderColor(val);
updateIcon(val);
});
function updateIcon(val) {
if (val == 0) volIcon.innerText = "🔇";
else if (val < 0.5) volIcon.innerText = "🔉";
else volIcon.innerText = "🔊";
}
function toggleMute() {
if (audio.muted || audio.volume === 0) {
audio.muted = false;
audio.volume = lastVolume > 0 ? lastVolume : 0.5;
volSlider.value = audio.volume;
updateSliderColor(audio.volume);
updateIcon(audio.volume);
} else {
lastVolume = audio.volume;
audio.muted = true;
audio.volume = 0;
volSlider.value = 0;
updateSliderColor(0);
volIcon.innerText = "🔇";
}
}
// Tenta tocar a música no primeiro clique (Obrigatório para navegadores)
window.addEventListener('click', () => {
if (audio.paused) {
audio.play().then(() => {
console.log("Música iniciada!");
}).catch(err => {
console.log("Aguardando interação...");
});
}
}, { once: true });
// --- LOGICA DO JOGO ---
function gmCarregada() {
document.getElementById('loader-area').style.display = 'none';
document.getElementById('btn-iniciar').style.display = 'block';
}
function finalizarIntro() {
const intro = document.getElementById('intro-overlay');
const loginArea = document.getElementById('main-login-area');
intro.style.opacity = '0';
// Garante que a música toque ao clicar no botão caso ainda não tenha tocado
audio.play();
setTimeout(() => {
intro.style.display = 'none';
loginArea.style.display = 'flex';
}, 1000);
}
window.receberFeedback = function(tipo, mensagem) {
if(tipo === "nome") {
document.getElementById('user').value = mensagem;
gmCarregada();
}
const feedback = document.getElementById('feedback-msg');
const card = document.getElementById('card');
card.classList.remove('loading');
if(tipo === "erro") { feedback.style.color = "#ff4444"; feedback.innerText = mensagem; }
else if(tipo === "info") { feedback.style.color = "#00ccff"; feedback.innerText = mensagem; }
}
if (typeof cef !== 'undefined') {
cef.on("game_feedback", window.receberFeedback);
cef.on("gm_carregada", gmCarregada);
}
function enviar(acao) {
var senha = document.getElementById('pass').value;
var feedback = document.getElementById('feedback-msg');
var card = document.getElementById('card');
if(senha.length < 1) { feedback.style.color = "orange"; feedback.innerText = "Digite sua senha!"; return; }
feedback.style.color = "#ffff00";
feedback.innerText = "Verificando...";
card.classList.add('loading');
if(acao === 'login') { try { samp.sendChat("/flogin " + senha); } catch(e) {} }
else { try { samp.sendChat("/fregistrar " + senha); } catch(e) {} }
}
// Simulação de teste (apagar depois de testar)
// setTimeout(gmCarregada, 3000);
</script>
</body>
</html>