/* =========================================
   BODY
========================================= */

body{

    margin:0;

    font-family:Arial;

    background:
    linear-gradient(to right,
    #020617,
    #0f172a,
    #020617);

    color:white;

    overflow:hidden;

}



/* =========================================
   MAIN PAGE
========================================= */

.typing-page{

    width:100%;

    min-height:100vh;

    display:flex;

    flex-direction:column;

    justify-content:center;

    align-items:center;

}



/* =========================================
   TYPING WRAPPER
========================================= */

.typing-wrapper{

    width:100%;

    display:flex;

    justify-content:center;

    position:relative;

}



/* =========================================
   ESC EXIT
========================================= */

.esc-tip{

    position:absolute;

    top:18px;

    left:22px;

    width:42px;

    height:42px;

    display:flex;

    justify-content:center;

    align-items:center;

    background:rgba(255,255,255,0.05);

    border:1px solid rgba(255,255,255,0.08);

    border-radius:12px;

    color:#cbd5e1;

    font-size:22px;

    cursor:pointer;

    backdrop-filter:blur(10px);

    transition:0.2s;

}



.esc-tip:hover{

    background:rgba(255,255,255,0.12);

    color:white;

}



/* =========================================
   TYPING BOX
========================================= */

.typing-box{

    width:78%;

    height:200px;

    background:rgba(255,255,255,0.04);

    border:1px solid rgba(255,255,255,0.08);

    border-radius:28px;

    padding:30px 35px;

    backdrop-filter:blur(12px);

    margin:35px auto 0 auto;

    overflow:hidden;

    position:relative;

}



/* =========================================
   TYPING TEXT
========================================= */

.typing-text{

    font-size:30px;

    line-height:32px;

    color:#e2e8f0;

    width:100%;

    height:100%;

    overflow-y:auto;

    padding-right:10px;

    font-family:

    "Consolas",
    "Courier New",
    monospace;

    font-weight:500;

    letter-spacing:0.5px;

}



/* =========================================
   SCROLLBAR
========================================= */

.typing-text::-webkit-scrollbar{

    width:5px;

}


.typing-text::-webkit-scrollbar-thumb{

    background:#334155;

    border-radius:20px;

}



/* =========================================
   HIDDEN INPUT
========================================= */

.hidden-input{

    opacity:0;

    position:absolute;

    left:-9999px;

}



/* =========================================
   CORRECT / WRONG
========================================= */

.correct{

    color:#22c55e;

}


.wrong{

    color:#ef4444;

}


.current{

    border-bottom:4px solid #eab308;

}



/* =========================================
   CURRENT WORD
========================================= */

.current-word{

    border-bottom:4px solid #2563eb;

    padding-bottom:6px;

}



/* =========================================
   KEYBOARD
========================================= */

.keyboard{

    width:68%;

    margin-top:18px;

}



/* =========================================
   KEY ROW
========================================= */

.key-row{

    display:flex;

    justify-content:center;

    gap:6px;

    margin-bottom:10px;

}



/* =========================================
   SINGLE KEY
========================================= */

.key{

    width:44px;

    height:44px;

    background:rgba(255,255,255,0.05);

    border:1px solid rgba(255,255,255,0.08);

    border-radius:14px;

    display:flex;

    justify-content:center;

    align-items:center;

    font-size:15px;

    color:#cbd5e1;

    backdrop-filter:blur(10px);

    transition:0.15s;

}



/* =========================================
   LARGE KEYS
========================================= */

.space-key{

    width:420px;

}


.enter-key{

    width:120px;

}


.shift-key{

    width:130px;

}


.tab-key{

    width:95px;

}


.caps-key{

    width:110px;

}


.backspace-key{

    width:120px;

}



/* =========================================
   ACTIVE KEY
========================================= */

.active-key{

    background:#2563eb;

    color:white;

    transform:scale(1.08);

    box-shadow:0px 0px 20px #2563eb;

}



/* =========================================
   MOBILE
========================================= */

@media(max-width:768px){

    body{

        overflow:auto;

    }


    .typing-page{

        padding:20px 0;

    }


    .typing-box{

        width:92%;

        min-height:auto;

        padding:25px;

    }


    .typing-text{

        font-size:20px;

        line-height:45px;

    }


    .keyboard{

        width:95%;

        overflow-x:auto;

    }


    .key{

        width:42px;

        height:42px;

        font-size:14px;

    }


    .space-key{

        width:220px;

    }

}

/* =========================================
   RESULT POPUP
========================================= */

.result-popup{

    position:fixed;

    top:0;

    left:0;

    width:100%;

    height:100vh;

    background:rgba(0,0,0,0.72);

    display:flex;

    justify-content:center;

    align-items:center;

    z-index:999999;

    visibility:hidden;

    opacity:0;

    transition:0.3s;

}



/* =========================================
   RESULT BOX
========================================= */

.result-box{

    width:650px;

    background:

    linear-gradient(
    to bottom right,
    rgba(255,255,255,0.08),
    rgba(255,255,255,0.04)
    );

    border:1px solid rgba(255,255,255,0.08);

    border-radius:28px;

    padding:45px;

    text-align:center;

    backdrop-filter:blur(18px);

    box-shadow:

    0px 20px 45px rgba(0,0,0,0.35);

}



/* =========================================
   RESULT TITLE
========================================= */

.result-title{

    font-size:42px;

    margin-top:0;

    color:white;

}



/* =========================================
   RESULT STATS
========================================= */

.result-stats{

    display:flex;

    justify-content:space-between;

    gap:18px;

    margin-top:35px;

}



/* =========================================
   RESULT CARD
========================================= */

.result-card{

    flex:1;

    background:rgba(255,255,255,0.05);

    border:1px solid rgba(255,255,255,0.08);

    border-radius:20px;

    padding:28px 20px;

}



/* =========================================
   RESULT NUMBER
========================================= */

.result-card h2{

    font-size:42px;

    margin:0;

    color:#60a5fa;

}



/* =========================================
   RESULT TEXT
========================================= */

.result-card p{

    color:#cbd5e1;

    margin-top:10px;

    font-size:16px;

}



/* =========================================
   RESULT MESSAGE
========================================= */

.result-message{

    margin-top:35px;

    color:#cbd5e1;

    font-size:18px;

    line-height:32px;

}



/* =========================================
   RESULT BUTTONS
========================================= */

.result-buttons{

    display:flex;

    justify-content:center;

    gap:20px;

    margin-top:35px;

}



/* =========================================
   RESTART BUTTON
========================================= */

.restart-result-btn{

    background:#2563eb;

    color:white;

    border:none;

    padding:16px 32px;

    border-radius:14px;

    font-size:18px;

    cursor:pointer;

}



/* =========================================
   HOME BUTTON
========================================= */

.home-result-btn{

    background:rgba(255,255,255,0.08);

    color:white;

    border:1px solid rgba(255,255,255,0.08);

    padding:16px 32px;

    border-radius:14px;

    font-size:18px;

    cursor:pointer;

}

/* =========================================
   FLOATING TIMER
========================================= */

.floating-timer{

    position:absolute;

    top:18px;

    right:22px;

    min-width:90px;

    height:42px;

    display:flex;

    justify-content:center;

    align-items:center;

    background:rgba(255,255,255,0.05);

    border:1px solid rgba(255,255,255,0.08);

    border-radius:14px;

    color:#f8fafc;

    font-size:18px;

    font-weight:600;

    backdrop-filter:blur(10px);

    letter-spacing:1px;

}