/* Hindi Typing Test Styles - COMPLETELY SEPARATE */
.htt-container {
    font-family: Arial, sans-serif;
    max-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;
}

.htt-title {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #FFD700;
    background: linear-gradient(to right, #1565C0, #FFD700);
    color: white;
    padding: 15px;
    border-radius: 5px;
}

.htt-card {
    background: #fff;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
}

.htt-text-container {
    position: relative;
    height: 200px;
    overflow: hidden;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #f9f9f9;
}

.htt-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;
    font-family: 'Nirmala UI', 'Arial Unicode MS', Arial, sans-serif;
    direction: ltr;
    text-align: justify;
    text-justify: inter-word;
    word-spacing: normal;
    letter-spacing: normal;
}

.htt-reference-text .htt-word {
    white-space: pre-wrap;
    word-wrap: break-word;
    transition: all 0.2s;
    display: inline;
    margin: 0;
    padding: 0;
}

.htt-word-correct {
    color: #2E7D32;
}

.htt-word-incorrect {
    color: #c62828;
    background-color: #ffebee;
}

.htt-current-word {
    background-color: #FFF9C4;
}

.htt-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;
    font-family: 'Nirmala UI', 'Arial Unicode MS', Arial, sans-serif;
    direction: ltr;
    text-align: left;
}

.htt-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
    justify-content: center;
}

.htt-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    height: 42px;
    box-sizing: border-box;
}

.htt-btn-start {
    background: #4CAF50;
    color: white;
}

.htt-btn-submit {
    background: #2196F3;
    color: white;
    font-size: 18px;
    padding: 12px 30px;
    margin-top: 10px;
    width: auto;
    min-width: 200px;
}

.htt-btn-retest {
    background: #FF9800;
    color: white;
    font-size: 18px;
    padding: 12px 30px;
}

.htt-btn-share {
    background: #4CAF50;
    color: white;
    font-size: 18px;
    padding: 12px 30px;
}

.htt-btn-preview {
    background: #9C27B0;
    color: white;
    font-size: 18px;
    padding: 12px 30px;
}

.htt-submit-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.htt-report-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 20px 0;
    flex-wrap: wrap;
}

.htt-timer-container {
    margin: 15px 0;
    text-align: center;
}

.htt-timer {
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    color: #c62828;
    padding: 10px;
    border-radius: 5px;
    background: #FFF9C4;
}

.htt-countdown {
    font-size: 48px;
    font-weight: bold;
    text-align: center;
    color: #c62828;
    padding: 20px;
    border-radius: 5px;
    background: #FFF9C4;
    margin: 20px 0;
}

.htt-countdown-message {
    font-size: 24px;
    text-align: center;
    color: #2E7D32;
    padding: 20px;
    border-radius: 5px;
    background: #E8F5E9;
    margin: 20px 0;
}

.htt-registration-form {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
}

.htt-form-group {
    margin-bottom: 15px;
}

.htt-form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.htt-form-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.htt-report {
    display: none;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
    margin-top: 20px;
    border: 1px solid #e0e0e0;
}

.htt-report-title {
    text-align: center;
    margin-bottom: 20px;
    color: #2E7D32;
    border-bottom: 2px solid #2E7D32;
    padding-bottom: 10px;
}

.htt-report-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.htt-report-table th, .htt-report-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.htt-report-table th {
    background-color: #f2f2f2;
    font-weight: bold;
}

.htt-report-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Highlighted numbers in report */
.htt-highlight-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 20px;
    text-align: center;
    display: inline-block;
    min-width: 80px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Yellow highlight for user info */
.htt-highlight-yellow {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #000;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 18px;
    text-align: center;
    display: inline-block;
    min-width: 80px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.htt-time-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #8e44ad;
    padding: 8px 15px;
    border-radius: 25px;
    color: white;
    font-weight: bold;
    margin-bottom: 15px;
    justify-content: center;
}

