/* Scoped styles to prevent affecting WordPress theme */
.ett-container {
    font-family: Arial, sans-serif;
    width: 1000px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    border-radius: 5px;
    position: relative;
}

.ett-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;
}

.ett-card {
    background: #fff;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
}

.ett-language-selector {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
}

.ett-language-label {
    background: #c62828;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    min-width: 150px;
    text-align: center;
}

.ett-language-dropdown {
    background: #1a237e;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    min-width: 200px;
    width: auto;
    transition: all 0.3s;
    height: 42px;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.ett-language-dropdown:focus {
    background: #1a237e;
    color: white;
    outline: none;
}

.ett-language-dropdown:hover {
    background: #303f9f;
}

.ett-language-dropdown option {
    background: white;
    color: #333;
    padding: 10px;
}

.ett-language-dropdown option:hover {
    background: #1a237e;
    color: white;
}

.ett-text-container {
    position: relative;
    height: 200px;
    overflow: hidden;
    margin-bottom: 15px;
    background: #fafafa;
}

.ett-reference-text {
    padding: 15px;
    line-height: 2.2;
    font-size: 24px;
    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;
    min-height: 100%;
    box-sizing: border-box;
}

/* RTL text direction for Urdu, Arabic, Hebrew */
.ett-reference-text.rtl {
    direction: rtl;
    text-align: right;
    unicode-bidi: bidi-override;
}

.ett-user-input.rtl {
    direction: rtl;
    text-align: right;
    unicode-bidi: bidi-override;
}

.ett-reference-text .ett-word {
    white-space: pre-wrap;
    word-wrap: break-word;
    transition: all 0.2s;
}

.ett-no-text {
    color: #c62828;
    font-style: italic;
    text-align: center;
    padding: 50px 20px;
    font-size: 18px;
}

.ett-loading {
    text-align: center;
    color: #1a237e;
    font-style: italic;
    padding: 50px 20px;
    font-size: 18px;
}

.ett-user-input {
    width: 100%;
    height: 250px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    resize: none;
    margin-bottom: 15px;
    font-size: 22px;
    line-height: 1.8;
    text-align: justify;
}

.ett-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
}

.ett-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    height: 42px;
    box-sizing: border-box;
}

.ett-btn-start {
    background: #4CAF50;
    color: white;
}

.ett-btn-reset {
    background: #FFC107;
    color: #333;
}

.ett-highlight-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    background: #8e44ad;
    padding: 8px 15px;
    border-radius: 25px;
    color: white;
    font-weight: bold;
}

.ett-toggle-switch {
    position: relative;
    display: inline-block;
    width: 70px;
    height: 30px;
}

.ett-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ett-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e74c3c;
    transition: .4s;
    border-radius: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
}

.ett-toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.ett-toggle-state {
    font-size: 12px;
    font-weight: bold;
    color: white;
    z-index: 1;
}

.ett-toggle-state.ett-on {
    margin-left: 8px;
}

.ett-toggle-state.ett-off {
    margin-right: 8px;
}

.ett-toggle-slider.ett-on {
    background-color: #2ecc71;
}

.ett-toggle-slider.ett-on:before {
    transform: translateX(40px);
}

.ett-toggle-slider.ett-off {
    background-color: #e74c3c;
}

.ett-timer-container {
    display: none;
    margin: 15px 0;
}

.ett-timer {
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    color: #c62828;
    padding: 10px;
    border-radius: 5px;
    background: #FFF9C4;
}

.ett-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.ett-stat-box {
    background: #f5f5f5;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    border: 1px solid #e0e0e0;
}

.ett-stat-value {
    font-size: 20px;
    font-weight: bold;
    color: #2E7D32;
}

.ett-current-word {
    background: #FFEB3B;
    border-radius: 2px;
}

.ett-correct {
    color: #2E7D32;
}

.ett-incorrect {
    color: #c62828;
    /* UNDERLINE REMOVED - only color change */
}

@media (max-width: 1000px) {
    .ett-container {
        width: 95%;
        padding: 15px;
    }
    
    .ett-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ett-text-container {
        height: 200px;
    }
    
    .ett-user-input {
        height: 200px;
        font-size: 18px;
    }
    
    .ett-controls {
        justify-content: center;
    }
    
    .ett-highlight-toggle {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }
    
    .ett-language-selector {
        flex-direction: column;
        align-items: stretch;
    }
    
    .ett-language-label {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .ett-container {
        padding: 10px;
    }
    
    .ett-stats {
        grid-template-columns: 1fr;
    }
    
    .ett-language-dropdown {
        min-width: 100%;
    }
    
    .ett-btn {
        flex-grow: 1;
    }
    
    .ett-reference-text {
        font-size: 20px;
        line-height: 2.0;
    }
    
    .ett-user-input {
        font-size: 16px;
    }
    
    .ett-loading {
        padding: 30px 15px;
        font-size: 16px;
    }
    
    .ett-no-text {
        padding: 30px 15px;
        font-size: 16px;
    }
}