/* Moka AI - Custom Styles */

.hidden {
    display: none !important;
}

body {
    font-family: 'Inter', sans-serif;
    background: #212121;
    background-image: 
        radial-gradient(at 0% 0%, rgba(30, 201, 143, 0.03) 0%, transparent 50%),
        radial-gradient(at 100% 100%, rgba(30, 201, 143, 0.02) 0%, transparent 50%);
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
}

/* Main Layout Fix */
main {
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Prefer dynamic viewport units on mobile browsers that support it */
@supports (height: 100dvh) {
    body { height: 100dvh; }
    main { height: 100dvh; }
}

/* Chat Area Layout Fix */
.flex-1.flex.flex-col.px-6 {
    height: calc(100vh - 60px); /* Header height */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Chat Messages Container Fix */
#chat-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden !important;
    scrollbar-width: thin;
    scrollbar-color: #40414f #1f1f1f;
    -ms-overflow-style: auto;
    padding: 1rem 0;
    height: calc(100vh - 200px);
    display: flex;
    flex-direction: column;
    scroll-behavior: smooth;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

#chat-messages::-webkit-scrollbar {
    width: 8px;
}

#chat-messages::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 4px;
}

#chat-messages::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #40414f 0%, #565869 100%);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

#chat-messages::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #565869 0%, #6b7280 100%);
}

/* Welcome Section Fix */
#welcome-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    overflow: hidden;
    background: linear-gradient(180deg, 
        rgba(33, 33, 33, 0) 0%, 
        rgba(42, 42, 42, 0.1) 50%, 
        rgba(33, 33, 33, 0) 100%);
}

/* Special day styling (29 Ekim) */
.red-smear-left {
    position: relative;
}
.red-smear-left:before {
    content: "";
    position: absolute;
    left: -14px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 60%;
    background: radial-gradient(closest-side, rgba(239,68,68,0.55), rgba(239,68,68,0.0));
    filter: blur(6px);
    opacity: 0.7;
    pointer-events: none;
}

.special-red-image {
    filter: drop-shadow(0 0 12px rgba(239,68,68,0.45));
}

/* Chat Container Fix */
#chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* Input Area Fix */
.p-6 {
    flex-shrink: 0;
    padding: 1.5rem;
    background: #212121;
    border-top: 1px solid #2a2a2a;
}

.sidebar-icon-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.logo-container {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background: #10a37f;
    color: white;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.logo-container:hover {
    background: #0d8a6b;
}

.sidebar-icon {
    transition: all 0.2s ease;
    padding: 10px;
    border-radius: 6px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-icon:hover {
    background: #2a2a2a;
}

.sidebar-icon.active {
    background: #2a2a2a;
}

.chat-input-container {
    background: #2f2f2f;
    border: 1px solid #3a3a3a;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.chat-input-container:focus-within {
    border-color: #565869;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.chat-input-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
}

.send-button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border-radius: 50%;
}

.send-button i {
    color: #000000;
}

.send-button:hover {
    background: #f0f0f0;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.send-button:focus-visible {
    outline: 2px solid #1EC98F;
}

.send-button:active {
    transform: scale(0.98);
}

.send-button:disabled {
    background: #565869;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.send-button:disabled i {
    color: #9ca3af;
}

/* Attach button styling */
.attach-button {
    transition: all 0.2s ease;
    border-radius: 50%;
    padding: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.attach-button:hover {
    background: rgba(86, 88, 105, 0.3);
    transform: scale(1.05);
}

/* Chat input focus styling */
#chat-input:focus {
    outline: none;
}

#chat-input::placeholder {
    color: #6b7280;
}

.header-item {
    transition: all 0.2s ease;
    padding: 8px;
    border-radius: 6px;
}

.header-item:hover {
    background: #2a2a2a;
}

.typing-indicator {
    display: none;
}

.typing-indicator.active {
    display: block;
    animation: fadeInUp 0.3s ease-out;
}

.message-bubble {
    animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

/* Long message handling */
.message-bubble p {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    white-space: pre-wrap;
    line-height: 1.7;
    max-width: 100%;
    overflow: hidden;
    margin: 0;
}

/* User message specific */
.user-message .message-bubble {
    max-width: 80%;
    margin-left: auto;
}

/* AI message specific */
.ai-message .message-bubble {
    max-width: 80%;
    margin-right: auto;
    width: auto;
    display: inline-block;
}

/* Fixed message bubble sizing - single size for all messages */
.message-bubble {
    min-width: fit-content;
    max-width: 80%;
    width: auto;
    display: inline-block;
}

/* User messages - always right aligned with fixed width */
.user-message .message-bubble {
    margin-left: auto;
    max-width: 70%;
    width: auto;
    display: inline-block;
    background: linear-gradient(135deg, #1EC98F 0%, #17B07A 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 18px;
    box-shadow: 0 2px 8px rgba(30, 201, 143, 0.2), 
                0 4px 16px rgba(30, 201, 143, 0.15);
    transition: all 0.2s ease;
}

.user-message .message-bubble:hover {
    box-shadow: 0 4px 12px rgba(30, 201, 143, 0.3), 
                0 6px 20px rgba(30, 201, 143, 0.2);
    transform: translateY(-1px);
}

/* AI messages - stylish bubble */
.ai-message .message-bubble {
    background: linear-gradient(135deg, #2a2a2a 0%, #2f2f2f 100%);
    color: #e5e7eb;
    padding: 12px 16px;
    border-radius: 18px;
    border: 1px solid rgba(64, 65, 79, 0.5);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), 
                0 1px 3px rgba(0, 0, 0, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
}

.ai-message .message-bubble:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), 
                0 2px 6px rgba(0, 0, 0, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.08);
    border-color: rgba(64, 65, 79, 0.7);
    transform: translateY(-1px);
}

/* Smooth fade in animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Code block styling in messages */
.message-bubble pre {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px;
    overflow-x: auto;
    margin: 8px 0;
}

.message-bubble code {
    background: rgba(0, 0, 0, 0.25);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
}

.message-bubble pre code {
    background: transparent;
    padding: 0;
}

/* Markdown styling */
.message-bubble ul, .message-bubble ol {
    padding-left: 20px;
    margin: 8px 0;
}

.message-bubble li {
    margin: 4px 0;
    line-height: 1.6;
}

.message-bubble strong {
    font-weight: 600;
    color: #fff;
}

.message-bubble em {
    font-style: italic;
}

.message-bubble a {
    color: #1EC98F;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.message-bubble a:hover {
    color: #17B07A;
    text-decoration: underline;
}

/* Global link polish */
a {
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
}

a:hover {
    text-underline-offset: 3px;
}

/* Footer link subtle hover */
.text-center.mt-3 a:hover {
    text-decoration: underline;
}

.message-bubble a i {
    font-size: 0.75em;
    opacity: 0.8;
}

/* Code Block Wrapper - Chat uyumlu */
.code-block-wrapper {
    margin: 1px 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #40414f;
    background: #2a2a2a;
    max-width: 100%;
    width: 100%;
}

/* ============================================
   PROFESYONEL KOD BLOĞU STİLLERİ
   ============================================ */

   .code-block-header {
    background: linear-gradient(135deg, #1a1a1e 0%, #242429 50%, #1f1f24 100%);
    border-bottom: 1px solid #3a3a42;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 10px 10px 0 0;
    gap: 10px;
    min-height: 40px;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
}

.code-block-header .text-xs {
    color: #a8adb8;
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    opacity: 0.8;
}

.code-block-content {
    background: linear-gradient(180deg, #0f0f13 0%, #13131a 100%);
    color: #e8eaed;
    padding: 16px 18px;
    border-radius: 0 0 10px 10px;
    overflow-x: auto;
    margin: 0;
    font-family: 'JetBrains Mono', 'Fira Code', 'SFMono-Regular', Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.7;
    max-height: 500px;
    overflow-y: auto;
    max-width: 100%;
    box-sizing: border-box;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.2),
        0 4px 16px rgba(0, 0, 0, 0.4);
    border: 1px solid #2a2a32;
    border-top: none;
}

.code-block-content code {
    color: #e8eaed;
    white-space: pre;
    word-wrap: normal;
    word-break: normal;
    display: block;
    width: 100%;
    font-weight: 400;
    letter-spacing: 0.3px;
}

/* ============================================
   ACTION BUTTONS
   ============================================ */

.code-action-btn {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.03) 100%);
    border: 1px solid #3a3a42;
    cursor: pointer;
    padding: 5px 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 6px;
    font-size: 11px;
    color: #c5c8ce;
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    font-weight: 500;
    backdrop-filter: blur(8px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.code-action-btn:hover {
    background: linear-gradient(135deg, rgba(30, 201, 143, 0.25) 0%, rgba(30, 201, 143, 0.12) 100%);
    border-color: #1EC98F;
    color: #1EC98F;
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.15),
        0 0 12px rgba(30, 201, 143, 0.25),
        inset 0 0 8px rgba(30, 201, 143, 0.1);
    transform: translateY(-1px);
}

.code-action-btn:active {
    transform: translateY(0);
    box-shadow: 
        0 1px 2px rgba(0, 0, 0, 0.2),
        inset 0 0 6px rgba(30, 201, 143, 0.15);
}

.code-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.code-action-btn i {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 12px;
    display: inline-flex;
    align-items: center;
}

.code-action-btn span {
    font-size: 11px;
    line-height: 1;
    font-weight: 500;
}

.code-action-btn:hover i {
    color: #1EC98F;
    transform: scale(1.1);
}

/* ============================================
   SCROLLBAR STİLLERİ
   ============================================ */

.code-block-content::-webkit-scrollbar {
    height: 10px;
    width: 10px;
}

.code-block-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.code-block-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #3a3a42 0%, #2a2a32 100%);
    border-radius: 8px;
    border: 2px solid transparent;
    background-clip: padding-box;
    transition: all 0.3s ease;
}

