/* ===== ESTILOS GENERALES PARA TODAS LAS MODALES ===== */

/* Mantener el diseño original, pero asegurando que sea responsivo */
.ventana {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-height: 90vh; /* Máximo 90% de la altura de la pantalla */

    background-color: transparent;
    color: white;
    padding: 15px;
    box-sizing: border-box;
    z-index: 10000; /* Mayor que el header (1000) para que siempre quede por encima */
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 25px;
    overflow-y: auto; /* Habilitar scroll si el contenido es muy grande */
}

/* Mantener el contenedor central con tamaño adaptable */
.contenidoVentana {
    background-color: #e2964a;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Mantener el título con el mismo tamaño y evitar que se rompa */
.contenidoVentana h2 {
    font-size: 18px;
    margin-bottom: 20px;
    white-space: nowrap; /* Impide que el texto se rompa en varias líneas */
    overflow: hidden;
    text-overflow: ellipsis; /* Añade puntos suspensivos si el texto es demasiado largo */
}

/* Mantener la disposición en 2 columnas y 2 filas, pero adaptable */
.imagenes-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Se mantiene en 2 columnas */
    grid-template-rows: repeat(2, auto);  /* 2 filas automáticas */
    gap: 15px; /* Espacio entre imágenes */
    justify-items: center;
    margin-top: 30px;
    width: 100%;
}

/* Mantener el tamaño de las imágenes pero adaptarlas a pantallas pequeñas */
.imagen-item img {
    width: 100%;  /* Para que se ajuste dentro del contenedor */
    max-width: 300px; /* Máximo más pequeño para mejor proporción */
    height: auto;
    border-radius: 8px;
}

/* Mantener la estructura de los elementos */
.imagen-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Mantener los botones exactamente igual */
button {
    background-color: #2A146E;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    margin-top: 5px;
    transition: background-color 0.3s ease;
    width: 100%;
    max-width: 350px; /* Evita que sean demasiado anchos */
}


button:hover {
    background-color: #4c406e;
}

/* Mantener el botón de cerrar igual */
.cerrar {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 32px;
    color: white;
    cursor: pointer;
    background: none;
    border: none;
}

/* ===== FIN ESTILOS GENERALES PARA TODAS LAS MODALES ===== */

/* ===== ESTILOS PARA LA MODAL PRINCIPAL (EMPIEZA GRATIS) ===== */

/* Modal Principal - más ancha */
#ModalPrincipal.ventana {
    max-width: 90vw;
    width: 900px;
}

/* Contenido de la Modal Principal */
.contenidoVentana.principal {
    background-color: #e2964a;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* ===== FIN ESTILOS PARA LA MODAL PRINCIPAL (EMPIEZA GRATIS) ===== */

/* ===== ESTILOS PARA LA MODAL DE INICIO DE SESIÓN MODERNA ===== */

/* Modal moderna - tamaño de imagen */
#loginModal.ventana {
    max-width: 100vw;
    width: 1088px; /* Ancho de la imagen modalGenerica2.png */
    height: 960px; /* Alto de la imagen modalGenerica2.png */
    max-height: 100vh; /* Limitar altura en pantallas pequeñas */
}

/* Contenido moderno */
.contenidoVentana.medieval {
    background: url('/assets/images/modalGenerica2.png') center/cover no-repeat;
    border: none;
    border-radius: 20px;
    padding: 0; /* Quitar padding para que la imagen se vea completa */
    position: relative;
    width: 100%;
    height: 100%;
    min-width: 500px;
    min-height: 400px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

/* Efecto de partículas flotantes */
.contenidoVentana.medieval::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-size: 50px 50px;
    animation: float 20s linear infinite;
    pointer-events: none;
}

@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-50px, -50px) rotate(360deg); }
}

/* Header de la modal moderna */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 20px 30px 15px 30px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2;
    background: rgba(0, 0, 0, 0.3); /* Fondo semi-transparente para legibilidad */
}

.modal-title {
    font-size: 32px;
    font-weight: bold;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.close-medieval {
    width: 80px;
    height:60px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: absolute;
    top: 60px;
    right: 30px;
    z-index: 3;
}

.close-medieval:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 0 10px rgba(255, 0, 0, 0.8));
}

/* Formulario moderno */
.login-form-medieval {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 20px;
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    padding: 0 30px;
}

.form-group-medieval {
    margin-bottom: 15px;
    text-align: left;
    position: relative;
}

