:root {
    --rate: 2 / 15
}

html, body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.container {
    height: 100%;
    width: 100%;
    background: url("/assets/images/exam/bg.png") no-repeat;
    background-size: 100% 100%;
}

.section {
    display: none;
    flex-direction: column;
    align-items: center;
}

.section.active {
    display: flex;
}

/* form section */
.form-section {
    padding: calc(var(--rate) * 200vw) calc(var(--rate) * 60vw) 0;
    color: white;
}

.form-logo {
    height: calc(var(--rate) * 218vw);
    width: calc(var(--rate) * 220vw);
    background: url("/assets/images/exam/logo.png") no-repeat;
    background-size: 100% 100%;
}

.form-title {
    margin-top: calc(var(--rate) * 48vw);
    margin-bottom: calc(var(--rate) * 40vw);
    font-size: calc(var(--rate) * 32vw);
    font-weight: bold;
    text-shadow: calc(var(--rate) * 12vw) calc(var(--rate) * 12vw) calc(var(--rate) * 7vw) rgba(118, 128, 236, 0.28);
}

.form-group {
    width: calc(var(--rate) * 630vw);
    margin-top: calc(var(--rate) * 60vw);
}

.form-input {
    width: 100%;
    display: block;
    font-size: calc(var(--rate) * 24vw);
    border: none;
    background: transparent;
    color: rgb(240, 240, 240);
}

.form-group-captcha {
    display: flex;
    flex-direction: row;
    justify-content: center;
    margin-top: calc(var(--rate) * -10vw);
}

.form-group-captcha > .form-input {
    flex-grow: 1;
    flex-shrink: 1;
}

.form-group-captcha > .form-captcha {
    padding-left: 4vw;
    width: 20vw;
    height: 4vw;
    flex-shrink: 0;
    flex-grow: 0;
}


.form-input:focus {
    outline: none;
}

::-webkit-input-placeholder { /* Edge */
    color: rgb(240, 240, 240);
}

:-ms-input-placeholder { /* Internet Explorer */
    color: rgb(240, 240, 240);
}

::placeholder {
    color: rgb(240, 240, 240);
}

.form-group::after {
    content: "";
    display: block;
    background: white;
    margin-top: calc(var(--rate) * 24vw);
    height: calc(var(--rate) * 2vw);
    box-shadow: calc(var(--rate) * 12vw) calc(var(--rate) * 12vw) calc(var(--rate) * 7vw) rgba(118, 128, 236, 0.28);
}

.login-button {
    display: flex;
    font-size: calc(var(--rate) * 32vw);
    flex-direction: column;
    justify-content: center;
    text-align: center;
    margin-top: calc(var(--rate) * 112vw);
    width: calc(var(--rate) * 520vw);
    height: calc(var(--rate) * 76vw);
    background: linear-gradient(90deg, rgb(104, 148, 249) 0%, rgb(143, 172, 241) 100%);
    border-radius: calc(var(--rate) * 38vw);
}

/* protocol section */
.protocol-section {
    padding: calc(var(--rate) * 160vw) calc(var(--rate) * 40vw) 0;
    color: rgb(51, 51, 51);
}

.protocol-box {
    display: flex;
    flex-direction: column;
    border-radius: calc(var(--rate) * 40vw);
    background-color: white;
    padding: calc(var(--rate) * 40vw) calc(var(--rate) * 36vw);
}

.protocol-logo {
    display: block;
    align-self: center;
    height: calc(var(--rate) * 220vw);
    width: calc(var(--rate) * 220vw);
}

.protocol-content {
    margin-top: calc(var(--rate) * 60vw);
    font-size: calc(var(--rate) * 28vw);
    padding-left: calc(var(--rate) * 20vw);
    padding-right: calc(var(--rate) * 20vw);
}

.content-paragraph {
    text-indent: 2em;
    line-height: 1.6;
}

.content-paragraph.center {
    text-align: center;
}

.custom-checkbox {
    display: flex;
    align-items: stretch;
    cursor: pointer;
    position: relative;
}

