.form-container {
    max-width: 40%;
    height: 285px;
    position: relative;
    margin-top: 3em;
}

.contact-box {
    min-width: 60cqh;
    min-height: 30cqh;
    max-height: 30cqh;
    position: absolute;
    display: flex;
    align-items: center;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    padding: 10px 25px;
    transform: translate(-50%, -50%);
    background: rgba(255, 217, 152, 0.082);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-sizing: border-box;
    box-shadow: 0px 0px 15px 2px #afc0ff23;
    border-radius: 10px;
}

.contact-box form {

    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .5em;
    column-gap: 2em;
    width: 100%;
}

.contact-box .user-box {
    position: relative;
}

.contact-box .user-box input {
    width: 100%;
    padding: 10px 4px;
    font-size: 16px;
    color: goldenrod;
    font-weight: 500;
    margin-bottom: 30px;
    border: 1px solid goldenrod;
    outline: none;
    background: transparent;
}

#userMessage {
    font-size: 16px;
    border: 1px solid goldenrod !important;
}

.msg-label {
    bottom: 30px;
    margin-left: 30px;
}

.contact-box .user-box label {
    position: absolute;
    top: 0;
    left: 30px;
    padding: 10px 0;
    font-size: 1em;
    font-weight: 600;
    color: #fff;
    pointer-events: none;
    transition: .5s;
}

.contact-box .user-box input:focus~label {
    top: -30px;
    left: 0;
    color: var(--secondary);
    font-size: 0.9rem;
}

.user-box input:focus {
    border: 1px solid orange;
}

.contact-box .user-box input:placeholder-shown+label {
    color: var(--secondary);
}
.contact-box .user-box input:not(:placeholder-shown)~label {
    top: -30px;
    left: 0;
    
    font-weight: 600;
    transition: .5s;
}

.user-box input:not(:placeholder-shown) {
    border: 1px solid rgb(255, 72, 0);
}

.user-box:has(input:not(:valid)) .form-btn {
    outline: 3px solid red;
    background: green !important;
    pointer-events: none !important;
}

.contact-box .user-box input:valid~label {
    left: 0;
    color: var(--secondary);
    font-size: 0.9rem;
    text-shadow: none;
}

.user-box input:valid {
    border: 1px solid rgb(0, 255, 136);
}

.user-box input:valid~.form-btn {
    pointer-events: all !important;
}


.contact-box form a {
    position: relative;
    display: inline-block;
    padding: 10px 20px;
    color: var(--secondary);
    font-size: 16px;
    text-decoration: none;
    text-transform: uppercase;
    overflow: hidden;
    transition: .5s;
    margin-top: 40px;
    letter-spacing: 4px
}

.form-btn {
    grid-column: -1/1;
    display: inline-block;
    padding: 5px 0px !important;
    background: black;
    border: 2px solid goldenrod;
    border-radius: 40px;
    box-shadow: 0 0 10px var(--secondary);
    font-size: var(--fs-rebtn);
    color: goldenrod;
    font-weight: 600;
    width: 50%;
    align-self: center;
    justify-self: center;
    transition: .5s;
}

.form-btn:hover {
    background-color: goldenrod;
    color: black;
    border: 2px solid black;
    box-shadow: 0 0 5px var(--secondary);
    transform: scale(1.1) translateY(-5%) !important;
}


@media (max-width:980px) {
        #contact-section {
            padding: 150px 20px 70px;
            height: 85vh;
            justify-content: center;
            gap: 0em;
        }
    
        .contact-bg {
            background-attachment: scroll;
        }
    
        #contact-section p {
            font-size: .98rem !important;
    
            background: rgba(0, 0, 0, 0.479);
            text-align: center;
            margin-top: unset;
            padding: 2px 15px;
            border-radius: 15px;
        }
    
        .form-container {
            width: 100% !important;
        }
    
        .contact-box {
            min-width: 80cqw;
            min-height: 28cqh;
        }
    
        .contact-box .user-box input {
            width: 100% !important;
            margin: 0px 0px 0px 0px;
        }
    
        .contact-box form {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: .5em !important;
            row-gap: 1em !important;
        }
    
        .contact-box .user-box label {
            left: 10px;
        }
    
        .form-btn {
            width: 50%;
            padding: 5px 0px !important;
            grid-column: span 2;
        }
}