/* === Google Fonts for Luxury Look === */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@600;700&family=Montserrat:wght@300;400;500&display=swap');

:root {
    --primary: #0a0a0a; /* أسود عميق */
    --secondary: #d4af37; /* ذهبي كلاسيكي (مثل عطور شانيل) */
    --secondary-light: #e6c263;
    --light-bg: #f9f9f9;
    --border: #e0e0e0;
    --text-dark: #1a1a1a;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    --glass-bg: rgba(255, 255, 255, 0.75);
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* === أنماط تسجيل الدخول الفاخرة === */
.login-prompt-luxury {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    max-width: 600px;
    margin: 40px auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.login-content {
    color: white;
    font-family: 'Montserrat', sans-serif;
}

.login-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    border-radius: 12px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
}

.login-prompt-luxury h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.2rem;
    margin-bottom: 15px;
    letter-spacing: 1px;
    color: #d4af37;
}

.login-prompt-luxury p {
    font-size: 1.1rem;
    margin-bottom: 25px;
    opacity: 0.9;
    line-height: 1.6;
}

.login-button-luxury {
    background: linear-gradient(135deg, #d4af37, #b8860b);
    color: white;
    text-decoration: none;
    padding: 14px 32px;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 500;
    display: inline-block;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.5px;
}

.login-button-luxury:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.55);
    background: linear-gradient(135deg, #e6c263, #d4af37);
}

/* === Chat Interface - Luxury Edition === */
#chat-container {
    width: 100%;
    max-width: 900px;
    margin: 40px auto;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: white;
    display: flex;
    flex-direction: column;
    height: 800px;
    border: 2px solid rgba(212, 175, 55, 0.2);
    direction: rtl;
    font-family: 'Montserrat', sans-serif;
    padding: 15px;
}

#chat-header {
    background: var(--primary);
    color: white;
    padding: 24px 20px;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

#chat-header .header-content {
    display: flex;
    align-items: center;
    gap: 14px;
    justify-content: center;
}

#chat-header .header-logo {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.2));
}

#chat-header h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.0rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: 1.2px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

#chat-header p {
    font-size: 1.0rem;
    opacity: 0.85;
    font-weight: 300;
    letter-spacing: 0.8px;
    font-family: 'Montserrat', sans-serif;
}

#chat-box {
    padding: 35px 30px;
    flex: 1;
    overflow-y: auto;
    background: linear-gradient(to bottom, #fcfcfc 0%, #f5f5f5 100%);
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.message {
    padding: 22px 28px;
    border-radius: 30px;
    line-height: 1.7;
    word-wrap: break-word;
    font-size: 17px;
    max-width: 90%;
    position: relative;
    animation: fadeIn 0.4s ease-out;
    transition: var(--transition);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    font-family: 'Montserrat', sans-serif;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.user-message {
    background: linear-gradient(135deg, var(--secondary), #b8860b);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 10px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.ai-message {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--text-dark);
    align-self: flex-start;
    border-bottom-left-radius: 10px;
    border: 1px solid rgba(212, 175, 55, 0.12);
    font-weight: 400;
}

.ai-message a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid transparent;
    padding-bottom: 1px;
    transition: var(--transition);
}

.ai-message a:hover {
    border-bottom-color: var(--secondary);
    color: #b8860b;
}

#input-area {
    display: flex;
    padding: 25px 20px;
    background: white;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
    gap: 16px;
    flex-direction: column;
}

#quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 15px;
    justify-content: center;
}

.quick-reply {
    background: rgba(245, 245, 245, 0.8);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 26px;
    padding: 12px 22px;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-dark);
    font-weight: 500;
    letter-spacing: 0.5px;
    min-width: 140px;
    text-align: center;
}

.quick-reply:hover {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(212, 175, 55, 0.25);
}

#user-input {
    flex: 1;
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 36px;
    padding: 18px 28px;
    font-size: 18px;
    font-family: 'Montserrat', sans-serif;
    outline: none;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.8);
    resize: none;
    min-height: 60px;
    max-height: 150px;
    overflow-y: auto;
    direction: rtl;
    text-align: right;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.05);
}

#user-input:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

#send-btn {
    background: linear-gradient(135deg, var(--secondary), #b8860b);
    color: white;
    border: none;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.4);
    align-self: flex-end;
    margin-top: 15px;
}

#send-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.55);
}

#send-btn.loading {
    background: #9e9e9e;
    box-shadow: 0 4px 12px rgba(158, 158, 158, 0.3);
}

/* === زر محادثة جديدة === */
#new-chat-btn-container {
    padding: 20px 20px;
    text-align: center;
    background: white;
    border-top: 1px solid var(--border);
}

#new-chat-btn {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 24px;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
    font-weight: 500;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Montserrat', sans-serif;
}

#new-chat-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(107, 114, 128, 0.4);
    background: linear-gradient(135deg, #4b5563, #374151);
}

#new-chat-btn i {
    font-size: 16px;
}

/* Scrollbar أنيقة */
#chat-box::-webkit-scrollbar {
    width: 8px;
}

#chat-box::-webkit-scrollbar-track {
    background: transparent;
}

#chat-box::-webkit-scrollbar-thumb {
    background: var(--secondary);
    border-radius: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .login-prompt-luxury {
        margin: 20px;
        padding: 30px 20px;
    }
    
    .login-logo {
        width: 60px;
        height: 60px;
    }
    
    #chat-container {
        height: auto;
        min-height: 520px;
        margin: 10px;
        border-radius: 24px;
        max-width: 100%;
        padding: 5px;
    }

    #chat-header h2 {
        font-size: 1.7rem;
    }

    .message {
        font-size: 14.5px;
        padding: 16px 20px;
    }

    #user-input {
        padding: 14px 20px;
        font-size: 15px;
    }

    #send-btn {
        width: 54px;
        height: 54px;
        font-size: 20px;
    }
    
    #quick-replies {
        gap: 8px;
    }
    
    .quick-reply {
        padding: 8px 14px;
        font-size: 12.5px;
    }
}