/* ***************** */
/* MARK: General CSS */
/* ***************** */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Courier New', Courier, monospace !important;
    color: #ffffff;
    text-decoration: none;
    text-transform: none;
    font-weight: unset;
}

html{
    background-color: #000;
}

body{
    content-visibility: auto;
    min-height: 100vh;
}

.js-warning {
    background-color: #ffcccc;
    border: 1px solid #ff0000;
    padding: 10px;
    margin: 10px 0;
    text-align: center;
    font-size: 3.2em;
    color:#000 !important;
    position: absolute;
  }
  
.js-warning a {
    color: #ff0000 !important;
    text-decoration: underline !important;
}

.disabled {
    cursor: not-allowed; /* Cursor de prohibido */
    opacity: 0.5; /* Opcional: hacer el botón más tenue para indicar que está deshabilitado */
}

#index {
    background: url(images/fondoHacker.jpg);
    background-color: #00000054;
    background-blend-mode: overlay;
    background-repeat: repeat-y; /* O repeat para ambos ejes */
    background-size: cover; /* Mantiene el tamaño original de la imagen */
}

#game {
    background: url(images/fondoCalabera.jpg);
    background-color: #000000ab;
    background-blend-mode: overlay;
    background-size: cover;
    overflow-x: hidden;
    position: relative;
}

@keyframes moverFondo {
    0% {
        background-position: 0% 0%;
    }
    16% {
        background-position: 400px 0%;
    }
    33% {
        background-position: 0% 400px;
    }
    49% {
        background-position: -400px 0%;
    }
    65% {
        background-position: 0% -400px;
    }
    82% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 0% 0%;
    }
}

.animacion-fondo {
    animation: moverFondo 5s alternate;
}

@keyframes parpadeo {
    0% {
        color: white; /* Color inicial */
    }
    50% {
        color: green; /* Color intermedio */
    }
    100% {
        color: white; /* Color final */
    }
}

.animacion-text {
    animation: parpadeo 1s infinite; /* Duración de la animación y que se repita indefinidamente */
}

#bodyRanking {
    background: url(images/fondoOjos.jpg);
    background-color: #00000093;
    background-blend-mode: overlay;
}

h1{
    font-weight: normal;
    margin: auto;
    margin-top: 2%;
    margin-bottom: 2%;
    text-align: center;
    color: #ffffff;
    width: 45%;
}

p {
    color: #ffffff;
}

/* Botones */
button {
    padding: 0.5vw 0;
    width: 25vw;
    font-size: 1.6vw;
    background-color: unset;
    border: none;
    cursor: pointer;
    color: #ffffff;
}

button:hover {
    background: linear-gradient(to right, #3700ff00 0%, #3700ff 50%, #3700ff00 100%);
}

#namePlayerGame {
    font-size: 1.2rem;
    width: 27%;
    position: absolute;
    top: 20px;
    right: 0;
    color: #ffff;
}

/* ******************************* */
/* MARK: CSS for index.php */
/* ******************************* */

main {
    margin: 0 5%;
}
#indexMain{
    margin-top: 25vh;
    display: flex;
    align-items: flex-end;
    position: relative;
}
#indexMain div{
    width: 50%;
    padding-top: 1vw;
    justify-content: space-between; /* Alinea los elementos a los extremos */
}

#indexText p{
    margin-top: 8px;
    font-size: 16px;
}
#indexButton{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-top: 50px;
}

.indexGame::before {
    content: '[ ] ';
}

.indexGame:hover::before {
    content: '[#] ';
}

.indexHallOfFame::before {
    content: '[ ] ';
}

.indexHallOfFame:hover::before {
    content: '[#] ';
}

#indexName{
    border-style: none;
    background-color: unset;
    width: 68%;
    height: 50px;
    text-align: center;
    font-size: 1.6vw;
}

#divName{
    display: ruby-text;
    font-size: 1.6vw;
}

#divName::before{
    content: '[';
}

#divName::after{
    content: ']';
}


#divName input:focus {
    outline: none;
}

#indexName:hover{
    cursor: pointer;
}

.no-clickeable{
    pointer-events: none;
}

#error-message{
    color: red !important; 
    display: none;
    text-align: center;
    margin-bottom: 20px;
}

/* ******************************* */
/* MARK: CSS for game.php */
/* ******************************* */

/* goBack */
#goBackButton{
    width: 14vw;
    position: absolute;
    top: 20px;
    left: 0;
    cursor: pointer;
}

#goBackButton #goBack{
    margin: 0;
    width: 14vw;
}

