/* Ultra Sleek Design System */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Typography & Base */
html {
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif;
    background: linear-gradient(180deg, #fafafa 0%, #ffffff 40%, #fafafa 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: #1a1a1a;
    line-height: 1.6;
}

/* Subtle Mesh Gradient Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 119, 198, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 219, 120, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

/* Container */
.container {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    z-index: 2;
}

/* Header - Ultra Minimal */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
    background: transparent;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

/* Language Toggle - Pill Style */
.lang-toggle {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 100px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #666;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    text-transform: uppercase;
}

.lang-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: #000;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* New Chat Button - Glass Effect */
.new-chat-btn {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 100px;
    padding: 6px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 32px;
    width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.new-chat-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: #000;
    transform: rotate(90deg);
}

.new-chat-btn svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
}

/* Title */
.title {
    text-align: center;
    flex: 1;
}

.title-main {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo {
    height: 64px; /* Increased further from 48px to 64px */
    width: auto;
    object-fit: contain;
    opacity: 0.9;
    max-width: 250px; /* Increased max width */
}

/* Share Button - Icon Only */
.share-button {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #999;
}

.share-button:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #000;
    transform: scale(1.1);
}

.share-button svg {
    width: 16px;
    height: 16px;
    stroke-width: 2;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 32px;
    position: relative;
    overflow-y: auto;
}

/* Initial View */
.initial-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 100%;
    max-width: 480px;
    animation: fadeInUp 0.6s ease-out;
}

/* Profile Picture - Enhanced */
.loading-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 28px;
    position: relative;
}

.profile-picture-container {
    width: 180px; /* Increased further from 140px to 180px */
    height: 180px; /* Increased further from 140px to 180px */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    background: transparent; /* Remove background color that creates ring */
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* Remove border, add shadow */
    border: none;
    box-shadow: 
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04);
        /* Removed rim light border: 0 0 0 1px rgba(255, 255, 255, 0.05) */
}

.profile-picture-container:hover {
    transform: scale(1.05);
}

.profile-picture {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: none !important; /* Force remove any border */
    outline: none !important; /* Force remove any outline */
    box-shadow: none !important; /* Remove any inherited box-shadow */
    background: none; /* Remove any background that might create border effect */
    position: absolute; /* Position absolutely to fill container completely */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* Greeting - Refined Typography */
.greeting {
    margin-bottom: 48px;
}

.greeting h2 {
    font-size: 24px; /* Increased from 16px to 24px */
    font-weight: 600; /* Increased from 400 to 600 for more prominence */
    color: #4a4a4a; /* Changed to subtle grey instead of black */
    text-align: center;
    letter-spacing: -0.2px; /* Adjusted for larger text */
    line-height: 1.4; /* Tightened for better appearance */
    opacity: 1; /* Full opacity for maximum impact */
    margin: 0; /* Remove any default margins */
}

/* Message Input Area - Seamless */
.message-input {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 32px 28px;
    background: transparent;
    z-index: 200;
}

/* Suggested Questions - Hidden by Default */
.suggested-questions {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    padding: 0 0 20px;
    width: 100%;
    max-width: 720px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.suggested-questions.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Container with fade effects */
.suggested-questions::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 20px;
    width: 80px;
    background: linear-gradient(to right, 
        rgba(250, 250, 250, 1) 0%, 
        rgba(250, 250, 250, 0.8) 20%,
        rgba(250, 250, 250, 0) 100%);
    pointer-events: none;
    z-index: 2;
    opacity: 0.95;
}

.suggested-questions::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 20px;
    width: 80px;
    background: linear-gradient(to left, 
        rgba(250, 250, 250, 1) 0%, 
        rgba(250, 250, 250, 0.8) 20%,
        rgba(250, 250, 250, 0) 100%);
    pointer-events: none;
    z-index: 2;
    opacity: 0.95;
}

.suggested-questions-inner {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex-wrap: nowrap;
    padding: 4px 40px 4px 40px; /* Equal padding on both sides */
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    /* Remove justify-content: center to allow full scroll range */
}

.suggested-questions-inner::-webkit-scrollbar {
    display: none;
}

.suggested-question-btn {
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 450;
    color: #555;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    flex-shrink: 0;
    font-family: inherit;
    letter-spacing: 0.2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    scroll-snap-align: start;
}