.custom-checkbox input {
    display: none; /* 隐藏默认复选框 */
}

.checkmark {
    height: calc(var(--rate) * 36vw); /* 自定义复选框的高度 */
    width: calc(var(--rate) * 36vw); /* 自定义复选框的宽度 */
    background-color: #eee; /* 默认背景色 */
    border-radius: 4px; /* 圆角 */
    border: 1px solid #ccc; /* 边框 */
    flex-shrink: 0;
}

.custom-checkbox input:checked + .checkmark {
    background-color: #4CAF50; /* 选中时的背景色 */
    border: 1px solid #4CAF50; /* 选中时的边框颜色 */
}

.checkmark:after {
    content: "";
    position: relative;
    display: none; /* 默认不显示勾选标记 */
}

.custom-checkbox input:checked + .checkmark:after {
    display: block; /* 选中时显示勾选标记 */
}

.custom-checkbox .checkmark:after {
    left: calc(var(--rate) * 10vw); /* 勾选标记的位置 */
    top: calc(var(--rate) * 10vw); /* 勾选标记的位置 */
    width: calc(var(--rate) * 5vw); /* 勾选标记的宽度 */
    height: calc(var(--rate) * 10vw); /* 勾选标记的高度 */
    border: solid white; /* 勾选标记的颜色 */
    border-width: 0 2px 2px 0; /* 勾选标记的边框宽度 */
    transform: rotate(45deg); /* 旋转以形成勾选形状 */
}

.protocol-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: calc(var(--rate) * 40vw) calc(var(--rate) * 39vw) calc(var(--rate) * 120vw);
    height: calc(var(--rate) * 76vw);
    border-radius: calc(var(--rate) * 38vw);
    color: rgb(254, 254, 254);
    background: linear-gradient(90deg, rgb(104, 148, 249) 0%, rgb(143, 172, 241) 100%);
    font-size: calc(var(--rate) * 32vw);
    font-weight: bold;
}

.protocol-button.disable {
    background: lightgrey;
}

/* question section */
.question-section {
    padding: calc(var(--rate) * 148vw) calc(var(--rate) * 40vw) 0;
}

.question-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.question-header {
    width: 100%;
    color: white;
}

.question-header-navbar {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    font-size: calc(var(--rate) * 24vw);
}

.question-header-progress {
    display: block;
    margin-top: calc(var(--rate) * 28vw);
    height: calc(var(--rate) * 20vw);
    border-radius: calc(var(--rate) * 10vw);
    background: rgb(227, 237, 255);
    overflow: hidden;
}

.question-progress-percent {
    width: 0;
    margin-top: -calc(var(--rate) * 20vw);
    height: calc(var(--rate) * 20vw);
    border-radius: calc(var(--rate) * 10vw);
    background: white;
}

.question-box {
    margin-top: calc(var(--rate) * 48vw);
    padding: calc(var(--rate) * 36vw);
    background: white;
    border-radius: calc(var(--rate) * 40vw);
}

.question-notice {
    font-size: calc(var(--rate) * 20vw);
    color: rgb(102, 102, 102);
}

.question-title {
    margin-top: calc(var(--rate) * 28vw);
    font-size: calc(var(--rate) * 28vw);
    color: rgb(102, 102, 102);
    font-weight: bold;
}

.question-answer {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    height: calc(var(--rate) * 56vw);
    margin-top: calc(var(--rate) * 24vw);
    font-size: calc(var(--rate) * 24vw);
    color: rgb(51, 51, 51);
    background-color: rgb(249, 249, 249);
    border-radius: calc(var(--rate) * 10vw);
    padding: 0 calc(var(--rate) * 12vw);
    cursor: pointer;
}

.question-answer::after {
    content: "";
    display: none;
    margin-right: calc(var(--rate) * 12vw);
    height: calc(var(--rate) * 40vw);
    width: calc(var(--rate) * 40vw);
    background-image: url("/assets/images/exam/check.png");
    background-size: 100% 100%;
    background-repeat: no-repeat;
}