.code-block-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #4a4a52 0%, #3a3a42 100%);
    background-clip: padding-box;
    box-shadow: inset 0 0 6px rgba(30, 201, 143, 0.2);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .code-block-content {
        font-size: 12px;
        padding: 12px 14px;
        max-height: 350px;
    }
    
    .code-block-header {
        padding: 8px 12px;
        min-height: 36px;
    }
    
    .code-action-btn {
        font-size: 10px;
        padding: 4px 8px;
    }
}

/* ============================================
   DARK MODE ENHANCEMENTİ
   ============================================ */

@media (prefers-color-scheme: dark) {
    .code-block-content {
        color-scheme: dark;
    }
}
/* Message bubble içinde kod bloğu varsa overflow'u düzelt */
.message-bubble {
    overflow: visible !important;
}

/* Kod bloğunu bubble dışına taşı */
.message-bubble .code-block-wrapper {
    margin-left: -16px;
    margin-right: -16px;
    width: calc(100% + 32px);
    border-radius: 0;
}

/* Syntax Highlighting Colors - Chat uyumlu */
.code-tag {
    color: #10b981; /* Green for HTML tags */
}

.code-attr {
    color: #60a5fa; /* Blue for attributes */
}

.code-value {
    color: #fbbf24; /* Yellow/orange for values */
}

.code-comment {
    color: #f97316; /* Orange for comments */
}

.code-char {
    color: #d4d4d4; /* Gray for special characters */
}

.pulse-animation {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.4;
    }
    50% {
        opacity: 1;
    }
}

.glass-effect {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #2a2a2a;
}

.quick-action {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #2a2a2a;
    border: 1px solid #40414f;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.quick-action::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(30, 201, 143, 0.1), transparent);
    transition: left 0.5s ease;
}

.quick-action:hover::before {
    left: 100%;
}

.quick-action:hover {
    background: #2f2f2f;
    border-color: #1EC98F;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 201, 143, 0.15);
}

/* Keyboard accessibility */
.quick-action:focus-visible {
    outline: 2px solid #1EC98F;
    outline-offset: 2px;
}

.quick-action:active {
    transform: translateY(0);
}

/* Icon color on hover */
.quick-action:hover i {
    color: #1EC98F;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.conversation-item {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 11px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.conversation-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(30, 201, 143, 0.05), transparent);
    transition: left 0.3s ease;
}

.conversation-item:hover {
    background: #2a2a2a;
    transform: translateX(2px);
}

.conversation-item:hover::before {
    left: 100%;
}

.conversation-item.active {
    background: #2a2a2a;
    border-left: 3px solid #1EC98F;
}

.conversation-item.active::before {
    background: linear-gradient(90deg, transparent, rgba(30, 201, 143, 0.1), transparent);
}

/* Conversation menu button styles */
.conversation-menu-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    position: relative;
    z-index: 10;
}

.conversation-menu-btn:hover {
    background: #40414f !important;
}

.conversation-menu-btn i {
    transition: color 0.2s ease;
}

.conversation-menu-btn:hover i {
    color: #fff !important;
}

/* Always show menu button on hover for desktop */
.conversation-item:hover .conversation-menu-btn {
    opacity: 1;
    transition: opacity 0.2s ease;
}

