#hearing-test-container {
    font-family: inherit; /* استفاده از فونت سایت */
    direction: rtl;
    text-align: center;
    margin: 20px auto;
    max-width: 800px;
}

.hearing-test-wrap {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 30px 20px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    color: white;
    position: relative;
}

.hearing-test-wrap h1 {
    color: white;
    margin-bottom: 20px;
    font-size: 28px;
    text-align: center;
    font-family: inherit;
}

.hearing-test-wrap h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 22px;
    font-family: inherit;
}

.step {
    display: none !important;
    background: rgba(255,255,255,0.98);
    padding: 30px;
    border-radius: 15px;
    width: 100%;
    max-width: 500px;
    color: #333;
    min-height: 300px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.step.active {
    display: block !important;
}

.progress {
    background: rgba(255,255,255,0.3);
    height: 8px;
    border-radius: 4px;
    margin: 0 0 30px 0;
    overflow: hidden;
    width: 100%;
    max-width: 500px;
}

.progress-bar {
    background: rgba(255,255,255,0.9);
    height: 100%;
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 4px;
}

input[type="text"], input[type="tel"] {
    width: 100%;
    padding: 15px;
    margin: 15px 0;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    text-align: right;
    box-sizing: border-box;
    transition: border-color 0.3s;
    font-family: inherit;
}

input[type="text"]:focus, input[type="tel"]:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
}

button {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white !important;
    border: none !important;
    padding: 15px 25px;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    margin: 8px 5px;
    transition: all 0.3s ease;
    min-width: 80px;
    font-family: inherit;
}

button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.instructions-list {
    background: rgba(255,255,255,0.95);
    padding: 25px;
    border-radius: 15px;
    margin: 20px 0;
    text-align: right;
}

.instruction-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.instruction-list li {
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
    font-size: 16px;
    color: #444;
    line-height: 1.5;
    font-family: inherit;
}

.instruction-list li:last-child {
    border-bottom: none;
}

