:root {
    --primary-color: #8affa3;
    --primary-color-dark: #5cb85c;
    --primary-color-darker: #3e8e41;
    --secondary-color: #2baa5b;
    --secondary-color-dark: #16801e;
    --highlight-color: #2e92d4;
    --text-color: #ffffff;
    --text-muted: #4caf50;
    --text-muted-alt: #185525;
    --bg-color: #121212;
    --bg-color-light: #272727;
    --border-color: var(--primary-color);
    --card-bg: #1e1e1e;
    --input-bg: #333;
    --gradient: linear-gradient(270deg, #121212, #272727, #121212);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Arial", sans-serif;
}

body {
    background: var(--gradient);
    background-size: 600% 600%;
    animation: gradientBackground 8s ease infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

@keyframes gradientBackground {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.forgotpassword-container {
    background-color: var(--card-bg);
    border: 3px solid var(--primary-color);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

#forgotpasswordform {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--bg-color-light);
    padding: 20px;
    border-radius: 8px;
}

#login-image {
    width: 120px;
    height: auto;
    margin-bottom: 10px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
}

#logintext,
p {
    color: var(--text-color);
    font-size: 1.2rem;
    margin-bottom: 10px;
}

h1.h1 {
    color: var(--text-color);
    margin: 10px 0;
    font-size: 1.5rem;
}

hr {
    width: 100%;
    border: 0;
    border-top: 1px solid var(--primary-color);
    margin: 10px 0 20px;
}

.form-group {
    width: 100%;
    margin-bottom: 15px;
}

.loginlable {
    color: var(--text-color);
    display: block;
    margin-bottom: 5px;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 10px;
    background: var(--gradient);
    color: var(--text-color);
    border: 1px solid var(--primary-color);
    border-radius: 5px;
}

input[type="submit"],
input[type="button"] {
    padding: 10px 20px;
    margin: 10px 5px;
    background-color: var(--primary-color-dark);
    border: none;
    border-radius: 5px;
    color: var(--text-color);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

input[type="submit"]:hover,
input[type="button"]:hover {
    background-color: var(--primary-color-darker);
}

.submit {
    display: flex;
    align-items: center;
    gap: 10px;
}

.loading-icon {
    margin-top: 10px;
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid var(--primary-color);
    border-top: 3px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 600px) {
    .forgotpassword-container {
        padding: 20px;
        width: 90%;
    }

    input[type="submit"],
    input[type="button"] {
        width: 100%;
    }
}

/* Toast message styling */
.toast {
    visibility: hidden;
    min-width: 250px;
    margin: 0 auto;
    background-color: var(--input-bg);
    color: #fff;
    text-align: center;
    border-radius: 5px;
    padding: 16px;
    position: fixed;
    z-index: 1000;
    left: 50%;
    top: 30px;
    transform: translateX(-50%);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}

.toast.show {
    visibility: visible;
    opacity: 1;
}

.toast.success {
    background-color: var(--text-muted);
}

.toast.error {
    background-color: #f44336;
}

.toast.warning {
    background-color: #ffae42;
}

#resendotp {
    color: var(--text-muted);
    text-decoration: none;
    cursor: pointer;
    font-size: 18px;
    transition: color 0.1s ease;
    margin-right: 10px;
    margin-top: 10px;
}


#resendotp:hover {
    color: var(--highlight-color);
}

#resendotp:active {
    color: var(--text-muted-alt);
    text-decoration: underline;
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
        padding: 20px;
        height: auto;
        justify-content: flex-start;
    }

    .forgotpassword-container {
        width: 95%;
        padding: 20px;
        margin-top: 40px;
    }

    #forgotpasswordform {
        padding: 15px;
    }

    #login-image {
        width: 100px;
    }

    h1.h1 {
        font-size: 1.3rem;
    }

    #logintext,
    p {
        font-size: 1rem;
    }

    input[type="text"],
    input[type="password"] {
        padding: 8px;
        font-size: 1rem;
    }

    input[type="submit"],
    input[type="button"] {
        width: 100%;
        padding: 10px;
        margin: 8px 0;
        font-size: 1rem;
    }

    .submit {
        align-items: stretch;
    }

    #resendotp {
        font-size: 16px;
        display: block;
        text-align: right;
        margin-top: 5px;
    }

    .toast {
        width: 90%;
        font-size: 14px;
        top: 40px;
    }
}