:root {
    --bg-color: #1e1e2e;
    --key-bg: #313244;
    --key-text: #cdd6f4;
    --highlight: #89b4fa;  
    --correct: #a6e3a1;    
    --wrong: #f38ba8;      
    --active: #f9e2af;
    --hint: #f9e2af;       /* New Hint Color */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--key-text);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    user-select: none;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 900px;
    width: 100%;
}

h1 { margin-bottom: 5px; letter-spacing: 1px; }
.highlight { color: var(--highlight); }

.stats-bar {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 20px;
    align-items: center;
}

.stat-box { font-size: 1.1rem; font-weight: bold; }

.mode-selector { display: flex; gap: 10px; }

button {
    background: var(--key-bg);
    color: var(--key-text);
    border: 1px solid transparent;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}
button:hover { border-color: var(--highlight); }
button.active { background: var(--highlight); color: var(--bg-color); }

.text-display {
    width: 100%;
    font-size: 1.8rem;
    line-height: 1.5;
    margin-bottom: 20px;
    padding: 25px;
    background: #181825;
    border-radius: 12px;
    min-height: 120px;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.3);
    font-family: 'Courier New', Courier, monospace;
    word-wrap: break-word;
}

.char-correct { color: var(--correct); }
.char-wrong { color: var(--wrong); text-decoration: underline; }
.char-current { background-color: var(--highlight); color: var(--bg-color); border-radius: 2px; }
.char-pending { opacity: 0.4; }

/* NEW: Hint Box Styles */
.hint-box {
    height: 30px;
    margin-bottom: 10px;
    font-weight: bold;
    color: var(--hint);
    text-align: center;
    font-size: 1.1rem;
    transition: opacity 0.2s;
}

.keyboard {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #11111b;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.row { display: flex; gap: 8px; justify-content: center; }

.key {
    width: 55px;
    height: 55px;
    background-color: var(--key-bg);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    font-size: 1.1rem;
    transition: transform 0.1s;
    border-bottom: 4px solid rgba(0,0,0,0.2);
}

.key.space { width: 350px; }
.key.shift { width: 110px; font-size: 0.9rem; }

.key.pressed {
    transform: translateY(4px);
    border-bottom-width: 0;
    background-color: var(--active);
    color: var(--bg-color);
}

.key.target {
    border: 2px solid var(--highlight);
    box-shadow: 0 0 15px rgba(137, 180, 250, 0.3);
}

.notification { margin-top: 20px; height: 20px; color: var(--correct); font-weight: bold; }