/* Context menu styles */
.conversation-context-menu {
    position: fixed;
    z-index: 9999 !important;
    pointer-events: auto !important;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Responsive greeting text */
.greeting-text {
    line-height: 1.4;
    word-wrap: break-word;
    hyphens: auto;
}

/* Mobile Sidebar Toggle */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1000;
    background: #10a37f;
    color: white;
    border: none;
    border-radius: 8px;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.mobile-menu-btn:hover {
    background: #0d8a6b;
}

/* Mobile Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.sidebar-overlay.active {
    display: block;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    /* Fix mobile viewport */
    body { 
        overflow: hidden !important;
        height: 100vh !important;
        height: 100dvh !important;
    }
    
    html {
        height: 100vh !important;
        height: 100dvh !important;
        overflow: hidden !important;
    }
    
    /* Fix chat area alignment - move left */
    .flex-1.flex.flex-col.px-6 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        max-width: 100% !important;
        margin: 0 !important;
    }
    
    /* Fix welcome section */
    #welcome-section {
        padding: 0 1rem !important;
        max-width: 100% !important;
    }
    
    /* Fix text alignment */
    .text-center {
        text-align: left !important;
    }

    /* Sidebar - Beautiful Mobile Design */
    aside {
        position: fixed;
        left: -100%;
        top: 0;
        height: 100vh !important;
        height: 100dvh !important;
        z-index: 9999 !important;
        transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1), transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch;
        display: flex !important;
        flex-direction: column !important;
        scroll-behavior: smooth;
        width: 85vw !important;
        max-width: 320px !important;
        background: linear-gradient(to bottom, #171717 0%, #1a1a1a 50%, #171717 100%) !important;
        border-right: 1px solid rgba(64, 65, 79, 0.3);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(30, 201, 143, 0.1);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }
    
    /* Sidebar open state - smooth slide in */
    aside.mobile-open {
        left: 0;
        transform: translateX(0);
        box-shadow: 8px 0 32px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(30, 201, 143, 0.2);
    }
    
    /* Sidebar overlay - beautiful backdrop */
    .sidebar-overlay {
        z-index: 8999 !important;
        display: block !important;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.35s ease;
    }
    
    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    /* Sidebar content sections */
    aside > div {
        min-height: 0;
    }
    
    /* Sidebar top section - buttons */
    aside.mobile-open > div.p-3 {
        padding: 1rem !important;
        background: rgba(30, 201, 143, 0.03);
        border-bottom: 1px solid rgba(64, 65, 79, 0.2);
    }
    
    /* Sidebar buttons - beautiful mobile design */
    aside.mobile-open button,
    aside.mobile-open a {
        width: 100% !important;
        padding: 14px 16px !important;
        min-height: 52px !important;
        border-radius: 12px !important;
        background: rgba(42, 42, 42, 0.8) !important;
        border: 1px solid rgba(64, 65, 79, 0.4) !important;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        font-size: 15px !important;
        font-weight: 500 !important;
        margin-bottom: 0.75rem !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    
    aside.mobile-open button:hover,
    aside.mobile-open a:hover,
    aside.mobile-open button:active,
    aside.mobile-open a:active {
        background: rgba(30, 201, 143, 0.15) !important;
        border-color: rgba(30, 201, 143, 0.5) !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 4px 12px rgba(30, 201, 143, 0.2) !important;
    }
    
    /* Sidebar button icons */
    aside.mobile-open button i,
    aside.mobile-open a i {
        font-size: 18px !important;
        width: 24px !important;
        height: 24px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        color: #1EC98F !important;
        transition: all 0.25s ease !important;
    }
    
    aside.mobile-open button:hover i,
    aside.mobile-open a:hover i {
        transform: scale(1.1) !important;
    }
    
    /* Sidebar button text - always visible on mobile */
    aside.mobile-open button span,
    aside.mobile-open a span {
        opacity: 1 !important;
        display: inline-block !important;
        color: #e5e7eb !important;
        font-weight: 500 !important;
        white-space: nowrap !important;
    }
    
    /* Conversations list */
    aside.mobile-open .flex-1 {
        padding: 0.75rem !important;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: rgba(30, 201, 143, 0.4) transparent;
    }
    
    /* Custom scrollbar for mobile sidebar */
    aside.mobile-open .flex-1::-webkit-scrollbar {
        width: 4px;
    }
    
    aside.mobile-open .flex-1::-webkit-scrollbar-track {
        background: transparent;
    }
    
    aside.mobile-open .flex-1::-webkit-scrollbar-thumb {
        background: rgba(30, 201, 143, 0.4);
        border-radius: 2px;
    }
    
    aside.mobile-open .flex-1::-webkit-scrollbar-thumb:hover {
        background: rgba(30, 201, 143, 0.6);
    }
    
    /* Conversation items - beautiful mobile design */
    aside.mobile-open .conversation-item {
        padding: 14px 16px !important;
        min-height: 56px !important;
        border-radius: 12px !important;
        background: rgba(42, 42, 42, 0.6) !important;
        border: 1px solid rgba(64, 65, 79, 0.2) !important;
        margin-bottom: 0.5rem !important;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
        cursor: pointer;
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    aside.mobile-open .conversation-item:hover,
    aside.mobile-open .conversation-item:active {
        background: rgba(30, 201, 143, 0.12) !important;
        border-color: rgba(30, 201, 143, 0.4) !important;
        transform: translateX(4px) !important;
        box-shadow: 0 4px 12px rgba(30, 201, 143, 0.15) !important;
    }
    
    aside.mobile-open .conversation-item.active {
        background: rgba(30, 201, 143, 0.18) !important;
        border-left: 4px solid #1EC98F !important;
        border-color: rgba(30, 201, 143, 0.5) !important;
        box-shadow: 0 4px 16px rgba(30, 201, 143, 0.2) !important;
    }
    
    /* Conversation item text */
    aside.mobile-open .conversation-item span {
        font-size: 14px !important;
        color: #e5e7eb !important;
        font-weight: 500 !important;
        opacity: 1 !important;
        display: block !important;
        flex: 1 !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }
    
    /* Profile section - beautiful bottom design */
    aside.mobile-open .px-2.py-3 {
        padding: 1rem !important;
        margin-top: auto !important;
        background: rgba(30, 201, 143, 0.03);
        border-top: 1px solid rgba(64, 65, 79, 0.3);
        border-radius: 0 !important;
    }
    
    /* Profile button - enhanced */
    aside.mobile-open #profile-btn {
        padding: 12px !important;
        border-radius: 12px !important;
        background: rgba(42, 42, 42, 0.8) !important;
        border: 1px solid rgba(64, 65, 79, 0.3) !important;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    
    aside.mobile-open #profile-btn:hover,
    aside.mobile-open #profile-btn:active {
        background: rgba(30, 201, 143, 0.15) !important;
        border-color: rgba(30, 201, 143, 0.5) !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 4px 12px rgba(30, 201, 143, 0.2) !important;
    }
    
    /* Profile avatar */
    aside.mobile-open #profile-btn .w-10 {
        width: 48px !important;
        height: 48px !important;
        font-size: 18px !important;
        box-shadow: 0 4px 12px rgba(30, 201, 143, 0.3) !important;
    }
    
    /* Profile text */
    aside.mobile-open #profile-btn .flex-1,
    aside.mobile-open #profile-btn .opacity-0 {
        opacity: 1 !important;
        display: block !important;
    }
    
    /* Login/Register buttons */
    aside.mobile-open .space-y-2 {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
    }
    
    aside.mobile-open .space-y-2 a {
        width: 100% !important;
        padding: 14px 16px !important;
        min-height: 52px !important;
        border-radius: 12px !important;
        font-size: 15px !important;
        font-weight: 600 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 12px !important;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }
    
    /* Push header behind sidebar when sidebar is open */
    aside.mobile-open ~ main {
        z-index: 10 !important;
    }
    
    aside.mobile-open ~ main .header-bar,
    aside.mobile-open ~ main header {
        z-index: 10 !important;
        position: relative !important;
    }
    
    /* Hide any floating buttons when sidebar is open on mobile */
    aside.mobile-open ~ main button[style*="position: fixed"],
    aside.mobile-open ~ main button[style*="fixed"],
    aside.mobile-open ~ main button[z-index],
    aside.mobile-open ~ main .floating,
    aside.mobile-open ~ main .fab {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
    
    /* Mobile conversation menu button - always visible and beautiful */
    .conversation-menu-btn {
        opacity: 1 !important;
        background: rgba(64, 65, 79, 0.3) !important;
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        min-height: 36px !important;
        border-radius: 8px !important;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        cursor: pointer !important;
        pointer-events: auto !important;
        z-index: 10 !important;
        position: relative !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        transition: all 0.2s ease !important;
        flex-shrink: 0 !important;
    }
    
    .conversation-menu-btn:active {
        background: rgba(30, 201, 143, 0.3) !important;
        transform: scale(0.9);
    }
    
    .conversation-menu-btn i {
        font-size: 14px !important;
        pointer-events: none !important;
        color: #9ca3af !important;
        transition: color 0.2s ease !important;
    }
    
    .conversation-menu-btn:active i {
        color: #1EC98F !important;
    }
    
    /* Mobile conversation item - show button */
    .conversation-item:hover .conversation-menu-btn,
    .conversation-item:active .conversation-menu-btn {
        opacity: 1 !important;
        background: rgba(64, 65, 79, 0.5) !important;
    }
    
    /* Mobile conversation title - always visible */
    .conversation-item .text-sm.text-gray-300 {
        opacity: 1 !important;
    }
    
    /* Main content adjustments */
    main {
        margin-left: 0;
        padding-left: 0;
        height: 100vh;
        overflow: hidden;
    }
    
    /* Chat area mobile fix */
    .flex-1.flex.flex-col.px-6 {
        height: calc(100vh - 60px);
        overflow: hidden;
    }
    
    /* Header adjustments */
    header {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Chat area adjustments */
    .flex-1.flex.flex-col.px-6 {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Welcome section mobile */
    .greeting-text {
        font-size: 1.5rem !important;
        line-height: 1.3;
        padding: 0 1rem;
    }
    
    /* Quick actions grid mobile */
    .grid.grid-cols-1.md\\:grid-cols-2 {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    /* Chat input mobile */
    .p-6 {
        padding: 1rem;
    }
    
    /* Chat messages mobile */
    #chat-messages {
        padding: 0.75rem 1rem;
        height: calc(100vh - 180px);
        display: flex;
        flex-direction: column;
        overflow-y: auto;
        overflow-x: hidden !important;
        scrollbar-width: thin;
        scrollbar-color: #565869 #2a2a2a;
        max-width: 100%;
        width: 100%;
    }

    /* If dynamic viewport units are supported, prefer them */
    @supports (height: 100dvh) {
        main { height: 100dvh; }
        .flex-1.flex.flex-col.px-6 { height: calc(100dvh - 60px); }
        #chat-messages { height: calc(100dvh - 180px); }
    }
    
    /* Hide desktop scrollbar, use native mobile scrolling */
    #chat-messages::-webkit-scrollbar {
        width: 4px;
    }
    
    /* Message handling improvements */
    .message-bubble {
        width: auto !important;
        max-width: 80% !important;
        padding: 0.875rem 1rem;
        border-radius: 14px;
        margin-bottom: 0.875rem;
        word-wrap: break-word;
        word-break: break-word;
    }

    .user-message .message-bubble {
        margin-left: auto !important;
        margin-right: 0 !important;
        background: linear-gradient(135deg, #1EC98F 0%, #17B07A 100%) !important;
        color: #fff !important;
        max-width: 80% !important;
        align-self: flex-end;
        box-shadow: 0 2px 8px rgba(30, 201, 143, 0.25) !important;
    }

    .ai-message .message-bubble {
        margin-left: 0 !important;
        margin-right: auto !important;
        background: linear-gradient(135deg, #2a2a2a 0%, #2f2f2f 100%) !important;
        color: #e5e7eb !important;
        max-width: 80% !important;
        align-self: flex-start;
        border: 1px solid rgba(64, 65, 79, 0.5) !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    }

    .message-bubble p {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        white-space: pre-wrap;
        line-height: 1.5;
        font-size: 14px;
        margin: 0;
    }

    /* Message container spacing */
    .message-container {
        width: 100%;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        padding: 0.25rem 0;
    }

    /* AI message specific layout */
    .ai-message {
        display: flex;
        gap: 0.75rem;
        align-items: flex-start;
        width: 100%;
    }

    .ai-message .w-8 {
        flex-shrink: 0;
        width: 28px !important;
        height: 28px !important;
        font-size: 12px !important;
        margin-top: 0.5rem !important;
    }

    .ai-message .flex-1 {
        flex: 1;
        min-width: 0;
    }

    /* User message specific layout */
    .user-message {
        display: flex !important;
        justify-content: flex-end !important;
        align-items: flex-start !important;
        width: 100% !important;
        padding: 0.25rem 0 !important;
        margin-bottom: 0.5rem;
    }
    
    /* AI message mobile */
    .ai-message {
        display: flex !important;
        justify-content: flex-start !important;
        align-items: flex-start !important;
        width: 100% !important;
        padding: 0.25rem 0 !important;
        margin-bottom: 0.5rem;
    }
    
    /* Message wrapper mobile */
    .max-w-3xl {
        max-width: 100% !important;
        width: 100% !important;
    }
    
    /* Typing indicator mobile */
    .typing-indicator {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    /* Extra small mobile adjustments */
    .greeting-text {
        font-size: 1.25rem !important;
        line-height: 1.2;
        padding: 0 0.5rem;
    }
    
    /* Header mobile small */
    header {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
    
    /* Chat area mobile small */
    .flex-1.flex.flex-col.px-6 {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    @supports (height: 100dvh) {
        .flex-1.flex.flex-col.px-6 { height: calc(100dvh - 60px); }
        #chat-messages { height: calc(100dvh - 170px); }
    }
    
    /* Quick actions mobile small */
    .grid.grid-cols-1.md\\:grid-cols-2 {
        gap: 0.5rem;
        padding: 0 0.25rem;
    }
    
    /* Quick action cards mobile small */
    .quick-action {
        padding: 0.75rem;
        margin: 0.25rem 0;
    }
    
    /* Chat input mobile small */
    .p-6 {
        padding: 0.75rem;
    }
    
    .chat-input-container {
        padding: 0.5rem;
    }
    
    /* Send button mobile small */
    .send-button {
        width: 40px;
        height: 40px;
        border-radius: 20px;
    }
    
    .send-button i {
        font-size: 12px;
    }
    
    /* Long message handling mobile small */
    .message-bubble p {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        white-space: pre-wrap;
        line-height: 1.3;
        font-size: 13px;
    }
    
    /* Message bubbles mobile small */
    .message-bubble {
        max-width: 85% !important;
        padding: 0.75rem 0.875rem;
        font-size: 14px;
        border-radius: 16px;
    }
    
    .user-message .message-bubble {
        max-width: 85% !important;
    }
    
    .ai-message .message-bubble {
        max-width: 85% !important;
    }
    
    /* Sidebar mobile small */
    aside {
        width: 260px;
    }
    
    /* Hamburger button mobile small */
    .hamburger-btn {
        width: 28px;
        height: 28px;
    }
    
    .hamburger-line {
        width: 16px;
        height: 2px;
    }
}

/* ChatGPT-style Message Actions */
.message-action-btn {
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    background: transparent;
    border: none;
    cursor: pointer;
}

.message-action-btn:hover {
    background: #40414f;
}

/* ChatGPT-style Attach Button */
.attach-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #40414f;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.attach-btn:hover {
    background: #565869;
}

/* ChatGPT-style Message Container */
.message-container {
    animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    margin-bottom: 1.5rem;
    padding: 4px 0;
}

/* AI avatar styling */
.ai-message .w-8 {
    background: linear-gradient(135deg, #1EC98F 0%, #17B07A 100%);
    box-shadow: 0 2px 8px rgba(30, 201, 143, 0.3),
                0 1px 3px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.ai-message .w-8:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(30, 201, 143, 0.4),
                0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Message wrapper improvements */
.user-message, .ai-message {
    padding: 8px 0;
    animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Typing indicator improvements */
#typing-indicator .typing-dots span {
    background: linear-gradient(135deg, #1EC98F 0%, #17B07A 100%);
    animation: typingDot 1.4s infinite ease-in-out;
}

#typing-indicator .typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

#typing-indicator .typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingDot {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ChatGPT-style Input Container */
.chat-input-container {
    background: #2f2f2f;
    border: 1px solid #3a3a3a;
    transition: all 0.2s ease;
    position: relative;
}

.chat-input-container:focus-within {
    border-color: #565869;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ChatGPT-style Send Button */
.send-button {
    transition: all 0.2s ease;
    background: #ffffff;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.send-button:hover {
    background: #f0f0f0;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.send-button:active {
    transform: scale(0.95);
}

.send-button:disabled {
    background: #565869;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.send-button i {
    color: #000000;
    font-size: 14px;
}

.send-button:disabled i {
    color: #9ca3af;
}

/* Input field disabled state */
#chat-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #2a2a2a;
}

#chat-input:disabled::placeholder {
    color: #6b7280;
}

/* ChatGPT-style Header */
.header-bar {
    background: linear-gradient(135deg, #1f1f1f 0%, #2a2a2a 100%);
    border-bottom: 1px solid rgba(64, 65, 79, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 
                0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Custom Hamburger Menu */
.hamburger-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    gap: 3px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.hamburger-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.hamburger-btn:active {
    background: rgba(255, 255, 255, 0.2);
}

/* Hide hamburger on desktop */
@media (min-width: 769px) {
    .hamburger-btn {
        display: none;
    }
}

.hamburger-line {
    width: 18px;
    height: 2px;
    background: #d1d5db;
    border-radius: 1px;
    transition: all 0.3s ease;
}

.hamburger-btn:hover .hamburger-line {
    background: #ffffff;
}

/* Header Title */
.header-title {
    color: #d1d5db;
    font-size: 16px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
}

/* Subtle enhancement for header title */
.header-title {
    letter-spacing: 0.02em;
    text-shadow: 0 0 12px rgba(30, 201, 143, 0.08);
}

/* Attach Header Button */
.attach-header-btn {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.attach-header-btn:hover {
    background: #40414f;
}

.attach-header-btn:hover i {
    color: #ffffff;
}

/* Mobile Sidebar Toggle */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1000;
    background: #10a37f;
    color: white;
    border: none;
    border-radius: 8px;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.mobile-menu-btn:hover {
    background: #0d8a6b;
}

/* Mobile Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.sidebar-overlay.active {
    display: block;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    /* Hide desktop sidebar, show mobile menu button */
    aside {
        position: fixed;
        left: -100%;
        top: 0;
        height: 100vh !important;
        height: 100dvh !important;
        z-index: 1000;
        transition: left 0.3s ease;
        width: 280px;
        overflow-y: auto !important;
        overflow-x: hidden !important;
    }
    
    aside.mobile-open {
        left: 0;
    }
    
    /* Main content adjustments */
    main {
        margin-left: 0;
        padding-left: 0;
        width: 100%;
    }
    
    /* Header adjustments */
    header {
        padding-left: 1rem;
        padding-right: 1rem;
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }
    
    /* Chat area adjustments */
    .flex-1.flex.flex-col.px-6 {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Welcome section mobile */
    .greeting-text {
        font-size: 1.5rem !important;
        line-height: 1.3;
        padding: 0 1rem;
        text-align: center;
    }
    
    /* Quick actions grid mobile */
    .grid.grid-cols-1.md\\:grid-cols-2 {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        max-width: 100%;
        padding: 0 0.5rem;
    }
    
    /* Chat input mobile */
    .p-6 {
        padding: 1rem;
    }
    
    /* Chat messages mobile */
    #chat-messages {
        padding: 0.5rem 1rem !important;
        height: calc(100vh - 150px) !important;
        min-height: calc(100vh - 150px) !important;
        display: flex;
        flex-direction: column;
        overflow-y: auto;
        overflow-x: hidden !important;
        scrollbar-width: thin;
        scrollbar-color: #565869 #2a2a2a;
        margin-top: 0 !important;
    }
    
    /* Message bubbles mobile */
    .max-w-3xl {
        max-width: 100%;
    }
    
    /* Typing indicator mobile */
    .typing-indicator {
        padding: 0 1rem;
    }
    
    /* Input container mobile */
    .chat-input-container {
        padding: 0.75rem;
    }
    
    /* Send button mobile */
    .send-button {
        width: 48px;
        height: 48px;
        border-radius: 24px;
    }
    
    .send-button i {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    /* Extra small mobile adjustments */
    .greeting-text {
        font-size: 1.25rem !important;
        line-height: 1.2;
        padding: 0 0.5rem;
    }
    
    /* Header mobile small */
    header {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
        height: 48px !important;
        min-height: 48px !important;
        max-height: 48px !important;
    }
    
    .header-title {
        font-size: 14px !important;
    }
    
    /* Chat input mobile small */
    .chat-input-container {
        padding: 0.75rem;
    }
    
    /* Send button mobile small */
    .send-button {
        width: 36px;
        height: 36px;
    }
    
    /* Quick actions mobile small */
    .quick-action {
        padding: 0.75rem;
    }
    
    /* Sidebar mobile small */
    aside {
        width: 280px;
    }
}

/* Tablet specific adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    /* Tablet sidebar */
    aside {
        width: 200px;
    }
    
    aside:hover {
        width: 280px;
    }
    
    /* Tablet main content */
    main {
        margin-left: 0;
    }
    
    /* Tablet header */
    header {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Tablet chat area */
    .flex-1.flex.flex-col.px-6 {
        padding-left: 2rem;
        padding-right: 2rem;
    }
    
    /* Tablet quick actions */
    .grid.grid-cols-1.md\\:grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* Mobile Quick Action Improvements */
@media (max-width: 768px) {
    .quick-action {
        padding: 0.75rem;
        margin: 0.25rem 0;
        border-radius: 8px;
        transition: all 0.2s ease;
    }
    
    .quick-action .flex {
        gap: 0.75rem;
    }
    
    .quick-action h3 {
        font-size: 0.875rem;
        line-height: 1.2;
        margin-bottom: 0.25rem;
    }
    
    .quick-action p {
        font-size: 0.75rem;
        line-height: 1.1;
        opacity: 0.8;
    }
    
    .quick-action:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }
    
    /* Mobile input improvements */
    .chat-input-container {
        border-radius: 12px;
    }
    
    .attach-btn {
        width: 28px;
        height: 28px;
    }
    
    /* Mobile header improvements */
    .header-title {
        font-size: 14px;
    }
    
    /* Mobile welcome section */
    #welcome-section {
        padding: 1rem;
    }
}

/* Desktop Layout Improvements */
@media (min-width: 769px) {
    /* Desktop sidebar */
    .desktop-sidebar {
        width: 4rem !important;
        min-width: 4rem;
        background: #212121;
        border-right: 1px solid #2a2a2a;
        transition: width 0.3s ease;
        overflow: hidden;
    }
    
    .desktop-sidebar:hover {
        width: 16rem !important;
    }
    
    .desktop-sidebar .sidebar-icon {
        transition: background 0.2s ease;
        color: #9ca3af;
    }
    
    .desktop-sidebar .sidebar-icon:hover,
    .desktop-sidebar .sidebar-icon.active {
        background: rgba(255, 255, 255, 0.05);
        color: #d1d5db;
    }
    
    .desktop-sidebar .conversation-item {
        transition: background 0.2s ease;
        padding: 0.75rem;
    }
    
    .desktop-sidebar .conversation-item:hover {
        background: rgba(255, 255, 255, 0.05);
    }
    
    .desktop-sidebar .conversation-item.active {
        background: rgba(255, 255, 255, 0.1);
    }
    
    .desktop-sidebar .conversation-item span {
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .desktop-sidebar:hover .conversation-item span {
        opacity: 1;
    }
    
    /* Desktop main content */
    main {
        margin-left: 0;
        width: calc(100% - 4rem);
        height: 100vh;
        overflow: hidden;
    }
    
    /* Desktop chat area - PROPER WIDTH */
    .flex-1.flex.flex-col.px-6 {
        padding-left: 2rem;
        padding-right: 2rem;
        max-width: 1200px;
        width: 100%;
        margin: 0 auto;
    }
    
    /* Desktop chat messages container - PROPER WIDTH */
    #chat-messages {
        max-width: 1200px;
        margin: 0 auto;
        padding-left: 2rem;
        padding-right: 2rem;
    }
    
    /* Desktop welcome section */
    #welcome-section {
        padding: 2rem;
    }
    
    /* Desktop welcome section content - same width as input */
    #welcome-section .max-w-4xl {
        max-width: 1200px !important;
        width: 100%;
        margin: 0 auto;
    }
    
    /* Desktop quick actions - same width as input */
    #welcome-section .grid.grid-cols-1.md\\:grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        max-width: 1200px !important;
        width: 100%;
    }
    
    /* Desktop message wrappers - PROPER max-width */
    #chat-messages .max-w-3xl {
        max-width: 1200px !important;
        width: auto !important;
    }
    
    /* Long message handling desktop */
    .message-bubble p {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        white-space: pre-wrap;
        line-height: 1.6;
        font-size: 15px;
    }
    
    /* Desktop message bubble base styles - PROPER WIDTH */
    #chat-messages .message-bubble {
        min-width: fit-content !important;
        max-width: 80% !important;
        width: auto !important;
        display: inline-block;
    }
    
    /* User messages desktop - AUTO WIDTH */
    #chat-messages .user-message .message-bubble {
        width: auto !important;
        max-width: 70% !important;
        margin-left: auto !important;
        margin-right: 0;
        display: inline-block;
    }
    
    /* AI messages desktop - AUTO WIDTH */
    #chat-messages .ai-message .message-bubble {
        width: auto !important;
        max-width: 80% !important;
        margin-left: 0;
        margin-right: auto;
        display: inline-block;
    }
    
    /* Desktop input */
    .p-6 {
        padding: 2rem;
        max-width: 1200px;
        margin: 0 auto;
        width: 100%;
    }
    
    .chat-input-container {
        padding: 1rem;
        border-radius: 16px;
        max-width: 1200px;
        margin: 0 auto;
    }
    
    /* Desktop message improvements */
    .message-container {
        margin-bottom: 2rem;
    }
    
    .ai-message .flex {
        gap: 1rem;
    }
    
    .ai-message .w-8 {
        width: 2.5rem;
        height: 2.5rem;
        margin-top: 0.5rem;
    }
    
    .ai-message .w-8 span {
        font-size: 1rem;
    }
    
    /* Desktop typing indicator */
    .typing-indicator {
        padding: 0 2rem;
    }
    
    /* Desktop sidebar text visibility */
    aside:not(:hover) #new-chat-btn span,
    aside:not(:hover) #moka-voice-btn span {
        display: none !important;
    }
    
    aside:hover #new-chat-btn span,
    aside:hover #moka-voice-btn span {
        display: inline !important;
    }
    
    aside:not(:hover) .conversation-item:last-child span {
        display: none !important;
    }
    
    aside:hover .conversation-item:last-child span {
        display: inline !important;
    }
}

/* Kaynaklar Panel Styles */
#sources-panel {
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    height: 70vh;
}

