.top-banner::before {
    content: none;
}

.top-banner h1 {
    font-size: 36px;
    line-height: 54px;
}

.top-banner .desc {
    font-size: 16px;
    font-weight: 700;
    margin: 0px auto 40px;
}

@keyframes indeterminate {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.grammar-wrapper {
    max-width: 1192px;
    margin: 40px auto 160px;
    text-align: left;
    color: var(--color-block-drak);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    border-radius: 12px;
    border: 1px solid #D5E0F2;
    box-shadow: 0px 4px 20px 0px rgba(0, 0, 0, 0.05);
    background: var(--color-white-lighter);
    padding: 20px;
}

.grammar-wrapper .base-purple-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 5px 20px;
    border-radius: 4px;
    background: var(--color-primary);
    font-size: 14px;
    font-weight: 500;
    color: var(--color-white-lighter);
    cursor: pointer;
    transition: all .3s;
    border: none;
}

.grammar-wrapper .base-purple-btn:not(.is-disabled):hover {
    background: var(--color-primary-dark);
}

.grammar-wrapper .base-purple-btn.is-disabled {
    opacity: .5;
    cursor: not-allowed;
}

.grammar-wrapper .grammar-left,
.grammar-wrapper .grammar-right {
    width: calc(50% - 10px);
}

.grammar-wrapper .editor-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
}

.grammar-wrapper .editor-content {
    display: flex;
    padding: 12px;
    height: 578px;
    background-color: var(--color-white-lighter);
    border: 1px solid #BFCFEA;
    border-radius: 8px;
    flex-direction: column;
    position: relative;
}

.grammar-wrapper .editor-box {
    flex: 1 1 0%;
    height: calc(100% - 42px);
    margin: 0 -12px 10px 0;
}

.grammar-wrapper .editor-textarea {
    width: 100%;
    height: 100%;
    border: none;
    font-size: 16px;
    resize: none;
    line-height: 28px;
    color: var(--color-block-drak);
    white-space: pre-wrap;
    padding-right: 12px;
}

.grammar-wrapper .editor-textarea:empty::before {
    content: attr(placeholder);
    color: rgba(42, 48, 72, 0.4);
    font-size: 16px;
}

.grammar-wrapper .editor-textarea .highlight {
    background-color: #ffe7e7;
}

.grammar-wrapper .footer-btn-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
    justify-content: space-between;
}

.grammar-wrapper .footer-btn-left .button-box {
    display: flex;
    align-items: center;
}

.grammar-wrapper .footer-btn-left .text-num {
    font-size: 14px;
    flex: 1;
    color: rgba(42, 48, 72, 0.8);
}

.grammar-wrapper .footer-btn-left .button-text.is-error {
    background: #E7E5FF;
    padding: 4px;
    border-radius: 4px;
    font-size: 12px;
    margin-bottom: -4px;
}

.grammar-wrapper .footer-btn-left .button-text.is-error .text-num {
    font-size: 12px;
}

.grammar-wrapper .footer-btn-left .button-text.is-error .text-num span {
    color: #FF2F2F;
}

.grammar-wrapper .footer-btn-left .button-text.is-error .error-msg {
    font-size: 12px;
    line-height: 18px;
}

.grammar-wrapper .footer-btn-left .button-text.is-error .error-msg span {
    cursor: pointer;
    color: var(--color-primary);
}

.grammar-wrapper .empty-editor-left {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    justify-content: center;
    width: 100%;
}

.grammar-wrapper .empty-button-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    max-width: 158px;
    width: 40%;
    height: 80px;
    color: var(--color-block-drak);
    background-color: #F2F3F7;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all .2s;
}

.grammar-wrapper .empty-button-card.paste-text {
    margin-left: 12px;
}

.grammar-wrapper .empty-button-card:hover {
    color: var(--color-primary);
    background-color: var(--color-purple-light);
}

.grammar-wrapper .empty-button-card svg {
    width: 24px;
    height: 24px;
    margin-bottom: 8px;
    transition: all .2s;
}

.grammar-wrapper .empty-button-card:hover svg {
    color: var(--color-primary);
}

.grammar-wrapper .editor-content .progress-box {
    width: 130px;
    margin-top: 34px;
    display: none;
}

.grammar-wrapper .editor-content .progress-outer {
    background-color: #ebeef5;
    border-radius: 100px;
    height: 6px;
    overflow: hidden;
    position: relative;
}

.grammar-wrapper .editor-content .progress-inner {
    background-color: var(--color-primary);
    border-radius: 100px;
    height: 100%;
    left: 0;
    line-height: 1;
    position: absolute;
    top: 0;
    transition: width .6s ease;
    white-space: nowrap;
    animation: indeterminate 3s infinite;
    width: 50%;
    transform: translateZ(0);
}

