/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'League Spartan', Arial, sans-serif;
}

/* Animated Background */
body {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(45deg, #FFDD44, #FF8C33, #ec7d64, #FFDD44);
    background-size: 400% 400%;
    animation: gradientAnimation 8s ease infinite;
}

/* Gradient Animation */
@keyframes gradientAnimation {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Container */
.container {
    text-align: center;
    width: 100%; /* Ensure the container spans full width */
    padding: 20px;
}

/* Title Styling */
.title {
    font-size: 4rem;
    font-weight: bold;
    color: #000;
    margin-bottom: 2rem;
}

/* Login Box */
.login-box {
    background: #fff;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 12px 12px 0px #4C3A2C;
    text-align: left;
    display: inline-block;
    width: 400px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Hover Effect */
.login-box:hover {
    transform: scale(1.05);
    box-shadow: 16px 16px 0px #4C3A2C;
}

/* Heading Inside Login Box */
h2 {
    margin-bottom: 1.5rem;
    color: #000;
    font-size: 2rem;
    text-align: center;
}

/* Labels */
label {
    display: block;
    font-weight: bold;
    margin: 0.8rem 0 0.5rem;
    font-size: 1.1rem;
}

/* Input Fields */
input {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1.5rem;
    border: 2px solid #FFDD44;
    border-radius: 8px;
    background-color: #FFDD44;
    color: #000;
    font-weight: bold;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

/* Input Focus Effect */
input:focus {
    border-color: #FF8C33;
    background-color: #FFE699;
}

/* Password Container */
.password-container {
    position: relative;
}

.password-container input {
    padding-right: 50px; /* Increased space for the larger toggle icon */
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
}

.toggle-password img {
    width: 30px; /* Increased width */
    height: 30px; /* Increased height */
    transition: filter 0.3s ease; /* Smooth transition for color change */
}

.toggle-password img.active {
    filter: brightness(0) invert(1); /* Change to white */
}

/* Login Button */
.login-btn {
    background: #FF3B3B;
    color: #fff;
    font-weight: bold;
    font-size: 1.2rem;
    padding: 0.8rem 2.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: block;
    margin: 1rem auto 0;
    transition: background 0.3s ease;
}

/* Button Hover */
.login-btn:hover {
    background: #e33131;
}

/* New User Section */
.new-user {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 1rem;
}

.new-user a {
    font-weight: bold;
    color: #000;
    text-decoration: none;
}

.new-user a:hover {
    text-decoration: underline;
}

/* Loading Animation */
.loading {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.cloche-container {
    position: relative;
    width: 100px;
    height: 100px;
}

.cloche {
    width: 100%;
    animation: serve 2s infinite;
}

@keyframes serve {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Responsive Design */

/* Tablets */
@media (max-width: 1024px) {
    .title {
        font-size: 3rem;
    }

    .login-box {
        width: 350px;
        padding: 2.5rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    input {
        font-size: 0.9rem;
        padding: 0.7rem;
    }

    .login-btn {
        font-size: 1rem;
        padding: 0.7rem 2rem;
    }
}

/* Mobile Devices */
@media (max-width: 768px) {
    .title {
        font-size: 2.5rem;
    }

    .login-box {
        width: 300px;
        padding: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    input {
        font-size: 0.8rem;
        padding: 0.6rem;
    }

    .login-btn {
        font-size: 0.9rem;
        padding: 0.6rem 1.8rem;
    }
}

/* Small Phones */
@media (max-width: 480px) {
    .title {
        font-size: 2rem;
    }

    .login-box {
        width: 250px;
        padding: 1.5rem;
    }

    h2 {
        font-size: 1.2rem;
    }

    input {
        font-size: 0.7rem;
        padding: 0.5rem;
    }

    .login-btn {
        font-size: 0.8rem;
        padding: 0.5rem 1.5rem;
    }

    .new-user {
        font-size: 0.9rem;
    }
}