/* Easter Egg */
.glitchTitle {
    position: relative;
    font-size: 2em; /* Ajusta según el tamaño del texto que desees */
    color: #00FF00; /* Color verde para el título */
    animation: glitch-animation 1s infinite;
}

/* Animación principal del glitch */
@keyframes glitch-animation {
    0% {
        text-shadow: 2px 2px 0 #ff0000, -2px -2px 0 #0000ff; /* Sombras rojas y azules */
        transform: translate(0);
    }
    20% {
        text-shadow: -2px -2px 0 #ff0000, 2px 2px 0 #0000ff;
        transform: translate(-2px, -2px);
    }
    40% {
        text-shadow: 2px 2px 0 #ff0000, -2px -2px 0 #0000ff;
        transform: translate(2px, 2px);
    }
    60% {
        text-shadow: -2px -2px 0 #ff0000, 2px 2px 0 #0000ff;
        transform: translate(-1px, 2px);
    }
    80% {
        text-shadow: 2px 2px 0 #ff0000, -2px -2px 0 #0000ff;
        transform: translate(1px, -1px);
    }
    100% {
        text-shadow: -2px -2px 0 #ff0000, 2px 2px 0 #0000ff;
        transform: translate(0);
    }
}

/* Fragmentos de texto glitch */
.glitchTitle::before,
.glitchTitle::after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: none;
    /*overflow: hidden; borrar*/
    clip: rect(0, 0, 0, 0); /* Inicialmente escondido */
}

/* Antes (en rojo) */
.glitchTitle::before {
    left: -2px;
    text-shadow: -2px 0 red;
    animation: glitch-before 2s infinite linear alternate-reverse;
}

.glitchTitle::before {
    left: -10px; /* Aumentado para mover más a la izquierda */
    text-shadow: -2px 0 blue;
    animation: glitch-before 1.5s infinite linear alternate-reverse;
}

.glitchTitle::after {
    left: 10px; /* Aumentado para mover más a la derecha */
    text-shadow: 2px 0 red;
    animation: glitch-after 1.5s infinite linear alternate-reverse;
}

@keyframes glitch-before {
    0% {
        clip: rect(0, 900px, 0, 0);
        transform: translate(-5px, -5px); /* Aumentado desplazamiento */
    }
    20% {
        clip: rect(10px, 900px, 60px, 0);
        transform: translate(5px, 0);
    }
    40% {
        clip: rect(30px, 900px, 90px, 0);
        transform: translate(-5px, 5px); /* Aumentado desplazamiento */
    }
    60% {
        clip: rect(50px, 900px, 120px, 0);
        transform: translate(0, -5px);
    }
    80% {
        clip: rect(70px, 900px, 150px, 0);
        transform: translate(5px, 5px); /* Aumentado desplazamiento */
    }
    100% {
        clip: rect(0, 900px, 0, 0);
        transform: translate(-5px, 0); /* Aumentado desplazamiento */
    }
}

@keyframes glitch-after {
    0% {
        clip: rect(0, 900px, 0, 0);
        transform: translate(5px, 5px); /* Aumentado desplazamiento */
    }
    20% {
        clip: rect(20px, 900px, 80px, 0);
        transform: translate(-5px, 0);
    }
    40% {
        clip: rect(40px, 900px, 110px, 0);
        transform: translate(5px, -5px); /* Aumentado desplazamiento */
    }
    60% {
        clip: rect(60px, 900px, 140px, 0);
        transform: translate(0, 5px);
    }
    80% {
        clip: rect(80px, 900px, 170px, 0);
        transform: translate(-5px, -5px); /* Aumentado desplazamiento */
    }
    100% {
        clip: rect(0, 900px, 0, 0);
        transform: translate(5px, 0); /* Aumentado desplazamiento */
    }
}

/* Divisores */
#game_Container {
    display: flex;
    margin-bottom: 2%;
}

.board {
    flex-basis: 60%;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #ffffff;
}

.info {
    flex-basis: 40%;
}

/* Game Board */
.gameTable {
    width: 32vw;
    height: 32vw;
    text-align: center;
    border-collapse: collapse;
    table-layout: fixed;

}

/* Primera fila y columna en amarillo */

/* Para la primera fila */
.gameTable tr:first-child td {
    color: #9dff00;

}

/* Para la primera columna */
.gameTable tr td:first-child {
    color: #9dff00;

}


.gameTable td{
    padding: 7px;
    text-align: center;
}

.gameTable tr{
    border: 2px dashed #ffffff;
}

.gameTable td:not(:last-of-type){
    border-right: 2px dashed #ffffff;
}

.gameTable td.codeName:hover{
    cursor: crosshair;
}

