*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:"Courier New", monospace;
}

body{

    background:rgb(227, 226, 226);
    color:#805004;

    min-height:100vh;

    display:flex;
    justify-content:center;
    align-items:center;

    padding:30px;

}

.typing-container{

    width:100%;
    max-width:1100px;

}
.title{

    text-align:center;

    font-size:48px;

    color:#805004;

    margin-bottom:40px;

}
.top-bar{

    display:flex;
    justify-content:center;
    gap:25px;
    flex-wrap:wrap;
    margin-bottom:50px;
}
.stat-box{
    background:rgb(255, 252, 252);
    min-width:140px;
    padding:18px;
    border-radius:15px;
    text-align:center;
    box-shadow:0 10px 25px rgba(0,0,0,.08);

}

.label{

    display:block;

    color:#999;

    font-size:14px;

    margin-bottom:10px;

}

.stat-box h2{

    color:#805004;

    font-size:30px;
}
#typing-box{
    background:rgb(255, 252, 252);
    padding:45px;
    border-radius:20px;
    box-shadow:0 15px 40px rgba(0,0,0,.08);
    min-height:260px;
}
#text-display{
    width:100%;
    height:220px;
    overflow-y:auto;
    overflow-x:hidden;
    padding:20px;
    scrollbar-width:none;
    -ms-overflow-style:none;

    font-size:32px; 
    line-height:2.1;
    font-weight:bold;
    
    color:#444;
    scroll-behavior:smooth;
}

#text-display::-webkit-scrollbar{
    display:none;
}

#text-display span{
    color:#b7aaa0;
    transition:.12s;
}
.correct{
    color:#a06608 !important;
}
.incorrect{
    color:#dd1414 !important;
}

.current{
    position:relative;
}
.current::after{

    content:"";
    position:absolute;
    left:0;
    bottom:-6px;
    width:2px;
    height:42px;
    background:#805004;
    animation:blink .8s infinite;
}

@keyframes blink{

50%{

opacity:0;

}

}

/* ===================== */

.buttons{

    text-align:center;

    margin-top:40px;

}

/* ===================== */

button{

    padding:15px 40px;

    font-size:18px;

    border:none;

    border-radius:12px;

    cursor:pointer;

    background:#805004;

    color:white;

    transition:.3s;

}

button:hover{

    background:#603b00;

    transform:translateY(-2px);

}

/* ===================== */

#restart-btn{

    margin-left:15px;

}

/* ===================== */

#result-modal{

    position:fixed;

    inset:0;

    background:rgba(0,0,0,.45);

    display:flex;

    justify-content:center;

    align-items:center;

}

.hidden{

    display:none !important;

}

/* ===================== */

.result-card{

    width:420px;

    background:white;

    border-radius:18px;

    padding:35px;

    text-align:center;

    box-shadow:0 20px 40px rgba(0,0,0,.15);

}

.result-card h2{

    color:#805004;

    margin-bottom:25px;

}

.result-row{

    display:flex;

    justify-content:space-between;

    margin:18px 0;

    font-size:22px;

}

.result-row b{

    color:#805004;

}

#play-again{

    margin-top:25px;

    width:100%;

}

/* ===================== */

@media(max-width:768px){

.title{

font-size:36px;

}

.top-bar{

gap:15px;

}

.stat-box{

min-width:120px;

}

#typing-box{

padding:25px;

}

#text-display{

font-size:24px;

line-height:50px;

}

.current::after{

height:30px;

}

}

@media(max-width:500px){

.title{

font-size:30px;

}

.stat-box{

width:100%;

}

#text-display{

font-size:20px;

line-height:40px;

}

button{

width:100%;

margin-top:15px;

}

#restart-btn{

margin-left:0;

}

.result-card{

width:95%;

}

}