.form-group-medieval label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
    text-transform: none;
    text-shadow: none;
    letter-spacing: 0.5px;
}

.form-group-medieval input {
    width: 100%;
    padding: 15px 18px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    box-sizing: border-box;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.form-group-medieval input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-group-medieval input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.forgot-password-medieval {
    display: block;
    text-align: right;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 14px;
    margin-top: 8px;
    text-shadow: none;
    transition: all 0.3s ease;
}

.forgot-password-medieval:hover {
    color: #ffffff;
    text-decoration: none;
    transform: translateX(5px);
}

/* Botón principal moderno */
.btn-entrar-medieval {
    width: 100%;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    border: none;
    padding: 18px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    margin: 20px 0;
    text-transform: none;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

.btn-entrar-medieval::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}

.btn-entrar-medieval:hover::before {
    left: 100%;
}

.btn-entrar-medieval:hover {
    background: linear-gradient(135deg, #ee5a24 0%, #ff6b6b 100%);
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255, 107, 107, 0.6);
}

/* Botones sociales modernos */
.social-login-medieval {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    width: 100%;
    max-width: 600px;
    position: absolute;
    bottom: 275px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    padding: 0 30px;
}

.social-btn-medieval {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.social-btn-medieval::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.social-btn-medieval:hover::before {
    left: 100%;
}

.social-btn-medieval:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.social-btn-medieval.google-medieval {
    background: #4285f4;
    border-color: transparent;
    color: white;
    font-weight: 700;
    box-shadow: 0 8px 25px rgba(66, 133, 244, 0.4);
    width: 100%;
    max-width: 400px;
}

.social-btn-medieval.google-medieval:hover {
    background: #3367d6;
    box-shadow: 0 12px 35px rgba(66, 133, 244, 0.6);
    transform: translateY(-2px);
}

.social-icon-medieval {
    font-weight: bold;
    margin-right: 15px;
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.google-logo-medieval {
    width: 24px;
    height: 24px;
    margin-right: 15px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.google-text-medieval {
    font-size: 16px;
    font-weight: 600;
    color: white;
}

/* Sección crear cuenta moderna */
.create-account-medieval {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    transition: all 0.3s ease;
}

.create-account-medieval:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.torch-character {
    font-size: 36px;
    margin-right: 20px;
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.3));
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.account-text-medieval {
    flex: 1;
}

.account-text-medieval p {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    text-transform: none;
    text-shadow: none;
    letter-spacing: 0.5px;
}

.btn-crear-cuenta-medieval {
    background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    text-transform: none;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 184, 148, 0.4);
    letter-spacing: 0.5px;
}

.btn-crear-cuenta-medieval:hover {
    background: linear-gradient(135deg, #00cec9 0%, #00b894 100%);
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0, 184, 148, 0.6);
}

/* ===== FIN ESTILOS PARA LA MODAL DE INICIO DE SESIÓN MODERNA ===== */

/* ===== ESTILOS PARA LA MODAL DE SOY PERSONA ===== */

/* Modal de Soy Persona - mismo tamaño que login */
#modalPersona.ventana {
    max-width: 90vw;
    width: auto;
    min-width: 500px;
    max-height: 98vh; /* Aumentar altura máxima */
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal de Registro de Profesor */
#modalRegistroProfesor.ventana {
    max-width: 90vw;
    width: auto;
    min-width: 500px;
    max-height: 95vh;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

#modalRegistroProfesor .contenidoVentana.persona {
    max-height: 90vh;
    overflow-y: auto;
    width: 700px;
    max-width: 90vw;
}

/* Contenedor principal de la modal de Soy Persona */
.contenidoVentana.persona {
    background: linear-gradient(135deg, 
        rgb(0, 20, 40) 0%, 
        rgb(0, 40, 80) 25%, 
        rgb(0, 60, 120) 50%, 
        rgb(0, 80, 160) 75%, 
        rgb(0, 100, 200) 100%);
    border: 4px solid #00d4ff;
    border-radius: 20px;
    padding: 30px 40px;
    position: relative;
    box-shadow: 
        0 0 30px rgba(0, 212, 255, 0.6),
        0 0 60px rgba(0, 212, 255, 0.4),
        0 25px 50px rgba(0, 0, 0, 0.5),
        inset 0 0 20px rgba(0, 212, 255, 0.1);
    animation: borderGlow 2s ease-in-out infinite alternate;
    overflow: visible;
    width: auto;
    min-width: 500px;
    max-width: 1200px;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

@keyframes borderGlow {
    0% {
        border-color: #00d4ff;
        box-shadow: 
            0 0 30px rgba(0, 212, 255, 0.6),
            0 0 60px rgba(0, 212, 255, 0.4),
            0 25px 50px rgba(0, 0, 0, 0.5),
            inset 0 0 20px rgba(0, 212, 255, 0.1);
    }
    100% {
        border-color: #00ffff;
        box-shadow: 
            0 0 40px rgba(0, 255, 255, 0.8),
            0 0 80px rgba(0, 255, 255, 0.6),
            0 25px 50px rgba(0, 0, 0, 0.5),
            inset 0 0 30px rgba(0, 255, 255, 0.2);
    }
}

/* Header específico para la modal de Soy Persona */
.contenidoVentana.persona .modal-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    padding: 0;
    border-bottom: none;
    background-color: transparent;
    border-radius: 0;
    margin-left: 0;
    margin-right: 0;
    margin-top: 0;
    width: 100%;
    position: static;
    text-align: center;
    flex-shrink: 0;
}

.contenidoVentana.persona .modal-title {
    font-size: 32px;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 0 15px rgba(0, 212, 255, 0.8);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: 'Courier New', monospace;
}

.contenidoVentana.persona .close-medieval {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 10px rgba(255, 0, 0, 0.6));
    z-index: 1000;
    font-size: 36px;
    color: #FF4444;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    user-select: none;
}

