html {
    height: 100vh;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #3a3a3a;
}

/*Rastrollo*/
/*--------------------------------Pantalla de acceso-------------------------------*/


/* CONTENEDOR PRINCIPAL para no llamar a body y juntar el css con el de mis compañeros */
.contenedor-principal-acceso {
    width: 100%;
    margin: 0 auto;
    background-color: #90ee90;
    position: relative;
    text-align: center;
    padding-top: 2%;
}

/* BOTÓN ADMIN */
.boton-admin {
    position: absolute;
    top: 1%;
    right: 1%;
    padding: 0.5% 1%;
    background-color: orange;
    border-radius: 15px;
    border: none;
    color: white;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
}

/* LOGO */
.seccion-logo {
    margin-top: 5%;
}

.logo {
    width: 15%;
    height: auto;
    margin-bottom: 1%;
}

.subtitulo {
    font-size: 16px;
    margin-top: 0.5%;
    color: rgb(116, 100, 64);
}

/* CAJA LOGIN */
.caja-login {
    width: 28%;
    min-width: 250px;
    margin: 2% auto 0 auto;
    padding: 1.5%;
    border-radius: 15px;
    box-sizing: border-box;
}

/* BOTONES login y registro */
.botones-login {
    text-align: center;
    width: 100%;
    margin: 2% 0;
    padding: 0;
    box-sizing: border-box;
    display: inline-block;
}


.botones-login a {
    display: inline-block;
    width: 46%;
    margin-right: 4%;
    box-sizing: border-box;
}

.botones-login a:last-child {
    margin-right: 0;
}

/* Estilo de los botones Iniciar Sesión y Registrarse */
.boton {
    width: 100%;
    padding: 3% 0;
    font-size: 14px;
    border: none;
    background-color: #1e90ff;
    color: white;
    border-radius: 15px;
    cursor: pointer;
    box-sizing: border-box;
}

/* INVITADO */
.boton-invitado {
    width: 100%;
    padding: 3% 0;
    border: none;
    background-color: #cac6c6;
    cursor: pointer;
    font-size: 14px;
    border-radius: 15px;
    color: white;
    margin-bottom: 40%;
    box-sizing: border-box;
}

/*Animaciones de los botones*/

/* Transicione para todos los botones */
.boton,
.boton-invitado,
.boton-admin {
    transition: all 0.3s ease;
}

/* Hover general */
.boton:hover {
    background-color: #1c86ee;
    transform: scale(1.05);
    /* zoom */
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.boton-invitado:hover {
    background-color: #bfbfbf;
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}



.boton-admin:hover {
    background-color: #ff9900;
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

/*quitar estilo de enlace*/
.boton-admin a {
    color: white;
    text-decoration: none;
}

/* FOOTER */
.pie-de-pagina {
    position: absolute;
    padding: 5px 0;
    bottom: 0;
    left: 0;
    right: 0;
    font-size: 12px;
    color: black;
    background-color: #666;
}

/*Rastrollo*/
/*--------------------------------Pantalla de login-------------------------------*/

/* Estilos Reutilizados de Pantalla de Acceso:
 * - .boton (Define el tamaño base, color de texto, border-radius y transición de los botones)
 * - .boton:hover (Define la animación hover base)
*/

.contenedor-principal-login {
    width: 100%;

    background-color: #90ee90;
    padding-top: 5%;
    padding-bottom: 5%;
    margin: 0 auto;
    position: relative;
    box-sizing: border-box;
}

/* Enlace Volver al inicio ya animado */
#volver-atras {
    width: 10%;
    position: absolute;
    top: 1%;
    left: 1%;
    color: white;
    font-weight: bold;
    cursor: pointer;
    font-size: 1em;
    text-decoration: none;
    background-color: rgba(0, 0, 0, 0.4);
    padding: 0.2%;
    border: none;
    border-radius: 20px;
    transition: background-color 0.3s ease;
}

#volver-atras:hover {
    background-color: rgba(0, 0, 0, 0.6);
}

/* Caja del Formulario */
.formulario-base {
    width: 90%;
    max-width: 40%;
    margin: 5% auto 0 auto;
    padding: 3%;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 1% 5% rgba(0, 0, 0, 0.1);
    text-align: center;
}

