.fira-code {
    font-family: 'Fira Code', monospace;
}

.glass-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.stats-bar {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 2rem;
    width: 100%;
    max-width: 800px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.stat-val {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

#time-display { color: #facc15; text-shadow: 0 0 10px rgba(250, 204, 21, 0.4); }
#wpm-display { color: #22d3ee; text-shadow: 0 0 10px rgba(34, 211, 238, 0.4); }
#acc-display { color: #ec4899; text-shadow: 0 0 10px rgba(236, 72, 153, 0.4); }

.typing-box {
    position: relative;
    width: 100%;
    max-width: 800px;
    min-height: 200px;
    font-size: 1.5rem;
    line-height: 1.6;
    color: #475569; /* Un-typed text color */
    overflow: hidden;
    cursor: text;
}

/* Character styling states */
.char {
    transition: color 0.1s;
}

.char.correct {
    color: #e2e8f0; /* Typed correct text */
}

.char.wrong {
    color: #ef4444; /* Typed wrong text */
    background: rgba(239,68,68,0.2);
    border-radius: 3px;
    text-shadow: 0 0 5px #ef4444;
}

.char.cursor-active {
    border-left: 2px solid #22d3ee;
    animation: blink 1s infinite step-end;
}

@keyframes blink {
    0%, 100% { border-color: #22d3ee; box-shadow: -2px 0 5px rgba(34, 211, 238, 0.5); }
    50% { border-color: transparent; box-shadow: none; }
}

#hidden-input {
    position: absolute;
    opacity: 0;
    top: 50%;
    left: -9999px; /* keep offscreen but focusable */
    width: 1px;
    height: 1px;
}

.overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
    transition: opacity 0.3s;
    z-index: 10;
}

.overlay p {
    font-size: 1.5rem;
    color: #22d3ee;
    text-shadow: 0 0 10px rgba(34, 211, 238, 0.5);
    animation: floating 2s infinite ease-in-out;
}

@keyframes floating {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@media (max-width: 600px) {
    .typing-box {
        font-size: 1.2rem;
        padding: 1.5rem;
    }
    .stats-bar {
        gap: 1.5rem;
    }
    .stat-val {
        font-size: 2rem;
    }
}