.contenidoVentana.persona .close-medieval:hover {
    color: #FF6666;
    transform: scale(1.1);
    filter: drop-shadow(0 0 15px rgba(255, 0, 0, 0.8));
}

/* Contenido de la modal de Soy Persona */
.modal-content-persona {
    background-color: transparent;
    padding: 30px 0;
    border-radius: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    margin: 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Sección de fecha de nacimiento */
.fecha-nacimiento-section {
    text-align: center;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    flex-shrink: 0;
}

.fecha-titulo {
    font-size: 24px;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 50px;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.6);
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.fecha-inputs {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
}

.fecha-input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    max-width: 120px;
}

.fecha-input-group label {
    font-size: 14px;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 8px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.6);
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

.fecha-input-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #00d4ff;
    border-radius: 8px;
    font-size: 16px;
    background: rgba(0, 0, 0, 0.3);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
    box-shadow: inset 0 0 10px rgba(0, 212, 255, 0.1);
}

.fecha-input-group select:focus {
    outline: none;
    border-color: #00ffff;
    box-shadow: 
        inset 0 0 15px rgba(0, 255, 255, 0.2),
        0 0 20px rgba(0, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.5);
}

.padres-nota {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 15px;
    font-style: italic;
    font-family: 'Courier New', monospace;
}

/* Segunda pantalla: Consentimiento RGPD */
.consentimiento-datos-section {
    text-align: left;
    width: 100%;
    max-width: 100%;
    flex-shrink: 0;
}

.consentimiento-titulo {
    font-size: 24px;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 30px;
    text-align: center;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.6);
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.consentimiento-info {
    background: rgba(0, 0, 0, 0.3);
    padding: 25px;
    border-radius: 10px;
    border-left: 4px solid #00d4ff;
    box-shadow: inset 0 0 10px rgba(0, 212, 255, 0.1);
}

.consentimiento-info p {
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    font-family: 'Courier New', monospace;
}

.consentimiento-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 12px;
}

.consentimiento-item input[type="checkbox"] {
    margin-top: 3px;
    transform: scale(1.2);
    accent-color: #00d4ff;
}

.consentimiento-item label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
    cursor: pointer;
    flex: 1;
    font-family: 'Courier New', monospace;
}

.info-link {
    color: #00d4ff;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.6);
}

.info-link:hover {
    color: #00ffff;
    text-shadow: 0 0 15px rgba(0, 255, 255, 0.8);
    text-decoration: underline;
}

.consentimiento-nota {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 212, 255, 0.3);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Courier New', monospace;
}

.consentimiento-nota p {
    margin-bottom: 10px;
}

/* Tercera pantalla: Formulario de registro */
.registro-form-section {
    text-align: left;
    width: 100%;
    max-width: 100%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.registro-titulo {
    font-size: 22px;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.6);
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
    flex-shrink: 0;
}

