* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #000000 0%, #1a0033 50%, #000000 100%);
    color: #ffffff;
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    /* Anti-selección */
    -webkit-user-select: none; 
    -moz-user-select: none; 
    -ms-user-select: none; 
    user-select: none; 
}

/* Anti-arrastre de imágenes */
img {
    pointer-events: none;
}

.login-container {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #ff00ff;
    border-radius: 15px;
    padding: 3rem 2rem;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 20px 40px rgba(255, 0, 255, 0.2);
    text-align: left; 
    transition: height 0.3s ease; 
}

.logo-container {
    text-align: center; 
    margin-bottom: 2rem;
}

.logo {
    width: 200px; 
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 8px; 
    filter: drop-shadow(0 0 10px #ff00ff);
}

.form-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.form-header h2 {
    font-size: 1.8rem;
    color: #ff00ff;
    text-shadow: 0 0 5px #ff00ff;
}

.toggle-button-container {
    text-align: center;
    margin-bottom: 2rem;
}

.toggle-button {
    background: none;
    color: #0099ff;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.toggle-button:hover {
    color: #ff00ff;
}

/* 🟢 CORRECCIÓN 1: Reducir el espacio entre grupos de formulario */
.form-group {
    text-align: left;
    margin-bottom: 0.7rem; 
}

/* 🟢 CORRECCIÓN 2: Reducir el espacio entre la etiqueta y el campo */
.form-group label {
    color: #0099ff;
    margin-bottom: 0.1rem;
    font-weight: bold;
    font-size: 0.9rem;
    display: block;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"] {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #333333;
    border-radius: 8px;
    /* 🟢 CORRECCIÓN 3: Reducir el relleno vertical interno de los campos */
    padding: 0.6rem 1rem;
    color: #ffffff;
    font-size: 1rem;
    width: 100%;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #ff00ff;
    box-shadow: 0 0 10px rgba(255, 0, 255, 0.3);
}

/* Más separación para Olvidaste tu contraseña */
.forgot-password {
    text-align: right;
    margin-top: 0.5rem; 
    margin-bottom: 1rem; 
    font-size: 0.9rem;
}

.forgot-password a {
    color: #0099ff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-password a:hover {
    color: #ff00ff;
}

.captcha-placeholder {
    background: #222;
    border: 1px dashed #555;
    padding: 1rem;
    text-align: center;
    color: #888;
    font-style: italic;
    border-radius: 8px;
    margin-top: 1rem;
}

.submit-button {
    background: linear-gradient(45deg, #ff00ff, #0099ff);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    /* 🟢 CORRECCIÓN 4: Reducir el espacio superior del botón */
    margin-top: 1rem; 
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(255, 0, 255, 0.4);
}

/* Estilos específicos para el checkbox */
.terms-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 1rem;
}

.terms-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #ff00ff; 
}

.terms-group label {
    margin: 0;
    font-size: 0.9rem;
}

.terms-group a {
    color: #0099ff;
    text-decoration: underline;
    cursor: pointer; 
}

/* Clase para ocultar formularios */
.hidden {
    display: none;
}

/* *************************************** */
/* ** ESTILOS DE LA VENTANA FLOTANTE (MODAL) ** */
/* *************************************** */
.modal {
    display: none; 
    position: fixed;
    z-index: 2000; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9); 
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #1a0033 0%, #000000 100%);
    margin: 5% auto; 
    padding: 30px;
    border: 2px solid #ff00ff;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    position: relative;
    box-shadow: 0 0 50px rgba(255, 0, 255, 0.5);
    animation: fadeIn 0.3s;
}

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

.terms-text {
    max-height: 60vh; 
    overflow-y: auto; 
    padding-right: 15px; 
    color: #cccccc;
    font-size: 1rem;
    line-height: 1.8;
    padding: 10px;
    border-top: 1px solid rgba(255, 0, 255, 0.3);
    margin-top: 1rem;
}

.terms-text p {
    margin-bottom: 1.5rem;
}

.terms-text strong {
    color: #0099ff;
    font-weight: bold;
    display: block;
    margin-top: 1rem;
}

.close-button {
    color: #ff00ff;
    float: right;
    font-size: 38px;
    font-weight: bold;
    transition: color 0.3s;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: #0099ff;
    text-decoration: none;
}

.terms-text h3 {
    color: #ff00ff;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

/* *************************************** */
/* ** NUEVO: ESTILOS DE LA NOTIFICACIÓN FLOTANTE (TOAST) ** */
/* *************************************** */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    font-size: 1rem;
    z-index: 3000; /* Siempre encima de todo */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateX(100%);
    /* Transición suave para la animación */
    transition: opacity 0.5s, visibility 0.5s, transform 0.5s;
}

.toast-notification.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(0); /* Se desliza desde la derecha */
}

/* Colores para los estados */
.toast-notification.success {
    background: linear-gradient(90deg, #00b300, #00e600); /* Verde */
    border: 1px solid #00ff00;
}

.toast-notification.error {
    background: linear-gradient(90deg, #cc0000, #ff0000); /* Rojo */
    border: 1px solid #ff3333;
}