#sources-panel.open {
    transform: translateY(0);
}

/* Ensure proper flex behavior for scrolling */
#sources-panel .flex.flex-col {
    height: 100%;
    min-height: 0;
}

#sources-content {
    min-height: 0;
}

@media (max-width: 768px) {
    /* Kaynaklar Panel - Mobil */
    #sources-panel {
        transform: translateY(100%) !important;
        z-index: 9999;
    }
    
    #sources-panel.open {
        transform: translateY(0) !important;
    }
    
    /* Overlay mobilde */
    #sources-overlay {
        z-index: 9998;
    }
    
    /* Mobil kaynak içeriği */
    .source-item {
        padding: 10px;
    }
    
    .source-title {
        font-size: 13px;
    }
    
    .source-snippet {
        font-size: 12px;
    }
    
    .source-date {
        font-size: 11px;
    }
    
    /* Mobil panel header */
    #sources-panel .flex.items-center.justify-between {
        padding: 12px;
    }
    
    #sources-panel h3 {
        font-size: 16px;
    }
    
    #sources-panel #close-sources-btn {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Mobil içerik */
    #sources-content {
        padding: 12px;
    }
    
    .source-icon {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
    
    /* Mobil panel height */
    #sources-panel {
        height: 80vh !important;
    }
}