.registro-form {
    max-width: 100%;
    margin: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Columnas del formulario */
.form-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    flex: 1;
    overflow: hidden;
    margin-bottom: 15px;
}

.form-column-left,
.form-column-right {
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow: hidden;
}

.form-group {
    margin-bottom: 0;
    flex-shrink: 0;
}

.form-group label {
    display: block;
    font-size: 16px;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.6);
    font-family: 'Courier New', monospace;
}

.form-group input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #00d4ff;
    border-radius: 8px;
    font-size: 18px;
    background: rgba(0, 0, 0, 0.3);
    color: #ffffff;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
    box-shadow: inset 0 0 10px rgba(0, 212, 255, 0.1);
    min-height: 50px;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #00ffff;
    box-shadow: 
        inset 0 0 15px rgba(0, 255, 255, 0.2),
        0 0 20px rgba(0, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.5);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.password-hint {
    display: block;
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 5px;
    font-family: 'Courier New', monospace;
}

.social-login-separator {
    display: flex;
    align-items: center;
    margin: 15px 0;
    flex-shrink: 0;
}

.separator-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #00d4ff, transparent);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.separator-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid #00d4ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #ffffff;
    margin: 0 15px;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
}

.social-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex-shrink: 0;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 20px;
    border: 2px solid #00d4ff;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.3);
    color: #ffffff;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.6);
}

.social-btn:hover {
    border-color: #00ffff;
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    transform: translateY(-2px);
}

.social-btn.google-btn {
    border-color: #00d4ff;
    color: #ffffff;
}

.social-btn.google-btn:hover {
    background-color: #4285f4;
    color: white;
}

.social-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* Footer de la modal de Soy Persona */
.modal-footer-persona {
    background-color: transparent;
    padding: 15px 0;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-top: 15px;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 0;
    width: 100%;
    gap: 15px;
    border-top: 2px solid rgba(0, 212, 255, 0.3);
    flex-shrink: 0;
}

/* Contenedor para los botones del footer */
.modal-footer-persona .botones-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 15px;
    width: 100%;
    flex-wrap: wrap;
}

.btn-volver-persona {
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border: 2px solid #6c757d;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 150px;
    position: relative;
    top: 0;
    font-family: 'Courier New', monospace;
}

.btn-volver-persona:hover {
    background: rgba(0, 0, 0, 0.5);
    border-color: #5a6268;
    box-shadow: 0 0 15px rgba(108, 117, 125, 0.4);
}

.btn-continuar-persona {
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: white;
    border: 2px solid #00d4ff;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 150px;
    position: relative;
    top: 0;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
}

.btn-continuar-persona:hover {
    background: linear-gradient(135deg, #00ffff 0%, #00d4ff 100%);
    border-color: #00ffff;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.6);
    transform: translateY(-2px);
}

.login-prompt-persona {
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    font-size: 14px;
    color: #ffffff;
    margin-top: 20px;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.6);
}

.login-link-persona {
    color: #00d4ff;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.6);
}

.login-link-persona:hover {
    color: #00ffff;
    text-shadow: 0 0 15px rgba(0, 255, 255, 0.8);
    text-decoration: underline;
}

/* ===== FIN ESTILOS PARA LA MODAL DE SOY PERSONA ===== */

/* ===== ESTILOS RESPONSIVE ===== */

/* Adaptabilidad en pantallas pequeñas */
@media (max-width: 600px) {
    .ventana {
        width: 95vw; /* Usar casi todo el ancho en pantallas pequeñas */
        padding: 10px;
    }
    
    .contenidoVentana {
        padding: 20px;
    }
    
    .imagenes-container {
        grid-template-columns: repeat(1, 1fr); /* Cambia a 1 columna en pantallas pequeñas */
        gap: 10px;
    }
    
    .imagen-item img {
        max-width: 200px; /* Imágenes más pequeñas en móviles */
    }
}

