@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600&display=swap');

body {
    font-family: 'Montserrat', Arial, sans-serif;
    background: #ffffff;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100vw;
    margin: 0 auto;
    position: static; /* Cambiado de fixed a static */
}

.form-box {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(31,58,87,0.12);
    padding: 44px 38px 34px 38px; /* más espacio interno */
    min-width: 370px;             /* más ancho mínimo */
    max-width: 420px;             /* más ancho máximo */
    width: 100%;
    margin: 0 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Animación de entrada */
    opacity: 0;
    transform: translateY(40px) scale(0.98);
    animation: fadeInUp 0.7s cubic-bezier(.42,.7,.4,1.2) forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

h2 {
    font-size: 1.5rem;
    color: #222;
    margin-bottom: 22px;
    font-weight: 700;
    letter-spacing: 0.5px;
    /* Animación de entrada */
    opacity: 0;
    transform: translateY(-20px);
    animation: fadeInTitle 0.7s 0.2s cubic-bezier(.42,.7,.4,1.2) forwards;
}

@keyframes fadeInTitle {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

input[type="text"], input[type="email"], input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #cfd8dc;
    font-size: 16px;
    margin-bottom: 16px;
    background: #f7fafc;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 2px #3498db33;
}

button {
    background: #3498db;
    color: #fff;
    border: none;
    padding: 12px 0;
    border-radius: 7px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-top: 6px;
    box-shadow: 0 2px 8px rgba(52,152,219,0.08);
    transition: background 0.2s, transform 0.2s;
}

button:hover {
    background: #217dbb;
    transform: scale(1.04);
}

.msg {
    background: #f8d7da;
    color: #721c24;
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 1rem;
    width: 100%;
    text-align: center;
    animation: fadeInMsg 0.5s cubic-bezier(.42,.7,.4,1.2);
}

@keyframes fadeInMsg {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

.form-box a {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.form-box a:hover {
    color: #217dbb;
    text-decoration: underline;
}

.form-box div {
    margin-top: 18px;
    font-size: 0.98rem;
    color: #444;
    text-align: center;
    animation: fadeInLink 0.7s 0.4s cubic-bezier(.42,.7,.4,1.2) forwards;
    opacity: 0;
}

@keyframes fadeInLink {
    to { opacity: 1; }
}