* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    display: flex;
    padding: 20px;
    padding-top: calc(20px + env(safe-area-inset-top));
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    flex-direction: column;
    justify-content: flex-start;
    overflow-y: auto;
}

/* Contenedor de contraseña */
.password-container {
    position: relative;
    margin-bottom: 15px;
}

/* Botón de toggle */
.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.password-toggle:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

/* Ícono ocular */
.eye-icon {
    width: 24px;
    height: 24px;
    fill: #2575fc;
}

.password-toggle.active .eye-icon {
    fill: #1a5dc8;
}

canvas {
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
    pointer-events: none;
}

.register-container {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    width: 100%;
    /* Cambia '90%' a '100%' */
    max-width: 500px;
    padding: 40px;
    backdrop-filter: blur(5px);
    margin: 40px auto;
}

h1 {
    color: #333;
    text-align: center;
    margin-bottom: 30px;
}

.input-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 600;
}

input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
}

input:focus {
    border-color: #2575fc;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 117, 252, 0.2);
}

.btn {
    background-color: #2575fc;
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn:hover {
    background-color: #1a5dc8;
    transform: translateY(-2px);
}

.links {
    margin-top: 20px;
    text-align: center;
}

.links a {
    color: #2575fc;
    text-decoration: none;
    font-weight: 500;
}

/* Separador */
.separator {
    display: flex;
    align-items: center;
    margin: 20px 0;
}

.separator-line {
    flex: 1;
    height: 1px;
    background-color: #ddd;
}

.separator-text {
    padding: 0 10px;
    color: #777;
    font-size: 14px;
}

/* Botón de Google */
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: white;
    color: #444;
    border: 1px solid #ddd;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-google:hover {
    background-color: #f8f8f8;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn-google img {
    width: 20px;
    height: 20px;
}

/* Media Queries para dispositivos pequeños (768px) */
@media (max-width: 768px) {
    body {
        padding: 15px;
        min-height: 100vh;
    }

    .register-container {
        width: 95%;
        padding: 30px 20px;
        margin: 20px auto;
        backdrop-filter: blur(3px);
        /* Efecto más ligero para móviles */
    }

    h1 {
        font-size: 22px;
        margin-bottom: 20px;
    }

    .input-group {
        margin-bottom: 15px;
    }

    input,
    .btn,
    .btn-google {
        padding: 12px 15px;
        font-size: 15px;
    }

    .password-toggle {
        right: 10px;
        padding: 3px;
    }

    .eye-icon {
        width: 20px;
        height: 20px;
    }

    .separator {
        margin: 15px 0;
    }

    .separator-text {
        font-size: 12px;
        padding: 0 8px;
    }

    .links {
        font-size: 14px;
    }
}

/* Media Queries para dispositivos muy pequeños (480px) */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .register-container {
        padding: 25px 15px;
        margin: 15px auto;
    }

    h1 {
        font-size: 20px;
    }

    label {
        font-size: 14px;
        margin-bottom: 6px;
    }

    input {
        padding: 10px 12px;
        font-size: 14px;
    }

    .btn,
    .btn-google {
        padding: 12px;
        font-size: 14px;
    }

    .btn-google img {
        width: 18px;
        height: 18px;
    }

    .links {
        font-size: 13px;
    }
}

/* Ajustes para modo horizontal en móviles */
@media (max-height: 500px) and (orientation: landscape) {
    body {
        padding: 10px 0;
        min-height: auto;
        height: auto;
    }

    .register-container {
        margin: 10px auto;
        padding: 20px 15px;
        max-width: 90%;
    }

    h1 {
        margin-bottom: 15px;
        font-size: 18px;
    }

    .input-group {
        margin-bottom: 10px;
    }

    .btn,
    .btn-google {
        margin-top: 5px;
        padding: 10px;
    }
}

/* Ajustes para tablets (769px a 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .register-container {
        max-width: 80%;
    }
}

.info-text {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

/* ============================================= */
/* --- VALIDACIÓN EN TIEMPO REAL (REGISTRO) --- */
/* ============================================= */

.validation-feedback {
    margin-top: 10px;
    margin-bottom: 15px;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 10px;
    border-radius: 8px;
    font-size: 0.85rem;
}

.validation-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.validation-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    color: #666;
    transition: color 0.3s ease;
}

.validation-item i {
    /* Simulación de icono con CSS */
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #ccc;
    margin-right: 8px;
    position: relative;
    transition: all 0.3s ease;
}

/* Estado Válido (Verde) */
.validation-item.valid {
    color: #28a745;
    font-weight: 600;
}

.validation-item.valid i {
    border-color: #28a745;
    background-color: #28a745;
}

/* Checkmark visual con CSS puro */
.validation-item.valid i::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Estado Inválido (cuando no coinciden) */
.validation-item.invalid {
    color: #dc3545;
}

.validation-item.invalid i {
    border-color: #dc3545;
    background-color: transparent;
}