@media (max-width: 768px) {
    .ventana {
        width: 90vw;
    }
    
    .imagenes-container {
        grid-template-columns: repeat(2, 1fr); /* Mantener 2 columnas en tablets */
    }
    
    /* Responsive para modal moderna */
    #loginModal.ventana {
        width: 95vw;
        max-width: 95vw;
    }
    
    #modalPersona.ventana {
        width: 95vw;
        max-width: 95vw;
        min-width: 90vw;
    }
    
    .contenidoVentana.persona {
        width: 100%;
        min-width: auto;
        max-width: 100%;
        padding: 20px 25px;
    }

    .modal-title {
        font-size: 28px;
    }
    
    .social-btn-medieval {
        font-size: 14px;
        padding: 15px 20px;
    }
    
    .create-account-medieval {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .btn-entrar-medieval {
        padding: 18px;
        font-size: 16px;
    }
    
    .form-group-medieval input {
        padding: 16px 18px;
    }
    
    /* Responsive para modal de Soy Persona */
    .fecha-inputs {
        flex-direction: column;
        gap: 10px;
    }
    
    .fecha-input-group {
        max-width: 100%;
    }
    
    .modal-footer-persona {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .modal-footer-persona .botones-container {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-volver-persona,
    .btn-continuar-persona {
        width: 100%;
    }
    
    .login-prompt-persona {
        position: static;
        transform: none;
        margin-top: 10px;
    }
    
    .fecha-nacimiento-section,
    .consentimiento-datos-section,
    .registro-form-section {
        max-width: 100%;
    }
    
    .consentimiento-info {
        padding: 20px;
    }
    
    .registro-form {
        max-width: 100%;
    }
}

/* ===== FIN ESTILOS RESPONSIVE ===== */

/* ===== ESTILOS PARA MENSAJES DE ERROR EN MODAL PERSONA ===== */

.mensaje-error-persona {
    background: rgba(255, 0, 0, 0.2);
    border: 2px solid #ff4444;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
    box-shadow: 0 0 20px rgba(255, 68, 68, 0.4);
    animation: slideInError 0.3s ease-out;
}

.mensaje-error-persona.exito {
    background: rgba(0, 255, 0, 0.2);
    border: 2px solid #00ff00;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.4);
}

.error-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.error-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.error-text {
    color: #FFFFFF;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
}

@keyframes slideInError {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== ESTILOS PARA MENSAJES DE ERROR EN MODAL LOGIN ===== */

.mensaje-error {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E8E 100%);
    border: 2px solid #FF4444;
    border-radius: 10px;
    padding: 15px 20px;
    margin: 15px 0;
    box-shadow: 0 4px 8px rgba(255, 68, 68, 0.2);
    animation: slideInError 0.3s ease-out;
    text-align: center;
}

.mensaje-error .error-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.mensaje-error .error-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.mensaje-error .error-text {
    color: #FFFFFF;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
}

/* ===== ESTILOS ESPECÍFICOS PARA MODAL SOY ALUMNO ===== */

/* Estilos para la sección de código de clase */
.codigo-clase-section {
    margin-bottom: 30px;
    text-align: center;
}

.codigo-titulo {
    font-size: 24px;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 25px;
    text-align: center;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.6);
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.codigo-input-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.codigo-input-container label {
    font-size: 16px;
    font-weight: bold;
    color: #ffffff;
    text-align: center;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.6);
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.codigo-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 400px;
}

.codigo-input-group input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #00d4ff;
    border-radius: 8px;
    font-size: 18px;
    background: rgba(0, 0, 0, 0.3);
    color: #ffffff;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
    box-shadow: inset 0 0 10px rgba(0, 212, 255, 0.1);
    min-height: 50px;
}

.codigo-input-group input:focus {
    outline: none;
    border-color: #00ffff;
    box-shadow: 
        inset 0 0 15px rgba(0, 255, 255, 0.2),
        0 0 20px rgba(0, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.5);
}

.codigo-input-group input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.btn-continuar-codigo {
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: white;
    border: 2px solid #00d4ff;
    padding: 15px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
    min-height: 50px;
}

