/**
 * Zayirja AI Frontend Styles - Clean & Simple Version
 * أنماط الواجهة الأمامية - إصدار نظيف ومبسط
 */

/* الأنماط الأساسية */
.zayirja-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    direction: rtl;
}

.zayirja-header {
    text-align: center;
    margin-bottom: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 20px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.zayirja-title {
    font-size: 2.5em;
    margin: 0 0 10px 0;
    font-weight: 700;
}

.zayirja-icon {
    font-size: 1.2em;
    margin-left: 10px;
}

.zayirja-subtitle {
    font-size: 1.2em;
    margin: 0;
    opacity: 0.9;
}

/* النموذج */
.zayirja-form-wrapper {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

.zayirja-form {
    padding: 40px;
}

.zayirja-form-section {
    margin-bottom: 30px;
    padding: 25px;
    background: #f8f9ff;
    border-radius: 15px;
    border-right: 4px solid #667eea;
}

.section-title {
    font-size: 1.3em;
    margin: 0 0 20px 0;
    color: #333;
    display: flex;
    align-items: center;
}

.section-icon {
    margin-left: 10px;
    font-size: 1.2em;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input.error,
.form-group textarea.error,
.form-group select.error {
    border-color: #e74c3c;
}

.field-error {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* زر الإرسال */
.form-submit-section {
    text-align: center;
    margin-top: 30px;
}

.zayirja-submit-btn {
    background-color: #FFA500;
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2em;
    font-weight: bold;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 200px;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(255, 165, 0, 0.3);
}

.zayirja-submit-btn:hover {
    background-color: #FF8C00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 165, 0, 0.4);
}

.zayirja-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-loading {
    display: flex;
    align-items: center;
    gap: 10px;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* النتائج - 4 أقسام منفصلة */
.zayirja-result {
    margin-top: 30px;
    background: #fafafa;
    padding: 0;
}

.zayirja-result-container {
    width: 100%;
    max-width: 100%;
}

/* تنسيق مربعات النتائج المحسن */
.result-section-box {
    background: #fafbfc;
    border: 1px solid #e8eaed;
    border-radius: 12px;
    padding: 0;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    overflow: hidden;
}

.result-section-box:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.section-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 18px 25px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-icon {
    font-size: 1.5em;
    line-height: 1;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

/* تصميم الأقسام الأربعة - النمط القديم للتوافق */
.result-section {
    background: white;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    padding: 25px;
}

.section-title {
    color: #2c3e50;
    font-size: 1.3em;
    margin: 0;
    font-weight: 600;
    flex: 1;
}

.section-description {
    color: #666;
    font-size: 14px;
    margin: 0 0 20px 0;
    line-height: 1.6;
    font-style: italic;
}

.section-content {
    padding: 25px;
    background: #fafbfc;
    color: #34495e;
    line-height: 1.7;
    font-size: 16px;
    white-space: pre-line;
    margin: 0;
}

.section-content p {
    margin-bottom: 15px;
}

.section-content p:last-child {
    margin-bottom: 0;
}

/* تم حذف الرسوم البيانية */



/* أزرار التفاعل البرتقالية */
.result-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    padding: 25px;
    background: white;
    border: 1px solid #ddd;
    flex-wrap: wrap;
}

/* الأزرار الجديدة - نظام موحد */

/* الزر البرتقالي الممتلئ - الافتراضي */
.btn-orange, 
.action-btn {
    background-color: #FFA500;
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 999px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    min-width: 160px;
    margin: 5px;
    box-shadow: 0 2px 8px rgba(255, 165, 0, 0.3);
}

.btn-orange:hover, 
.action-btn:hover {
    background-color: #FF8C00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 165, 0, 0.4);
    color: white;
    text-decoration: none;
}

.btn-orange:active, 
.action-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(255, 165, 0, 0.3);
}

/* الزر البرتقالي بإطار فقط */
.btn-orange-outline {
    background-color: transparent;
    color: #FFA500;
    border: 2px solid #FFA500;
    padding: 12px 32px;
    border-radius: 999px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    min-width: 160px;
    margin: 5px;
}

.btn-orange-outline:hover {
    background-color: #FFA500;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 165, 0, 0.3);
    text-decoration: none;
}

.btn-orange-outline:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(255, 165, 0, 0.2);
}

/* أزرار ثانوية - نفس الشكل لكن باللون الرمادي */
.btn-secondary,
.action-btn.secondary {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 999px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    min-width: 160px;
    margin: 5px;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover,
.action-btn.secondary:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.4);
    color: white;
    text-decoration: none;
}

/* أزرار صغيرة */
.btn-orange.small,
.action-btn.small {
    padding: 10px 24px;
    font-size: 14px;
    min-width: 120px;
}

/* أيقونات الأزرار */
.btn-orange .btn-icon,
.btn-orange-outline .btn-icon,
.action-btn .btn-icon {
    font-size: 16px;
}

/* نافذة التقييم المحدثة */
.rating-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    animation: fadeIn 0.3s ease;
}

.rating-modal {
    background: white;
    padding: 35px;
    border-radius: 10px;
    text-align: center;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: slideIn 0.3s ease;
}

.rating-modal h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.4em;
}