/* Encabezados y Subtítulos */
.formulario-base h2 {
    font-size: 2em;
    color: #333;
    margin-bottom: 0.5%;
}

.formulario-base p {
    font-size: 1em;
    color: #666;
    margin-bottom: 3%;
}

/* Etiquetas */
.formulario-base label {
    display: block;
    text-align: left;
    font-weight: bold;
    color: #333;
    margin-bottom: 0.5%;
    font-size: 0.9em;
    margin-top: 1.5%;
    margin-left: 2%;
}

/* Campos de Entrada (Inputs) */
.formulario-base input[type="email"],
.formulario-base input[type="password"],
.formulario-base input[type="text"] {
    width: 95%;
    padding: 2%;
    margin-bottom: 1.5%;
    border: 1px solid #ccc;
    border-radius: 10px;
    box-sizing: border-box;
    font-size: 1em;
}

/* Contenedor de "Recordar sesión" */
.recordarme-contenedor {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-top: 1%;
    margin-bottom: 2%;
    font-size: 0.9em;
    color: #666;
}

.formulario-base input[type="checkbox"] {
    margin-right: 2%;
}

.recordarme-contenedor label {
    margin: 0;
    font-size: 0.9em;
    color: #666;
}

/* Botón de "Iniciar Sesión" */
.formulario-base .boton {
    width: 95%;
    padding: 2% 0;
    background-color: #4CAF50;
    color: white;
    font-weight: bold;
    border: none;
    border-radius: 20px;
    font-size: 1em;
    margin-top: 1%;
    cursor: pointer;
    box-sizing: border-box;
    color: white;
    text-decoration: none;

}

/*Quitar estilo de submit*/
.formulario-base .boton button {
    background: none;
    border: none;
    color: white;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
}

/*Dividir botones cancelar y iniciar sesion*/
.division-con-flex {
    display: flex;
    gap: 2%;
    width: 100%;
    margin-top: 1%;
}

/*Estilizar boton cancelar*/
.division-con-flex .boton:first-child {
    background-color: #f44336;
}

/*quitar estilo de enlace*/
.division-con-flex .boton:first-child a {
    color: white;
    text-decoration: none;
}

/*Animacion reutilizada */
.division-con-flex .boton:first-child:hover {
    background-color: #c62828;
    transform: scale(1.05);
    box-shadow: 0 1% 5% rgba(0, 0, 0, 0.3);
}

/* Estilizar boton iniciar sesion*/
.division-con-flex .boton:last-child {
    background-color: #4CAF50;
}

/*Animacion reutilizada */
.formulario-base .boton:hover {
    background-color: #45a049;
    transform: scale(1.05);
    box-shadow: 0 1% 5% rgba(0, 0, 0, 0.3);
}

/* Enlace de Olvido de Contraseña */
.formulario-base .enlace-olvido {
    display: block;
    font-size: 0.9em;
    color: #007bff;
    text-decoration: none;
    margin-top: 1%;
    margin-bottom: 2%;
}

.formulario-base .enlace-olvido:hover {
    text-decoration: underline;
}

/* Texto de ayuda (¿No tienes una cuenta?) */
.formulario-base .texto-ayuda {
    font-size: 0.9em;
    color: #666;
    margin-top: 1%;
}

.formulario-base .texto-ayuda a {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
}

.formulario-base .texto-ayuda a:hover {
    text-decoration: underline;
}

/*Rastrollo*/
/*--------------------------------Pantalla de Registro-------------------------------*/

/* Estilos Reutilizados de Pantalla de Login y Acceso:
 * - .contenedor-principal-login (Fondo, centrado y posición)
 * - #volver-atras (Botón de retorno)
 * - .formulario-base (Caja blanca del formulario, títulos h2/p, color de texto general)
 * - .formulario-base label (Estilos de etiquetas)
 * - .formulario-base input[type="email"], input[type="password"] (Estilos de campos de email y password)
 * - .formulario-base .boton (Estilos de botón base verde de formulario)
 * - .formulario-base .boton:hover (Animación hover de botón)
 * - .formulario-base .texto-ayuda (Estilos del párrafo que contiene el enlace)
 * - .division-con-flex (Flexbox para centrar y dividir los botones: Cancelar y Crear Cuenta)
 * - .division-con-flex .boton:first-child (Estilo de botón Cancelar - Fondo Rojo)
 * - .division-con-flex .boton:first-child:hover (Animación hover de Cancelar - Rojo)
 * - .division-con-flex .boton:last-child (Estilo de botón Crear Cuenta - Fondo Verde)
*/

