@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
    --bg-color: #323437;
    --sub-gray: #646669;
    --yellow: #e2b714;
    --error: #ca4754;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    display: flex;
    flex-direction: column;
    padding: 0 10px;
    align-items: center;
    min-height: 100vh;
    background: var(--bg-color);

}

::selection {
    color: #fff;
    background: var(--bg-color);
}



.modal-hidden {
    display: none;
}



.wrapper {
    margin-top: 3%;
    width: 90%;
    /* width: 60%;
    padding: 35px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05); */
}

.wrapper .input-field {
    opacity: 0;
    z-index: -999;
    position: absolute;
}

.wrapper .content-box {
    padding: 13px 20px 0;
    border-radius: 10px;
    /* border: 1px solid #bfbfbf; */
}

.content-box {
    position: relative;
}

.content-box .typing-text {
    overflow: hidden;
    max-height: 256px;
}

.typing-text::-webkit-scrollbar {
    width: 0;
}

.typing-text p {
    font-size: 21px;
    text-align: justify;
    letter-spacing: 1px;
    word-break: break-all;
}

.typing-text p span {
    position: relative;
    color: var(--sub-gray);
    font-size: 1.5rem;
    line-height: 1.8;
}

.typing-text p span.correct {
    color: white;
}

.typing-text p span.incorrect {
    color: var(--error);

}

.typing-text p span.active {
    color: var(--sub-gray);
}

.typing-text p span.active::before {
    position: absolute;
    content: "";
    height: 100%;
    width: 3px;
    bottom: 0;
    left: 0;
    opacity: 0;
    border-radius: 5px;
    background: var(--yellow);
    animation: blink 1s ease-in-out infinite;
}

@keyframes blink {
    50% {
        opacity: 1;
    }
}

.content-box .content {
    margin-top: 17px;
    display: flex;
    padding: 8px 0;
    /* flex-wrap: wrap; */
    align-items: center;
    justify-content: center;
    /* border-top: 1px solid #bfbfbf; */
}

.content button {
    outline: none;
    border: none;
    width: 105px;
    color: #fff;
    padding: 8px 0;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    background: var(--bg-color);
    transition: transform 0.3s ease;
}

.content button:active {
    transform: scale(0.97);
}

.content .result-details {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    width: calc(100% - 140px);
    justify-content: space-between;
    position: relative;
}

.result-details li {
    display: none;
    height: 20px;
    list-style: none;
    position: relative;
    align-items: center;
    
}

.result-details li:not(:first-child) {
    padding-left: 22px;
    border-left: 1px solid #bfbfbf;
}

.result-details li p {
    font-size: 19px;
    align-self: center;
    padding-top: 5px;
}

.result-details li span {
    display: block;
    font-size: 20px;
    margin-left: 10px;
    align-self: flex-end;
}

li span b {
    font-weight: 500;
}

li:not(:first-child) span {
    font-weight: 500;
}

@media (max-width: 745px) {
    .wrapper {
        padding: 20px;
    }

    .content-box .content {
        padding: 20px 0;
    }

    .content-box .typing-text {
        max-height: 100%;
    }

    .typing-text p {
        font-size: 19px;
        text-align: left;
    }

    .content button {
        width: 100%;
        font-size: 15px;
        padding: 10px 0;
        margin-top: 20px;
    }

    .content .result-details {
        width: 100%;
    }

    .result-details li:not(:first-child) {
        border-left: 0;
        padding: 0;
    }

    .result-details li p,
    .result-details li span {
        font-size: 17px;
    }
}

@media (max-width: 518px) {
    .wrapper .content-box {
        padding: 10px 15px 0;
    }

    .typing-text p {
        font-size: 18px;
    }

    .result-details li {
        margin-bottom: 10px;
    }

    .content button {
        margin-top: 10px;
    }
}



.modal {
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.time {
    color: var(--yellow);
    z-index: 4;
    position: absolute;
    top: -24px;
    font-size: 26px;
}



.navbar.transparent.navbar-inverse .navbar-inner {
    background: rgba(0, 0, 0, 0.4);
}

.replay-button {
    color: var(--sub-gray);
  
}

.tryAgainBtn {
    position: absolute;
}

.replay-button:hover {
    color: white;
    transition: all 0.35s ease-in-out;
}


.replay-button:active {
    color: var(--yellow);
    transition: all 0.35s ease-in-out;
}

.leaderboard {
    margin: 60px auto;
    text-align: center;
    background-color: var(--bg-color);
    color: var(--sub-gray);
}

.table-dark td,
.table-dark th,
.table-dark thead th {
    border-color: var(--bg-color);
}

.bg-dark {
    background-color: var(--bg-color) !important;
}

.stats {
    width: 300px;
    margin-top: 5%;
    background-color: #2c2e31;
    border-radius: 5px;
    height: 40px;
   
}

.stats-details {
    display: flex;
    justify-content: space-between;

}

.stats-details,li {
    display: flex;
    /* justify-content: center; */

}

li p {
    margin-right: 6px;
    color: var(--sub-gray);
    padding-left: 12px;
    padding-top: 9px;
    padding-bottom: 0;
    margin-bottom: 0;
}

li span {
    color: var(--yellow);
    padding-top: 9px;
    padding-right: 12px;
}

.created-at {
    min-width: 200px;
    font-size: 13px;
}

.leader-wpm {
    color: var(--yellow);
}

.stats-title {
    background-color: #2c2e31;
    padding: 8px 22px;
    margin-left: 12px;
    border-radius: 8px;
}

.welcome {
    margin-left: auto;
    color: white;
    font-size: 22px;
}


