.utst-container {
    font-family: 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', 'Nafees Nastaleeq', Arial, sans-serif;
    max-width: 1000px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    border-radius: 5px;
    box-sizing: border-box;
    width: 100%;
}

.utst-title {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #FFD700;
    background: linear-gradient(to right, #228B22, #FFD700);
    color: white;
    padding: 15px;
    border-radius: 5px;
    width: 100%;
    box-sizing: border-box;
    font-size: 24px;
    font-family: 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', 'Nafees Nastaleeq', Arial, sans-serif;
}

.utst-card {
    background: #fff;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
    box-sizing: border-box;
}

.utst-text-selection-container {
    margin-bottom: 20px;
}

.utst-form-group {
    margin-bottom: 15px;
}

/* ===== SELECT TEXT SECTION ===== */
.utst-text-select-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0px;
    width: 100%;
}

/* Select Text Button - RED COLOR */
.utst-select-label-btn {
    background: #c62828;
    color: white;
    padding: 0 20px;
    border: none;
    border-radius: 40px;
    font-weight: bold;
    width: 160px;
    height: 50px;
    line-height: 50px;
    font-size: 16px;
    border: 2px solid #8B0000;
    cursor: default;
    box-sizing: border-box;
    text-align: center;
    white-space: nowrap;
    flex-shrink: 0;
    font-family: Arial, sans-serif;
}

/* Dropdown - NAVY BLUE */
.utst-text-dropdown {
    background: #1E3D58 !important;
    color: white !important;
    border: 2px solid #FFD700 !important;
    font-weight: bold;
    height: 50px;
    padding: 0 25px;
    border-radius: 40px;
    width: 100%;
    flex: 1;
    box-sizing: border-box;
    font-size: 18px;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23FFD700' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") !important;
    background-repeat: no-repeat !important;
    background-position: right 20px center !important;
    background-size: 20px !important;
    font-family: 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', 'Nafees Nastaleeq', Arial, sans-serif;
}

.utst-text-dropdown option {
    background: #1E3D58;
    color: white;
    padding: 15px 20px;
    font-size: 18px;
    line-height: 2.2;
    min-height: 50px;
    font-family: 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', 'Nafees Nastaleeq', Arial, sans-serif;
}

/* Preview Button */
.utst-btn-preview-text {
    background: #FF8C00;
    color: white;
    white-space: nowrap;
    height: 50px;
    border: none;
    border-radius: 40px;
    padding: 0 25px;
    font-weight: bold;
    cursor: pointer;
    box-sizing: border-box;
    border: 2px solid #CD853F;
    font-size: 16px;
    flex-shrink: 0;
    width: 160px;
    font-family: Arial, sans-serif;
}

/* ===== WORD HIGHLIGHT TOGGLE AND TIME SELECTOR ===== */
.utst-controls-row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 60px;
    margin-bottom: 20px;
    width: 100%;
}

/* Word Highlight Toggle */
.utst-highlight-toggle-container {
    flex: 1;
    display: flex;
    justify-content: flex-start;
}

.utst-highlight-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #660000;
    padding: 0 20px;
    border-radius: 40px;
    color: white;
    font-weight: bold;
    height: 50px;
    box-sizing: border-box;
    border: 2px solid #FFD700;
    width: 100%;
    font-family: Arial, sans-serif;
}

.utst-highlight-label {
    color: white;
    font-weight: bold;
    font-size: 16px;
    white-space: nowrap;
}

.utst-toggle-switch {
    position: relative;
    display: inline-block;
    width: 70px;
    height: 30px;
    flex-shrink: 0;
}

.utst-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.utst-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;
}

.utst-toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.utst-toggle-state {
    font-size: 12px;
    font-weight: bold;
    color: white;
    z-index: 1;
    position: relative;
}

.utst-toggle-state.utst-on {
    margin-left: 8px;
}

.utst-toggle-state.utst-off {
    margin-right: 8px;
}

.utst-toggle-slider.utst-on {
    background-color: #2ecc71;
}

.utst-toggle-slider.utst-on:before {
    transform: translateX(40px);
}

.utst-toggle-slider.utst-off {
    background-color: #e74c3c;
}

/* Time Selector */
.utst-time-selector-container {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.utst-time-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #8e44ad;
    padding: 0 20px;
    border-radius: 40px;
    color: white;
    font-weight: bold;
    height: 50px;
    border: 2px solid #FFD700;
    width: 100%;
    font-family: Arial, sans-serif;
}