/* Kaynaklar İçeriği */
.source-item {
    background: #2a2a2a;
    border: 1px solid #40414f;
    border-radius: 8px;
    padding: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.source-item:hover {
    background: #2f2f2f;
    border-color: #1EC98F;
}

.source-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
}

.source-title {
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
    font-size: 14px;
}

.source-snippet {
    color: #9ca3af;
    font-size: 13px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.source-date {
    color: #6b7280;
    font-size: 12px;
    margin-top: 4px;
}

/* Kaynaklar Panel Scrollbar */
#sources-content {
    scrollbar-width: thin;
    scrollbar-color: #565869 #2a2a2a;
}

#sources-content::-webkit-scrollbar {
    width: 8px;
}

#sources-content::-webkit-scrollbar-track {
    background: #2a2a2a;
    border-radius: 4px;
}

#sources-content::-webkit-scrollbar-thumb {
    background: #565869;
    border-radius: 4px;
}

#sources-content::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* Enhanced Source Cards */
.source-card {
    display: grid;
    grid-template-columns: 24px 1fr 40px;
    gap: 12px;
    align-items: start;
    background: #2a2a2a;
    border: 1px solid #40414f;
    border-radius: 10px;
    padding: 12px;
    transition: border-color 0.2s ease, background 0.2s ease;
    cursor: pointer;
    margin-bottom: 10px;
}

