/* Bounce-in animation for card */
@keyframes slideIn {
    0%   { transform: translate(-50%, 0); opacity: 0; }
    100% { transform: translate(-50%, 0); opacity: 1; }
}
.slide-in {
    animation: slideIn 0.5s ease-out;
}

/* Bounce for messages */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-20px); }
    60% { transform: translateY(-10px); }
}

/* 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);
}
.error {
    color: white;
    background-color: #e63946;
}
.success {
    color: white;
    background-color: #2d6a4f;
}

/* Centered login 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);
}

/* Logo */
.logo {
    height: 90px;
    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 eye */
.password-group {
    position: relative;
}
.toggle-password {
    position: absolute;
    right: 12px;
    cursor: pointer;
    user-select: none;
    font-size: 18px;
    color: #2d6a4f;
}

/* Login button */
.btn {
    font-size: 18px;
    height: 45px;
    width: 60%;
    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);
}

/* Links */
.or {
    color: black;
    font-family: Tahoma, sans-serif;
    font-size: 15px;
    margin-top: 20px;
}
.links {
    display: flex;
    justify-content: space-around;
    margin-top: 15px;
}
.links a {
    color: seagreen;
    font-family: Tahoma, sans-serif;
    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;
}

/* Responsive */
@media (max-width: 600px) {
    .center {
        transform: translate(-50%, 5%);
        padding: 20px;
    }
    .btn {
        width: 80%;
    }
}

/* Ensure full responsiveness across all devices */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: #f0fdf4; /* optional subtle background */
}

/* Make sure center card stays vertically centered */
.center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 400px;
}

/* Adjust text and elements for smaller devices */
@media (max-width: 600px) {
    body {
        font-size: 15px;
    }

    .center {
        width: 90%;
        padding: 20px;
    }

    .input-group input {
        font-size: 15px;
        height: 45px;
    }

    .btn {
        width: 100%;
        font-size: 16px;
    }

    .logo {
        height: 70px;
    }

    .links {
        flex-direction: column;
        gap: 10px;
    }
}

/* Handle very small phones */
@media (max-width: 400px) {
    .center {
        padding: 15px;
    }
    .input-group input {
        font-size: 14px;
    }
    .btn {
        font-size: 14px;
    }
}
