.tool-content {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.stats-bar {
    display: flex;
    justify-content: space-around;
    margin-bottom: 2rem;
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
}

.stat-box {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.2rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #007bff;
}

.typing-area {
    margin-bottom: 2rem;
}

.word-display {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1.5rem;
    font-size: 1.5rem;
    line-height: 2;
    height: 150px;
    overflow: hidden;
    position: relative;
    user-select: none;
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 10px;
}

.word-display .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    font-size: 1.2rem;
    font-weight: bold;
}

.word-display span {
    padding: 2px 4px;
    border-radius: 4px;
}

.word-display span.correct {
    color: #28a745;
}

.word-display span.incorrect {
    color: #dc3545;
    background-color: #f8d7da;
}

.word-display span.current {
    background-color: #e2e6ea;
    text-decoration: underline;
}

.input-field {
    width: 100%;
    padding: 1rem;
    font-size: 1.2rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s;
}

.input-field:focus {
    border-color: #007bff;
}

.controls {
    text-align: center;
}

.result-modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    border-radius: 12px;
}

.result-modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 80%;
}

.final-stats {
    display: flex;
    justify-content: space-around;
    margin: 2rem 0;
}

.final-stat {
    display: flex;
    flex-direction: column;
}

.final-stat .label {
    font-size: 1rem;
    color: #666;
}

.final-stat .value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #28a745;
}

.final-stat .sub-label {
    font-size: 0.8rem;
    color: #999;
}