/* English Typing Practice Styles */
.etp-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;
}

.etp-title {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #4CAF50;
    background: linear-gradient(to right, #FF6B6B, #4CAF50);
    color: white;
    padding: 15px;
    border-radius: 5px;
}

.etp-card {
    background: #fff;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
}

.etp-text-container {
    position: relative;
    height: 200px;
    overflow: hidden;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #f9f9f9;
}

.etp-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;
}

.etp-reference-text .etp-word {
    white-space: pre-wrap;
    word-wrap: break-word;
    transition: all 0.2s;
    display: inline;
    margin: 0;
    padding: 0;
}

.etp-word-correct {
    color: #2E7D32;
}

.etp-word-incorrect {
    color: #c62828;
    background-color: #ffebee;
}

.etp-word-incorrect-preview {
    color: #c62828;
    text-decoration: underline;
    background-color: #ffebee;
}

.etp-current-word {
    background-color: #FFF9C4;
}

.etp-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;
}

.etp-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
    justify-content: center;
}

.etp-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    height: 42px;
    box-sizing: border-box;
}

.etp-btn-start {
    background: #4CAF50;
    color: white;
}

.etp-btn-submit {
    background: #2196F3;
    color: white;
    width: 300px;
    height: 50px;
    font-size: 20px;
    padding: 12px 30px;
    margin-top: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.3);
    transition: all 0.3s ease;
}

.etp-btn-submit:hover {
    background: #1976D2;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(33, 150, 243, 0.4);
}

.etp-btn-retest {
    background: #FF9800;
    color: white;
    font-size: 18px;
    padding: 12px 30px;
}

.etp-btn-share {
    background: #4CAF50;
    color: white;
    font-size: 18px;
    padding: 12px 30px;
}

.etp-btn-preview {
    background: #9C27B0;
    color: white;
    font-size: 18px;
    padding: 12px 30px;
}

.etp-report-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 20px 0;
    flex-wrap: wrap;
}

.etp-timer-container {
    margin: 15px 0;
    text-align: center;
}

.etp-timer {
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    color: #c62828;
    padding: 10px;
    border-radius: 5px;
    background: #FFF9C4;
}

.etp-countdown {
    font-size: 48px;
    font-weight: bold;
    text-align: center;
    color: #c62828;
    padding: 20px;
    border-radius: 5px;
    background: #FFF9C4;
    margin: 20px 0;
}

.etp-countdown-message {
    font-size: 24px;
    text-align: center;
    color: #2E7D32;
    padding: 20px;
    border-radius: 5px;
    background: #E8F5E9;
    margin: 20px 0;
}

.etp-registration-form {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
}

.etp-form-group {
    margin-bottom: 15px;
}

.etp-form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.etp-form-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.etp-form-input.uppercase {
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
}

.etp-report {
    display: none;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
    margin-top: 20px;
    border: 1px solid #e0e0e0;
}

.etp-report-title {
    text-align: center;
    margin-bottom: 20px;
    color: #2E7D32;
    border-bottom: 2px solid #2E7D32;
    padding-bottom: 10px;
}

.etp-report-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.etp-report-table th, .etp-report-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.etp-report-table th {
    background-color: #f2f2f2;
    font-weight: bold;
}

.etp-report-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Highlighted numbers in report */
.etp-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);
}

/* Highlighted user data in report */
.etp-highlight-user-data {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #333;
    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);
    border: 2px solid #FF8C00;
}

.etp-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;
    width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.etp-time-dropdown {
    background: white;
    color: #333;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    width: 150px;
}

/* Word Highlight Toggle */
.etp-highlight-toggle {
    display: flex;
    align-items: center;
    gap: 35px;
    background: #8e44ad;
    padding: 10px 45px;
    border-radius: 25px;
    color: white;
    font-weight: bold;
    margin-bottom: 15px;
    width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.etp-toggle-switch {
    position: relative;
    display: inline-block;
    width: 70px;
    height: 30px;
}

.etp-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.etp-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;
}

.etp-toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.etp-toggle-state {
    font-size: 12px;
    font-weight: bold;
    color: white;
    z-index: 1;
}

.etp-toggle-state.etp-on {
    margin-left: 8px;
}

.etp-toggle-state.etp-off {
    margin-right: 8px;
}

.etp-toggle-slider.etp-on {
    background-color: #2ecc71;
}

.etp-toggle-slider.etp-on:before {
    transform: translateX(40px);
}

.etp-toggle-slider.etp-off {
    background-color: #e74c3c;
}

/* Social Share Modal */
.etp-share-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;
}

.etp-share-content {
    background: white;
    margin: 50px auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
    text-align: center;
}

.etp-share-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
    color: #666;
}

.etp-share-close:hover {
    color: #000;
}

.etp-share-title {
    color: #2E7D32;
    border-bottom: 2px solid #2E7D32;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.etp-share-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
}

.etp-share-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.3s;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.etp-share-btn-whatsapp {
    background: #25D366;
}

.etp-share-btn-facebook {
    background: #3b5998;
}

.etp-share-btn-twitter {
    background: #1DA1F2;
}

.etp-share-btn-linkedin {
    background: #0077B5;
}

.etp-share-btn-copy {
    background: #6c757d;
}

.etp-share-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Preview Modal Styles */
.etp-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;
}

.etp-preview-content {
    background: white;
    margin: 50px auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    position: relative;
}

.etp-preview-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
    color: #666;
}

.etp-preview-close:hover {
    color: #000;
}

.etp-preview-section {
    margin-bottom: 25px;
    padding: 20px;
    border-radius: 8px;
    background: #f9f9f9;
}

.etp-preview-title {
    color: #2E7D32;
    border-bottom: 2px solid #2E7D32;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.etp-preview-text {
    line-height: 1.8;
    font-size: 16px;
    text-align: justify;
    white-space: pre-wrap;
}

.etp-typed-text {
    background: #E3F2FD;
    border-left: 4px solid #2196F3;
}

.etp-reference-preview {
    background: #FFF8E1;
    border-left: 4px solid #FF9800;
}

/* Responsive Design */
@media (max-width: 1000px) {
    .etp-container {
        width: 95%;
        padding: 15px;
    }
    
    .etp-text-container {
        height: 200px;
    }
    
    .etp-user-input {
        height: 200px;
        font-size: 22px;
    }
    
    .etp-controls {
        justify-content: center;
    }
    
    .etp-time-selector, .etp-highlight-toggle {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }
    
    .etp-report-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .etp-report-buttons .etp-btn {
        width: 200px;
    }
    
    .etp-btn-submit {
        width: 250px;
        height: 45px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .etp-container {
        padding: 10px;
    }
    
    .etp-btn {
        flex-grow: 1;
    }
    
    .etp-reference-text {
        font-size: 20px;
        line-height: 2.0;
    }
    
    .etp-user-input {
        font-size: 16px;
    }
    
    .etp-highlight-number, .etp-highlight-user-data {
        font-size: 16px;
        min-width: 70px;
        padding: 6px 12px;
    }
    
    .etp-preview-content, .etp-share-content {
        margin: 20px auto;
        padding: 20px;
    }
    
    .etp-share-buttons {
        gap: 8px;
    }
    
    .etp-share-btn {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .etp-btn-submit {
        width: 200px;
        height: 40px;
        font-size: 16px;
        padding: 8px 20px;
    }
    
    .etp-highlight-toggle {
        gap: 10px;
        padding: 6px 12px;
    }
    
    .etp-time-selector, .etp-highlight-toggle {
        width: 90%;
    }
}