﻿
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: linear-gradient(to right, #7f7f80, #4f4e4f);
    color: #fff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 1.5s ease;
    overflow-y: auto;
}

.container {
    display: flex;
    width: 90%;
    max-width: 1100px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 25px rgba(0,0,0,0.2);
}

.info-panel {
    flex: 1;
    padding: 40px;
    background-color: #4e2278;
    display: flex;
    flex-direction: column;
    justify-content: center;
    animation: slideLeft 1s ease;
}

.info-panel .logo {
    width: 120px;
    margin-bottom: 20px;
    max-width: 100px;
    margin: 0 auto 20px;
    align-self: center;
    text-align: center;
}

.info-panel h1 {
    font-size: 2.5rem;
    color: #f8690e;
    margin-bottom: 20px;
}

.info-panel p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #e0e0e0;
}

.inspiracion {
    margin-top: 30px;
    font-style: italic;
    color: #c6c6c6;
}

.form-panel {
    flex: 1;
    padding: 60px 40px;
    background-color: #ffffff;
    color: #333;
    animation: slideRight 1s ease;
}

.form-panel h2 {
    margin-bottom: 30px;
    font-size: 2rem;
    color: #4E2278;
}

.form-panel label {
    display: block;
    margin-top: 15px;
    font-weight: bold;
}

.form-panel input {
    width: 100%;
    padding: 12px;
    margin-top: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.form-panel input:focus {
    border-color: #7723D8;
    outline: none;
    box-shadow: 0 0 5px rgba(119,35,216,0.5);
}

.form-panel button {
    margin-top: 25px;
    width: 100%;
    padding: 12px;
    background-color: #7723D8;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

.form-panel button:hover {
    background-color: #5f1caa;
}

.registro {
    text-align: center;
    margin-top: 20px;
    font-size: 0.95rem;
}

.registro a {
    color: #f8690e;
    text-decoration: none;
    font-weight: bold;
}

.footer {
    margin-top: 20px;
    font-size: 12px;
    color: #aaa;
    text-align: center;
}

.exito-animacion {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(72, 239, 182, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.6s ease-in-out;
}

.exito-animacion .check {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #ffffff;
    position: relative;
    margin-bottom: 20px;
}

.exito-animacion .check::after {
    content: "";
    position: absolute;
    left: 22px;
    top: 40px;
    width: 20px;
    height: 40px;
    border: solid #48c78e;
    border-width: 0 6px 6px 0;
    transform: rotate(45deg);
    animation: drawCheck 0.4s ease forwards;
}

.exito-animacion p {
    font-size: 1.2rem;
    font-weight: bold;
    color: #1b1b1b;
}

.oculto {
    display: none;
}

.error-message {
    color: #e63946;
    font-size: 0.9rem;
    margin-top: 10px;
    text-align: center;
}

.logo {
    width: 90px;
    transition: opacity 0.3s ease;
    max-width: 100px;
    margin: 0 auto 20px;
    text-align: center;
}
  
.logo:hover {
    opacity: 0.8;
}

@media (max-width: 768px) {
    body {
        height: auto;
        padding: max(48px, env(safe-area-inset-top)) 16px 24px;
        align-items: flex-start;
    }

    .container {
        flex-direction: column;
        height: auto;
        width: 100%;
        margin: 0;
    }

    .info-panel, .form-panel {
        flex: 1 1 100%;
        padding: 2rem;
    }

    .info-panel {
        order: 2; /* Primero aparece el formulario en mobile */
        text-align: center;
    }

    .form-panel {
        order: 1; /* Formulario arriba */
    }

    .info-panel .logo {
        width: 100px;
        margin-bottom: 1rem;
    }

    .form-panel h2 {
        font-size: 1.8rem;
    }

    .info-panel h1 {
        font-size: 2rem;
    }

    .info-panel p, .inspiracion {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .info-panel, .form-panel {
        padding: 1.5rem;
    }

    .form-panel h2 {
        font-size: 1.6rem;
    }

    .info-panel h1 {
        font-size: 1.6rem;
    }

    .form-panel input {
        padding: 10px;
    }

    .registro {
        margin-top: 1rem;
    }
}


@keyframes drawCheck {
    from {
        opacity: 0;
        height: 0;
    }
    to {
        opacity: 1;
        height: 40px;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes slideRight {
    from { transform: translateX(50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.input-error {
    border-color: #e63946 !important;
    box-shadow: 0 0 0 2px rgba(230,57,70,0.18) !important;
}
.error-message {
    min-height: 22px;
    color: #e63946;
    font-size: 0.92rem;
    margin-top: 10px;
    text-align: center;
}
.error-message.visible {
    animation: fadeIn 0.25s ease;
}

