
body {
    background: #000; /* Fallback color */
    color: #FFFFFF;
    font-family: "Roboto", sans-serif;
    text-align: center;
    margin: 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden; /* Prevent scroll during animation */
}

body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('background.webp'); /* Updated to .webp */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    animation: fadeInBackground 1.5s ease forwards;
    z-index: -1; /* Ensure it stays behind content */
}

@keyframes fadeInBackground {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.wrapper {
    width: 400px; /* Reduced width */
    min-height: 400px; /* Adjusted height */
    padding: 2rem; /* Reduced padding */
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 8px;
    border: 0px solid #272727; /* Adds border */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1; /* Ensure it's above the background */
    opacity: 0;
    animation: fadeInContent 1.5s ease 0.5s forwards; /* Delayed fade-in */
}

@keyframes fadeInContent {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.title {
    font-size: 2.4rem; /* Reduced font size */
    font-weight: 600;
    margin-bottom: 2rem; /* Adjusted margin */
    color: #fff;
}

.inForm {
    text-align: left;
    display: block;
    margin: 1rem 0 0.5rem;
    font-size: 1.2rem; /* Slightly reduced font size */
    color: #CCCCCC;
}

.logInput {
    width: 265px; /* Reduced width */
    padding: 1rem; /* Reduced padding */
    font-size: 1rem; /* Reduced font size */
    color: #FFFFFF;
    background-color: #000000;
    border: 1px solid #272727; /* Ensures border */
    border-radius: 4px;
    outline: none;
    transition: border-color 0.3s;
}

.logInput:focus {
    border-color: #666666;
    background-color: #101010;
}

.button {
    width: 265px; /* Reduced width */
    padding: 1rem; /* Reduced padding */
    font-size: 1rem; /* Reduced font size */
    color: #FFFFFF;
    background: #000000; /* Pure black for AMOLED */
    border: 1px solid #1A1A1A; /* Slightly lighter border for definition */
    border-radius: 4px;
    cursor: pointer;
    margin-top: 1.5rem; /* Adjusted spacing */
    transition: background 0.3s, transform 0.2s;
    text-align: center; /* Centers the text horizontally */
    display: flex; /* Flexbox for centering */
    justify-content: center; /* Centers the content horizontally */
    align-items: center; /* Centers the content vertically */
}

.button:hover {
    background: #0A0A0A; /* Slightly lighter black on hover */
    transform: scale(1.02);
}

.button:active {
    transform: scale(0.98);
}


/* Centering fix for all devices */
body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

/* Ensure the wrapper scales well on smaller screens */
.wrapper {
    width: 90%; /* Ensure the wrapper is flexible on small screens */
    max-width: 400px; /* Maintain a max width for larger screens */
    padding: 20px; /* Keep padding consistent */
    box-sizing: border-box; /* Include padding in width calculations */
}

/* Adjust font sizes for mobile screens */
@media (max-width: 768px) {
    .title {
        font-size: 1.8rem; /* Slightly reduce font size */
    }
    .logInput, .button {
        font-size: 1rem; /* Adjust input and button sizes */
    }
}