.question-answer.checked {
    color: white;
    background-color: rgb(106, 149, 248);
}

.question-answer.checked::after {
    display: block;
}

.question-footer {
    margin: calc(var(--rate) * 132vw) calc(var(--rate) * 39vw);
}

.question-back-button, .question-submit-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: calc(var(--rate) * 76vw);
    border-radius: calc(var(--rate) * 38vw);
    font-size: calc(var(--rate) * 32vw);
    font-weight: bold;
    cursor: pointer;
}

.question-back-button {
    border: 2px solid rgb(106, 149, 248);
    color: rgb(106, 149, 248);
    background: transparent;
}

.question-submit-button {
    margin-top: calc(var(--rate) * 36vw);
    background: linear-gradient(90deg, rgb(104, 148, 249) 0%, rgb(143, 172, 241) 100%);
    color: white;
}

/* result section */
.result-section {
    padding: calc(var(--rate) * 232vw) calc(var(--rate) * 40vw);
}

.result-icon {
    display: block;
    height: calc(var(--rate) * 180vw);
    width: calc(var(--rate) * 180vw);
    border-radius: 50%;
    background-size: 100% 100%;
    background-repeat: no-repeat;
}

.result-icon.success {
    background-image: url("/assets/images/exam/success.png");
}

.result-icon.failed {
    background-image: url("/assets/images/exam/failed.png");
}

.result-text {
    color: white;
    text-shadow: calc(var(--rate) * 12vw) calc(var(--rate) * 12vw) calc(var(--rate) * 7vw) rgba(118, 138, 236, 0.28);
}

.result-title {
    margin-top: calc(var(--rate) * 54vw);
    font-weight: bold;
    font-size: calc(var(--rate) * 32vw);
}

.result-subtitle {
    margin-top: calc(var(--rate) * 24vw);
    font-size: calc(var(--rate) * 28vw);
}

/* modal */
.modal-container {
    position: absolute;
    top: 0;
    height: 100%;
    width: 100%;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.modal-container.active {
    display: flex;
}

.modal-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: calc(var(--rate) * 420vw);
    padding: calc(var(--rate) * 60vw);
    border-radius: calc(var(--rate) * 20vw);
    background: rgba(255, 255, 255, 0.7);
    font-size: calc(var(--rate) * 28vw);
    color: rgb(106, 149, 248);
}

.modal-icon {
    display: block;
    height: calc(var(--rate) * 100vw);
    width: calc(var(--rate) * 100vw);
    background-size: 100% 100%;
    background-repeat: no-repeat;
}

.modal-icon.info {
    background-image: url("/assets/images/exam/notice.png");
}

.modal-icon.break {
    background-image: url("/assets/images/exam/break.png");
}

.modal-content {
    margin-top: calc(var(--rate) * 48vw);
    word-break: break-all;
    word-wrap: anywhere;
}