.btn-continuar-codigo:hover {
    background: linear-gradient(135deg, #00ffff 0%, #00d4ff 100%);
    border-color: #00ffff;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.6);
    transform: translateY(-2px);
}

/* Separador entre secciones */
.separador-seccion {
    margin: 30px 0;
    display: flex;
    justify-content: center;
}

.separador-linea {
    width: 80%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00d4ff, transparent);
    border-radius: 1px;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

/* Estilos para la sección sin código */
.sin-codigo-section {
    text-align: center;
    margin-top: 20px;
}

.sin-codigo-titulo {
    font-size: 20px;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 25px;
    text-align: center;
    line-height: 1.4;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.6);
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-jugar-ahora {
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: white;
    border: 2px solid #00d4ff;
    padding: 18px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    margin: 0 auto;
    display: block;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
    min-height: 60px;
}

.btn-jugar-ahora:hover {
    background: linear-gradient(135deg, #00ffff 0%, #00d4ff 100%);
    border-color: #00ffff;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.6);
    transform: translateY(-2px);
}

/* Responsive para la modal de alumno */
@media (max-width: 768px) {
    .contenidoVentana.persona {
        width: 95vw;
        max-width: 100%;
        padding: 20px;
        max-height: 95vh;
    }
    
    .codigo-input-group {
        flex-direction: column;
        gap: 15px;
    }
    
    .codigo-input-group input {
        width: 100%;
    }
    
    .btn-continuar-codigo {
        width: 100%;
    }
    
    .codigo-titulo,
    .sin-codigo-titulo {
        font-size: 16px;
    }
    
    .separador-linea {
        width: 90%;
    }
    
    /* Formulario en una sola columna en móviles */
    .form-columns {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .registro-titulo {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    .form-group input {
        font-size: 16px;
        padding: 12px 15px;
        min-height: 45px;
    }
    
    .modal-header {
        margin-bottom: 15px;
    }
    
    .modal-title {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .contenidoVentana.persona {
        padding: 15px;
        max-height: 98vh;
    }
    
    .registro-titulo {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .form-group label {
        font-size: 14px;
    }
    
    .form-group input {
        font-size: 14px;
        padding: 10px 12px;
        min-height: 40px;
    }
    
    .modal-title {
        font-size: 20px;
    }
    
    .btn-volver-alumno,
    .btn-registrar-alumno {
        padding: 10px 15px;
        font-size: 12px;
        width: 120px;
    }
}

/* Estilos para el modal de registro de alumno */
.username-hint {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85em;
    margin-top: 5px;
    font-family: 'Courier New', monospace;
}

.age-hint {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85em;
    margin-top: 5px;
    font-family: 'Courier New', monospace;
}

.btn-volver-alumno {
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border: 2px solid #6c757d;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-right: 10px;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
}

.btn-volver-alumno:hover {
    background: rgba(0, 0, 0, 0.5);
    border-color: #5a6268;
    box-shadow: 0 0 15px rgba(108, 117, 125, 0.4);
}

.btn-registrar-alumno {
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: white;
    border: 2px solid #00d4ff;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
}

.btn-registrar-alumno:hover {
    background: linear-gradient(135deg, #00ffff 0%, #00d4ff 100%);
    border-color: #00ffff;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.6);
    transform: translateY(-2px);
}

.login-link-alumno {
    color: #00d4ff;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.6);
}

.login-link-alumno:hover {
    color: #00ffff;
    text-shadow: 0 0 15px rgba(0, 255, 255, 0.8);
    text-decoration: underline;
}

/* Contenedor para botones lado a lado */
.modal-buttons-container {
    display: flex;
    flex-direction: row;
    gap: 15px;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* Estilos para botones del modal de profesor - estilo btn-run */
.btn-volver-profesor {
    background: rgba(108, 117, 125, 0.1);
    border: 2px solid #6c757d;
    color: #6c757d;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
    min-width: 120px;
}

.btn-volver-profesor:hover {
    background: rgba(108, 117, 125, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(108, 117, 125, 0.4);
}

.btn-volver-profesor:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(108, 117, 125, 0.3);
}

.btn-registrar-profesor {
    background: rgba(0, 212, 255, 0.1);
    border: 2px solid #00d4ff;
    color: #00d4ff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
    min-width: 120px;
}

.btn-registrar-profesor:hover {
    background: rgba(0, 212, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.4);
}

.btn-registrar-profesor:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 212, 255, 0.3);
}

.login-link-profesor {
    color: #00d4ff;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.6);
}

.login-link-profesor:hover {
    color: #00ffff;
    text-shadow: 0 0 15px rgba(0, 255, 255, 0.8);
    text-decoration: underline;
}

/* Responsive adjustments for student registration modal */
@media (max-width: 768px) {
    .btn-volver-alumno,
    .btn-registrar-alumno {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .btn-volver-profesor,
    .btn-registrar-profesor {
        padding: 10px 20px;
        font-size: 14px;
        min-width: 100px;
    }
    
    .modal-buttons-container {
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .username-hint,
    .age-hint {
        font-size: 0.75em;
    }
}