.grammar-wrapper .editor-content .progress-text {
    font-size: 14px;
    color: var(--color-block-drak);
    margin-top: 8px;
    text-align: center;
}

.grammar-wrapper .footer-btn-right {
    display: none;
    justify-content: flex-end;
}

.grammar-wrapper .empty-editor-right {
    position: absolute;
    top: 200px;
    left: 50%;
    display: flex;
    align-items: center;
    flex-direction: column;
    transform: translateX(-50%);
}

.grammar-wrapper .empty-editor-right .loading-icon {
    width: 60px;
    height: 60px;
}

.grammar-wrapper .footer-btn-right .button-box {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.grammar-wrapper .generate-content {
    overflow: auto;
    width: 100%;
    height: 100%;
    padding-right: 12px;
}


.grammar-wrapper .suggest-item {
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid var(--color-gray);
    border-radius: 10px;
    cursor: pointer;
    transition: all .3s;
}

.grammar-wrapper .suggest-item:hover {
    background: var(--color-purple-light);
}

.grammar-wrapper .suggest-item .suggest-title {
    font-size: 12px;
    color: rgba(42, 48, 72, 0.4);
}

.grammar-wrapper .suggest-item .origin-text,
.grammar-wrapper .suggest-item .correct-text {
    font-size: 14px;
    line-height: 24px;
    display: flex;
    flex-flow: row nowrap;
    justify-content: flex-start;
    align-items: flex-start;
    margin-top: 6px;
}

.grammar-wrapper .suggest-item .correct-text {
    font-weight: 500;
}

.grammar-wrapper .suggest-item .origin-text .diff {
    color: var(--color-red);
    border: 1px solid var(--color-red);
    margin: 0 2px;
}

.grammar-wrapper .suggest-item .correct-text .diff {
    color: #229E03;
    border: 1px solid #229E03;
    margin: 0 2px;
}

.grammar-wrapper .suggest-item .svg-icon {
    width: 16px;
    height: 16px;
    margin-top: 5px;
    margin-right: 6px;
    min-width: 16px;
    color: #333;
}

.grammar-wrapper .suggest-item .button-box {
    display: none;
    margin-top: 6px;
}

.grammar-wrapper .suggest-item .suggest-button {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 5px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid var(--color-gray);
    cursor: pointer;
    background: none;
    transition: all .3s;
}

.grammar-wrapper .suggest-item .accept-btn {
    background: var(--color-primary);
    color: var(--color-white-lighter);
    border: none;
    margin-right: 10px;
}

.grammar-wrapper .suggest-item .accept-btn:hover {
    background: var(--color-primary-dark);
}

.grammar-wrapper .suggest-item .dismiss-btn:hover {
    border-color: var(--color-primary);
    background: rgba(104, 91, 255, 0.1);
    color: var(--color-primary);
}

.grammar-wrapper .fail-box,
.grammar-wrapper .success-box {
    display: none;
    position: absolute;
    top: 120px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    width: 90%;
}

.grammar-wrapper .fail-box .fail-icon {
    width: 200px;
    height: 120px;
}

.grammar-wrapper .fail-box .fail-title {
    font-size: 14px;
    font-weight: 600;
}

.grammar-wrapper .fail-box .fail-desc {
    font-size: 12px;
    color: rgba(42, 48, 72, 0.6);
    margin: 8px auto;
}

.grammar-wrapper .fail-box .regenerate-btn,
.grammar-wrapper .success-box .regenerate-btn {
    height: 36px;
    padding: 7px 20px 8px 20px;
    margin: 0 auto;
}

.grammar-wrapper .success-box .success-icon {
    width: 100px;
    height: 100px;
}

.grammar-wrapper .success-box .success-desc {
    font-weight: 600;
    margin: 20px auto;
}

.grammar-wrapper .success-box .regenerate-btn {
    padding: 10px 24px;
    font-size: 16px;
    height: 44px;
}

@media(max-width: 998px) {
    .grammar-wrapper {
        margin-bottom: 100px;
        padding: 20px 10px;
    }

    .grammar-wrapper .grammar-left,
    .grammar-wrapper .grammar-right {
        width: calc(50% - 6px);
    }

    .grammar-wrapper .editor-title {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .grammar-wrapper .editor-content {
        padding: 10px;
    }

    .grammar-wrapper .editor-box {
        height: calc(100% - 100px);
    }

    .grammar-wrapper .editor-textarea,
    .grammar-wrapper .generate-content {
        padding-right: 10px;
    }
}

@media(max-width: 552px) {
    .grammar-wrapper {
        margin-bottom: 80px;
        justify-content: center;
    }

    .grammar-wrapper .grammar-left,
    .grammar-wrapper .grammar-right {
        width: 100%;
    }

    .grammar-wrapper .grammar-right {
        margin-top: 30px;
    }
}