@charset "utf-8";

body {
    background: #f1f2f3 
    url(../img/background.webp)
    center center / cover no-repeat; 
    margin: 0;
    padding: 0;
}

html {
  overflow-y: scroll;  /* 始终预留滚动条空间 */
}

/*--------------------------------------------*/
/*Utility classes                             */
/*--------------------------------------------*/

.container {
    width: min(100% - 30px, 1080px);
    margin-inline: auto;
}

/*--------------------------------------------*/
/*Main                                        */
/*--------------------------------------------*/

h1 {
    padding-top: 40px;
    font-size: 35px;
    color:#161616;;
    font-weight: 700;
    text-align: center;
}

.btn-area {
    display:flex;
    justify-content: center;
}

.create {
    margin: 10px 0;
    width: 150px;
    height: 40px;
    border-radius: 10px;
    background-color: #009e5f;
    font-size: 15px;
    color:#fff;
    transition: ease-in-out 0.25s;
}

.create:hover {
    background-color: #17d388;
}

.modal {
    display: none; /* 默认隐藏 */
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    align-items: center;
    justify-content: center;
}
 
.create-box {
    display: grid;
    width: auto;
    place-items: center;
    background-color: #f1f2f3;
    border-radius: 10px;
}

.basic-info-one {
    margin: 30px 30px 0;
    width: 450px;
    height: auto;
    display:flex;
    gap:20px;
}

.basic-info-two {
    margin: 10px 30px;
    width: 450px;
    height: auto;
    display:flex;
    gap:20px;
}

.input-one, .input-two, .input-three, .input-four {
    padding: 0 10px;
    width: 50%;
    height: 40px;
    border-radius: 10px;
    background-color: #fff;
    font-size: 15px;
    color:#4f362f;
    border: 1px solid #fff;
}

.input-five {
    margin: 0 30px;
    padding: 10px;
    width: 450px;
    border-radius: 10px;
    background-color: #fff;
    font-size: 15px;
    color:#4f362f;
    border: 1px solid #fff;
    resize: none;
    min-height: 80px;
}

.input:focus {
    border: 1px solid #4f362f;
    transition: ease-in-out 0.25s;
}

.add-btn-group {
    display: flex;
    gap:20px;
    width: 450px;
    height: auto;
}

.add {
    margin: 10px 0;
    width: 50%;
    height: 40px;
    border-radius: 10px;
    background-color: #009e5f;
    font-size: 15px;
    color:#fff;
    transition: ease-in-out 0.25s;
}

.add:hover {
    background-color: #17d388;
}

.add-cancel {
    margin: 10px 0;
    width: 50%;
    height: 40px;
    border-radius: 10px;
    background-color: #b07966;
    font-size: 15px;
    color:#fff;
    transition: ease-in-out 0.25s;
}

.add-cancel:hover {
    background-color: #bb9486;
}

.error-box {
    width: 100%;
    height: 25px;
    background-color: transparent;
    text-align: center;
    color:#e9250c;
    font-weight: 500;
}

.contacts-container {
    margin: 10px 0 100px;
    width: 100%;
    height: auto;
    display: grid;
    justify-items: stretch;
    grid-template-columns: repeat(3, 1fr);
    gap:15px;
}

.contact-box {
    padding: 10px;
    height: auto;
    width: 350px;
    cursor: pointer;
    background-color: #fff;
    border-radius: 10px;
    color: #4f362f;
    display: grid;
    justify-items: left;
    align-items: center;
    border: 1px solid #fff;
    font-size: 15px;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    word-break: break-word;
}

.contact-box:hover {
    border: 1px solid #4f362f;
    transition: ease-in-out 0.25s;
}

.bottom-box {
    width: 100%;
    display:flex;
    justify-content: space-between;
}

main {
    min-height:calc(100vh - 72px);
}

footer {
    height: 72px;
    display: flex;
    justify-content: space-between;
    line-height: 72px;
    font-size: 18px;
    color: #161616;
    font-weight: 500;
}

@media screen and (max-width: 768px) {
    .contacts-container {
        width:100%;
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 480px) {
    .contacts-container {
        grid-template-columns: repeat(1, 1fr);
        width: 100%;
        place-items: center;
    }

    .create-box {
        width: 90%;
    }

    .input-five, .basic-info-one, .basic-info-two, .add-btn-group {
        width:80%;
    }

    .input-one, .input-two, .input-three, .input-four, .input-five {
        font-size: 10px;
    }

    .error-box {
        font-size: 12px;
    }
}