.source-card:hover { border-color: #1EC98F; background: #2f2f2f; }

.source-left { width: 24px; height: 24px; }
.source-main { min-width: 0; }
.source-right { margin-left: 8px; }

.source-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.source-title { font-size: 15px; line-height: 1.3; margin: 0; }
.source-meta { color: #9ca3af; font-size: 12px; margin-bottom: 4px; }
.source-url { color: #9ca3af; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px; }

.source-badge { display: inline-flex; align-items: center; height: 18px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.badge-official { background: rgba(30, 201, 143, 0.15); color: #1EC98F; border: 1px solid rgba(30,201,143,0.35); }
.badge-wiki { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59,130,246,0.35); }
.badge-publisher { background: rgba(236, 72, 153, 0.15); color: #f472b6; border: 1px solid rgba(236,72,153,0.35); }
.badge-default { background: rgba(156, 163, 175, 0.15); color: #d1d5db; border: 1px solid rgba(156,163,175,0.35); }

.source-thumb { width: 80px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid #374151; display: block; }

/* Visit button */
.source-visit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1EC98F 0%, #17A377 100%);
    color: #0b3b2f;
    border: 1px solid rgba(30, 201, 143, 0.4);
    box-shadow: 0 2px 8px rgba(30, 201, 143, 0.25);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.source-visit-btn:hover { transform: scale(1.06); box-shadow: 0 4px 12px rgba(30,201,143,0.35); }
.source-visit-btn:active { transform: scale(0.96); }

@media (max-width: 520px) {
    .source-right { display: none; }
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    max-width: 400px;
    width: auto;
}

.toast-notification {
    background: linear-gradient(135deg, #2a2a2a 0%, #353535 100%);
    border: 1px solid #40414f;
    border-radius: 16px;
    padding: 14px 18px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.2), 
                0 0 0 1px rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    pointer-events: auto;
    opacity: 0;
    transform: translateX(120%) scale(0.95);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: toastSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.toast-notification.hide {
    opacity: 0;
    transform: translateX(120%) scale(0.95);
    transition: all 0.15s ease-out;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(120%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.toast-close-btn {
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
}

.toast-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Toast responsive */
@media (max-width: 768px) {
    #toast-container {
        top: 70px;
        right: 12px;
        left: auto;
        max-width: calc(100vw - 24px);
        width: auto;
    }
    
    .toast-notification {
        min-width: 280px;
        max-width: calc(100vw - 24px);
        width: auto;
        padding: 12px 14px;
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .toast-notification .flex.items-center.gap-3 {
        gap: 12px;
    }
    
    .toast-notification .flex-shrink-0.text-xl {
        font-size: 18px;
    }
    
    .toast-notification .text-sm {
        font-size: 13px;
        line-height: 1.4;
    }
}
    

/* Toast hover effect */
.toast-notification:hover {
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4), 0 6px 16px rgba(0, 0, 0, 0.3),
                0 0 0 1px rgba(255, 255, 255, 0.08);
    transform: translateX(0) scale(1.01);
}

.toast-notification.hide:hover {
    transform: translateX(120%) scale(0.95);
}

/* Toast success border */
.toast-notification[class*="border-[#1EC98F]"] {
    border-left: 3px solid #1EC98F;
}

/* Toast error border */
.toast-notification[class*="border-red"] {
    border-left: 3px solid #ef4444;
}

/* Toast info border */
.toast-notification[class*="border-blue"] {
    border-left: 3px solid #60a5fa;
}

/* Image Preview Container - Close Button Mobile */
#image-preview-container {
    flex-wrap: wrap;
}

#image-preview-container .group {
    transition: all 0.2s ease;
}

@media (max-width: 768px) {
    /* Mobile: Always show close button on image preview */
    #image-preview-container .image-remove-btn {
        opacity: 1 !important;
        background: rgba(239, 68, 68, 0.9) !important;
    }
    
    #image-preview-container .image-remove-btn:hover {
        background: rgb(220, 38, 38) !important;
    }
    
    /* Larger touch target for mobile */
    #image-preview-container .image-remove-btn {
        width: 32px;
        height: 32px;
    }
    
    /* Mobile Layout Improvements */
    body {
        height: 100dvh;
        overflow: hidden;
    }
    
    /* Sidebar Overlay */
    .sidebar-overlay {
        display: block !important;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.85);
        backdrop-filter: blur(6px);
        z-index: 40;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s ease;
    }
    
    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    /* Sidebar on mobile - hidden by default */
    aside.desktop-sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        height: 100vh;
        z-index: 50;
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 8px 0 32px rgba(0,0,0,0.8);
        width: 300px;
    }
    
    aside.desktop-sidebar.mobile-open {
        left: 0;
    }
    
    /* Main content full width on mobile */
    main {
        width: 100%;
        margin-left: 0 !important;
    }
    
    /* Header adjustments */
    .header-bar {
        padding: 0.5rem 1rem !important;
        height: 50px !important;
        min-height: 50px !important;
        max-height: 50px !important;
    }
    
    .header-title {
        font-size: 15px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Fix header to not cover content */
    main {
        padding-top: 0 !important;
    }
    
    /* Ensure content starts below header */
    .flex-1.flex.flex-col.px-6 {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    /* Welcome section text adjustments */
    #welcome-section {
        padding-top: 0.5rem !important;
        padding-bottom: 1rem !important;
    }
    
    #welcome-section h1 {
        font-size: 1.5rem !important;
        padding: 0 1rem;
        margin-top: 0.5rem !important;
    }
    
    #welcome-section p {
        font-size: 0.9rem !important;
        padding: 0 1rem;
    }
    
    /* Quick actions grid on mobile */
    .grid-cols-1.md\\:grid-cols-2.lg\\:grid-cols-4 {
        grid-template-columns: 1fr !important;
        gap: 0.75rem;
    }
    
    /* Quick action cards */
    .quick-action {
        padding: 0.75rem !important;
    }
    
    /* Chat messages container */
    #chat-messages {
        padding: 0.75rem;
    }
    
    /* Mobile sidebar button improvements */
    aside.desktop-sidebar button {
        padding: 14px 12px !important;
        min-height: 50px !important;
        border-radius: 12px;
        gap: 14px;
    }
    
    aside.desktop-sidebar button i {
        font-size: 20px !important;
    }
    
    aside.desktop-sidebar button span {
        font-size: 15px !important;
        font-weight: 500;
    }
    
    /* Mobile conversation items */
    aside.desktop-sidebar .conversation-item {
        padding: 14px 12px !important;
        min-height: 56px !important;
        gap: 12px;
        border-radius: 12px;
    }
    
    aside.desktop-sidebar .conversation-item span {
        font-size: 14px !important;
        font-weight: 500;
    }
    
    /* Mobile user profile button */
    aside.desktop-sidebar #profile-btn {
        padding: 12px !important;
        min-height: 64px !important;
        border-radius: 16px;
    }
    
    aside.desktop-sidebar #profile-btn .w-10 {
        width: 48px !important;
        height: 48px !important;
        font-size: 18px !important;
    }
    
    /* Message bubbles on mobile */
    .message-bubble {
        max-width: 85% !important;
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
    }
    
    /* Input area on mobile */
    .p-6 {
        padding: 1rem !important;
        position: sticky;
        bottom: 0;
        background: #212121;
    }
    
    .chat-input-container {
        padding: 0.5rem 0.75rem !important;
    }
    
    /* Chat input text */
    #chat-input {
        font-size: 16px !important; /* Prevents zoom on iOS */
    }
    
    /* Footer - hide on mobile */
    .text-center.mt-3 {
        display: none !important;
    }
    
    /* Welcome Section - Beautiful Mobile Design */
    #welcome-section {
        padding: 1.5rem 1rem !important;
        margin-top: 0 !important;
        justify-content: flex-start !important;
        min-height: auto !important;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        max-height: calc(100vh - 140px);
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    #welcome-section::-webkit-scrollbar {
        display: none;
    }
    
    #welcome-section .max-w-5xl {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 auto;
    }
    
    /* Main Content Flex Container - Mobile */
    .flex-1.flex.flex-col.px-6 {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        height: calc(100vh - 50px) !important;
        overflow: hidden !important;
    }
    
    @supports (height: 100dvh) {
        .flex-1.flex.flex-col.px-6 {
            height: calc(100dvh - 50px) !important;
        }
        #welcome-section {
            max-height: calc(100dvh - 140px);
        }
    }
    
    /* Welcome Section Title */
    #welcome-section h1 {
        font-size: 1.75rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.75rem !important;
        padding: 0 !important;
        text-align: center;
        font-weight: 700 !important;
        color: #ffffff !important;
    }
    
    /* Welcome Section Description */
    #welcome-section p {
        font-size: 0.95rem !important;
        line-height: 1.5 !important;
        padding: 0 !important;
        margin-bottom: 1.5rem !important;
        text-align: center;
        color: #d1d5db !important;
    }
    
    /* Welcome Section mb-8 class override */
    #welcome-section .mb-8 {
        margin-bottom: 1.25rem !important;
    }
    
    /* Quick Actions Grid - Beautiful Mobile Layout */
    #welcome-section .grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Quick Action Cards - Mobile Optimized */
    .quick-action {
        padding: 1rem !important;
        min-height: 70px !important;
        border-radius: 14px !important;
        background: linear-gradient(135deg, rgba(42, 42, 42, 0.9) 0%, rgba(35, 35, 35, 0.9) 100%) !important;
        border: 1px solid rgba(64, 65, 79, 0.4) !important;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        cursor: pointer;
    }
    
    .quick-action:active {
        transform: translateY(-2px) scale(0.98) !important;
        background: linear-gradient(135deg, rgba(30, 201, 143, 0.15) 0%, rgba(30, 201, 143, 0.1) 100%) !important;
        border-color: rgba(30, 201, 143, 0.5) !important;
        box-shadow: 0 4px 16px rgba(30, 201, 143, 0.2) !important;
    }
    
    .quick-action .flex {
        gap: 0.875rem !important;
        align-items: center !important;
    }
    
    .quick-action i {
        font-size: 1.5rem !important;
        color: #1EC98F !important;
        width: 32px !important;
        height: 32px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
    }
    
    .quick-action h3 {
        font-size: 0.95rem !important;
        font-weight: 600 !important;
        line-height: 1.3 !important;
        margin-bottom: 0.25rem !important;
        color: #ffffff !important;
    }
    
    .quick-action p {
        font-size: 0.8rem !important;
        line-height: 1.4 !important;
        color: #9ca3af !important;
        margin: 0 !important;
    }
    
    /* Chat Input Area - Mobile Optimized */
    .px-6.pb-4 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        padding-bottom: 1rem !important;
        padding-top: 0 !important;
    }
    
    .px-6.pb-4 .max-w-4xl {
        max-width: 100% !important;
        width: 100% !important;
    }
    
    /* Chat Input Container - Mobile */
    .chat-input-container {
        border-radius: 16px !important;
        padding: 0.5rem 0.75rem !important;
        background: rgba(47, 47, 47, 0.95) !important;
        border: 1px solid rgba(64, 65, 79, 0.4) !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    
    /* Hamburger button - beautiful mobile design */
    .hamburger-btn {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 4px;
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        border-radius: 12px !important;
        background: rgba(30, 201, 143, 0.12) !important;
        border: 1px solid rgba(30, 201, 143, 0.25) !important;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
        flex-shrink: 0 !important;
        margin-right: 8px !important;
        cursor: pointer;
        padding: 10px;
        box-shadow: 0 2px 8px rgba(30, 201, 143, 0.15);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    
    .hamburger-btn:hover {
        background: rgba(30, 201, 143, 0.2) !important;
        border-color: rgba(30, 201, 143, 0.4) !important;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(30, 201, 143, 0.25);
    }
    
    .hamburger-btn:active {
        background: rgba(30, 201, 143, 0.25) !important;
        border-color: #1EC98F !important;
        transform: scale(0.95) translateY(0);
        box-shadow: 0 2px 6px rgba(30, 201, 143, 0.2);
    }
    
    .hamburger-line {
        width: 20px !important;
        height: 2.5px !important;
        background: #1EC98F !important;
        border-radius: 2px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 1px 2px rgba(30, 201, 143, 0.3);
    }
    
    .hamburger-btn:hover .hamburger-line {
        background: #17B07A !important;
        transform: scale(1.05);
    }
    
    /* Header layout fix for mobile */
    header .flex.items-center.gap-4 {
        min-width: 0;
        flex: 1;
        overflow: hidden;
    }
    
    /* Make Moka AI text not overflow */
    .header-title {
        max-width: 200px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        display: block !important;
    }
    
    /* Sources panel on mobile */
    #sources-panel {
        height: 80vh !important;
    }
    
    /* Image analysis results on mobile */
    .analysis-result {
        font-size: 0.85rem;
        line-height: 1.5;
    }
    
    /* Toast notifications on mobile */
    .toast-notification {
        width: calc(100% - 2rem) !important;
        max-width: 100% !important;
        left: 1rem !important;
        right: 1rem !important;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    /* Welcome Section - Extra Small */
    #welcome-section {
        padding: 1rem 0.75rem !important;
    }
    
    #welcome-section h1 {
        font-size: 1.5rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    #welcome-section p {
        font-size: 0.875rem !important;
        margin-bottom: 1.25rem !important;
    }
    
    /* Quick Actions - Extra Small */
    #welcome-section .grid {
        gap: 0.625rem !important;
    }
    
    .quick-action {
        padding: 0.875rem !important;
        min-height: 64px !important;
    }
    
    .quick-action i {
        font-size: 1.375rem !important;
        width: 28px !important;
        height: 28px !important;
    }
    
    .quick-action h3 {
        font-size: 0.875rem !important;
    }
    
    .quick-action p {
        font-size: 0.75rem !important;
    }
    
    /* Header */
    .header-title {
        font-size: 0.9rem;
    }
    
    /* Messages */
    .message-bubble {
        max-width: 90% !important;
        font-size: 0.85rem;
    }
    
    /* Chat Input */
    .chat-input-container {
        padding: 0.5rem !important;
        border-radius: 14px !important;
    }
    
    .px-6.pb-4 {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }
}