.gameTable td:hover{
    cursor: default;
}

/* Coordenadas de los barcos */
#ShipCoords {
    margin-top: .5vw;
}

/* Panel de información */
.section.info {
    width: 50%;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.gameTable td img{
    display: flex;
    width: 65%;
    margin: auto;
}

.gameTable td:has(img){
    padding: 0;
}

/* Timer */
.timer {
    font-size: 4vw;
}

/* Puntos */
.points {
    font-size: 2vw;
    /*margin-top: 1vw;borrar*/
}
 /* Mensaje de Puntos */
.points-info {
    font-size: 1vw;
    /*margin: 1vw 0;borrar*/
    height: auto;
    padding: 1%;
}

.notification {
    font-size: 1.5vw;
    color: #ffffff;
}

/* Contenedor para input y botón */
.input-group {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1.5vw;
    margin-bottom: 1.5vw;
}

/* Escribir nombre */
input[type="text"] {
    display: none;
    border-style: none;
    color: #ffffff;
    background-color: unset;
    width: 100%;
    height: 50px;
    text-align: center;
    font-size: 1.6vw;
}
#divNameGame{
    display: none;
    font-size: 1.6vw;
    color: #ffffff;
}

#divNameGame::before{
    content: '[';
}

#divNameGame::after{
    content: ']';
}

#divNameGame input:focus {
    outline: none;
}
/* Placeholder estilo */
input[type="text"]::placeholder {
    color: #000000;
}

/* Focus efecto */
input[type="text"]:focus {
    outline: none;
}

#buttonName{
    display: none; /* Oculto inicialmente */
    padding: 1vw;
    font-size: 1.6vw;
    background-color: unset;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-left: 11px;
}
#errorMessage{
    color: red !important; 
    display: none;
}

/* Ocultar botones Home y Ranking */
.buttons {
    display: none; /* Ocultar botones por defecto */
}

.buttons button:hover::before , #buttonName:hover::before{
    content: '[';
}

.buttons button:hover::after , #buttonName:hover::after{
    content: ']';
}

#extraOptions {
    width: 18% !important;
    position: fixed;
    top: 30px;
    left: -280px;
    background-color: black;
    border: solid #3700ff;
    padding: 10px;
    z-index: 100;
    border-radius: 0px 20px 20px 20px;
    display: none;
}

.extraOptionsEntryMove {
    animation: moveEntryOptions 1s forwards;
}

.extraOptionsOutputMove {
    animation: moveOutputOptions 1s forwards;
}

@keyframes moveEntryOptions {
    0% { left: -280px; }
    100% { left: 30px; }
}

@keyframes moveOutputOptions {
    0% { left: 30px; }
    100% { left: -280px; }
}

/* Oscurecer tabla en los turnos */

.tablero-oculto {
    pointer-events: none; /* Desactiva los clics en la tabla */
    opacity: 0.5; /* Reduce la opacidad para oscurecer */
}

/*ataque especial*/

.ammoTitle{
    margin-top: 1vw;
}

.showName{
    margin-bottom: 1vw;
}

/* Ataque Especial No RAM */

#specialAttackButtons {
    margin: 4% 0;
    display: flex;
    cursor: pointer;
    flex-direction: column;
    font-size: 2rem;
}

#specialAttackButtons button::before{
    margin: 2% 0;
    content: "[ ] ";
}

#specialAttackButtons button:hover::before{
    content: "[#] ";
}


#specialAttackButtons button:focus::before{
    color: yellow !important;
    content: "[#] ";
}

#specialAttackButtons button:focus{
    color: yellow !important;
}

#specialAttackButtons button:disabled::before {
    content: "[/] ";
    cursor: not-allowed;
    opacity: 0.5;
}

#specialAttackButtons button:disabled {
    content: "[/] ";
    cursor: not-allowed;
    opacity: 0.5;
}

#specialAttackButtons #specialAttackButtonWannaCry::before{
    margin: 2% 0;
    content: "[ ] ";
}

#specialAttackButtons #specialAttackButtonWannaCry:hover::before{
    content: "[#] ";
}


#specialAttackButtons #specialAttackButtonWannaCry:focus::before{
    color: yellow !important;
    content: "[#] ";
}

#specialAttackButtons #specialAttackButtonWannaCry:focus{
    color: yellow !important;
}

#specialAttackButtonWannaCry.disabled::before {
    color: white !important;
    content: "[/] " !important;
    cursor: not-allowed;
    opacity: 0.5 !;
}

/* ******************************* */
/* MARK: CSS for ranking.php */
/* ******************************* */

