body {
    font-family: 'Courier New', Courier, monospace; /* Font monospaced agar lebar huruf sama */
    background-color: #f0f4f8;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

.wrapper {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    width: 700px;
    text-align: center;
}

.stats-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-weight: bold;
    font-size: 1.2rem;
    color: #333;
}

.typing-box {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    height: 120px;
    overflow: hidden; /* Sembunyikan baris yang meluap */
    text-align: left;
    position: relative;
    cursor: text;
}

.word-display {
    font-size: 1.5rem;
    line-height: 2.5rem;
    user-select: none; /* Agar user tidak bisa copy paste */
}

/* Styling untuk kata dan huruf */
span {
    position: relative;
}

/* Huruf yang benar */
.correct {
    color: #2ecc71;
}

/* Huruf yang salah */
.incorrect {
    color: #e74c3c;
    background-color: #fadbd8;
    border-radius: 3px;
}

/* Kursor berkedip pada huruf yang aktif */
.active {
    border-left: 2px solid #3498db;
}

.input-field {
    opacity: 0; /* Sembunyikan input asli */
    position: absolute;
    z-index: -999;
}

#restart-btn {
    margin-top: 20px;
    padding: 10px 20px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
}

#restart-btn:hover {
    background: #2980b9;
}

/* Modal Hasil */
.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}
.hidden { display: none; }
.modal-content {
    background: white;
    padding: 40px;
    border-radius: 8px;
    text-align: center;
}