File size: 13,028 Bytes
7e9dc27 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 |
<!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> |