@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
:root {
    --accent-color:#8672FF;
    --base-color: white;
    --text-color:#2E2B41;
    --input-color:#F3F0FF;
}
*{
    margin: 0;
    padding: 0;
}
html {
    font-family: Poppins, Segoe UI, sans-serif;
    font-size: 12pt;
    color: var(--text-color);
    text-align: center;
}
body {
    min-height: 100vh;
    background-image: url(background.jpg);
    background-size: cover;
    background-position: right;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px; /* Add padding for better spacing on smaller screens */
}
.wrapper{
    box-sizing: border-box;
    background-color: var(--base-color);
    height: auto;
    width: 100%;
    max-width: 300px;  /* Restrict max width to 300px */
    padding: 20px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
h1 {
    font-size: 2rem;  /* Smaller font size */
    font-weight: 900;
    text-transform: uppercase;
}

form{
    width: 100%;  /* Ensure form takes full width of wrapper */
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
form > div {
    width: 100%;
    display: flex;
    justify-content: center;
}
form label {
    flex-shrink: 0;
    height: 40px;  /* Reduced height for smaller inputs */
    width: 40px;  /* Reduced width for smaller inputs */
    background-color: var(--accent-color);
    fill: var(--base-color);
    color: var(--base-color);
    border-radius: 10px 0 0 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;  /* Smaller font size */
    font-weight: 500;
}
form input{
    box-sizing: border-box;
    flex-grow: 1;
    min-width: 0;
    height: 40px;  /* Reduced height for smaller inputs */
    padding: 1em;
    font: inherit;
    border-radius: 0 10px 10px 0;
    border: 2px solid var(--input-color);
    border-left: none;
    background-color: var(--input-color);
    transition: 150ms ease;
}
form input:hover{
    border-color: var(--accent-color);
}
form input:focus{
    outline: none;
    border-color: var(--text-color);
}
div:has(input:focus)>label{
    background-color: var(--text-color);
}
form button{
    margin-top: 10px;
    border: none;
    border-radius: 1000px;
    padding: .5em 2em;  /* Reduced padding for smaller button */
    background-color: var(--accent-color);
    color: var(--base-color);
    font: inherit;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: 150ms ease;
}
form button:hover{
    background-color: var(--text-color);
}
form button:focus{
    outline: none;
    background-color: var(--text-color);
}
a{
    text-decoration: none;
    color: var(--accent-color);
}
a:hover{
    text-decoration: underline;
}
@media(max-width: 1100px){
    .wrapper{
        width: 100%;
        max-width: 100%;  /* Ensure wrapper doesn't exceed 100% width */
        border-radius: 0;
    }
}
form div.incorrect label{
    background-color: #f026f0;
}
form div.incorrect input{
    background-color: #f026f0;
}