.suggested-question-btn:hover {
    background: #fff;
    border-color: #000000;
    color: #000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Mobile scroll improvements for suggested questions */
@media (max-width: 768px) {
    .suggested-questions-inner {
        padding: 4px 24px 4px 24px; /* Match input container padding */
        -webkit-overflow-scrolling: touch; /* Smooth iOS scrolling */
    }
    
    .suggested-question-btn {
        font-size: 14px;
        padding: 10px 18px;
        scroll-snap-align: center; /* Better mobile snap */
    }
}

@media (max-width: 480px) {
    .suggested-questions-inner {
        padding: 4px 20px 4px 20px; /* Match small mobile padding */
    }
    
    .suggested-question-btn {
        font-size: 13px;
        padding: 9px 16px;
    }
}

/* ===============================================
   CLEAN INPUT CONTAINER - MOBILE-FIRST REBUILD
   =============================================== */

/* Input Container - Robust Mobile-First */
.input-container {
    position: relative;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: stretch;
    box-sizing: border-box;
}

/* Message Input Field - Clean Approach */
.message-field {
    flex: 1;
    height: 52px;
    padding: 0 56px 0 20px; /* Right padding for button + margin */
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 26px; /* Half of height for perfect circle */
    font-size: 14px;
    background: #ffffff;
    outline: none;
    font-family: inherit;
    color: #1a1a1a;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.2px;
    font-weight: 400;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    box-sizing: border-box;
    line-height: 1.4;
}

/* Placeholder Styling */
.message-field::placeholder {
    color: #aaa;
    font-weight: 400;
}

/* Focus State */
.message-field:focus {
    border-color: #000000;
    background: #fff;
    box-shadow: 
        0 0 0 3px rgba(0, 0, 0, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Send Button - Clean with Primary Color Support */
.send-btn {
    position: absolute;
    top: 50%;
    right: 26px; /* 20px container padding + 6px button margin */
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none !important;
    border-radius: 50%;
    background: #6366f1; /* Default primary color, will be overridden by dynamic theming */
    color: white !important; /* Force white text */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    z-index: 10;
    box-shadow: none !important; /* Remove any inherited shadows */
    outline: none !important; /* Remove outlines */
}

/* Send Button States - Let Dynamic Theming Handle Colors */
.send-btn:hover,
.send-btn:hover:not(:disabled) {
    /* Colors handled by JavaScript dynamic theming */
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.send-btn:active,
.send-btn:active:not(:disabled) {
    /* Colors handled by JavaScript dynamic theming */
    transform: translateY(-50%) scale(0.95);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.send-btn:focus {
    /* Colors handled by JavaScript dynamic theming */
    outline: 2px solid rgba(0, 0, 0, 0.2);
    outline-offset: 2px;
}

/* Send Button Icon */
.send-btn svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.5;
}

/* Mobile Optimization */
@media (max-width: 768px) {
    .input-container {
        padding: 0 24px;
        max-width: 100%;
        margin: 0 auto;
    }
    
    /* Match messages container padding on mobile */
    .messages-container {
        padding: 24px;
        padding-bottom: 140px; /* Adjusted for mobile */
    }
    
    .message-field {
        height: 48px;
        border-radius: 24px;
        padding: 0 52px 0 18px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .send-btn {
        right: 30px; /* 24px container + 6px margin */
        width: 36px;
        height: 36px;
    }
    
    .send-btn svg {
        width: 16px;
        height: 16px;
    }
}

/* Extra Small Mobile */
@media (max-width: 480px) {
    .input-container {
        padding: 0 20px;
    }
    
    /* Match messages container padding on small mobile */
    .messages-container {
        padding: 20px;
        padding-bottom: 140px; /* Adjusted for mobile */
    }
    
    .message-field {
        padding: 0 48px 0 16px;
    }
    
    .send-btn {
        right: 26px; /* 20px container + 6px margin */
        width: 32px;
        height: 32px;
    }
    
    .send-btn svg {
        width: 14px;
        height: 14px;
    }
}

/* Skeleton Loading Input - Matching Clean Structure */
.skeleton-input-container {
    position: relative;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: stretch;
    box-sizing: border-box;
}

.skeleton-input-field {
    flex: 1;
    height: 52px;
    background: linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.04) 25%,
        rgba(0, 0, 0, 0.08) 50%,
        rgba(0, 0, 0, 0.04) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 26px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.skeleton-send-btn {
    position: absolute;
    top: 50%;
    right: 26px;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.08) 25%,
        rgba(0, 0, 0, 0.12) 50%,
        rgba(0, 0, 0, 0.08) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 50%;
}

/* Skeleton Mobile Optimization */
@media (max-width: 768px) {
    .skeleton-input-container {
        padding: 0 24px;
    }
    
    .skeleton-input-field {
        height: 48px;
        border-radius: 24px;
    }
    
    .skeleton-send-btn {
        right: 30px;
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    .skeleton-input-container {
        padding: 0 20px;
    }
    
    .skeleton-send-btn {
        right: 26px;
        width: 32px;
        height: 32px;
    }
}

/* Real Input Container - Matches Skeleton Structure */
.real-input-container {
    position: relative;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: stretch;
    box-sizing: border-box;
}

/* Online Status - Minimal Dot */
.online-status-bottom {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    padding: 16px 32px 0;
    font-size: 11px;
    color: #aaa;
    font-weight: 450;
    letter-spacing: 0.3px;
}

.online-status-bottom .status-dot {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
    }
}

/* Chat View */
.chat-view {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 24px;
    padding-bottom: 160px; /* Add padding to prevent messages from being hidden behind input */
    max-width: 720px;
    margin: 0 auto;
    width: 100%;
}

/* Message Bubbles - Widget Style */
.message {
    display: flex;
    flex-direction: column;
    max-width: 75%;
    margin-bottom: 12px;
    animation: messageSlide 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

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

.message-wrapper {
    position: relative;
    display: inline-block;
}

.message-content {
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.6;
    word-wrap: break-word;
    letter-spacing: 0.1px;
    position: relative;
    display: inline-block;
    white-space: pre-wrap;
}

/* Formatted content styles */
.message-content strong {
    font-weight: 600;
    color: inherit;
}

.message-content em {
    font-style: italic;
}

.message-content a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: opacity 0.2s ease;
}

.message-content a:hover {
    opacity: 0.8;
}

/* Better spacing for structured content */
.message-content br + br {
    display: block;
    height: 8px;
}

/* Sent messages - User */
.message.sent {
    align-items: flex-end;
    margin-left: auto;
}

/* LTR: Sharp corner on bottom-left (pointing outward) */
.message.sent .message-content {
    background: var(--brand-color, #6366f1);
    color: #fff;
    border-radius: 18px 18px 18px 4px;
}

/* Received messages - AI */
.message.received {
    align-items: flex-start;
    margin-right: auto;
}

/* LTR: Sharp corner on bottom-right (pointing outward) */
.message.received .message-content {
    background: #f0f0f0;
    color: #1a1a1a;
    border-radius: 18px 18px 4px 18px;
}

/* Message Footer - Time & Copy - Always Visible */
.message-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    padding: 0 4px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.message:hover .message-footer {
    opacity: 1;
}

.message-time {
    font-size: 11px;
    color: #999;
    letter-spacing: 0.2px;
}

.message-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: #999;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    padding: 0;
}

.message-copy:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #666;
}

.message-copy svg {
    width: 14px;
    height: 14px;
}

.message-copy.copied {
    color: #10b981;
}

.message-copy.copied svg {
    animation: checkmark 0.3s ease;
}

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

/* Align footer based on message type */
.message.sent .message-footer {
    justify-content: flex-end;
}

.message.received .message-footer {
    justify-content: flex-start;
}

/* Typing Indicator - Widget Style */
.typing-indicator {
    display: inline-flex;
    align-items: center;
    padding: 12px 16px;
    background: #f0f0f0;
    border-radius: 18px 18px 18px 4px;
    margin-bottom: 12px;
    margin-right: auto;
}

.typing-indicator span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #999;
    margin: 0 3px;
    animation: typing 1.4s ease-in-out infinite;
}

.typing-indicator span:nth-child(1) {
    animation-delay: 0s;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 80%, 100% {
        opacity: 0.4;
        transform: scale(1);
    }
    40% {
        opacity: 1;
        transform: scale(1.3);
    }
}

/* Modal - Premium Feel */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

.modal-content {
    background: white;
    border-radius: 24px;
    padding: 36px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: scaleIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667eea;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 12px 0;
    letter-spacing: -0.3px;
}

.modal-text {
    font-size: 14px;
    color: #666;
    margin: 0 0 28px 0;
    line-height: 1.6;
}

.modal-buttons {
    display: flex;
    gap: 12px;
}

.modal-btn {
    flex: 1;
    padding: 14px 24px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.2px;
}

.modal-btn-cancel {
    background: rgba(0, 0, 0, 0.05);
    color: #666;
}

.modal-btn-cancel:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #000;
}

.modal-btn-confirm {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.modal-btn-confirm:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* ===============================================
   ENHANCED MODAL - PREMIUM GLASSMORPHISM DESIGN
   =============================================== */

/* Enhanced Modal Overlay */
.enhanced-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.enhanced-modal-overlay.modal-visible {
    opacity: 1;
    visibility: visible;
}

/* Multi-Layer Backdrop */
.enhanced-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 20%, rgba(99, 102, 241, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(168, 85, 247, 0.08) 0%, transparent 50%),
        linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.6) 100%);
    backdrop-filter: blur(20px) saturate(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
    animation: backdropFadeIn 0.4s ease-out;
}

