.body{
    margin: 0;
    padding: 0;
    width: 100%;
    height: auto;
    background: white;
    padding-bottom: 10px;
}
.contact {
    width: 1120px;
    display: block;
    text-align: center;
    margin: 0 auto;
}

.contact > h2 {
    font-weight: 600;
    font-size: 1.8rem;
    padding: 40px 0;
}

.contact > ul {
    padding: 0;
    list-style: none;
}

.contact > ul > li {
    display: flex;
    margin: 0 0 3% 0;
    position: relative; /* 为父元素设置相对定位 */
}

.contact > ul > li > span {
    flex: .3;
    display: inline-block;
    text-align: right;
    padding-right: 20px;
    font-weight: 600;
    line-height: 40px;
    width: 24%;
}

.contact > ul > li > span > span {
    color: red;
}

.contact > ul > li > input,
.contact > ul > li > textarea {
    flex: .7;
    display: inline-block;
    margin: 0 120px 0 0;
    border: none;
    background: #f3f3f3;
    color: #000;
    font-weight: 600;
    padding: 0 20px;
}

.contact > ul > li > input {
    height: 40px;
    line-height: 40px;
}

.contact > ul > li > textarea {
    padding-top: 10px;
    font-weight: 600;
}

.contact > ul > li > button {
    border: none;
    border-radius: 8px;
    color: #fff;
    padding: 5px 16px;
    background: #0078d2;
    width: 100px;
    cursor: pointer;
}

.contact > ul > li:last-child {
    text-align: left;
    display: block;
    margin-left: 594px;
}
@media screen and (max-width: 1200px) {

    .contact {
        width: 100% !important;
    }

    .contact > ul > li {
        display: inline-block !important;
        width: 100%;
    }

    .contact > ul > li:last-child {
        margin-left: 42% !important; /* 可能需要考虑这个值 */
    }

    .contact > ul > li > span {
        font-size: 14px;
        padding-right: 10px !important;
        width: 45% !important;
        text-align: left !important;
    }

    .contact > ul > li > input,
    .contact > ul > li > textarea {
        margin: 0 3% 0 0 !important;
        width: 50%;
    }

}
@media screen and (max-width:767px) {
    .contact > ul > li:last-child {
        margin-left: 35% !important;
    }
}

.contact-modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.contact-modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 30px;
    border: 1px solid #888;
    border-radius: 15px;
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.2);
    width: 40%;
    max-width: 500px;
    text-align: center;
}

.contact-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.contact-close:hover,
.contact-close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.error {
    color: red;
}

.success {
    color: green;
}

#closeModal {
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#closeModal:hover {
    background-color: #0056b3;
}
.contact-error {
    color: red;
    font-size: 0.9em;
    margin-top: 5px;
    position: absolute;
    top: 100%;
    left: 27%;
    display: none;
}

@media screen and (max-width:1200px){
    .contact-error {
        left: 22%;
    }
}
