/*
Typing Speed Game
-----------------
License : Apache 2.0 License
Author  : Md Mahbubur Rahman
URL     : https://m-a-h-b-u-b.github.io
GitHub  : https://github.com/m-a-h-b-u-b/typing-speed-game
*/

body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f4f4f9;
}

.container {
    text-align: center;
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0px 0px 15px rgba(0,0,0,0.1);
    width: 90%;
    max-width: 600px;
}

#text-to-type {
    font-size: 20px;
    margin-bottom: 10px;
    min-height: 60px;
}

textarea {
    width: 100%;
    height: 100px;
    padding: 10px;
    font-size: 18px;
    border-radius: 5px;
    border: 1px solid #ccc;
    resize: none;
}

.info {
    margin-top: 15px;
    font-size: 18px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

button {
    margin-top: 15px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border: none;
    background-color: #4CAF50;
    color: white;
    border-radius: 5px;
}
button:hover {
    background-color: #45a049;
}

/* Highlighting text */
.correct {
    color: green;
}

.incorrect {
    color: red;
}

.current {
    text-decoration: underline;
    font-weight: bold;
}

/* Progress bar */
.progress-container {
    width: 100%;
    height: 20px;
    background-color: #ddd;
    border-radius: 10px;
    margin: 15px 0;
    overflow: hidden;
}

#time-bar {
    height: 100%;
    width: 100%;
    background-color: #4CAF50;
    transition: width 0.2s linear, background-color 0.3s linear;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fff;
    margin: auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
}

.modal-content button {
    padding: 10px 20px;
    margin-top: 15px;
    border: none;
    border-radius: 5px;
    background-color: #4CAF50;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

.modal-content button:hover {
    background-color: #45a049;
}