@keyframes backdropFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px) saturate(1);
        -webkit-backdrop-filter: blur(0px) saturate(1);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(20px) saturate(1.2);
        -webkit-backdrop-filter: blur(20px) saturate(1.2);
    }
}

/* Enhanced Modal Content */
.enhanced-modal-content {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(40px) saturate(1.8);
    -webkit-backdrop-filter: blur(40px) saturate(1.8);
    border-radius: 28px;
    padding: 40px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    box-shadow: 
        0 32px 64px rgba(0, 0, 0, 0.12),
        0 16px 32px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.enhanced-modal-overlay.modal-visible .enhanced-modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Close Button */
.enhanced-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.enhanced-modal-close:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #000;
    transform: scale(1.05);
}

.enhanced-modal-close:active {
    transform: scale(0.95);
}

/* Icon Container Removed - Clean Minimal Design */

/* Enhanced Typography */
.enhanced-modal-text-content {
    margin-bottom: 36px;
    margin-top: 8px; /* Added top margin since icon is removed */
}

.enhanced-modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 16px 0;
    letter-spacing: -0.5px;
    line-height: 1.2;
    animation: textFadeIn 0.6s ease-out 0.3s both;
}

.enhanced-modal-text {
    font-size: 15px;
    color: #6b7280;
    margin: 0;
    line-height: 1.6;
    font-weight: 400;
    letter-spacing: 0.1px;
    animation: textFadeIn 0.6s ease-out 0.4s both;
}

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