/* Landscape mobile adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    #welcome-section {
        padding: 1rem 0;
    }
    
    #sources-panel {
        height: 90vh !important;
    }
}

/* Fix mobile layout issues */
@media (max-width: 768px) {
    /* Prevent double scrollbars */
    main {
        overflow: hidden !important;
    }
    
    /* Fix chat messages scrolling */
    #chat-messages {
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Fix input area */
    .chat-input-container {
        position: relative;
        z-index: 10;
    }
    
    /* Fix header */
    header.header-bar {
        position: sticky !important;
        top: 0 !important;
        z-index: 100 !important;
        background: #2a2a2a !important;
        height: auto !important;
        overflow: hidden;
    }
    
    /* Prevent header from covering content */
    .flex-1.flex.flex-col.px-6 {
        margin-top: 0 !important;
    }
    
    /* Chat area should start from top on mobile */
    #welcome-section {
        padding-top: 1rem !important;
        margin-top: 0 !important;
    }
    
    #chat-messages {
        margin-top: 0 !important;
        padding-top: 0.5rem !important;
    }
}

/* Profile Dropdown Styles - Enhanced */
.profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: linear-gradient(135deg, #252525 0%, #2a2a2a 100%);
    border: 1px solid rgba(64, 65, 79, 0.6);
    border-radius: 16px;
    min-width: 280px;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 
                0 4px 16px rgba(0, 0, 0, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.profile-dropdown::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(30, 201, 143, 0.3), transparent);
}