/* Para el campo de nombre de usuario */

.formulario-base input[type="text"] {
    width: 95%;
    padding: 2%;
    margin-bottom: 1.5%;
    border: 1px solid #ccc;
    border-radius: 10px;
    box-sizing: border-box;
    font-size: 18px;
}

/*Miguel/*
/*--------------------------------Pantalla de Zonas-------------------------------*/

.contenedor-menu-zonas {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: Arial, sans-serif;
    background-color: rgb(0, 193, 128);
    text-align: center;
    overflow: hidden;
}

/* ENCABEZADO -------------------------------------------- */
#encabezado {
    width: 100%;
    height: 8vh;
    background: white;
    padding: 0.5%;
    border-bottom: 0.2% solid #dcdcdc;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#titulo-encabezado {
    font-size: 30px;
    font-weight: bold;
}

/* MENÚ --------------------------------------------------- */
#menu-navegacion {
    display: flex;
    gap: 8%;
    margin-right: 5%;
}

#menu-navegacion a {
    color: black;
    text-decoration: none;
    font-size: 100%;
    transition: 0.3s;
}

#menu-navegacion a:hover {
    transform: scale(1.1);
}

/* CONTENIDO PRINCIPAL ----------------------------------- */
#contenido-principal {
    width: 100%;
    flex: 1;
    padding-top: 1%;
    display: flex;
    flex-direction: column;
}

#logo {
    width: 10%;
    height: auto;
    margin-bottom: 1%;
}


/* BOTÓN ¿CÓMO JUGAR? ------------------------------------ */
#boton-como-jugar {
    width: 12%;
    height: 5%;
    background: white;
    border-radius: 5px;
    font-size: 2vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: auto;
    cursor: pointer;
    transition: transform 0.25s;
    border: 0.3vh solid #ccc;
}

#boton-como-jugar:hover {
    transform: scale(1.05);
}


/* TARJETAS ---------------------------------------------- */
#contenedor-tarjetas {
    width: 100%;
    height: 55%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2%;
    margin-top: 2%;
}

.tarjeta {
    width: 9%;
    height: 35%;
    background: white;
    padding: 1.5%;
    border-radius: 6%;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin-top: 2%;
    margin-bottom: 5%;
    text-decoration: none;
    color: black;
}

.tarjeta img {
    width: 100%;
    height: 80%;
    object-fit: contain;
}

.tarjeta:hover {
    transform: scale(1.05);
}

.titulo-tarjeta {
    font-size: 1.7vh;
    font-weight: bold;
}


/* FOOTER ------------------------------------------------- */
footer {
    width: 100%;
    padding: 1% 0;
    background: rgb(62, 62, 62);
    color: white;
    font-size: 1.9vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
}


@media (max-width: 768px) {

    html,
    body {
        overflow: auto;
        height: auto;
        min-height: 100%;
    }

    #contenido-principal {
        min-height: 82%;
    }

    #boton-como-jugar {
        width: 50%;
    }

    #contenedor-tarjetas {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3%;
        width: 100%;
        height: auto;
        margin-top: 3%;
        margin-bottom: 3%;
    }

    .tarjeta {
        width: 50%;
        height: auto;
        gap: 5%;
    }

    footer {
        height: 20%;
        margin-top: auto;
    }
}

/*Miguel*/
/*--------------------------------Pantalla de Juego-------------------------------*/
/*Esto esta en px*/


.contenedor {
    width: 1800px;
    height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: #d9f0e1;
    display: flex;
    overflow: hidden;
    padding: 20px;
}

/* Barra de vida */
.barra-vida {
    width: 40px;
    height: 300px;
    background: #fff;
    border-radius: 20px;
    border: 3px solid #ccc;
    position: absolute;
    left: 40px;
    top: 310px;
    display: flex;
    align-items: flex-end;
}

.vida-restante {
    width: 40px;
    height: 150px;
    background: red;
    border-radius: 15px;
}

/* Imagen del mundo arriba a la derecha */
.mundo {
    position: fixed;
    top: 0;
    right: 0px;
    width: 300px;
    height: auto;
}

/* Problemas */
.problemas {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
    align-items: center;
}