.question {
    background: #f8f9ff;
    padding: 20px;
    border-radius: 10px;
    margin: 15px 0;
    text-align: right;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.question:hover {
    border-color: #667eea;
}

.question p {
    margin-bottom: 15px;
    font-weight: 500;
    color: #444;
    font-family: inherit;
}

.test-info {
    background: rgba(248, 249, 250, 0.95);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: center;
}

.test-info p {
    margin: 8px 0;
    font-size: 16px;
    color: #333;
    font-family: inherit;
}

.frequency-container {
    text-align: center;
    margin: 30px 0;
}

.play-frequency-btn {
    background: linear-gradient(45deg, #28a745, #20c997);
    font-size: 20px;
    font-weight: bold;
    padding: 20px 40px;
    border-radius: 50px;
    min-width: 200px;
    margin: 10px;
    transform: scale(1);
    transition: all 0.3s ease;
    font-family: inherit;
}

.play-frequency-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(40, 167, 69, 0.4);
}

.play-frequency-btn:disabled {
    background: linear-gradient(45deg, #6c757d, #adb5bd);
    transform: none;
    cursor: not-allowed;
}

.repeat-btn {
    background: linear-gradient(45deg, #ffc107, #fd7e14);
    font-size: 16px;
    padding: 15px 25px;
    border-radius: 25px;
    margin: 10px;
    font-family: inherit;
}

.repeat-btn:hover {
    background: linear-gradient(45deg, #e0a800, #e8590c);
}

.progress-indicator {
    margin: 20px 0;
}

.frequency-progress {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.freq-item {
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    min-width: 60px;
    text-align: center;
    transition: all 0.3s;
    font-family: inherit;
}

.freq-item.completed {
    background: #28a745;
    color: white;
}

.freq-item.active {
    background: #ffc107;
    color: #333;
    animation: pulse 2s infinite;
}

.freq-item.pending {
    background: #e9ecef;
    color: #6c757d;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.response-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    animation: slideUp 0.3s ease;
}

.modal-content h3 {
    color: #333;
    margin-bottom: 25px;
    font-size: 20px;
    font-family: inherit;
}

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

.modal-buttons button {
    flex: 1;
    padding: 15px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 10px;
    min-width: 120px;
    font-family: inherit;
}

.heard-yes {
    background: linear-gradient(45deg, #28a745, #20c997);
}

.heard-yes:hover {
    background: linear-gradient(45deg, #218838, #1ba085);
}

.heard-no {
    background: linear-gradient(45deg, #dc3545, #c82333);
}

.heard-no:hover {
    background: linear-gradient(45deg, #c82333, #a71e2a);
}

.repeat-modal-btn {
    background: linear-gradient(45deg, #6c757d, #adb5bd);
    padding: 12px 20px;
    font-size: 14px;
    margin-top: 15px;
    border-radius: 25px;
    font-family: inherit;
}

.repeat-modal-btn:hover {
    background: linear-gradient(45deg, #5a6268, #95a0a8);
}

.result {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    padding: 25px;
    border-radius: 15px;
    margin: 20px 0;
    text-align: right;
    border: 2px solid #28a745;
}

.result h3 {
    color: #155724;
    margin-bottom: 15px;
    font-family: inherit;
}

.result p {
    color: #155724;
    font-size: 16px;
    line-height: 1.5;
    font-family: inherit;
}

.result-summary {
    background: rgba(40, 167, 69, 0.1);
    padding: 20px;
    border-radius: 10px;
    margin: 15px 0;
    text-align: center;
    border: 2px solid #28a745;
}

.result-summary p {
    margin: 8px 0;
    font-size: 16px;
    font-weight: bold;
    color: #155724;
    font-family: inherit;
}

.detailed-results {
    margin: 20px 0;
}

.detailed-results h4 {
    color: #333;
    text-align: center;
    margin-bottom: 15px;
    font-size: 16px;
    font-family: inherit;
}

.frequency-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin: 15px 0;
}

.freq-result {
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.3s;
    font-family: inherit;
}

.freq-result.heard {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border: 1px solid #28a745;
}

.freq-result.not-heard {
    background: linear-gradient(135deg, #f8d7da, #f1b0b7);
    color: #721c24;
    border: 1px solid #dc3545;
}

.success-result {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    border: 2px solid #17a2b8;
    text-align: center;
    padding: 25px;
}

.warning {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border: 2px solid #ffc107;
    color: #856404;
    padding: 25px;
    border-radius: 15px;
    margin: 20px 0;
    text-align: right;
}

.warning h3 {
    color: #856404;
    margin-bottom: 15px;
    font-size: 20px;
    font-family: inherit;
}

.warning p {
    margin-bottom: 10px;
    line-height: 1.6;
    font-family: inherit;
}

.warning a {
    color: #856404;
    text-decoration: underline;
    font-weight: bold;
    font-family: inherit;
}

.clinic-info {
    background: rgba(255, 255, 255, 0.8);
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
}

.clinic-info p {
    margin: 8px 0;
    font-weight: bold;
    font-family: inherit;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .hearing-test-wrap {
        margin: 10px;
        padding: 20px 15px;
        min-height: 500px;
    }
    
    .step {
        padding: 20px;
        min-height: 250px;
    }
    
    .instructions-list {
        padding: 20px;
    }
    
    .instruction-list li {
        font-size: 14px;
        padding: 10px 0;
    }
    
    button {
        padding: 12px 18px;
        font-size: 14px;
        margin: 5px 3px;
    }
    
    .play-frequency-btn {
        font-size: 18px;
        padding: 18px 30px;
        min-width: 180px;
    }
    
    .frequency-progress {
        gap: 8px;
    }
    
    .freq-item {
        padding: 6px 10px;
        font-size: 12px;
        min-width: 50px;
    }
    
    .modal-content {
        padding: 25px;
        margin: 20px;
    }
    
    .modal-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .modal-buttons button {
        min-width: 100%;
    }
    
    .test-info {
        padding: 15px;
    }
    
    .test-info p {
        font-size: 14px;
    }
    
    .frequency-results {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .freq-result {
        padding: 10px;
        font-size: 13px;
    }
    
    .result-summary p {
        font-size: 14px;
    }
}