/* Enhanced Buttons */
.enhanced-modal-buttons {
    display: flex;
    gap: 16px;
    animation: buttonsFadeIn 0.6s ease-out 0.5s both;
}

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

.enhanced-modal-btn {
    flex: 1;
    padding: 16px 24px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
    font-family: inherit;
}

/* Cancel Button - Glassmorphism */
.enhanced-modal-btn-cancel {
    background: rgba(107, 114, 128, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

.enhanced-modal-btn-cancel:hover {
    background: rgba(107, 114, 128, 0.12);
    border-color: rgba(107, 114, 128, 0.2);
    color: #374151;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(107, 114, 128, 0.15);
}

.enhanced-modal-btn-cancel:active {
    transform: translateY(0);
}

/* Confirm Button - Solid Color */
.enhanced-modal-btn-confirm {
    background: #000000;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
}

.enhanced-modal-btn-confirm:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 12px 35px rgba(0, 0, 0, 0.4),
        0 4px 15px rgba(0, 0, 0, 0.3);
    background: #333333;
}

.enhanced-modal-btn-confirm:active {
    transform: translateY(-1px);
}

.enhanced-modal-btn-confirm .btn-icon {
    transition: transform 0.2s ease;
}

.enhanced-modal-btn-confirm:hover .btn-icon {
    transform: translateX(2px);
}

/* Responsive Design */
@media (max-width: 640px) {
    .enhanced-modal-content {
        padding: 32px 24px;
        margin: 20px;
        border-radius: 24px;
    }
    
    .enhanced-modal-title {
        font-size: 20px;
    }
    
    .enhanced-modal-text {
        font-size: 14px;
    }
    
    .enhanced-modal-buttons {
        flex-direction: column;
        gap: 12px;
    }
    
    .enhanced-modal-btn {
        padding: 14px 20px;
    }
}

/* RTL Support */
[dir="rtl"] .enhanced-modal-close {
    right: auto;
    left: 16px;
}

[dir="rtl"] .enhanced-modal-btn-confirm .btn-icon {
    transform: scaleX(-1);
}

[dir="rtl"] .enhanced-modal-btn-confirm:hover .btn-icon {
    transform: scaleX(-1) translateX(2px);
}

/* Focus Styles for Accessibility */
.enhanced-modal-btn:focus-visible,
.enhanced-modal-close:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

/* Animation for Modal Exit */
.enhanced-modal-overlay.modal-hiding {
    pointer-events: none;
}

.enhanced-modal-overlay.modal-hiding .enhanced-modal-content {
    transform: scale(0.95) translateY(10px);
    opacity: 0;
    transition: all 0.2s ease-out;
}

.enhanced-modal-overlay.modal-hiding .enhanced-modal-backdrop {
    opacity: 0;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    transition: all 0.3s ease-out;
}

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

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

/* Loading States - Shimmer Effect */
.skeleton-loader {
    background: linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.04) 25%,
        rgba(0, 0, 0, 0.08) 50%,
        rgba(0, 0, 0, 0.04) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 100px;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Error Messages - Soft Style */
.error-message {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    color: #dc2626;
    padding: 14px 24px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    z-index: 1000;
    max-width: 90%;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.1);
}