.rating-modal p {
    margin: 0 0 25px 0;
    color: #666;
    font-size: 16px;
}

.stars-container {
    margin: 25px 0;
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #fff 0%, #f8f9ff 100%);
    border-radius: 15px;
    border: 2px solid #e1e5e9;
}

.star {
    font-size: 2.5em;
    cursor: pointer;
    margin: 0 8px;
    color: #ddd;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: inline-block;
    position: relative;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.star:hover {
    color: #FFD700;
    transform: scale(1.3) rotate(15deg);
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
    filter: drop-shadow(0 4px 8px rgba(255, 215, 0, 0.3));
}

.star.active {
    color: #FFD700;
    transform: scale(1.2);
    text-shadow: 0 0 12px rgba(255, 215, 0, 0.5);
    animation: starPulse 0.6s ease-in-out;
}

.star.submitted {
    color: #FF7F00;
    transform: scale(1.1);
    animation: starSuccess 1s ease-in-out;
}

@keyframes starPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1.2); }
}

@keyframes starSuccess {
    0% { transform: scale(1.2); color: #FFD700; }
    50% { transform: scale(1.5); color: #FF7F00; }
    100% { transform: scale(1.1); color: #FF7F00; }
}

.rating-message {
    margin: 20px 0;
    font-size: 16px;
    font-weight: bold;
    min-height: 24px;
    color: #333;
}

.rating-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

.submit-rating-btn,
.cancel-rating-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.3s ease;
    min-width: 100px;
}

.submit-rating-btn {
    background-color: #FFA500;
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 999px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 165, 0, 0.3);
    min-width: 140px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.submit-rating-btn:hover {
    background-color: #FF8C00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 165, 0, 0.4);
    color: white;
}

.submit-rating-btn:disabled {
    background-color: #cccccc;
    color: #888;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.cancel-rating-btn {
    background-color: transparent;
    color: #6c757d;
    border: 2px solid #6c757d;
    padding: 12px 32px;
    border-radius: 999px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 10px;
    min-width: 140px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cancel-rating-btn:hover {
    background-color: #6c757d;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.submit-rating-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.cancel-rating-btn {
    background: #f0f0f0;
    color: #333;
}

.cancel-rating-btn:hover {
    background: #e0e0e0;
}

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

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* الإشعارات المحسنة */
.zayirja-notification {
    position: fixed;
    top: 25px;
    right: 25px;
    background: white;
    border: none;
    border-radius: 12px;
    padding: 18px 24px;
    box-shadow: 
        0 10px 30px rgba(0,0,0,0.15),
        0 4px 8px rgba(0,0,0,0.1);
    z-index: 10000;
    display: none;
    max-width: 400px;
    min-width: 300px;
    font-family: 'Segoe UI', Arial, sans-serif;
    font-weight: 500;
    animation: slideInRight 0.4s ease-out;
    backdrop-filter: blur(10px);
}

.zayirja-notification.success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-left: 4px solid #28a745;
}

.zayirja-notification.error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.zayirja-notification.info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    float: left;
    margin-right: -5px;
}

/* الإحصائيات */
.zayirja-points-info {
    background: linear-gradient(135deg, #ffeaa7 0%, #fab1a0 100%);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
    text-align: center;
}

.points-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.points-icon {
    font-size: 1.5em;
}

.points-text {
    font-size: 1.1em;
    font-weight: 600;
}

/* الاستجابة للموبايل - تحسين كامل */
@media (max-width: 768px) {
    .zayirja-container {
        padding: 10px;
    }
    
    .zayirja-header {
        padding: 30px 15px;
    }
    
    .zayirja-title {
        font-size: 2em;
    }
    
    .zayirja-form {
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .zayirja-form-section {
        padding: 20px;
    }
    
    /* تحسين الأقسام الجديدة للموبايل */
    .result-section-box {
        margin-bottom: 12px;
    }
    
    .section-header {
        padding: 15px 20px;
        gap: 10px;
    }
    
    .section-icon {
        font-size: 1.3em;
    }
    
    .section-title {
        font-size: 1.2em;
    }
    
    .section-content {
        padding: 20px;
        font-size: 15px;
        line-height: 1.6;
    }
    
    /* النمط القديم للتوافق */
    .result-section {
        padding: 20px;
        margin-bottom: 8px;
    }
    
    .section-description {
        font-size: 13px;
    }
    
        /* أزرار متجاوبة */
    .result-actions {
        padding: 15px;
        gap: 10px;
    }
    
    .action-btn {
        padding: 10px 15px;
        font-size: 13px;
        min-width: 100px;
        flex: 1;
    }
    
    /* نافذة التقييم للموبايل */
    .rating-modal {
        padding: 25px;
        width: 95%;
        max-width: 350px;
    }
    
    .star {
        font-size: 28px;
        margin: 0 5px;
    }
    
    .rating-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .submit-rating-btn,
    .cancel-rating-btn {
        width: 100%;
        padding: 14px;
    }
}

@media (max-width: 480px) {
    .zayirja-container {
        padding: 5px;
    }
    
    .result-section-box {
        margin-bottom: 10px;
    }
    
    .section-header {
        padding: 12px 15px;
        gap: 8px;
    }
    
    .section-icon {
        font-size: 1.2em;
    }
    
    .section-title {
        font-size: 1.1em;
    }
    
    .section-content {
        padding: 15px;
        font-size: 14px;
    }
    
    /* النمط القديم للتوافق */
    .result-section {
        padding: 15px;
        margin-bottom: 5px;
    }
    
    /* تم حذف الرسوم البيانية */
    
    .result-actions {
        flex-direction: column;
        gap: 8px;
        padding: 12px;
    }
    
    .action-btn {
        width: 100%;
        padding: 12px;
        font-size: 14px;
    }
    
    .rating-modal {
        padding: 20px;
        width: 98%;
    }
    
    .star {
        font-size: 25px;
        margin: 0 3px;
    }
}

/* تم حذف تنسيقات الرسوم البيانية */

/* نوافذ الأخطاء والتنبيهات */
.error-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    animation: fadeIn 0.3s ease;
}

.error-modal {
    background: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
    position: relative;
}

.error-icon {
    font-size: 3em;
    margin-bottom: 20px;
    display: block;
}

.error-modal h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.5em;
}

.error-modal p {
    margin: 0 0 20px 0;
    color: #666;
    font-size: 16px;
    line-height: 1.5;
}

.error-content {
    margin: 25px 0;
    text-align: right;
    background: #f8f9ff;
    padding: 20px;
    border-radius: 10px;
    border-right: 4px solid #667eea;
}

.error-content p {
    margin-bottom: 15px;
    color: #333;
    font-weight: 600;
}

.error-content ul {
    margin: 0;
    padding-right: 20px;
}

.error-content li {
    margin-bottom: 8px;
    color: #555;
    line-height: 1.4;
}

.error-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 25px;
    flex-wrap: wrap;
}

