* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Open Sans', sans-serif;
}

.mod {
    display: flex;
    justify-content: center;
    width: 400px;
    height: 588px;
    border-radius: 5px;
    box-shadow: #333 0 0 10px;
}
.mod-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80%;
    height: 100%;
}
h2 {
    margin-top: 20px;
}

.form-item {
    position: relative;
    margin-top: 30px;
    width: 100%;
}
label {
    display: block;
    margin-bottom: 7px;
    color: #777;
}
input {
    display: block;
    padding-left: 10px;
    width: 100%;
    height: 46px;
    border: 2px solid #f0f0f0;
    border-radius: 4px;
}
input:focus {
    /* 去掉谷歌浏览器默认边框 */
    outline: none;
    border: 2px solid #666;
}

button {
    margin-top: 30px;
    width: 100%;
    height: 46px;
    background: #3498db;
    border: 2px solid #3498db;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
}
span {
    position: absolute;
    bottom: -20px;
    font-size: 13px;
    color: #e74c3c;
    visibility: hidden;
}
.error span {
    visibility: visible;
}
.error input {
    border: 2px solid #e74c3c;
}
.success input {
    border: 2px solid #2ecc71;
}
.success span {
    visibility: hidden;
}