@media screen and (min-width: 1024px) {
    /* form section */
    .form-section {
        padding-top: 100px;
    }

    .form-logo {
        width: 220px;
        height: 220px;
    }

    .form-title {
        margin-top: 48px;
        margin-bottom: 40px;
        font-size: 32px;
        text-shadow: 12px 12px 7px rgba(118, 128, 236, 0.28);
    }

    .form-group {
        width: 630px;
        margin-top: 60px;
    }

    .form-group::after {
        margin-top: 24px;
        height: 2px;
        box-shadow: 12px 12px 7px rgba(118, 128, 236, 0.28);
    }

    .form-group-captcha {
        display: flex;
        flex-direction: row;
        justify-content: center;
        margin-top: -10px;
    }

    .form-group-captcha > .form-input {
        flex-grow: 1;
        flex-shrink: 1;
    }

    .form-group-captcha > .form-captcha {
        padding-left: 40px;
        width: 200px;
        height: 40px;
        flex-shrink: 0;
        flex-grow: 0;
    }


    .form-input {
        font-size: 24px;
    }

    .login-button {
        margin-top: 112px;
        width: 520px;
        height: 76px;
        border-radius: 38px;
        font-size: 32px;
        cursor: pointer;
    }

    .custom-checkbox {
        display: flex;
        align-items: center;
        cursor: pointer;
    }

    .checkmark {
        height: 30px; /* 自定义复选框的高度 */
        width: 30px; /* 自定义复选框的宽度 */
        background-color: #eee; /* 默认背景色 */
        border-radius: 4px; /* 圆角 */
        border: 1px solid #ccc; /* 边框 */
        margin-right: 12px;
    }


    .custom-checkbox .checkmark:after {
        left: 9px;
        top: 2px;
        width: 8px;
        height: 16px;
        border: solid white;
        border-width: 0 2px 2px 0;
        transform: rotate(45deg);
    }

    /* protocol section */
    .protocol-section {
        padding: 100px 160px;
    }

    .protocol-box {
        border-radius: 40px;
        padding: 52px 0 68px;
        width: 100%;
    }

    .protocol-logo {
        height: 220px;
        width: 220px;
    }

    .protocol-content {
        margin-top: 40px;
        font-size: 28px;
    }

    .content-paragraph {
        text-indent: 0;
        line-height: 1.4;
        margin-bottom: 48px;
    }

    .protocol-button {
        margin: 60px 0 0;
        align-self: center;
        height: 76px;
        width: 520px;
        border-radius: 38px;
        font-size: 32px;
        cursor: pointer;
    }

    /* question section */
    .question-section {
        padding: 100px 160px;
    }

    .question-inner {
        background-color: white;
        border-radius: 40px;
        padding: 60px 80px;
    }

    .question-header {
        color: #666;
    }

    .question-header-navbar {
        font-size: 24px;
        padding: 0 80px;
    }

    .question-nav-notice {
        color: #6a95f8;
    }

    .question-header-progress {
        margin-top: 16px;
        height: 20px;
        border-radius: 10px;
        background-color: rgba(106, 149, 248, 0.5);
    }

    .question-progress-percent {
        height: 20px;
        border-radius: 10px;
        background-color: #6a95f8;
    }

    .question-box {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-top: 28px;
        padding: 0;
        background: transparent;
        border-radius: unset;
    }

    .question-notice {
        font-size: 20px;
        color: #666;
    }

    .question-title {
        margin-top: 28px;
        font-size: 28px;
        font-weight: bold;
        color: #333;
    }

    .question-options {
        margin-top: -4px;
    }

    .question-answer {
        width: 598px;
        height: 56px;
        border-radius: 10px;
        background-color: #f9f9f9;
        padding: 0 16px;
        font-size: 24px;
        color: #333;
        margin-top: 24px;
    }

    .question-answer::after {
        margin-right: 16px;
        height: 40px;
        width: 40px;
    }

    .question-footer {
        margin: 60px 0 0;
        display: flex;
        flex-direction: row;
        width: 100%;
        justify-content: space-around;
    }

    .question-back-button, .question-submit-button {
        height: 76px;
        border-radius: 38px;
        width: 520px;
        font-size: 32px;
    }

    .question-submit-button {
        margin-top: 0;
    }

    /*  result section  */
    .result-section {
        padding: 200px;
    }

    .result-icon {
        width: 180px;
        height: 180px;
    }

    .result-text {
        color: white;
        text-shadow: 12px 12px 7px rgba(118, 138, 236, 0.28);
    }

    .result-title {
        font-weight: bold;
        font-size: 32px;
        margin-top: 54px;
    }

    .result-subtitle {
        font-size: 28px;
        margin-top: 24px;
    }

    /*  modal  */
    .modal-box {
        width: 420px;
        padding: 60px;
        border-radius: 20px;
        font-size: 28px;
    }

    .modal-icon {
        height: 100px;
        width: 100px;
    }

    .modal-content {
        margin-top: 48px;
    }
}