/* Ranking Board */

#table-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    max-width: 80%;
}


#rankingTable {
    border-collapse: collapse;
    border-spacing: 0 15px;
    width: 100%;
    font-size: 1.2em;
    color: #ffffff;
}

#rankingTable tr{
    text-align: center;
}

#rankingTable th, #rankingTable td {
    padding: 15px;
    margin-bottom: 1px;

}

#rankingTable th {
    text-transform: uppercase;
    letter-spacing: 2px;
}

#rankingTable tr:first-of-type {
    border-bottom: 2px dashed #ffffff;
}

#rankingTable th:not(:last-of-type), #rankingTable td:not(:last-of-type){
    border-right: 2px dashed #ffffff;
}

#rankingTable tr:hover:not(:has(th)) {
    background: linear-gradient(to right, #3700ff00 0%, #3700ff 50%, #3700ff00 100%);
    position: relative;
}
.selecRanking{
    display: flex;
    justify-content: space-evenly;
}

.selecRanking::before {
    content: '[ ]';
}

tr:hover .selecRanking::before {
    content: '[#]';
}

/* Ranking Board Pager */

#paginador {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 50px 0 20px;
}

#paginador a {
    text-decoration: none;
    padding: 5px 10px;
    color: #ffffff;
}

#paginador a:hover {
    background: linear-gradient(to right, #3700ff00 0%, #3700ff 50%, #3700ff00 100%);
}

#paginador a:hover::before {
    content: '[';
}

#paginador a:hover::after {
    content: ']';
}

#paginador strong {
    padding: 5px 0;
    background: linear-gradient(to right, #3700ff00 0%, #3700ff 50%, #3700ff00 100%);
    cursor: not-allowed;
}

#paginador strong::before{
    content: '[';
}

#paginador strong::after{
    content: ']';
}

#paginador a,strong{
    text-align: center;
    width: 78px;
}

#goBack:hover::before{
    content: '[';
}

#goBack:hover::after{
    content: ']';
}

#goBack{
    margin-top: 0.5%;
    margin-left: 17%;
}

#goBackRanking{
    margin-top: 1vw;
    margin-bottom: 3vw;
}

#goBackRanking:hover::before{
    content: '[';
}

#goBackRanking:hover::after{
    content: ']';
}

.win {
    background: linear-gradient(to right, #3700ff00 0%, green 50%, #3700ff00 100%);
    font-weight: bold; /* Por ejemplo, hacerlo más destacado */
}

.win:hover{
    background: linear-gradient(to right, #3700ff00 0%, green 50%, #3700ff00 100%) !important;
}


.lose{
    background: linear-gradient(to right, #3700ff00 0%, red 50%, #3700ff00 100%);
    font-weight: bold; /* Por ejemplo, hacerlo más destacado */
}

.lose:hover{
    background: linear-gradient(to right, #3700ff00 0%, red 50%, #3700ff00 100%) !important;
}

.last{
    background: linear-gradient(to right, #3700ff00 0%, yellow 50%, #3700ff00 100%);
    font-weight: bold; /* Por ejemplo, hacerlo más destacado */
}

.last:hover{
    background: linear-gradient(to right, yellow 0%, #3700ff00 50%, yellow 100%);
}

/* ******************************* */
/* MARK: Notificaciones */
/* ******************************* */
#notificationContainer , 
#notificationContainergame {
    position: relative;
    z-index: 200;
}

.notificationGame {
    position: absolute;
    padding: 10px;
    margin: 10px;
    background-color: #000000 !important;
}

.notificationLeft {
    border-radius: 0px 20px 20px 20px;
    background-color: #000000 !important;
    border: 2px;
    border-style: solid;
    left: -50%;
    margin-top: 15%;
    animation: movimentLeft 3s forwards;
}

.notificationLeftGame {
    border-radius: 0px 20px 20px 20px;
    background-color: #000000 !important;
    border: 2px;
    border-style: solid;
    left: -50%;
    margin-top: 20%;
    animation: movimentLeft 3s forwards;
}

.notificationRight {
    border-radius: 20px 0px 20px 20px;
    background-color: #000000 !important;
    border: 2px;
    border-style: solid;
    right: -50%;
    margin-top: 15%;
    animation: movimenRight 3s forwards;
}

.notificationRightGame {
    border-radius: 20px 0px 20px 20px;
    background-color: #000000 !important;
    border: 2px;
    border-style: solid;
    right: -50%;
    margin-top: 20%;
    animation: movimenRight 3s forwards;
}

@keyframes movimentLeft {
    0% { left : -50%; }
    25% { left: 5%;}
    75% { left: 5%;}
    0% { left : -50%; }
}

@keyframes movimenRight {
    0% { right : -50%; }
    25% { right: 5%;}
    75% { right: 5%;}
    100% { right :-50%; }
}

.CSSwarning {
    background-color: #ff9800; /* Naranja */
}

/* ******************************* */
/* MARK: CSS for win.php */
/* ******************************* */

#bodyWin{
    background: url(images/calaveraTormenta.jpg);
    background-size: cover;
    background-color: #0c0c0c93;
    background-blend-mode: overlay;
    overflow-x: hidden;
    animation: moverFondo 5s alternate;
}

#gameTitle{
    font-size: 2.5vw;
}

#inputNameWinLose{
    display: block;
    color: white;
    border-style: none;
    background-color: unset;
    width: 68%;
    height: 50px;
    text-align: center;
    font-size: 1.6vw;
}

#inputNameWinLose::placeholder{
    color:white
}

#bodyWin .points{
    margin: 8% 0;
}

