/* styles.css - النسخة الكاملة والنهائية */
body {
    background-color: #f4f6f9;
    font-family: 'Tajawal', sans-serif;
    margin: 0;
    padding: 20px 10px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

#container {
    max-width: 480px;
    width: 100%;
    background: #fff;
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

#hero-section {
    text-align: center;
    padding: 25px 20px;
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    border-bottom: 1px solid #e9e9e9;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#blogger-image {
    width: auto;
    /* زيادة العرض */
    height: 380px;
    /* زيادة الطول لجعله مربعًا */
    border-radius: 0;
    /* إزالة التدوير ليصبح مربعًا */
    border: 5px solid #fff;
    /* الحفاظ على الإطار الأبيض */
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 15px;
    object-fit: cover;
    /* الحفاظ على طريقة عرض الصورة */}

#main-headline {
    font-size: 15px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

#sub-headline {
    font-size: 16px;
    color: #555;
    margin: 0;
    padding-bottom: 8px;
}

#hook-area {
    text-align: center;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#random-hook {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
    min-height: 20px;
}

#start-chat-btn {
    background: #6A296B;
    color: white;
    padding: 15px 30px;
    font-weight: 700;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 14px;
    box-shadow: 0 4px 15px rgba(74, 0, 224, 0.4);
    transition: all 0.3s ease;
    width: 100%;
    font-family: 'Tajawal';
}

#start-chat-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(74, 0, 224, 0.5);
}

#chat-box-wrapper {
    padding: 10px;
}

#chat-box {
    height: 450px;
    overflow-y: auto;
    padding: 10px;
}

.message {
    margin: 10px 0;
    padding: 12px 18px;
    border-radius: 20px;
    max-width: 85%;
    line-height: 1.5;
    word-wrap: break-word;
}

.message.user {
    background-color: #77337C;
    color: white;
    margin-right: auto;
    border-bottom-left-radius: 5px;
    text-align: left;
}

.message.bot {
    background-color: #f1f0f0;
    color: #333;
    margin-left: auto;
    border-bottom-right-radius: 5px;
    text-align: right;
}

.typing-indicator {
    color: #888;
    font-style: italic;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 15px 5px;
    align-items: flex-start;
}

.option-button {
    background-color: #fff;
    border: 2px solid #ddd;
    color: #444;
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
    font-size: 15px;
    text-align: right;
    width: 100%;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.option-button:hover {
    transform: translateY(-2px);
    border-color: #77337C;
}

.option-button.offer {
    border: 2px solid #77337C;
}

.option-button.offer b {
    display: block;
    font-size: 16px;
    color: #77337C;
}

.option-button.confirmation {
    max-width: 90%;
    font-weight: bold;
}

.option-button.disabled {
    background-color: #f9f9f9 !important;
    color: #aaa !important;
    border-color: #eee !important;
    cursor: not-allowed;
    opacity: 0.8;
    transform: none;
}

.option-button.selected {
    background-color: #77337C !important;
    color: white !important;
    border-color: #77337C !important;
    font-weight: bold;
    transform: scale(1.02);
}

#input-area {
    display: flex;
    padding: 10px;
    border-top: 1px solid #eee;
}

#user-input {
    flex-grow: 1;
    padding: 12px;
    border-radius: 0 10px 10px 0;
    border: 1px solid #ccc;
    outline: none;
    font-family: 'Tajawal', sans-serif;
    font-size: 15px;
}

#send-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 10px 0 0 10px;
    background-color: #77337C;
    color: white;
    cursor: pointer;
}

#notification-toast {
    position: fixed;
    bottom: 20px;
    /* غيرناه لأسفل ليكون أفضل على الموبايل */
    left: 20px;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    font-weight: bold;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
    z-index: 1000;
    transform: translateY(20px);
}

/* حالة ظهور الإشعار */
#notification-toast.show {
    opacity: 1;
    transform: translateY(0);
}

footer {
    text-align: center;
    font-size: 12px;
    padding: 15px;
    background: #f8f9fa;
    color: #888;
    border-top: 1px solid #eee;
}

footer a {
    color: #555;
    text-decoration: none;
}
/* ========================================================== */
/* أكواد تحسين شكل الأزرار على الموبايل والشاشات الصغيرة      */
/* ========================================================== */

@media (max-width: 500px) {

    /* تصغير حجم الخط داخل كل الأزرار */
    .option-button {
        font-size: 14px;
        padding: 12px 15px; /* تعديل الحشو ليكون مناسباً */
        line-height: 1.4; /* تحسين تباعد الأسطر في حالة التفاف النص */
    }

    /* تصغير الخط العريض في أزرار العروض */
    .option-button.offer b {
        font-size: 15px;
    }

    /* جعل أزرار التأكيد (نعم/لا) تأخذ عرضاً أكبر لتجنب التفاف النص الطويل فيها */
    .option-button.confirmation {
        max-width: 85%;
    }

    /* تصغير حجم الخط الرئيسي في الهيدر قليلاً */
    #main-headline {
        font-size: 22px;
    }

    /* تصغير حجم زر البدء */
    #start-chat-btn {
        font-size: 16px;
        padding: 12px 25px;
    }
}