.htt-time-dropdown {
    background: white;
    color: #333;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    width: 150px;
    min-width: 150px;
    max-width: 150px;
    box-sizing: border-box;
}

/* Preview Modal Styles */
.htt-preview-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    overflow-y: auto;
}

.htt-preview-content {
    background: white;
    margin: 50px auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    position: relative;
}

.htt-preview-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
    color: #666;
}

.htt-preview-close:hover {
    color: #000;
}

.htt-preview-section {
    margin-bottom: 25px;
    padding: 20px;
    border-radius: 8px;
    background: #f9f9f9;
}

.htt-preview-title {
    color: #2E7D32;
    border-bottom: 2px solid #2E7D32;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.htt-preview-text {
    line-height: 1.8;
    font-size: 16px;
    text-align: justify;
    white-space: pre-wrap;
    font-family: 'Nirmala UI', 'Arial Unicode MS', Arial, sans-serif;
    direction: ltr;
    text-align: justify;
    text-justify: inter-word;
}

.htt-typed-text {
    background: #E3F2FD;
    border-left: 4px solid #2196F3;
}

.htt-reference-preview {
    background: #FFF8E1;
    border-left: 4px solid #FF9800;
}

.htt-comparison-preview {
    background: #FFF3E0;
    border-left: 4px solid #FF9800;
}

/* Underline for incorrect words in preview */
.htt-incorrect-word {
    text-decoration: underline;
    text-decoration-color: #c62828;
    text-decoration-thickness: 2px;
    background-color: #ffebee;
    padding: 2px 4px;
    border-radius: 3px;
}

/* Social Share Modal Styles */
.htt-share-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
}

.htt-share-content {
    background: white;
    margin: 100px auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
    text-align: center;
}

.htt-share-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
    color: #666;
}

.htt-share-close:hover {
    color: #000;
}

.htt-share-title {
    color: #2E7D32;
    margin-bottom: 25px;
    border-bottom: 2px solid #2E7D32;
    padding-bottom: 10px;
}

.htt-share-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
}

.htt-share-btn {
    padding: 15px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    color: white;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.htt-share-whatsapp {
    background: #25D366;
}

.htt-share-facebook {
    background: #3b5998;
}

.htt-share-twitter {
    background: #1DA1F2;
}

.htt-share-linkedin {
    background: #0077B5;
}

.htt-share-copy {
    background: #6c757d;
    grid-column: span 2;
}

.htt-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Responsive Design */
@media (max-width: 1000px) {
    .htt-container {
        width: 95%;
        padding: 15px;
    }
    
    .htt-text-container {
        height: 200px;
    }
    
    .htt-user-input {
        height: 200px;
        font-size: 18px;
    }
    
    .htt-controls {
        justify-content: center;
    }
    
    .htt-time-selector {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }
    
    .htt-report-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .htt-report-buttons .htt-btn {
        width: 200px;
    }
    
    .htt-share-buttons {
        grid-template-columns: 1fr;
    }
    
    .htt-share-copy {
        grid-column: span 1;
    }
}

@media (max-width: 480px) {
    .htt-container {
        padding: 10px;
    }
    
    .htt-btn {
        flex-grow: 1;
    }
    
    .htt-reference-text {
        font-size: 20px;
        line-height: 2.0;
    }
    
    .htt-user-input {
        font-size: 16px;
    }
    
    .htt-highlight-number {
        font-size: 18px;
        min-width: 70px;
        padding: 6px 12px;
    }
    
    .htt-highlight-yellow {
        font-size: 16px;
        min-width: 70px;
        padding: 6px 12px;
    }
    
    .htt-time-dropdown {
        width: 120px;
        min-width: 120px;
        max-width: 120px;
    }
    
    .htt-preview-content {
        margin: 20px auto;
        padding: 20px;
    }
    
    .htt-share-content {
        margin: 50px auto;
        padding: 20px;
    }
}