@keyframes typing {
    0% { width: 0; }
    25% { width: 90%; } /* 从0%到25%进行打字 */
    70% { width: 90%; } /* 从25%到70%保持不变，这里包括了3秒的停顿 */
    100% { width: 0; } /* 从70%到100%进行擦除 */
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: orange; }
}

.typewriter {
    overflow: hidden;
    border-right: 0.15em solid orange;
    white-space: nowrap;
    letter-spacing: 0.15em;
    width: 0;
    animation: 
        typing 10s steps(40, end) infinite, /* 总时长调整为10秒，包括打字、等待和擦除 */
        blink-caret 0.75s step-end infinite;
}

.typewriter::after {
    content: '';
    animation: blink-caret 1s step-end infinite;
}
