/* Bounce-in animation */
@keyframes bounceIn {
    0% { transform: translate(-5%, -10px); opacity: 0; }
    60% { transform: translate(-5%, 30px); opacity: 1; }
    80% { transform: translate(-5%, -10px); }
    100% { transform: translate(-5%, 20px); }
}
.bounce-in { animation: bounceIn 1s ease-out; }

/* Centered card */
.center {
    position: relative;
    top: 50%;
    left: 50%;
    transform: translate(-50%, 43%);
    width: 90%;
    max-width: 400px;
    padding: 30px;
    background: white;
    text-align: center;
    border-radius: 12px;
    box-shadow: 0px 6px 14px rgba(0,0,0,0.25);
}

h3{
    text-align: left;
    margin-bottom: 31px;
    font-family: serif;
    font-size: 24px;
}

form{
    width: 458px;
}

/* Logo */
.logo {
    height: 124px;
    width: auto;
}

/* Input groups */
.input-group {
    position: relative;
    display: flex;
    align-items: center;
    margin: 15px 0;
}
.input-group input {
    flex: 1;
    height: 50px;
    padding: 0 15px;
    border-radius: 7px;
    border: 2px solid seagreen;
    background-color: #f9fff9;
    color: #1b4332;
    font-size: 16px;
    font-family: Tahoma, sans-serif;
}
.input-group input:focus {
    outline: none;
    border-color: #2d6a4f;
    box-shadow: 0 0 6px rgba(45, 106, 79, 0.5);
}
.input-group input::placeholder {
    color: #5c8d5c;
}

/* Password toggle */
.password-group { position: relative; }
.toggle-password {
    position: absolute;
    right: 12px;
    cursor: pointer;
    user-select: none;
    font-size: 18px;
    color: #2d6a4f;
}

/* Button */
.btn {
    font-size: 18px;
    height: 45px;
    width: 70%;
    margin-top: 20px;
    background-color: #2d6a4f;
    border-radius: 7px;
    border: none;
    color: white;
    font-family: Tahoma, sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn:hover {
    background-color: #1b4332;
    transform: scale(1.05);
}

/* Password strength */
#strengthMessage {
    margin-top: 8px;
    font-size: 14px;
    font-weight: bold;
}

/* Links */
.or { color: black; font-size: 15px; margin-top: 20px; }
.links { margin-top: 15px; }
.links a {
    color: seagreen;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
}
.links a:hover {
    color: white;
    background-color: seagreen;
    padding: 4px 10px;
    border-radius: 5px;
}

/* Error and success messages */
.error, .success {
    font-weight: bold;
    padding: 12px;
    width: 80%;
    max-width: 400px;
    text-align: center;
    margin: 20px auto;
    font-size: 18px;
    border-radius: 6px;
    animation: bounce 0.7s;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    position: relative;
    top: -32%;
    left: 1%;
}
.error { color: white; background-color: #e63946; }
.success { color: white; background-color: #2d6a4f; }

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-20px); }
    60% { transform: translateY(-10px); }
}

/* Responsive */
@media (max-width: 600px) {
    .center { transform: translate(-50%, 5%); padding: 20px; }
    .btn { width: 90%; }
}


/* Make sure the page fits nicely on all screens */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: #f0fdf4; /* soft neutral background */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Center card properly for all devices */
.center {
    position: relative;
    top: auto;
    left: -7%;
    transform: none;
    width: 100%;
    max-width: 500px;
    margin: 20px;
}

/* Handle smaller screens */
@media (max-width: 600px) {
    body {
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 30px;
    }

    .center {
        width: 90%;
        padding: 20px;
    }

    .logo {
        height: 90px;
    }

    .btn {
        width: 100%;
        font-size: 16px;
        height: 45px;
    }

    h3 {
        font-size: 20px;
        text-align: center;
        margin-bottom: 20px;
    }

    .input-group input {
        font-size: 15px;
        height: 45px;
    }

    .links a {
        display: inline-block;
        margin-top: 10px;
    }
}

/* Very small phones */
@media (max-width: 400px) {
    .center {
        padding: 15px;
    }

    .logo {
        height: 70px;
    }

    .btn {
        font-size: 14px;
    }

    .input-group input {
        font-size: 14px;
    }

    h3 {
        font-size: 18px;
    }
}
