/* CSS Document */
html, body {
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
	 margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: fixed; /* Impede scroll */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    font-family:Arial, Helvetica, sans-serif;
}

/* Para Webkit (Chrome, Safari) */
body {
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
}

/* Para evitar o bounce/elastic scroll no iOS */
body {
    overscroll-behavior: none;
}



.simple-buttons {
   position: fixed;
    top: 100px;
    left: 270px;
    width: 100%;
    height: 100%;
    background: transparent;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: start;
    z-index: 10000;
    gap: 30px;
}

.simple-btn {
    padding: 40px 40px;
    font-size: 18px;
    width: 300px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.online-btn {
    background: #ffee00;
    color: black;
}

.offline-btn {
    background: #ff4444;
    color: white;
}

.simple-btn:hover {
    transform: scale(1.1);
}

/* Indicador simples do modo */
.mode-indicator {
    position: fixed;
    top: 10px;
    right: 10px;
    background: black;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    z-index: 9999;
}




#instructions
{
	left:0px;
	right:0px;
	bottom:0px; 
	position:absolute; 
	top:0px; 
	background:#ccc;
	z-index:1002;
}

.placar
{
	font-size: 80px;
    width: 90px;
    text-align: center;
	background:none;
	border:none;
}

.placar1
{
	font-size: 80px;
    width: 200px;
	background:none;
	color:#FFFFFF;
	border:none;
}

.placarEsquerdo
{
	position:absolute; 
	left:20px; 
	top:20px;
	text-align:center;
}

.placarDireito
{
	position:absolute; 
	right:20px; 
	top:20px;
	text-align:center;	
}

.placarVida
{
	position:absolute;
	left:20px;
	bottom:20px;
	text-align:center;
	color:#FFFFFF;
	font-size:90px;
	font-weight:bold;
	background:#000000;
	opacity:0.2;
	text-align:center;
	padding-left:20px;
}

.placar2
{
	display:none;
}

.mira {
    position: fixed !important; /* Mudei para fixed */
    left: 50% !important;
    top: 50% !important;
    width: 30px !important;
    height: 30px !important;
    color: #FF0000 !important;
    font-weight: bold !important;
    z-index: 1001 !important; /* Z-index muito alto */
    margin-left: -15px !important;
    margin-top: -15px !important;
    font-size: 24px !important;
    text-align: center !important;
    display: block !important; /* Força display */
    pointer-events: none !important;
    text-shadow: 
        0px 0px 4px rgba(0,0,0,0.9),
        0px 0px 2px rgba(255,255,255,0.5) !important;
}

.arma
{
	position:fixed;
	right:0px;
	width:90%;
	bottom:-30px;
	z-index:5;
}

.hit
{
	position:absolute;
	background:#FF0000;
	top:0px;
	left:0px;
	width:100%;
	height:1000px;
	z-index:6;
	display:none;
}

#instructions2
{
    position: absolute;
    left: 14%;
    height: 17%;
    width: 21%;
    top: 49%;
    z-index: 11;
	cursor:pointer;
}

#github
{
    position: absolute;
    left: 14%;
    height: 17%;
    width: 21%;
    top: 71%;
    z-index: 11;
	cursor:pointer;
	
}

#alertAviso
{
	position:absolute;
	left:50%;
	top:60%;
	margin-top:-15%;
	width:30%;
	
	margin-left:-15%;
	background:#000000;
	z-index:12;
	padding:30px;
	border-radius: 20px;
	display:none;
	text-align:center;
	font-family:Arial, Helvetica, sans-serif;
	color:#FFFFFF;
	font-size:25px;
	
}

/* ===== CONTROLES MOBILE ===== */

.controles-mobile {
    display: none;
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 1000;
}

/* Joystick esquerdo - movimento (maior altura) */
.joystick-area {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40%;
    height: 60%; /* Aumentei a altura para 60% */
    pointer-events: auto;
}

.joystick-base {
    position: absolute;
    left: 60px;
    bottom: 20px; /* Ajustado para nova altura */
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    pointer-events: none;
}

.joystick-handle {
    position: absolute;
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    left: 25px;
    top: 25px;
    pointer-events: none;
    transition: transform 0.1s;
}

/* Área de rotação - lado direito superior (acima do tiro) */
.rotacao-area {
    position: absolute;
    right: 0;
    top: 0;
    width: 40%; /* Mesma largura do tiro */
    height: 60%; /* Acima do botão de tiro */
    pointer-events: auto;
    /* Debug visual - remova depois */
     /*background: rgba(0, 255, 255, 0.2); */
}

/* Área de tiro - lado direito inferior */
.area-tiro {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 40%;
    height: 40%; /* Reduzida para dar espaço à rotação */
    pointer-events: auto;
	 /*background: rgba(17, 0, 255, 0.2); */
}


/* Botão de tiro */
.botao-tiro {
    position: absolute;
    right: 50px;
    bottom: 20px;
    width: 100px;
    height: 100px;
    background: rgba(244, 67, 54, 0.3);
    border: 2px solid rgba(244, 67, 54, 0.6);
    border-radius: 50%;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 16px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Botão de pulo - centro inferior */
.pulo-area {
    position: absolute;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    width: 90px;
    height: 90px;
    background: rgba(76, 175, 80, 0.3);
    border: 2px solid rgba(76, 175, 80, 0.6);
    border-radius: 50%;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 16px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}


/* Botão para trocar modo primeira terceira pessoa */
.modoBtn1, .modoBtn3 {
    position: absolute;
    left: 45%;
    top: 3px;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    pointer-events: auto;
    align-items: center;
    justify-content: center;
    color: black;
    font-size: 15px !important; /* Texto "VITÓRIAS"/"DERROTAS" menor */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}



/* Indicador de modo paisagem */
.orientacao-aviso {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    color: white;
    z-index: 10001;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    text-align: center;
    flex-direction: column;
}

.orientacao-aviso h2 {
    margin-bottom: 20px;
    font-size: 32px;
}

.orientacao-aviso p {
    font-size: 18px;
    opacity: 0.8;
}

/* Mobile apenas - Modo Paisagem */
@media (max-width: 768px) and (orientation: landscape) {
    .controles-mobile {
        display: block;
    }

    .simple-buttons {
   position: fixed;
    top: 0;
    left: 30px;
}

.simple-btn {
    padding: 30px 40px;
    font-size: 18px;
    width: 250px;
}
    
   .mira {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        z-index: 1001 !important;
    }
    
    /* Ajustar elementos de UI para mobile */
    .placar {
        font-size: 24px !important; /* Reduzido de 40px */
        width: 50px !important; /* Reduzido de 60px */
        height: 30px !important;
        text-align: center;
    }
    
    /* Texto acima dos placares */
    .placarEsquerdo, .placarDireito {
        font-size: 14px !important; /* Texto "VITÓRIAS"/"DERROTAS" menor */
        font-weight: bold;
        top: 10px;
    }
    
    .placarEsquerdo {
        left: 10px;
    }
    
    .placarDireito {
        right: 10px;
    }
    
    /* Placar de vida */
    .placarVida {
        left: 10px;
        bottom: 10px;
        font-size: 25px !important; /* Reduzido de 50px */
        padding-left: 10px;
        padding-right: 10px;
        opacity: 0.3; /* Um pouco mais transparente */
    }
    
    .placar1 {
        font-size: 30px !important; /* Reduzido de 40px */
        width: 80px !important; /* Reduzido de 120px */
        text-align: center;
    }
    
    .arma {
        width: 70%;
        bottom: -20px;
    }

	/* Ajuste específico para o input de vida (se necessário) */
    #vida {
        font-size: 25px !important;
    }


	#alertAviso {
    position: fixed;
    left: 65%;
    top: 87%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 300px;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    padding: 20px;
    border-radius: 15px;
    display: none;
    text-align: center;
    font-family: Arial, Helvetica, sans-serif;
    color: #FFFFFF;
    font-size: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}
}

/* Mobile - Modo Retrato (mostrar aviso) */
@media (max-width: 768px) and (orientation: portrait) {
    .orientacao-aviso {
        display: flex;
    }
}

/* Mobile - Modo Retrato (mostrar aviso) */
@media (min-width: 768px) and (max-width: 1366px) and (orientation: portrait) {
    .orientacao-aviso {
        display: flex;
    }
}

/* Tablet ajustes */
@media (min-width: 768px) and (max-width: 1366px) and (orientation: landscape) {
    .controles-mobile {
        display: block;
    }
    
    .mira {
        display: none;
    }
}

/* Efeitos de toque nos botões */
.pulo-area:active,
.botao-tiro:active {
    transform: scale(0.95);
    opacity: 0.8;
}

.modoBtn1, .modoBtn3 {
   
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    opacity: 0.8;
   
}

/* Feedback visual do joystick */
.joystick-base.active {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.7);
}