/* Scoped styles to prevent affecting WordPress theme */
.mtt-container {
    font-family: Arial, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    border-radius: 5px;
    position: relative;
}

.mtt-title {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #4CAF50;
    background: linear-gradient(to right, #FF9800, #4CAF50);
    color: white;
    padding: 15px;
    border-radius: 5px;
}

.mtt-card {
    background: #fff;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
}

.mtt-text-container {
    position: relative;
    height: 250px;
    overflow: hidden;
    margin-bottom: 15px;
}

.mtt-reference-text {
    padding: 15px;
    line-height: 1.8;
    font-size: 16px;
    background: #fff;
    color: #333;
    text-align: justify;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    transition: transform 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.mtt-reference-text span {
    white-space: pre-wrap;
    word-wrap: break-word;
}

.mtt-user-input {
    width: 100%;
    height: 150px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    resize: none;
    margin-bottom: 15px;
    font-size: 16px;
    line-height: 1.8;
    text-align: justify;
}

.mtt-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
}

.mtt-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.mtt-btn-start {
    background: #4CAF50;
    color: white;
}

.mtt-btn-reset {
    background: #FFC107;
    color: #333;
}

.mtt-timer-container {
    display: none;
    margin: 15px 0;
}

.mtt-timer {
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    color: #c62828;
    padding: 10px;
    border-radius: 5px;
    background: #FFF9C4;
}

.mtt-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.mtt-stat-box {
    background: #f5f5f5;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    border: 1px solid #e0e0e0;
}

.mtt-stat-value {
    font-size: 20px;
    font-weight: bold;
    color: #2E7D32;
}

.mtt-current-char {
    background: #FFEB3B;
    border-radius: 2px;
}

.mtt-correct {
    color: #2E7D32;
}

.mtt-incorrect {
    color: #c62828;
    text-decoration: underline;
}

.mtt-language-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.mtt-language-tab {
    padding: 8px 15px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.mtt-language-tab.active {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

@media (max-width: 768px) {
    .mtt-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .mtt-text-container, .mtt-user-input {
        height: 200px;
    }
    
    .mtt-language-tabs {
        justify-content: center;
    }
}