.carta {
    width: 150px;
    height: 200px;
    background: #b9ddaa;
    border-radius: 12px;
    border: 3px solid #a5c494;
    padding: 10px;
    text-align: center;
}

.alerta {
    font-size: 22px;
    color: #ff4d00;
}

.planeta {
    width: 150px;
    height: 150px;
}

/* Información carta */
.info-carta {
    background: #fff;
    padding: 20px;
    text-align: center;
    margin: 30px auto;
    width: 1350px;
    /* 75% de 1800px */
    height: 400px;
    border-radius: 12px;
    font-size: 18px;
    box-shadow: 0 0 10px #0002;
}

/* Estado de ronda */
.estado-ronda {
    position: absolute;
    right: 10px;
    top: 400px;
    background: #ffffffcc;
    padding: 15px 25px;
    text-align: center;
    border-radius: 12px;
    border: 2px solid #ccc;
    font-size: 18px;
}

/* Mano del jugador */
.mano {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 70px;
}

.carta-mano {
    width: 120px;
    height: 180px;
    background: #a9d398;
    border-radius: 10px;
    border: 3px solid #88b47c;
}

/* Botones */
.acciones {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: absolute;
    right: 0;
    bottom: 80px;
}

.boton-tablero {
    padding: 15px 25px;
    font-size: 16px;
    border-radius: 10px;
    cursor: pointer;
    color: white;
    border: none;
    width: 120px;
    text-align: center;
}

.jugar {
    background: #2ecc71;
}

.pasar {
    background: #a57d6c;
}



.Salir {
    background-color: #000;
}

/*quitar estilo de enlace*/
.boton-tablero a {
    text-decoration: none;
    color: white;
}

/*Vega*/
/*--------------------------------Pantalla de Perfil del usuario-------------------------------*/

/* BODY - reutilizado en otras pantallas */
#bodyVega {
    background-color: #E7F4EE;
}

/* VOLVER - reutilizado en otras pantallas */
#volverInicio {
    list-style-type: none;
}

#volverInicio a {
    font-family: "Inter", sans-serif;
    font-size: 0.8em;
    text-decoration: none;
    color: inherit;
}

/* MAIN - reutilizado en pantallas: Modificar contraseña, Recuperar contraseña */
#mainEstrecho {
    background-color: white;
    margin: 0 auto;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 2px 2px 2px 1px rgba(100, 100, 100, 0.2);
    width: 40%;
}

/* FORMULARIO - reutilizado en pantallas: Modificar contraseña, Recuperar contraseña */
#formVega {
    font-family: "Nunito";
    width: 95%;
}

#formVega h1 {
    text-align: center;
}

#formVega label,
#formVega input,
#formVega select {
    display: block;
    margin: 10px;
    font-family: "Nunito";
}

#formVega input {
    width: 100%;
    padding: 10px;
    border-radius: 10px;
}

#formVega input[type="password"],
#formVega input[type="email"],
#formVega input[type="text"],
#formVega input[type="number"] {
    border: 3px solid;
    border-color: #E5E7EB;
    background-color: #F9FAFB;
}

/* BOTONES - reutilizado en pantallas: Modificar contraseña, Recuperar contraseña */
#seccionBotones {
    display: flex;
    flex: 1;
    justify-content: space-evenly;
    width: 100%;
    gap: 10px;
}

.seccionBotones a {
    text-decoration: none;
    width: 100%;
    margin-top: 20px;
    display: block;
}

.seccionBotones button {
    width: 100%;
}

#modificar {
    background-color: #2E8B57;
    color: white;
    margin-top: 20px;
    font-size: 1.2em;
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-family: "Nunito";
    box-sizing: border-box;
    /* Ensure padding doesn't increase size */
    height: 48px;
    /* Fixed height for consistency */
}

/* Remove text decoration and double margin when wrapped in a link */
.seccionBotones a #modificar {
    margin-top: 0;
    text-decoration: none;
}

#cancelar {
    margin: 0;
    /* Removed margin that caused misalignment */
    font-family: "Nunito";
    background-color: #41404093;
    color: white;
    font-size: 1.2em;
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    box-sizing: border-box;
    height: 48px;
    /* Fixed height for consistency */
}


#eliminar {
    background-color: #ff0000;
    color: white;
    margin-top: 20px;
    font-size: 1.2em;
    box-sizing: border-box;
}