.utst-time-label {
    color: white;
    font-weight: bold;
    font-size: 16px;
    white-space: nowrap;
}

.utst-time-dropdown {
    background: white;
    color: #333;
    border: none;
    padding: 0 15px;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
    width: 130px;
    height: 36px;
    box-sizing: border-box;
    font-size: 15px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
    font-family: Arial, sans-serif;
}

/* Start Test button */
.utst-submit-container {
    display: flex;
    justify-content: center;
    margin-top: 100px;
}

.utst-btn-submit {
    background: #2196F3;
    color: white;
    font-size: 18px;
    padding: 0 40px;
    height: 50px;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    font-weight: bold;
    border: 2px solid #1976D2;
    min-width: 200px;
    font-family: Arial, sans-serif;
}

/* Test Header Styles */
.utst-test-header {
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(145deg, #ffffff, #f5f7fa);
    border-radius: 16px;
    border: 1px solid #e9ecef;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
}

.utst-stats-container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    width: 100%;
}

.utst-stat-box {
    flex: 1;
    min-width: 150px;
    padding: 10px;
    border-radius: 14px;
    text-align: center;
    box-sizing: border-box;
}

.utst-ref-stat {
    background: linear-gradient(145deg, #1B4D3E, #2E7D32);
    border: 2px solid #FFD700;
}

.utst-ref-stat .utst-stat-label {
    color: #FFD700;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 8px;
    font-family: Arial, sans-serif;
}

.utst-ref-stat-inner-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.utst-ref-mini-stat-box {
    background: rgba(255,255,255,0.1);
    padding: 5px;
    border-radius: 8px;
    min-width: 60px;
}

.utst-ref-mini-label {
    color: #FFD700;
    font-size: 11px;
    margin-bottom: 3px;
    font-family: Arial, sans-serif;
}

.utst-ref-mini-value {
    color: white;
    font-size: 20px;
    font-weight: bold;
    background: linear-gradient(145deg, #2A5F3A, #1E4E2E);
    padding: 3px 8px;
    border-radius: 8px;
    border: 2px solid #FFD700;
    font-family: 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', 'Nafees Nastaleeq', Arial, sans-serif;
}

.utst-timer-stat {
    background: linear-gradient(145deg, #8B0000, #B22222);
    border: 2px solid #FFD700;
}

.utst-timer-stat .utst-stat-label {
    color: #FFD700;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 8px;
    font-family: Arial, sans-serif;
}

.utst-timer-stat .utst-stat-value {
    background: rgba(255,255,255,0.95);
    color: #8B0000;
    border: 3px solid #FFD700;
    font-size: 26px;
    font-weight: bold;
    padding: 8px;
    border-radius: 10px;
    display: inline-block;
    min-width: 100px;
    font-family: 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', 'Nafees Nastaleeq', Arial, sans-serif;
}

.utst-user-stat {
    background: linear-gradient(145deg, #FF8C00, #FFA500);
    border: 2px solid #1E3D58;
}

.utst-user-stat .utst-stat-label {
    color: #1E3D58;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 8px;
    font-family: Arial, sans-serif;
}

.utst-user-stat-inner-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.utst-user-mini-stat-box {
    background: rgba(255,255,255,0.2);
    padding: 5px;
    border-radius: 8px;
    min-width: 60px;
}

.utst-user-mini-label {
    color: #1E3D58;
    font-size: 11px;
    margin-bottom: 3px;
    font-family: Arial, sans-serif;
}

.utst-user-mini-value {
    color: #1E3D58;
    font-size: 20px;
    font-weight: bold;
    background: #FFE5D9;
    padding: 3px 8px;
    border-radius: 8px;
    border: 2px solid #1E3D58;
    font-family: 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', 'Nafees Nastaleeq', Arial, sans-serif;
}

/* ===== TEXT CONTAINER - COMPLETELY HIDDEN SCROLLBAR ===== */
.utst-text-container {
    height: 350px;
    overflow: hidden;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #f9f9f9;
    margin-bottom: 15px;
    position: relative;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.utst-text-container::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.utst-reference-text {
    padding: 20px;
    line-height: 2.8;
    font-size: 24px;
    background: #fff;
    font-family: 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', 'Nafees Nastaleeq', Arial, sans-serif;
    position: relative;
    word-wrap: break-word;
    text-align: right;
    direction: rtl;
    unicode-bidi: embed;
    will-change: transform;
    transition: transform 0.15s ease-out;
    transform: translateY(0);
    min-height: 100%;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Word highlighting styles */
.utst-word {
    display: inline;
    padding: 2px 4px;
    border-radius: 3px;
    transform: none !important;
    transition: none !important;
    unicode-bidi: embed;
    font-family: 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', 'Nafees Nastaleeq', Arial, sans-serif;
    font-size: 24px;
    line-height: 2.8;
}

.utst-word-correct {
    background-color: #E8F5E9 !important;
    color: #2E7D32 !important;
    border-bottom: 2px solid #2E7D32;
}

.utst-word-incorrect {
    background-color: #FFEBEE !important;
    color: #c62828 !important;
    border-bottom: 2px solid #c62828;
    text-decoration: line-through;
    text-decoration-color: #c62828;
}

.utst-current-word {
    background-color: #FFF9C4 !important;
    box-shadow: 0 0 0 2px #FFD700 !important;
    border-radius: 3px;
}

/* Countdown message styles */
.utst-countdown-message {
    font-size: 24px;
    text-align: center;
    color: #2E7D32;
    padding: 20px;
    background: #E8F5E9;
    margin: 20px 0;
    border-radius: 5px;
    font-family: Arial, sans-serif;
}

.utst-countdown {
    font-size: 48px;
    font-weight: bold;
    text-align: center;
    color: #c62828;
    padding: 20px;
    background: #FFF9C4;
    margin: 20px 0;
    border-radius: 5px;
    font-family: 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', 'Nafees Nastaleeq', Arial, sans-serif;
}

.utst-main-content {
    margin-top: 20px;
}

.utst-typing-area-container {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    background: #f9f9f9;
    margin-bottom: 15px;
}

.utst-typing-label {
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    font-size: 18px;
    text-align: left;
    font-family: Arial, sans-serif;
}

.utst-user-input {
    width: 100%;
    min-height: 80px;
    max-height: 80px;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    resize: none;
    font-size: 26px;
    font-family: 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', 'Nafees Nastaleeq', Arial, sans-serif;
    direction: rtl;
    text-align: right;
    box-sizing: border-box;
    line-height: 2.2;
    background: #fff;
    unicode-bidi: plaintext;
}

.utst-user-input:focus {
    outline: 2px solid #FFD700;
    outline-offset: 2px;
    border-color: #ccc;
}

.utst-user-input::placeholder {
    font-family: 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', 'Nafees Nastaleeq', Arial, sans-serif;
    color: #999;
    font-size: 22px;
    opacity: 0.7;
}

/* Report Styles */
.utst-report {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
    border: 1px solid #e0e0e0;
}

.utst-report-title {
    text-align: center;
    color: #2E7D32;
    border-bottom: 2px solid #2E7D32;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-family: 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', 'Nafees Nastaleeq', Arial, sans-serif;
}

.utst-report-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.utst-report-table th,
.utst-report-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.utst-report-table th {
    background-color: #f2f2f2;
    font-weight: bold;
    font-family: Arial, sans-serif;
}

.utst-report-table td {
    font-family: 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', 'Nafees Nastaleeq', Arial, sans-serif;
    font-size: 18px;
}

.utst-highlight-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 20px;
    display: inline-block;
    font-family: 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', 'Nafees Nastaleeq', Arial, sans-serif;
}

.utst-highlight-yellow {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #000;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 18px;
    display: inline-block;
    font-family: 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', 'Nafees Nastaleeq', Arial, sans-serif;
}

.utst-report-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 20px 0;
    flex-wrap: wrap;
}

.utst-btn-retest {
    background: #FF9800;
    color: white;
    min-width: 120px;
    padding: 12px 25px;
    border: none;
    border-radius: 40px;
    font-weight: bold;
    cursor: pointer;
    border: 2px solid #F57C00;
    height: 50px;
    font-size: 16px;
    font-family: Arial, sans-serif;
}

.utst-btn-preview {
    background: #9C27B0;
    color: white;
    min-width: 120px;
    padding: 12px 25px;
    border: none;
    border-radius: 40px;
    font-weight: bold;
    cursor: pointer;
    border: 2px solid #7B1FA2;
    height: 50px;
    font-size: 16px;
    font-family: Arial, sans-serif;
}

/* Modal Styles */
.utst-fulltext-modal,
.utst-preview-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
}

.utst-fulltext-content,
.utst-preview-content {
    background: white;
    margin: 50px auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.utst-fulltext-close,
.utst-preview-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
    color: #666;
}

.utst-fulltext-close:hover,
.utst-preview-close:hover {
    color: #000;
}

.utst-fulltext-title,
.utst-preview-title {
    color: #2E7D32;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #FFD700;
    font-family: 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', 'Nafees Nastaleeq', Arial, sans-serif;
}

.utst-fulltext-preview {
    margin-top: 20px;
}

.utst-fulltext-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 5px;
    justify-content: center;
}

.utst-fulltext-stat {
    background: #1E3D58;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-family: 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', 'Nafees Nastaleeq', Arial, sans-serif;
}

.utst-fulltext-body {
    font-size: 24px;
    line-height: 2.5;
    font-family: 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', 'Nafees Nastaleeq', Arial, sans-serif;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 5px;
    border: 1px solid #ddd;
    max-height: 400px;
    overflow-y: auto;
    direction: rtl;
    text-align: right;
    unicode-bidi: embed;
}

/* Preview text styles */
.utst-preview-section {
    margin-bottom: 25px;
}

.utst-preview-section h3 {
    color: #1E3D58;
    margin-bottom: 10px;
    font-size: 18px;
    text-align: left;
    font-family: Arial, sans-serif;
}

.utst-preview-text {
    font-size: 22px;
    line-height: 2.2;
    font-family: 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', 'Nafees Nastaleeq', Arial, sans-serif;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 5px;
    border: 1px solid #ddd;
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    direction: rtl;
    text-align: right;
    unicode-bidi: embed;
}

.utst-typed-text .utst-preview-text {
    border-left: 4px solid #4CAF50;
    border-right: none;
}

.utst-reference-preview .utst-preview-text {
    border-left: 4px solid #FF9800;
    border-right: none;
}

/* Button hover effects */
.utst-btn-preview-text:hover,
.utst-btn-submit:hover,
.utst-btn-retest:hover,
.utst-btn-preview:hover {
    opacity: 0.9;
    transform: scale(1.02);
    transition: all 0.2s;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Desktop Large */
@media (min-width: 1024px) {
    .utst-text-select-wrapper {
        flex-direction: row;
    }
    .utst-reference-text {
        font-size: 24px;
    }
    .utst-word {
        font-size: 24px;
    }
}

/* Desktop Medium */
@media (max-width: 1023px) and (min-width: 769px) {
    .utst-text-select-wrapper {
        flex-direction: row;
    }
    .utst-select-label-btn,
    .utst-btn-preview-text {
        width: 140px;
    }
    .utst-reference-text {
        font-size: 22px;
    }
    .utst-word {
        font-size: 22px;
    }
    .utst-user-input {
        font-size: 22px;
    }
}

/* Tablet */
@media (max-width: 768px) {
    .utst-container {
        padding: 15px;
    }
    
    .utst-text-select-wrapper {
        flex-wrap: wrap;
        gap: 10px;
    }
    .utst-select-label-btn,
    .utst-text-dropdown,
    .utst-btn-preview-text {
        width: 100%;
    }
    .utst-controls-row {
        flex-direction: column;
        gap: 15px;
        margin-top: 40px;
    }
    .utst-highlight-toggle-container,
    .utst-time-selector-container {
        width: 100%;
        justify-content: center;
    }
    .utst-highlight-toggle,
    .utst-time-selector {
        max-width: 100%;
    }
    .utst-stats-container {
        flex-direction: column;
    }
    .utst-stat-box {
        width: 100%;
        min-width: 100%;
    }
    .utst-submit-container {
        margin-top: 60px;
    }
    .utst-text-container {
        height: 300px;
    }
    .utst-reference-text {
        font-size: 20px;
        line-height: 2.5;
    }
    .utst-word {
        font-size: 20px;
        line-height: 2.5;
    }
    .utst-user-input {
        font-size: 20px;
        min-height: 100px;
    }
}

/* Mobile Large */
@media (max-width: 480px) {
    .utst-container {
        padding: 10px;
    }
    .utst-card {
        padding: 15px;
    }
    .utst-select-label-btn,
    .utst-btn-preview-text {
        height: 45px;
        line-height: 45px;
        font-size: 14px;
    }
    .utst-text-dropdown {
        height: 45px;
        font-size: 16px;
    }
    .utst-highlight-toggle,
    .utst-time-selector {
        padding: 0 15px;
        height: 45px;
    }
    .utst-time-dropdown {
        width: 120px;
        font-size: 14px;
    }
    .utst-btn-submit {
        height: 45px;
        font-size: 16px;
        min-width: 180px;
    }
    .utst-reference-text {
        font-size: 18px;
        padding: 15px;
        line-height: 2.5;
    }
    .utst-word {
        font-size: 18px;
        line-height: 2.5;
    }
    .utst-user-input {
        font-size: 18px;
        min-height: 80px;
    }
    .utst-timer-stat .utst-stat-value {
        font-size: 24px;
        min-width: 100px;
    }
    .utst-ref-mini-value,
    .utst-user-mini-value {
        font-size: 18px;
    }
    .utst-report-buttons {
        flex-direction: column;
    }
    .utst-btn-retest,
    .utst-btn-preview {
        width: 100%;
    }
    .utst-controls-row {
        margin-top: 30px;
    }
    .utst-submit-container {
        margin-top: 50px;
    }
    .utst-fulltext-content,
    .utst-preview-content {
        margin: 20px auto;
        padding: 20px;
        width: 95%;
    }
    .utst-fulltext-body {
        font-size: 18px;
        line-height: 2.2;
    }
    .utst-preview-text {
        font-size: 18px;
        line-height: 2.2;
    }
}

/* Mobile Small */
@media (max-width: 360px) {
    .utst-time-selector {
        flex-direction: column;
        height: auto;
        padding: 12px;
        gap: 10px;
    }
    .utst-time-dropdown {
        width: 100%;
    }
    .utst-highlight-toggle {
        flex-wrap: wrap;
        justify-content: center;
        height: auto;
        padding: 12px;
        gap: 10px;
    }
    .utst-highlight-label {
        width: 100%;
        text-align: center;
    }
    .utst-reference-text {
        font-size: 16px;
        line-height: 2.5;
        padding: 12px;
    }
    .utst-word {
        font-size: 16px;
        line-height: 2.5;
    }
    .utst-user-input {
        font-size: 16px;
    }
    .utst-controls-row {
        margin-top: 25px;
    }
    .utst-submit-container {
        margin-top: 40px;
    }
    .utst-stat-box {
        padding: 8px;
    }
    .utst-ref-mini-stat-box,
    .utst-user-mini-stat-box {
        min-width: 50px;
    }
}

/* Utility Classes */
.utst-hidden {
    display: none !important;
}

.utst-text-center {
    text-align: center;
}

.utst-mt-20 {
    margin-top: 20px;
}

.utst-mb-20 {
    margin-bottom: 20px;
}

/* Ensure all elements use border-box */
* {
    box-sizing: border-box;
}

/* Remove default appearance for form elements */
.utst-user-input,
.utst-text-dropdown,
.utst-time-dropdown {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Focus states for accessibility */
.utst-btn:focus,
.utst-text-dropdown:focus,
.utst-time-dropdown:focus,
.utst-user-input:focus {
    outline: 2px solid #FFD700;
    outline-offset: 2px;
}

/* Loading state */
.utst-loading {
    text-align: center;
    color: #1E3D58;
    font-style: italic;
    padding: 50px 20px;
    font-size: 18px;
    font-family: Arial, sans-serif;
}

/* No text state */
.utst-no-text {
    color: #c62828;
    font-style: italic;
    text-align: center;
    padding: 50px 20px;
    font-size: 18px;
    font-family: 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', 'Nafees Nastaleeq', Arial, sans-serif;
}

/* Word count label in admin */
.utst-word-count-label {
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 3px;
    background: #f5f5f5;
    font-family: Arial, sans-serif;
}

.utst-zero-count {
    background: #ffebee;
    color: #c62828;
}

/* Counter display in admin */
.utst-counter-display {
    margin-top: 10px;
    display: flex;
    gap: 20px;
    background: #fff;
    padding: 10px;
    border-radius: 5px;
    text-align: right;
    font-family: Arial, sans-serif;
}

.utst-word-count-green {
    color: #2E7D32 !important;
    font-weight: bold;
}

.utst-char-count-red {
    color: #c62828 !important;
    font-weight: bold;
}

/* RTL Specific Styles */
[dir="rtl"] {
    text-align: right;
}

.utst-reference-text .utst-word:last-child {
    margin-left: 0;
    margin-right: 0;
}

/* Ensure proper spacing for RTL text */
.utst-reference-text span + span {
    margin-right: 2px;
}

/* Fix for cursor position in RTL textarea */
.utst-user-input {
    text-indent: 0;
    padding-right: 12px;
    padding-left: 12px;
}