.error-btn {
    padding: 12px 32px;
    border-radius: 999px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 140px;
    margin: 5px;
}

.error-btn.primary {
    background-color: #FFA500;
    color: white;
    border: none;
    box-shadow: 0 2px 8px rgba(255, 165, 0, 0.3);
}

.error-btn.primary:hover {
    background-color: #FF8C00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 165, 0, 0.4);
    color: white;
    text-decoration: none;
}

.error-btn.secondary {
    background-color: transparent;
    color: #FFA500;
    border: 2px solid #FFA500;
}

.error-btn.secondary:hover {
    background-color: #FFA500;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 165, 0, 0.3);
    text-decoration: none;
}

.error-btn.cancel {
    background-color: transparent;
    color: #6c757d;
    border: 2px solid #6c757d;
}

.error-btn.cancel:hover {
    background-color: #6c757d;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

/* تحسينات للطباعة */
@media print {
    .result-actions,
    .zayirja-notification,
    .error-modal-overlay {
        display: none !important;
    }
    
    .zayirja-result {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .simple-charts-container {
        page-break-inside: avoid;
    }
}

/* أنماط أساسية للزايرجة */
.zayirja-widget {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Arial', sans-serif;
    direction: rtl;
}

.zayirja-form {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #06b6d4;
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.form-control.error {
    border-color: #ef4444;
}

.field-error {
    color: #ef4444;
    font-size: 14px;
    margin-top: 5px;
}

.submit-btn {
    background: linear-gradient(45deg, #06b6d4, #8b5cf6);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.3);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* أنماط النتائج المحسنة */
.result-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-top: 30px;
}

.answer-section {
    margin-bottom: 30px;
}

.answer-section h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 24px;
}

.answer-text {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-right: 4px solid #06b6d4;
    line-height: 1.8;
    font-size: 16px;
    color: #333;
}

/* تم حذف أنماط الرسوم البيانية المحسنة */

/* أنماط أزرار التفاعل المحسنة */
.result-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.action-btn {
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    min-width: 150px;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* أنماط نافذة المشاركة */
.share-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.share-modal {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.share-modal h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 20px;
}

.share-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.share-option {
    background-color: #FFA500;
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 999px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 140px;
    box-shadow: 0 2px 8px rgba(255, 165, 0, 0.3);
    text-decoration: none;
}

.share-option:hover {
    background-color: #FF8C00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 165, 0, 0.4);
    color: white;
    text-decoration: none;
}

.close-share-modal {
    background-color: transparent;
    color: #6c757d;
    border: 2px solid #6c757d;
    padding: 12px 32px;
    border-radius: 999px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.close-share-modal:hover {
    background-color: #6c757d;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

/* أنماط نافذة التقييم - محدث */
.rating-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.rating-modal {
    background: white;
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 450px;
    width: 90%;
    text-align: center;
    direction: rtl;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    animation: slideInUp 0.4s ease;
}

.rating-modal h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.6em;
    font-weight: 600;
}

.rating-modal p {
    margin: 0 0 25px 0;
    color: #666;
    font-size: 1.1em;
    line-height: 1.6;
}

.stars-container {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 25px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    border: 1px solid #dee2e6;
}

.star {
    font-size: 3em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.3;
    transform: scale(1);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    user-select: none;
}

.star:hover {
    opacity: 1;
    transform: scale(1.15);
    filter: drop-shadow(0 4px 8px rgba(255, 215, 0, 0.4));
}

.star.active {
    opacity: 1;
    transform: scale(1.25);
    filter: drop-shadow(0 4px 12px rgba(255, 215, 0, 0.6));
    animation: starGlow 1.5s ease-in-out infinite alternate;
}

.star.submitted {
    animation: starSuccess 0.8s ease-in-out;
}

@keyframes starGlow {
    0% { filter: drop-shadow(0 4px 12px rgba(255, 215, 0, 0.6)); }
    100% { filter: drop-shadow(0 6px 16px rgba(255, 215, 0, 0.9)); }
}

@keyframes starSuccess {
    0%, 100% { transform: scale(1.25); }
    25% { transform: scale(1.5) rotate(15deg); }
    50% { transform: scale(1.3); }
    75% { transform: scale(1.5) rotate(-15deg); }
}

@keyframes slideInUp {
    0% { 
        opacity: 0; 
        transform: translateY(50px) scale(0.8); 
    }
    100% { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

.rating-message {
    min-height: 45px;
    margin: 20px 0;
    font-size: 1.3em;
    font-weight: 600;
    color: #555;
    padding: 15px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #e9ecef;
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rating-message:not(:empty) {
    border-color: #FF7F00;
    background: linear-gradient(135deg, #fff5f0 0%, #ffe8d6 100%);
    color: #d63384;
    box-shadow: 0 4px 12px rgba(255, 127, 0, 0.25);
    transform: scale(1.02);
}

.rating-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.submit-rating-btn {
    background: linear-gradient(135deg, #FF7F00 0%, #E55A00 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 127, 0, 0.3);
    min-width: 150px;
}

.submit-rating-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #E55A00 0%, #CC4A00 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 127, 0, 0.4);
}

.submit-rating-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    background: #cccccc !important;
    box-shadow: none !important;
}

.cancel-rating-btn {
    background: transparent;
    color: #6c757d;
    border: 2px solid #6c757d;
    padding: 13px 28px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1em;
    transition: all 0.3s ease;
    min-width: 120px;
}

.cancel-rating-btn:hover {
    background: #6c757d;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

/* أنماط الإشعارات */
.zayirja-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    z-index: 1001;
    max-width: 300px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.zayirja-notification.success {
    background: #10b981;
}

.zayirja-notification.error {
    background: #ef4444;
}

.zayirja-notification.info {
    background: #06b6d4;
}

.notification-close {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    float: left;
    margin-right: 10px;
}

/* تحسينات للجوال */
@media (max-width: 768px) {
    /* تم حذف أنماط الرسوم البيانية */
    
    .result-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .action-btn {
        width: 100%;
        max-width: 250px;
    }
    
    .share-options {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .zayirja-widget {
        padding: 10px;
    }
    
    .zayirja-form,
    .result-content {
        padding: 20px;
    }
}

/* انيميشن للتحميل */
.btn-loading {
    display: none;
}

.btn-loading::after {
    content: '';
    width: 16px;
    height: 16px;
    margin: 0 8px;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* تم حذف تحسينات الرسوم البيانية */

/* تحسين أزرار المشاركة */
.share-option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* تحسين نافذة التقييم */
.rating-modal {
    animation: fadeInScale 0.3s ease;
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* تحسين نافذة المشاركة */
.share-modal {
    animation: fadeInScale 0.3s ease;
}

/* تحسين الإشعارات */
.zayirja-notification {
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(100%);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* تم حذف الرسوم البيانية الجديدة */

/* تنسيق إجابة الزايرجة بدون ألوان */
.zayirja-section {
    margin: 25px 0 !important;
    padding: 20px !important;
    background: #fafafa !important;
    border: 2px solid #333 !important;
    border-radius: 8px !important;
}

.zayirja-direct-answer {
    border-left: 4px solid #333 !important;
}

.zayirja-detailed-analysis {
    border-left: 4px solid #555 !important;
}

.zayirja-astral-analysis {
    border-left: 4px solid #777 !important;
}

.zayirja-wisdom-extraction {
    border-left: 4px solid #999 !important;
}

.zayirja-section h3 {
    margin: 0 0 15px 0 !important;
    color: #333 !important;
    font-weight: bold !important;
    font-size: 1.3em !important;
}

.zayirja-section p {
    margin: 12px 0 !important;
    color: #333 !important;
    line-height: 1.6 !important;
}

/* تصميم متجاوب محدث */
@media (max-width: 768px) {
    /* تم حذف أنماط الرسوم البيانية */
    
    /* تحسينات التقييم للموبايل */
    .rating-modal {
        padding: 25px;
        margin: 20px;
        max-width: 95%;
    }
    
    .stars-container {
        gap: 6px;
        padding: 15px;
    }
    
    .star {
        font-size: 2.5em;
    }
    
    .rating-buttons {
        flex-direction: column;
        gap: 12px;
    }
    
    .submit-rating-btn,
    .cancel-rating-btn {
        width: 100%;
        max-width: 250px;
        margin: 0 auto;
    }
}

/* ===== REAL TIME POINTS UPDATE STYLES ===== */

/* تأثيرات تحديث النقاط */
.points-updated {
    animation: pointsUpdatePulse 1s ease-in-out;
    background: linear-gradient(135deg, #4CAF50, #2196F3) !important;
    color: white !important;
    border-radius: 8px !important;
    padding: 4px 8px !important;
    font-weight: bold !important;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3) !important;
}

@keyframes pointsUpdatePulse {
    0% { 
        transform: scale(1);
        background: inherit;
    }
    25% { 
        transform: scale(1.1);
        background: linear-gradient(135deg, #4CAF50, #2196F3);
        box-shadow: 0 0 15px rgba(76, 175, 80, 0.6);
    }
    50% { 
        transform: scale(1.05);
        background: linear-gradient(135deg, #2196F3, #4CAF50);
    }
    75% { 
        transform: scale(1.08);
        background: linear-gradient(135deg, #4CAF50, #FFD700);
    }
    100% { 
        transform: scale(1);
        background: linear-gradient(135deg, #4CAF50, #2196F3);
    }
}

/* عرض النقاط المؤقت */
.temporary-points-display {
    animation: fadeInScale 0.5s ease-out;
    border: 2px solid #4CAF50 !important;
    background: linear-gradient(135deg, #f0f8ff, #e8f5e8) !important;
    margin: 15px 0 !important;
    position: relative;
    overflow: hidden;
}

.temporary-points-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(76, 175, 80, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* تحسينات عرض النقاط */
.points-available {
    color: #4CAF50 !important;
    font-weight: bold;
}

.points-available .points-count {
    background: linear-gradient(135deg, #4CAF50, #2196F3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.2em;
    font-weight: 900;
}

.no-points-warning {
    color: #f44336 !important;
    font-weight: bold;
    animation: warningPulse 2s infinite;
}

@keyframes warningPulse {
    0%, 100% { color: #f44336; }
    50% { color: #ff7043; }
}

.login-link {
    color: #2196F3 !important;
    text-decoration: none;
    font-weight: bold;
    border-bottom: 1px dashed #2196F3;
    transition: all 0.3s ease;
}

.login-link:hover {
    color: #1976D2 !important;
    border-bottom: 1px solid #1976D2;
    background: rgba(33, 150, 243, 0.1);
    padding: 2px 4px;
    border-radius: 4px;
}

/* شريط التقدم للنقاط */
.points-progress,
.questions-progress {
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    background: linear-gradient(135deg, #4CAF50, #2196F3);
    height: 8px;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.points-progress::after,
.questions-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progressShine 2s infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* إشعارات تحديث النقاط */
.zayirja-notification.info {
    background: linear-gradient(135deg, #2196F3, #4CAF50) !important;
    border-left: 4px solid #1976D2;
}

.zayirja-notification.info::before {
    content: '🔄';
    margin-left: 8px;
    font-size: 1.2em;
}

/* تحسينات responsive لتحديث النقاط */
@media (max-width: 768px) {
    .temporary-points-display {
        padding: 12px !important;
        font-size: 14px !important;
        margin: 10px 0 !important;
    }
    
    .points-available .points-count {
        font-size: 1.1em;
    }
    
    .points-updated {
        padding: 3px 6px !important;
        font-size: 14px !important;
    }
}

@media (max-width: 480px) {
    .temporary-points-display {
        padding: 10px !important;
        font-size: 13px !important;
        text-align: center !important;
    }
    
    .no-points-warning,
    .points-available {
        text-align: center;
        line-height: 1.4;
    }
    
    .login-link {
        display: inline-block;
        padding: 4px 8px;
        margin: 2px;
        border-radius: 4px;
        background: rgba(33, 150, 243, 0.1);
    }
}