/* MODIFICAR CONTRASEÑA - específico de pantalla Perfil */
#modificarContrasena {
    list-style-type: none;
}

#modificarContrasena a {
    font-family: "Inter", sans-serif;
    font-size: 0.8em;
}


/*Vega*/
/*--------------------------------Pantalla de Puntuaciones-------------------------------*/

/* BODY - reutilizado de pantalla Perfil */
/* VOLVER - reutilizado de pantalla Perfil */

/* HEADER / TÍTULO - específico de Puntuaciones */
#divH1 {
    width: 100%;
    margin: 0 auto;
    text-align: center;
    font-family: "Inter", sans-serif;
    color: #1B5E20;
}

/* MAIN - específico de Puntuaciones */
#mainVega {
    background-color: white;
    width: 75%;
    margin: 0 auto;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 2px 2px 2px 1px rgba(100, 100, 100, 0.2);
}

/* TABLA - específico de Puntuaciones */
#tablaPuntuaciones {
    border-radius: 16px;
    border-collapse: collapse;
    font-family: "Inter", sans-serif;
    width: 100%;
}

#tablaPuntuaciones tr:nth-child(odd) {
    background-color: #CFF9CF;
}

#tablaPuntuaciones td,
#tablaPuntuaciones th {
    padding-top: 15px;
    padding-bottom: 15px;
}

#tablaPuntuaciones th {
    background-color: #4CAF50;
    color: white;
}

#tablaPuntuaciones th:first-child {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}

#tablaPuntuaciones th:last-child {
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}

#tablaPuntuaciones td {
    color: #1B5E20;
}

#tablaPuntuaciones td:last-child {
    font-weight: bold;
}

#tablaPuntuaciones td:first-child,
#tablaPuntuaciones th:first-child {
    text-align: left;
    padding-left: 20px;
}

#tablaPuntuaciones td:last-child,
#tablaPuntuaciones th:last-child {
    text-align: right;
    padding-right: 20px;
}


/*Vega*/
/*--------------------------------Pantalla de Modificar Contraseña-------------------------------*/

/* BODY - reutilizado de pantalla Perfil */
/* VOLVER - reutilizado de pantalla Perfil */
/* MAIN - reutilizado de pantalla Perfil */
/* FORMULARIO - reutilizado de pantalla Perfil */
/* BOTONES - reutilizado de pantalla Perfil */


/*Vega*/
/*--------------------------------Pantalla de Recuperar contraseña-------------------------------*/

/* BODY - reutilizado de pantalla Perfil */
/* VOLVER - reutilizado de pantalla Perfil */
/* MAIN - reutilizado de pantalla Perfil */
/* FORMULARIO - reutilizado de pantalla Perfil */
/* BOTONES - reutilizado de pantalla Perfil */


/*Media Query Rastrollo*/
@media (max-width: 1200px) {


    .formulario-base {
        margin: 50% auto;
    }

    .contenedor-principal-acceso {
        height: 100%;
    }

    .logo {
        width: 40%;
    }

    .subtitulo {
        font-size: 20px;
    }

    .caja-login {
        width: 80%;
        margin: 40% auto;
    }
}

/* --- Estilos para el Popup Cómo Jugar y gestion de la sesion  esto es de pantalla de zonas--- */

/* Contenedor del popup: ocupa toda la pantalla y oscurece el fondo */
#popup-reglas {
    display: none;
    /* Oculto por defecto, se muestra con JS */
    position: fixed;
    z-index: 1000;
    /* Se asegura de que esté por encima de todo */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
}

/* El contenido del popup: la caja blanca con el texto */
#popup-contenido {
    background-color: #fefefe;
    margin: auto;
    padding: 20px 30px;
    border: 1px solid #888;
    width: 80%;
    border-radius: 15px;
    position: relative;
    /*pal boton de cerrar*/
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.3s;
}

/* Animación q me ha dao gpt*/
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Botón cerrar */
.cerrar-popup {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
}

.cerrar-popup:hover,
.cerrar-popup:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

#boton-sesion {
    color: black;
    text-decoration: none;
    font-size: 100%;
    transition: 0.3s;
    width: 150px;
    cursor: pointer;
}

#boton-sesion:hover {
    transform: scale(1.1);
}