/* Toast Notifications */
.toast-notification {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 14px 24px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 450;
    z-index: 10000;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.2px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* RTL Support */
html[dir="rtl"] .header {
    flex-direction: row-reverse;
}

html[dir="rtl"] .message-field {
    text-align: right;
    padding: 0 20px 0 56px; /* Flipped padding for RTL */
}

html[dir="rtl"] .send-btn {
    right: auto;
    left: 26px; /* 20px container padding + 6px button margin */
}

html[dir="rtl"] .skeleton-send-btn {
    right: auto;
    left: 26px;
}

/* RTL Mobile Responsive */
@media (max-width: 768px) {
    html[dir="rtl"] .message-field {
        padding: 0 18px 0 52px;
    }
    
    html[dir="rtl"] .send-btn,
    html[dir="rtl"] .skeleton-send-btn {
        right: auto;
        left: 30px; /* 24px container + 6px margin */
    }
}

@media (max-width: 480px) {
    html[dir="rtl"] .message-field {
        padding: 0 16px 0 48px;
    }
    
    html[dir="rtl"] .send-btn,
    html[dir="rtl"] .skeleton-send-btn {
        right: auto;
        left: 26px; /* 20px container + 6px margin */
    }
}

html[dir="rtl"] .messages-container {
    direction: rtl;
}

/* RTL: Flip message positions */
html[dir="rtl"] .message.sent {
    margin-left: 0;
    margin-right: auto;
    align-items: flex-start;
}

html[dir="rtl"] .message.received {
    margin-right: 0;
    margin-left: auto;
    align-items: flex-end;
}

/* RTL: Flip bubble corners for sent messages */
html[dir="rtl"] .message.sent .message-content {
    border-radius: 18px 18px 4px 18px;
}

/* RTL: Flip bubble corners for received messages */
html[dir="rtl"] .message.received .message-content {
    border-radius: 18px 18px 18px 4px;
}

/* RTL: Flip footer alignment */
html[dir="rtl"] .message.sent .message-footer {
    justify-content: flex-start;
}

html[dir="rtl"] .message.received .message-footer {
    justify-content: flex-end;
}

/* Arabic Font Support */
html[lang="ar"] body,
html[lang="ar"] input,
html[lang="ar"] button,
html[lang="ar"] textarea {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Arabic', 'Segoe UI', sans-serif;
}

/* Responsive Design */
@media (max-width: 640px) {
    .header {
        padding: 20px 24px;
    }
    
    .main-content {
        padding: 32px 24px;
    }
    
    .message-input {
        padding: 16px 24px 24px;
    }
    
    .suggested-questions {
        padding: 0 24px 16px;
    }
    
    .profile-picture-container {
        width: 150px; /* Increased further from 120px to 150px */
        height: 150px; /* Increased further from 120px to 150px */
    }
    
    .logo {
        height: 52px; /* Increased from 40px to 52px */
        max-width: 200px;
    }
    
    .greeting h2 {
        font-size: 20px; /* Slightly smaller on mobile but still prominent */
        font-weight: 600;
        letter-spacing: -0.1px;
        color: #4a4a4a; /* Match the subtle grey */
    }
}

/* Remove unnecessary elements */
.status-bar,
.home-indicator {
    display: none;
}

/* Custom Focus States */
:focus-visible {
    outline: none;
}

button:focus-visible {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

/* Smooth Scrolling */
* {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 100px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* Disable user selection on UI elements */
.header,
.suggested-questions,
.online-status-bottom,
.modal-icon,
.modal-title {
    user-select: none;
    -webkit-user-select: none;
}