.profile-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.profile-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: #d1d5db;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.profile-dropdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #1EC98F 0%, #17B07A 100%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.profile-dropdown-item:hover {
    background: linear-gradient(90deg, rgba(30, 201, 143, 0.1) 0%, transparent 100%);
    color: #ffffff;
    padding-left: 20px;
}

.profile-dropdown-item:hover::before {
    opacity: 1;
}

.profile-dropdown-item i {
    color: #9ca3af;
    transition: all 0.2s ease;
    font-size: 14px;
    width: 20px;
    text-align: center;
}

.profile-dropdown-item:hover i {
    color: #1EC98F;
    transform: scale(1.1);
}

.profile-dropdown-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(64, 65, 79, 0.5), transparent);
    margin: 6px 12px;
}

/* Profile Info Section Enhanced */
#profile-dropdown .px-4.py-4 {
    background: linear-gradient(135deg, rgba(30, 201, 143, 0.05) 0%, transparent 100%);
    border-bottom: 1px solid rgba(64, 65, 79, 0.3);
    position: relative;
}

#profile-dropdown .px-4.py-4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(30, 201, 143, 0.2), transparent);
}

/* Profile Button Hover Effects */
#profile-btn > div {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#profile-btn:hover > div {
    background: linear-gradient(90deg, rgba(30, 201, 143, 0.1) 0%, transparent 100%);
    box-shadow: 0 4px 12px rgba(30, 201, 143, 0.15);
}

/* Menu Button Enhancements */
#settings-btn, #logout-btn {
    position: relative;
    border-radius: 12px;
}

#settings-btn::after, #logout-btn::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #1EC98F 0%, #17B07A 100%);
    border-radius: 12px 0 0 12px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

#settings-btn:hover::after {
    opacity: 1;
}

#logout-btn::after {
    background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
}

#logout-btn:hover::after {
    opacity: 1;
}

/* Icon container animations */
#profile-dropdown button:hover .w-10 {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(30, 201, 143, 0.3);
}

#logout-btn:hover .w-10 {
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Text hover effects */
#profile-dropdown button:hover span.font-medium {
    transform: translateX(2px);
    transition: transform 0.2s ease;
}

/* Smooth transitions for all elements */
#profile-dropdown * {
    transition: all 0.2s ease;
}

/* Icon hover glow effect */
#profile-dropdown button:hover i.fa-cog,
#profile-dropdown button:hover i.fa-sign-out-alt {
    filter: drop-shadow(0 0 4px currentColor);
}

/* Divider styling */
#profile-dropdown .h-px.bg-gradient-to-r {
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(30, 201, 143, 0.1) 20%,
        rgba(64, 65, 79, 0.5) 50%,
        rgba(30, 201, 143, 0.1) 80%,
        transparent 100%
    );
}

/* Profile avatar badge */
#profile-dropdown .fa-check-circle {
    animation: fadeInScale 0.3s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 0.5;
        transform: scale(1);
    }
}

/* Menu items entrance animation */
#profile-dropdown.show button {
    animation: slideInRight 0.4s ease-out forwards;
    opacity: 1;
}

#profile-dropdown.show #settings-btn {
    animation: slideInRight 0.4s ease-out 0.1s backwards;
}

#profile-dropdown.show #logout-btn {
    animation: slideInRight 0.4s ease-out 0.2s backwards;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Prevent initial animation before show class */
#profile-dropdown button {
    opacity: 1;
}

#profile-dropdown.hidden button {
    opacity: 0;
    animation: none;
}

/* Mobile profile dropdown enhancements */
@media (max-width: 768px) {
    /* Ensure sidebar bottom section is visible and scrollable */
    aside .px-2 {
        flex-shrink: 0;
        max-height: none !important;
    }
    
    /* Make profile button and actions visible in mobile sidebar */
    aside.mobile-open .px-2.py-3,
    aside.mobile-open.sidebar-expanded .px-2.py-3 {
        display: flex !important;
        flex-direction: column !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Ensure all buttons are visible on mobile */
    aside.mobile-open button span,
    aside.mobile-open a span {
        opacity: 1 !important;
        transition: none !important;
    }
    
    #profile-dropdown {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        transform: translateY(100%);
        border-radius: 20px 20px 0 0;
        margin-bottom: 0;
        max-height: 70vh;
        overflow-y: auto;
    }
    
    #profile-dropdown.show {
        transform: translateY(0);
    }
    
    /* Mobile specific animation */
    @keyframes slideInUp {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    #profile-dropdown.show button {
        animation: slideInUp 0.3s ease-out forwards;
    }
    
    /* Code Block - Mobile responsive */
    .code-block-wrapper {
        border-radius: 8px;
        margin: 10px 0;
    }
    
    .code-block-header {
        padding: 8px 12px;
    }
    
    .code-block-content {
        padding: 12px;
        font-size: 12px;
        max-height: 300px;
    }
    
    .code-action-btn {
        padding: 4px 8px;
        font-size: 14px;
    }
}

/* Header Action Buttons */
.header-action-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: transparent;
    color: #d1d5db;
    transition: all 0.3s ease;
}

.header-action-btn:hover {
    background: rgba(30, 201, 143, 0.1);
    color: #1EC98F;
}

/* Header Bar Enhancements */
.header-bar {
    background: linear-gradient(135deg, rgba(30, 201, 143, 0.05) 0%, rgba(30, 201, 143, 0.02) 100%);
    border-bottom: 1px solid rgba(30, 201, 143, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Mobile Image Upload and Reporting Improvements */
@media (max-width: 640px) {
    #image-preview-container {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 0.5rem;
        padding: 0.5rem 0;
        scrollbar-width: thin;
        scrollbar-color: rgba(30, 201, 143, 0.5) transparent;
    }
    
    #image-preview-container::-webkit-scrollbar {
        height: 6px;
    }
    
    #image-preview-container::-webkit-scrollbar-thumb {
        background-color: rgba(30, 201, 143, 0.5);
        border-radius: 3px;
    }
    
    #image-preview-container .relative {
        flex: 0 0 auto;
        width: 5rem;
        height: 5rem;
        margin-right: 0.5rem;
    }
    
    .chat-input-container {
        padding: 0.25rem;
        border-radius: 9999px;
        background-color: #2a2a2a;
    }
    
    #chat-input {
        font-size: 0.875rem;
        padding: 0 0.5rem;
    }
    
    .send-button {
        width: 2.5rem;
        height: 2.5rem;
    }
}

/* Dark mode for image preview */
#image-preview-container .relative {
    background-color: #2a2a2a;
    border: 1px solid #40414f;
}

#image-preview-container img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}