#nameButton{
    padding: 1vw;
    font-size: 1.6vw;
    background-color: unset;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin: 8% 0%;
}

#nameButton:hover::before{
    content: '[';
}

#nameButton:hover::after{
    content: ']';
}

#buttonsWin:hover::before{
    content: '[';
}

#buttonsWin:hover::after{
    content: ']';
}

#winSection{
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

#nombreWin{
    display: ruby;
    font-size: 1.6vw;
    color: #ffffff;
}

#nombreWin::before{
    content: '[';
}

#nombreWin::after{
    content: ']';
}

#inputNameWinLose input:focus {
    outline: none;
}

#nombreWin:hover{
    cursor: pointer;
}

.section {
    width: 50%;
    margin: 0 auto;
    text-align: center;
}

#buttonWin{
    margin-top: 8%;
}


/* ******************************* */
/* MARK: CSS for lose.php */
/* ******************************* */

#bodyLose {
    background-image: url('images/calaveraCerrada.jpg');
    background-color: #6b5f5fab;
    background-blend-mode: overlay;
    background-size: cover;
    animation: cambiarFondo 2s infinite;
    height: 100%;
}


#gameTitle{
    font-size: 2.5vw;
}

#inputNameLose{
    margin-top: 100px;
    margin-bottom: 50px;
    display: block;
    color: white
}

#inputNameLose::placeholder{
    color:white
}

#buttonsLose:hover::before{
    content: '[';
}

#buttonsLose:hover::after{
    content: ']';
}

#loseSection{
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

#divnombreLose{
    width: 30%;
    display: none;
    font-size: 1.6vw;
    color: #ffffff;
}

#divnombreLose::before{
    content: '[';
}

#divnombreLose::after{
    content: ']';
}

#divnombreLose input:focus {
    outline: none;
}


#buttonLose{
    margin-top: 70px;
}


@keyframes moverFondo {
    0% {
        background-position: 0% 0%;
    }
    16% {
        background-position: 400px 0%;
    }
    33% {
        background-position: 0% 400px;
    }
    49% {
        background-position: -400px 0%;
    }
    65% {
        background-position: 0% -400px;
    }
    82% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 0% 0%;
    }
}

@keyframes parpadeoWin {
    0% {
        color: white; /* Color inicial */
    }
    50% {
        color: green; /* Color intermedio */
    }
    100% {
        color: white; /* Color final */
    }
}

@keyframes parpadeoLose {
    0% {
        color: white; /* Color inicial */
    }
    50% {
        color: red; /* Color intermedio */
    }
    100% {
        color: white; /* Color final */
    }
}


@keyframes cambiarFondo {
    0% {
      background-image: url('images/calaberaAbierta.jpg');
    }
    50% {
      background-image: url('images/calaveraCerrada.jpg');
    }
    100% {
      background-image: url('images/calaberaAbierta.jpg');
    }
  }

.animacion-text-win {
    animation: parpadeoWin 1s infinite; /* Duración de la animación y que se repita indefinidamente */
}

.animacion-text-lose {
    animation: parpadeoLose 1s infinite; /* Duración de la animación y que se repita indefinidamente */
}

/* *************** */
/* MARK: Forbidden */
/* *************** */

#bodyForbidden{
    background: url(images/bocasRedondas.jpg);
    background-color: #000000ab;
    background-blend-mode: overlay;
    background-size: cover;
    color: white;
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
}

#bodyForbidden h1{
    font-size: 100px;
    color: red;
    width: unset;
    margin: unset;
}

#bodyForbidden p{
    width: 66%;
    text-align: center;
}