/* ===================================================
   RESPONSIVE FIXES - ADD TO TOP OF CSS FILE
   =================================================== */

/* Hide all overlay panels by default */
.news-selection-panel,
.news-overlay,
.login-panel,
.conversations-selection-panel,
.use-cases-selection-panel,
.use-cases-overlay,
.cloud-wizard-panel,
.premium-popup-modal {
    display: none !important;
}

/* Show only when active */
.news-selection-panel.active,
.news-overlay.active,
.login-panel.active,
.conversations-selection-panel.active,
.use-cases-selection-panel.active,
.use-cases-overlay.active,
.cloud-wizard-panel.active,
.premium-popup-modal.active {
    display: flex !important;
}

/* Hide all backdrops by default */
.news-panel-backdrop,
.login-panel-backdrop,
.conversations-panel-backdrop,
.use-cases-panel-backdrop,
.cloud-wizard-backdrop,
.premium-popup-backdrop {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Show backdrops only when active */
.news-panel-backdrop.active,
.login-panel-backdrop.active,
.conversations-panel-backdrop.active,
.use-cases-panel-backdrop.active,
.cloud-wizard-backdrop.active,
.premium-popup-backdrop.active {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&family=Roboto+Mono:wght@400;500&display=swap');

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

:root {
    /* Background colors - Clean whites and light grays */
    --bg-primary: #ffffff;
    --bg-secondary: #f7f7f8;
    --bg-tertiary: #ececf1;
    
    /* Text colors - Dark grays for readability */
    --text-primary: #2d333a;
    --text-secondary: #565869;
    --text-muted: #8e8ea0;
    
    /* Accent colors - OpenAI green palette */
    --neon-cyan: #10a37f;        /* Primary green */
    --neon-magenta: #10a37f;     /* Keep consistent */
    --neon-yellow: #10a37f;      /* Keep consistent */
    --success: #10a37f;
    --error: #ef4146;
    
    /* Glow effects */
    --glow-cyan: rgba(16, 163, 127, 0.2);
    --glow-magenta: rgba(16, 163, 127, 0.2);
    
    /* Button colors */
    --button-bg: #10a37f;
    --button-hover: #0d8c6d;
    --button-border: #10a37f;
}

body {
    font-family: 'Rajdhani', sans-serif;
    /* background: var(--bg-primary);
    color: var(--text-primary); */
    background: #ffffff;
    color: #2d333a;
    height: 100vh;
    overflow: hidden;
    position: relative;
}
 

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* background: var(--bg-primary); */
      background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeOut 1s ease-out 2s forwards;
}

@keyframes fadeOut {
    to { opacity: 0; pointer-events: none; }
}

.loading-logo {
    font-size: 72px;
    font-weight: 700;
    letter-spacing: 8px;
    /* color: var(--neon-cyan); */
    color: #10a37f;
    /* text-shadow: 0 0 20px var(--glow-cyan), 0 0 40px var(--glow-cyan); */
     text-shadow: 0 0 20px rgba(16, 163, 127, 0.3);
    animation: glitch 2s infinite;
}

@keyframes glitch {
    0%, 90%, 100% { transform: translate(0); }
    92% { transform: translate(-2px, 2px); }
    94% { transform: translate(2px, -2px); }
    96% { transform: translate(-2px, -2px); }
}

.loading-text {
    margin-top: 24px;
    font-family: 'Roboto Mono', monospace;
    font-size: 14px;
    /* color: var(--text-secondary); */
       color: #565869;
    letter-spacing: 2px;
}

.loading-bar {
    width: 300px;
    height: 2px;
    /* background: var(--bg-secondary); */
    background: #ececf1;
    margin-top: 24px;
    position: relative;
    overflow: hidden;
}

.loading-progress {
    position: absolute;
    height: 100%;
    /* background: var(--neon-cyan); */
    background: #10a37f;
    /* box-shadow: 0 0 10px var(--glow-cyan); */
    box-shadow: 0 0 10px rgba(16, 163, 127, 0.3);
    animation: loading 2s ease-in-out forwards;
}

@keyframes loading {
    0% { width: 0%; }
    100% { width: 100%; }
}

.container {
    display: flex;
    height: 100vh;
}

.chat-area {
      flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    /* background: #1a1a1a; */
    /* background: transparent; */
     background: #ffffff;
    position: relative;
    justify-content: flex-start; 
}

 
.control-panel::-webkit-scrollbar {
    width: 6px;
}

.control-panel::-webkit-scrollbar-track {
    background: transparent;
}

.control-panel::-webkit-scrollbar-thumb {
    background: var(--neon-cyan);
    box-shadow: 0 0 5px var(--glow-cyan);
}


.chat-header {
    padding: 6px;
    /* border-bottom: 1px solid rgba(255, 255, 255, 0.1); */
    border-bottom: 1px solid #ececf1;
    /* background: rgba(26, 31, 46, 0.3); */
     background: rgba(247, 247, 248, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* min-height: 60px; */
}
 
.conversation-indicator-label {
    font-family: 'Roboto Mono', monospace;
    font-size: 7px;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 1px;
    /* text-transform: uppercase; */
}

.conversation-indicator-title {
    /* font-size: 16px; */
    /* font-weight: 600; */
    color: #ffffff;
    letter-spacing: 0.5px;
    max-width: 500px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.conversation-indicator-title.empty {
    color: rgba(255, 255, 255, 0.3);
    /* font-style: italic; */
}


.chat-action-btn {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Roboto Mono', monospace;
    font-size: 10px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
}

.chat-action-btn:hover {
    border-color: var(--neon-cyan);
    color: #ffffff;
    background: rgba(212, 165, 116, 0.1);
}
.chat-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--glow-cyan);
    letter-spacing: 2px;
}

.chat-subtitle {
    font-family: 'Roboto Mono', monospace;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    letter-spacing: 1px;
} 

.messages::-webkit-scrollbar {
    width: 6px;
}

/* 
.messages::-webkit-scrollbar-track {
    background: transparent;
}

.messages::-webkit-scrollbar-thumb {
    background: var(--neon-cyan);
    box-shadow: 0 0 5px var(--glow-cyan);
} */

/* .messages {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    background: transparent;
    align-items: flex-start;   
} */
/* When messages exist, make it grow to fill space */
.messages:not(:empty) {
    flex: 1;
}
/* .message {
    display: flex;
    gap: 0;
    width: 100%;
    max-width: 100%;
    animation: messageSlide 0.4s ease-out;
    word-break: break-word; 
}
.message.user {
    align-self: center;  
    flex-direction: row-reverse; 
    border: none !important;  
}
 
.message.assistant {
         
    width: 100%; 
    text-align: left;
    align-self: flex-start;   
} */

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
 
/* .message.user {
    width: auto;   
    max-width: 100%;  
    align-self: flex-end;   
    font-size: 15px;
} */

.message-avatar {
    /* width: 40px;
    height: 40px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
    flex-shrink: 0;
    border: 1px solid; */
    display: none;
}

.message.user .message-avatar {
    /* background: rgba(0, 255, 255, 0.1); */
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: 0 0 15px var(--glow-cyan);
}

.message.assistant .message-avatar {
    background: rgba(255, 0, 110, 0.1);
   
    border-color: var(--neon-magenta);
    color: var(--neon-magenta);
    box-shadow: 0 0 15px var(--glow-magenta);
}

/* .message-content {
 
    padding: 16px 20px;
    border-radius: 4px;
    border-left: none;
    line-height: 1.7;
    font-size: 15px;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    width: 100%;  
    border:none !important
  
} */

/* .message.assistant .message-content {
    text-align: left !important;
    width: 100%;
    display: block; 
}    */

/* .streaming-message {
    width: 100% !important;
    max-width: 100% !important;
    align-self: flex-start !important;
} */

/* .streaming-message .message-content {
    text-align: left !important;
    width: 100% !important;
    display: block !important;
} */

.response-content
{
    background: white;
    color:black
}
.streaming-message .response-content {
    text-align: left !important;
    display: block !important;
    bottom: max(20px, calc(env(safe-area-inset-bottom) + 20px));
    /* width: 100% !important; */
}
.message.assistant .response-content {
    text-align: left;
    /* width: 100%; */
}
 
/* .streaming-message .response-content {
    text-align: left;
    display: block;
} */

/* 
.message.user .message-content {
    width: auto;  
 

    color:red
} */

/* .messages > * {
    width: 100%;   
    max-width: 700px; 
    min-width: 220px;
    margin-left: 10px;
    margin-right: 10px;
}
   */
.message-content h1, .message-content h2, .message-content h3 {
    color: var(--neon-cyan);
    margin-top: 16px;
    margin-bottom: 8px;
}

.message-content h1 { font-size: 24px; }
.message-content h2 { font-size: 20px; }
.message-content h3 { font-size: 16px; }

.message-content p {
    margin: 8px 0;
}


.message-content ul, .message-content ol {
    margin-left: 20px;
    margin-bottom: 12px;
}

.message-content li {
    margin-bottom: 4px;
}

.message-content pre code {
    background: none;
    padding: 0;
    color: var(--text-primary);
}


.message-content blockquote {
    border-left: 3px solid var(--neon-cyan);
    padding-left: 16px;
    margin: 12px 0;
    color: var(--text-secondary);
}

.message-content a {
    color: var(--neon-cyan);
    text-decoration: none;
}

.message-content a:hover {
    text-decoration: underline;
}

.streaming-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.streaming-dot {
    width: 6px;
    height: 6px;
    background: var(--neon-cyan);
    border-radius: 50%;
    animation: pulse 1.4s ease-in-out infinite;
}

.streaming-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.streaming-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes pulse {
    0%, 80%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    40% {
        opacity: 1;
        transform: scale(1.2);
        box-shadow: 0 0 10px var(--glow-cyan);
    }
}
/* .input-area {
    backdrop-filter: none;
    flex-shrink: 0;
    padding: 24px 0;
    display: flex;
    justify-content: center;
    width: 100%;
}
  */
/* Ensure it stays the same in both states */
/* .chat-area.empty-chat .input-container {
    width: 50vw;
    max-width: 50vw;
    min-width: 50vw;
} */

/* .chat-area:not(.empty-chat) .input-container {
    width: 50vw;
    max-width: 50vw;
    min-width: 50vw;
} */

 /* #message-input {
 
    height: 50px;
    min-height: 50px;
    max-height: 50px;
    width: 100%;
    padding: 16px 180px 16px 50px;
    background: transparent;   
    color: #ffffff;
    font-family: 'Roboto Mono', monospace;
    font-size: 14px;
    resize: none;
    border: none;
    border-radius: 8px;  
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
    word-wrap: break-word;
    line-height: 1.5;
    outline: none;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex-shrink: 0;
}  
   */

 

/* Show scroll only when max height is reached */
#message-input::-webkit-scrollbar {
    width: 4px;
}

#message-input::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
}
#message-input::-webkit-scrollbar {
    width: 4px;
}

.sent-email
{
    color: #174236 !important;
}
#message-input::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
}

/* .send-icon-btn {
    position: absolute;
    right: 12px;
    bottom: 12px;  
    transform: none;
    background: transparent;
    border: none;
    color: #d4a574;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    border-radius: 4px;
    z-index: 100;
} */

.send-icon-btn:hover {
    color: #ffffff;
    background: rgba(212, 165, 116, 0.1);
}

.send-icon-btn:disabled {
    color: #666;
    cursor: not-allowed;
    opacity: 0.5;
}


#message-input:focus {
    outline: none;
    /* border-color: var(--neon-cyan); */
    /* box-shadow: 0 0 20px var(--glow-cyan), inset 0 0 20px rgba(0, 255, 255, 0.05); */
}

#message-input::placeholder {
    color: var(--text-muted);
}

.send-btn {
    background: var(--button-bg);
    border: 1px solid var(--button-border);
    padding: 5px 5px;
    color: #ffffff;
    font-family: 'Rajdhani', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
    border-radius: 8px;
    width: auto; /* Changed from default */
 
}


.send-btn:hover {
    background: var(--button-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.send-btn:disabled {
    background: #2a2a2a;
    color: #666;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 80px;
    color: var(--neon-cyan);
    text-shadow: 0 0 20px var(--glow-cyan);
    margin-bottom: 24px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.empty-text {
    font-family: 'Roboto Mono', monospace;
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.panel-section {
    padding: 24px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.1);
    overflow: visible;
    position: relative;
    background: #EDECDD
}

 
.panel-logo {
    font-size: 32px;
    font-weight: 700;
    color: var(--neon-cyan);
    text-shadow: 0 0 15px var(--glow-cyan);
    letter-spacing: 3px;
    text-align: center;
    margin-bottom: 8px;
    top:25px
}

.panel-status {
    text-align: center;
    font-family: 'Roboto Mono', monospace;
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.section-title {
    font-family: 'Roboto Mono', monospace;
    font-size: 11px;
    color: var(--text-secondary);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.1);
}

.conversations {
    overflow: visible;
    position: relative;
    z-index: 1000;
    min-height: 60px;
}
/* .conversation-item {
    padding: 8px 12px; 
    margin-bottom: 4px; 
    background: transparent; 
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Roboto Mono', monospace;
    font-size: 11px;
    overflow: hidden;
    border-radius: 6px;
} */
/* 
.conversation-item:hover {
    background: rgba(255, 255, 255, 0.05);   
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateX(2px);
} */

/* .conversation-item.active {
    background: rgba(255, 255, 255, 0.1); 
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: none;   
} */

.conversation-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.delete-btn {
    background: none;
    border: none;
    color: var(--error);
    font-size: 20px;
    cursor: pointer;
    padding: 0 8px;
    opacity: 0;
    /* transition: opacity 0.3s; */
}

.conversation-item:hover .delete-btn {
    opacity: 1;
}

.new-conversation-btn {
    width: auto;
    padding: 5px 5px;
    background: var(--button-bg);
    border: 1px solid var(--button-border);
    color: #ffffff;
    font-family: 'Rajdhani', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
    margin: 12px auto 0 auto;
    border-radius: 8px;
    display: block;
}

.new-conversation-btn:hover {
    background: var(--button-hover);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.premium-card {
    background: linear-gradient(135deg, rgba(58, 58, 58, 0.3) 0%, rgba(42, 42, 42, 0.3) 100%);
    border: 1px solid var(--button-border);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.premium-badge {
    display: inline-block;
    padding: 6px 12px;
    background: var(--button-bg);
    color: #ffffff;
    font-family: 'Rajdhani', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border-radius: 6px;
}

.premium-title {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
}
.premium-desc {
    font-family: 'Roboto Mono', monospace;
    font-size: 11px;
    color: #174236;
    opacity: 0.7;
    margin-bottom: 16px;
    line-height: 1.6;
}

.premium-btn {
    display: inline-block;
    padding: 6px 12px;
    background: var(--button-bg);
    color: #ffffff;
    font-family: 'Rajdhani', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
 
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border-radius: 6px;
}

.premium-btn:hover {
    background: #0f2d24;
    border-color: #0f2d24;
    transform: translateY(-2px);
    box-shadow: none;
}

.hidden {
    display: none !important;
}

.reasoning-section {
    /* background: rgba(13, 17, 23, 0.8); */
    border-radius: 6px;
    margin-bottom: 16px;
    overflow: hidden;
    background: #F5F1E4 !important;
}

.reasoning-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #F6F5EF !important;
    cursor: pointer;
    transition: all 0.3s;
    user-select: none;
}
 
.reasoning-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Roboto Mono', monospace;
    font-size: 12px;
    font-weight: 600;
    color: var(--neon-cyan);
    letter-spacing: 1px;
}

.reasoning-icon {
    font-size: 16px;
    animation: spin 2s linear infinite;
}

.reasoning-icon.complete {
    animation: none;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.reasoning-toggle {
    font-size: 12px;
    color: var(--text-secondary);
    transition: transform 0.3s;
}

.reasoning-toggle.expanded {
    transform: rotate(180deg);
}

.reasoning-content {
    padding: 16px;
    max-height: none;
    overflow-y: visible;
    display: none;
    font-family: 'Roboto Mono', monospace;
    font-size: 12px;
    line-height: 1.6;
}

.reasoning-content.expanded {
    display: block;
}

.reasoning-content::-webkit-scrollbar {
    width: 6px;
}

.reasoning-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.reasoning-content::-webkit-scrollbar-thumb {
    background: #d4a574;
    border-radius: 3px;
}

.reasoning-step {
    padding: 8px 12px;
    margin-bottom: 8px;
    /* background: rgba(0, 0, 0, 0.3); */
    border-left: 2px solid #d4a574;
    animation: stepFadeIn 0.4s ease-out;
    /* border-radius: 4px; */
}

@keyframes stepFadeIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.reasoning-step-label {
    color: var(--neon-cyan);
    font-weight: 600;
    margin-bottom: 4px;
}

/* .reasoning-step-content {
    color: var(--text-secondary);
} */

.sources-step {
    background: rgba(13, 17, 23, 0.9) !important;
}

.sources-toggle-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(212, 165, 116, 0.1);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.sources-toggle-header:hover {
    background: rgba(212, 165, 116, 0.15);
}

.sources-toggle-text {
    font-size: 11px;
    font-weight: 600;
    color: #d4a574;
    letter-spacing: 0.5px;
}

.sources-toggle-icon {
    font-size: 10px;
    color: var(--text-secondary);
    transition: transform 0.3s;
}

.sources-toggle-icon.expanded {
    transform: rotate(180deg);
}

.sources-list {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: none;
    overflow-y: visible;
    padding: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.sources-list.collapsed {
    max-height: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
    opacity: 0;
}

.sources-list::-webkit-scrollbar {
    width: 4px;
}

.sources-list::-webkit-scrollbar-thumb {
    background: var(--neon-cyan);
    border-radius: 2px;
}

.source-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: rgba(212, 165, 116, 0.05);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 11px;
    font-family: 'Roboto Mono', monospace;
    transition: all 0.2s;
}

.source-link:hover {
    background: rgba(212, 165, 116, 0.15);
    transform: translateX(2px);
}


.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.auth-tab {
    flex: 1;
    padding: 10px;
    background: transparent;
    border: 1px solid var(--button-border);
    color: var(--text-secondary);
    font-family: 'Rajdhani', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 8px;
}

.auth-tab:hover {
    border-color: #ffffff;
    color: #ffffff;
}

.auth-tab.active {
    background: var(--button-bg);
    border-color: var(--button-border);
    color: #ffffff;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-input {
    padding: 12px 14px;
    background: rgba(42, 42, 42, 0.95);  /* Match panel background exactly */
    border: 1px solid rgba(42, 42, 42, 0.95);  /* Same color */
    color: #ffffff;
    font-family: 'Roboto Mono', monospace;
    font-size: 12px;
    transition: all 0.3s;
    border-radius: 0px;
    outline: none;
}

.auth-input:focus {
    outline: none;
    border: 1px solid rgba(42, 42, 42, 0.95);
    background: rgba(50, 50, 50, 0.95);  /* Slightly lighter on focus */
}

.auth-input::placeholder {
    color: #888888;
}

/* Override browser autofill */
.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:focus,
.auth-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px rgba(42, 42, 42, 1) inset !important;
    -webkit-text-fill-color: #ffffff !important;
    border: 1px solid rgba(42, 42, 42, 0.95) !important;
}

.auth-button {
    width: auto;
    padding: 5px 20px;
    background: var(--button-bg);
    border: 1px solid var(--button-border);
    color: #ffffff;
    font-family: 'Rajdhani', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
    margin: 4px auto 0 auto;
    border-radius: 8px;
    display: block;
}

.auth-button:hover {
    background: var(--button-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.auth-button:disabled {
    background: #2a2a2a;
    color: #666;
    cursor: not-allowed;
    transform: none;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    font-size: 10px;
    color: var(--text-muted);
    font-family: 'Roboto Mono', monospace;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--button-border);
}

.auth-guest-button {
    width: auto;
    padding: 5px 10px;
    background: transparent;
    border: 1px solid var(--button-border);
    color: #ffffff;
    font-family: 'Rajdhani', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 8px;
    margin: 0 auto;
    display: block;
}

.auth-guest-button:hover {
    background: var(--button-bg);
}

.auth-message {
    padding: 10px;
    font-size: 10px;
    /* font-family: 'Roboto Mono', monospace; */
    border-radius: 6px;
    margin-bottom: 12px;
}

.auth-message.error {
    background: rgba(255, 0, 64, 0.1);
    border: 1px solid var(--error);
    color: var(--error);
}

.auth-message.success {
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
}

.auth-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(58, 58, 58, 0.3);
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid var(--button-border);
}

.auth-user-icon {
    width: 40px;
    height: 40px;
    background: var(--button-bg);
    border: 1px solid var(--button-border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #ffffff;
}

.auth-user-details {
    flex: 1;
}

.auth-username {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    font-family: 'Rajdhani', sans-serif;
}

.auth-status {
    font-size: 10px;
    color: var(--success);
    font-family: 'Roboto Mono', monospace;
}


.auth-logout-button {
    width: auto;
    padding: 5px 10px;
    background: transparent;
    border: 1px solid #ff4444;
    color: #ff4444;
    font-family: 'Rajdhani', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 8px;
    margin: 0 auto;
    display: block;
}

.auth-logout-button:hover {
    background: rgba(255, 68, 68, 0.1);
    border-color: #ff6666;
}

.date-group {
    margin-bottom: 8px;
}

.date-header {
    padding: 12px 16px;
    background: rgba(58, 58, 58, 0.8);
    border: 1px solid var(--button-border);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Rajdhani', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #ffffff;
    transition: all 0.3s;
    user-select: none;
    position: relative;
    z-index: 1001;
    border-radius: 6px;
}

.date-header:hover {
    background: var(--button-hover);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px var(--glow-cyan);
}

.date-header-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.date-count {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    color: #ffffff;
}

.expand-icon {
    font-size: 14px;
    transition: transform 0.3s;
    color: #ffffff;
}

.date-group.collapsed .expand-icon {
    transform: rotate(-90deg);
}
 

.auth-header {
    margin: 0 0 20px 0;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    color: #333;
}

.auth-logged-out-parent
{
    border:1px solid red
}
.auth-logged-out .panel-toggle-btn
{
    display: none !important
}

.date-group-items {
    position: absolute;
    left: 0;
    right: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background:#242424;;
    /* backdrop-filter: blur(20px); */
    z-index: 1002;
    /* box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7); */
    border-radius: 6px;
}

.date-group:not(.collapsed) .date-group-items {
    max-height: 50vh;
    overflow-y: auto;
}

.date-group.collapsed .date-group-items {
    max-height: 0;
    overflow: hidden;
}

/* .date-group-items .conversation-item {
    margin: 2px 8px;   
    background: transparent;
    position: relative;
}    */
/* 
@media (max-width: 1024px) {
    .chat-area {
        flex: 0 0 70%;
    }
    .control-panel {
        flex: 0 0 30%;
    }
} */

/* @media (max-width: 1024px) {
    .container {
        flex-direction: column;
    }
    .chat-area {
        flex: 1;
    }
    .control-panel {
        display: none;
    }
    .message {
        max-width: 95%;
    }
} */

.message-content,
.reasoning-step-content,
.source-link,
.conversation-title,
.empty-text,
.panel-status,
.section-title,
.auth-input,
.premium-desc,
.date-header {
    color: black
    /* color: #ffffff !important; */
}

.chat-title,
.panel-logo,
.neon-cyan,
.reasoning-step-label,
.sources-toggle-text {
     color: #ffffff !important;
}

  

.messages::-webkit-scrollbar-thumb {
    background: #3a3a3a;  
    border-radius: 4px;
}

.messages::-webkit-scrollbar-thumb:hover {
    background: #4a4a4a;  
}

/* Control panel scrollbar */
.control-panel::-webkit-scrollbar {
    width: 6px;
}

.control-panel::-webkit-scrollbar-track {
    background: transparent;
}

.control-panel::-webkit-scrollbar-thumb {
    background: #3a3a3a;
    border-radius: 3px;
}

.control-panel::-webkit-scrollbar-thumb:hover {
    background: #4a4a4a;
}

/* Conversations scrollbar */
.conversations::-webkit-scrollbar {
    width: 6px;
}

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

.conversations::-webkit-scrollbar-thumb {
    background: #3a3a3a;
    border-radius: 3px;
}

.conversations::-webkit-scrollbar-thumb:hover {
    background: #4a4a4a;
}

/* Reasoning content scrollbar */
.reasoning-content::-webkit-scrollbar {
    width: 6px;
}

.reasoning-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.reasoning-content::-webkit-scrollbar-thumb {
    background: #3a3a3a;
    border-radius: 3px;
}

.reasoning-content::-webkit-scrollbar-thumb:hover {
    background: #4a4a4a;
}

.container {
    display: flex;
    height: 100vh;
}
.conversations-panel {
    flex: 0 0 280px;
    min-width: 280px;
    max-width: 280px;
    width: 280px;
    background: rgba(42, 42, 42, 0.95);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    display: flex !important;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: visible;
    transition: flex 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                min-width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: fixed !important;
    height: 100%;
    z-index: 100;
}
 
body .conversations-panel.collapsed {
    flex: 0 0 60px !important;
    min-width: 0px !important;
    max-width: 0px !important;
    width: 00px !important;
    align-items: center;
    display: none;
}
/* .conversations-panel.collapsed .panel-section {
    display: none !important;
} */

/* .conversations-panel.collapsed .panel-logo,
.conversations-panel.collapsed .panel-status,
.conversations-panel.collapsed .section-title,
.conversations-panel.collapsed .conversations,
.conversations-panel.collapsed .conversation-filter,
.conversations-panel.collapsed .new-conversation-btn,
.conversations-panel.collapsed .auth-user-info,
.conversations-panel.collapsed .auth-logout-button,
.conversations-panel.collapsed .upgrade-section,
.conversations-panel.collapsed #auth-section {
    display: none !important;
} */

.conversations-panel.collapsed .panel-logo,
.conversations-panel.collapsed .auth-user-info,
.conversations-panel.collapsed .auth-logged-out
{
    display: none !important;
} 
/* Hide scrollbar when conversations panel is collapsed */
.conversations-panel {
    overflow: hidden !important;
}

.conversations-panel.collapsed::-webkit-scrollbar {
    display: none !important;
}

.conversations-panel.collapsed {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}


.conversations-panel.collapsed .panel-toggle-btn {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    top:1vh !important
}

.panel-section:has(.conversations) {
    display: none;
}

body.logged-in .panel-section:has(.conversations) {
    display: block;
}

/* Auth section always visible */
#auth-section {
    display: block !important;
}   
.container:not(:has(.conversations-panel.logged-in)) .chat-area {
    flex: 1;
}
 
.conversations-panel .panel-section {
    /* padding: 24px; */
    min-width: 60px !important;;
     
    display: flex;
    flex-direction: column;
    flex: 1;
    /* overflow: hidden; */
    min-height: 0;
}

/* Middle chat area */
.chat-area {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: white   ;
    position: relative; 
    justify-content: center;
    align-items: center;
    
}
 

/* .chat-area.empty-chat .input-area {
 flex-shrink: 0;
    padding: 24px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
} */
.panel-section:has(#conversations) {
    display: none;
}

body.logged-in .panel-section:has(#conversations) {
    display: block;
}

/* Right control panel */
/* Ensure control panel is always visible */
.control-panel {
    flex: 0 0 300px;
    min-width: 300px;
    max-width: 300px;
    background: rgba(42, 42, 42, 0.95);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    display: flex !important;  /* Force display */
    flex-direction: column;
    overflow-y: auto;
    overflow-x: visible;
}
/*  
@media (max-width: 1400px) {
    .conversations-panel {
        flex: 0 0 200px;
        min-width: 200px;
        max-width: 200px;
    }
    
    .control-panel {
        flex: 0 0 250px;
        min-width: 250px;
        max-width: 250px;
    }
} */


/* @media (max-width: 1024px) {
    .conversations-panel {
        flex: 0 0 180px;
        min-width: 180px;
        max-width: 180px;
    }
    
    .control-panel {
        flex: 0 0 220px;
        min-width: 220px;
        max-width: 220px;
    }
}
  */

/* Hide upgrade section by default (not logged in) */
.panel-section:has(.premium-card) {
    display: none;
}

/* Show when logged in */
body.logged-in .panel-section:has(.premium-card) {
    display: block;
}

/* .response-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
} */

.response-tab {
    max-width: 100px;
    padding: 4px 4px;
    background: #174236;
    border: none;
    color: white !important;
    font-family: 'Roboto Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
}

.response-tab:hover {
    color: white;
    transform: translateY(-3px);
    
}

.response-tab.active {
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}
/*  
.source-card {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
}

.source-card:hover {
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(2px);
}

.source-favicon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    border-radius: 4px;
}

.source-info {
    flex: 1;
    min-width: 0;
}

.source-card-title {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.source-card-description {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Roboto Mono', monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
} */

.response-tabs {
    display: flex !important;
    gap: 8px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}



/* .conversation-filter {
    margin-bottom: 16px;
    padding: 8px 0;
}
.filter-select {
    width: 100%;
    padding: 10px 12px;
    background: rgba(58, 58, 58, 0.95);  
        border: 1px solid var(--button-border);
    color: #ffffff;
    font-family: 'Roboto Mono', monospace;
    font-size: 11px;
    cursor: pointer;
    border-radius: 6px;
    outline: none;
    transition: all 0.3s;
}

.filter-select:hover {
    border-color: var(--neon-cyan);
    background: rgba(74, 74, 74, 0.95);  
}

.filter-select:focus {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px var(--glow-cyan);
    background: rgba(74, 74, 74, 0.95);  
}

.filter-select option {
    background: #2a2a2a;  
    color: #ffffff;
    padding: 8px;
}

.filter-select option:hover {
    background: #3a3a3a;
}

.filter-select option:checked {
    background: #3a3a3a;
}

.date-header-simple {
    padding: 8px 12px;
    margin: 12px 0 4px 0;
    background: rgba(58, 58, 58, 0.5);
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Rajdhani', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
}

.date-header-simple .date-count {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
} */

.search-mode-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    padding: 8px 12px;
    background: rgba(42, 42, 42, 0.5);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-mode-label {
    font-family: 'Roboto Mono', monospace;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.5px;
}

.toggle-switch {
    position: relative;
    width: 40px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.toggle-switch.active {
    background: linear-gradient(135deg, #d4a574 0%, #f4c590 100%);
    border-color: #d4a574;
    box-shadow: 0 0 10px rgba(212, 165, 116, 0.3);
}

.toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background: #ffffff;
    border-radius: 50%;
    transition: all 0.3s;
}

.toggle-switch.active .toggle-slider {
    left: 22px;
}

.deep-search-badge {
    padding: 3px 8px;
    background: linear-gradient(135deg, #d4a574 0%, #f4c590 100%);
    color: #1a1a1a;
    font-family: 'Rajdhani', sans-serif;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(212, 165, 116, 0.3);
}

.deep-search-info {
    font-family: 'Roboto Mono', monospace;
    font-size: 9px;
    color: rgba(255, 255, 255, 0.4);
    margin-left: auto;
}

.steps-timeline {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 12px;
}

.step-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    /* background: rgba(0, 0, 0, 0.3); */
    /* border-radius: 6px; */
    border-left: 3px solid #084536;
} 

.step-number {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: #084536 ;
    color: white !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
}

.step-content {
    flex: 1;
}

.step-label {
    font-family: 'Rajdhani', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #d4a574;
    margin-bottom: 4px;
}

.step-description {
    /* font-family: 'Roboto Mono', monospace; */
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
}

.step-sources {
    margin-top: 6px;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    /* font-family: 'Roboto Mono', monospace; */
}

.message-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.action-btn {
    padding: 4px 12px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.6);
    /* font-family: 'Roboto Mono', monospace; */
    font-size: 10px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.action-btn:hover {
    border-color: var(--neon-cyan);
    color: #ffffff;
    background: rgba(212, 165, 116, 0.1);
}

.export-menu {
    position: relative;
    display: inline-block;
}

.export-btn {
    padding: 6px 14px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    /* font-family: 'Roboto Mono', monospace; */
    font-size: 10px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.export-btn:hover {
    border-color: var(--neon-cyan);
    color: #ffffff;
    background: rgba(212, 165, 116, 0.1);
}

.export-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: #2a2a2a;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    min-width: 140px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.export-dropdown.show {
    display: block;
}

.export-option {
    padding: 10px 16px;
    color: rgba(255, 255, 255, 0.8);
    /* font-family: 'Roboto Mono', monospace; */
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.export-option:last-child {
    border-bottom: none;
}

.export-option:hover {
    background: rgba(212, 165, 116, 0.1);
    color: #ffffff;
}

.message-content img {
    max-width: 300px;  /* Control individual image width */
    max-height: 300px;
    height: auto;
    border-radius: 8px;
    margin: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: inline-block;
    vertical-align: top;
}
 
.message.assistant .message-content *
{
    color:black
}

/* .message.user .message-content,
.message.user .message-content * {
    color: #000000 !important;
} */

.message-content p:has(> img:only-child) img {
    max-width: 500px;  /* Larger when alone */
    max-height: 400px;
    display: block;
    margin: 16px auto;
 
}

.message-content p:has(img:only-child) img {
    display: block;
    margin: 16px auto;
}

.message-content img[src=""],
.message-content img:not([src]) {
    display: none;
}

/* Image error handling */
.message-content img {
    object-fit: cover;
}

.mode-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    background: rgba(42, 42, 42, 0.5);
    padding: 4px;
    border-radius: 8px;

}

.mode-btn {
    flex: 1;
    padding: 10px 16px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    /* font-family: 'Roboto Mono', monospace; */
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.mode-btn:hover {
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.8);
}

.mode-btn.active {
    background: linear-gradient(135deg, #d4a574 0%, #f4c590 100%);
    border-color: #d4a574;
    color: #1a1a1a;
    box-shadow: 0 0 10px rgba(212, 165, 116, 0.3);
}

.mode-hint {
    font-size: 9px;
    opacity: 0.7;

}

.assets-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 12px;
}

.asset-item {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.asset-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.asset-type {
    /* font-family: 'Roboto Mono', monospace; */
    font-size: 11px;
    font-weight: 600;
    color: #d4a574;
    letter-spacing: 1px;
}

.asset-title {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
}

.asset-lang {
    /* font-family: 'Roboto Mono', monospace; */
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

.asset-source {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 10px;
}

.asset-source a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    /* font-family: 'Roboto Mono', monospace; */
}

.asset-source a:hover {
    color: #d4a574;
}

.table-container {
    overflow-x: auto;
    margin-top: 8px;
}

.table-container table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.table-container th,
.table-container td {
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: left;
}

.table-container th {
    background: rgba(212, 165, 116, 0.1);
    font-weight: 600;
    color: #d4a574;
}

.asset-code pre {
    background: rgba(0, 0, 0, 0.5);
    padding: 12px;
    border-radius: 6px;
    overflow-x: auto;
    margin-top: 8px;
}

.asset-code code {
    /* font-family: 'Roboto Mono', monospace; */
    font-size: 11px;
    color: #ffffff;
}

/* Assets container - 2 column grid */
.assets-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 12px;
}

/* Make it responsive - single column on smaller screens */
/* @media (max-width: 1200px) {
    .assets-container {
        grid-template-columns: 1fr;
    }
} */

/* Asset item styling */
.asset-item {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.asset-item:hover {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(212, 165, 116, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* Asset header */
.asset-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 12px;
    flex-shrink: 0;
}

.asset-type {
    font-size: 11px;
    font-weight: 700;
    color: #d4a574;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.asset-title {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    /* font-family: 'Roboto Mono', monospace; */
}

.asset-download-btn {
    background: transparent;
    border: 1px solid rgba(212, 165, 116, 0.3);
    color: #d4a574;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
    font-family: 'Roboto Mono', monospace;
}

.asset-download-btn:hover {
    background: rgba(212, 165, 116, 0.1);
    border-color: #d4a574;
    transform: translateY(-1px);
}

.asset-download-btn svg {
    width: 14px;
    height: 14px;
}

/* Table container - NO SCROLLBARS */
.table-container {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    padding: 12px;
    flex: 1;
    overflow: hidden;
    max-height: 300px;
}

/* Table styling */
.table-container table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    color: #ffffff;
    table-layout: fixed;
}

.table-container th,
.table-container td {
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    text-align: left;
    vertical-align: top;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 0;
}

.table-container th {
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.2) 0%, rgba(244, 197, 144, 0.2) 100%);
    font-weight: 600;
    color: #d4a574;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.5px;
}

.table-container tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

.table-container tbody tr:hover {
    background: rgba(212, 165, 116, 0.08);
}

/* Compact numbers and percentages */
.table-container td {
    font-family: 'Roboto Mono', monospace;
}

/* Asset source link */
.asset-source {
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 9px;
    flex-shrink: 0;
}

.asset-source a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-family: 'Roboto Mono', monospace;
    transition: color 0.2s;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

.asset-source a:hover {
    color: #d4a574;
}

/* Image assets */
.asset-item.asset-image img {
    max-width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: contain;
    border-radius: 6px;
    margin-top: 8px;
}

/* Code assets */
.asset-item.asset-code pre {
    background: rgba(0, 0, 0, 0.5);
    padding: 12px;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 8px;
    max-height: 250px;
}

.asset-item.asset-code code {
    font-family: 'Roboto Mono', monospace;
    font-size: 11px;
    color: #ffffff;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}

.asset-lang {
    font-size: 9px;
    padding: 2px 6px;
    background: rgba(212, 165, 116, 0.2);
    border-radius: 3px;
    color: #d4a574;
    font-family: 'Roboto Mono', monospace;
}

/* Add subtle animation on load */
.asset-item {
    animation: assetFadeIn 0.4s ease-out backwards;
}

.asset-item:nth-child(1) { animation-delay: 0.05s; }
.asset-item:nth-child(2) { animation-delay: 0.1s; }
.asset-item:nth-child(3) { animation-delay: 0.15s; }
.asset-item:nth-child(4) { animation-delay: 0.2s; }
.asset-item:nth-child(5) { animation-delay: 0.25s; }
.asset-item:nth-child(6) { animation-delay: 0.3s; }
@keyframes assetFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Grid layout for assets */
.assets-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 12px;
    max-width: 100%;
}

/* Chart specific styles */
.asset-item.asset-chart {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(212, 165, 116, 0.2);
    border-radius: 8px;
    padding: 12px;
}

.chart-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    max-width: 100%;
    overflow: hidden;
}

.chart-image {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    display: block;
}

.chart-info {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Roboto Mono', monospace;
}

/* Make sure asset-chart is visible */
.asset-item {
    display: block !important;
    visibility: visible !important;
}

/* Code section styles */
.chart-code-section {
    margin-top: 12px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(212, 165, 116, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.code-label {
    font-family: 'Roboto Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    color: #d4a574;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.code-copy-btn {
    background: transparent;
    border: 1px solid rgba(212, 165, 116, 0.3);
    color: #d4a574;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.3s;
    font-family: 'Roboto Mono', monospace;
}

.code-copy-btn:hover {
    background: rgba(212, 165, 116, 0.1);
    border-color: #d4a574;
}

.chart-code-section pre {
    margin: 0;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    max-height: 300px;
    overflow-y: auto;
}

.chart-code-section pre code {
    font-family: 'Roboto Mono', monospace;
    font-size: 11px;
    line-height: 1.6;
}

.asset-code-btn {
    background: transparent;
    border: 1px solid rgba(212, 165, 116, 0.3);
    color: #d4a574;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
    font-family: 'Roboto Mono', monospace;
}

.asset-code-btn:hover,
.asset-code-btn.active {
    background: rgba(212, 165, 116, 0.1);
    border-color: #d4a574;
}

.asset-code-btn svg {
    width: 14px;
    height: 14px;
}

/* Chart container needs to be relative for absolute positioning */
.asset-item {
    position: relative;
}

/* Code overlay - positioned absolutely */
.chart-code-section {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    border: 1px solid rgba(212, 165, 116, 0.3);
    overflow: hidden;
    z-index: 10;
    display: flex;
    flex-direction: column;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(212, 165, 116, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.code-label {
    font-family: 'Roboto Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    color: #d4a574;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.code-copy-btn {
    background: transparent;
    border: 1px solid rgba(212, 165, 116, 0.3);
    color: #d4a574;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.3s;
    font-family: 'Roboto Mono', monospace;
}

.code-copy-btn:hover {
    background: rgba(212, 165, 116, 0.2);
    border-color: #d4a574;
}

.chart-code-section pre {
    margin: 0;
    padding: 16px;
    background: transparent;
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;
}

.chart-code-section pre code {
    font-family: 'Roboto Mono', monospace;
    font-size: 11px;
    line-height: 1.6;
}

/* Add close button to code overlay */
.code-close-btn {
    background: transparent;
    border: 1px solid rgba(255, 68, 68, 0.3);
    color: #ff4444;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.3s;
    font-family: 'Roboto Mono', monospace;
    margin-left: 8px;
}

.code-close-btn:hover {
    background: rgba(255, 68, 68, 0.1);
    border-color: #ff4444;
}

/* Ensure chart container has proper stacking */
.chart-container {
    position: relative;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    max-width: 100%;
    overflow: hidden;
}

/* Animation for overlay */
.chart-code-section {
    animation: overlayFadeIn 0.3s ease-out;
}

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

/* Apps container */
.apps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 20px;
    padding: 12px;
}

.app-item {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.app-type {
    font-size: 11px;
    font-weight: 700;
    color: #d4a574;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.app-title {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    margin-left: 12px;
}

.app-description {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Roboto Mono', monospace;
}

.app-fullscreen-btn,
.app-download-btn {
    background: transparent;
    border: 1px solid rgba(212, 165, 116, 0.3);
    color: #d4a574;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
    font-family: 'Roboto Mono', monospace;
}

.app-fullscreen-btn:hover,
.app-download-btn:hover {
    background: rgba(212, 165, 116, 0.1);
    border-color: #d4a574;
    transform: translateY(-1px);
}

.app-container {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.app-iframe {
    width: 100%;
    height: 400px;
    border: none;
    display: block;
    background: white;
}

/* Fullscreen overlay */
.app-fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: overlayFadeIn 0.3s ease-out;
}

.app-fullscreen-container {
    width: 90vw;
    height: 90vh;
    background: #1a1a1a;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.app-fullscreen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(42, 42, 42, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.app-fullscreen-title {
    font-size: 16px;
    font-weight: 600;
    color: #d4a574;
    font-family: 'Rajdhani', sans-serif;
}

.app-fullscreen-close {
    background: transparent;
    border: 1px solid rgba(255, 68, 68, 0.3);
    color: #ff4444;
    padding: 8px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
    font-family: 'Roboto Mono', monospace;
}

.app-fullscreen-close:hover {
    background: rgba(255, 68, 68, 0.1);
    border-color: #ff4444;
}

.app-fullscreen-iframe {
    flex: 1;
    width: 100%;
    border: none;
    background: white;
}

/* Voice Mode Styles */
.mode-btn.voice-mode {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.mode-btn.voice-mode.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: #ffffff;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
}

.voice-controls {
  display: flex;
    align-items: center;
    justify-content: center;
}

.voice-controls.active {
    display: flex;
}


.voice-mic-button {
    width: 40px;  /* Smaller - was 60px */
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(212, 165, 116, 0.3);  /* Gold border */
    background: transparent;  /* Transparent background */
    color: #d4a574;  /* Gold color */
    font-size: 18px;  /* Smaller icon */
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}


.voice-mic-button:hover {
   border-color: #d4a574;
    background: rgba(212, 165, 116, 0.1);
    transform: scale(1.05);
}

.voice-mic-button.listening {
    background: rgba(255, 68, 68, 0.1);  /* Subtle red background */
    border-color: #ff4444;
    color: #ff4444;
    animation: voiceGlow 1.5s infinite;
}
@keyframes voiceGlow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(255, 68, 68, 0.3);
    }
    50% {
        box-shadow: 0 0 15px rgba(255, 68, 68, 0.5);
    }
}

.voice-status {
    font-family: 'Roboto Mono', monospace;
    font-size: 11px;  /* Smaller text */
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    letter-spacing: 0.5px;
}

.voice-indicator {
    font-size: 12px;  /* Smaller */
    color: #d4a574;  /* Gold color */
    font-weight: 600;
}

.voice-indicator.listening {
    color: #ff4444;
}

/* Voice stop button - subtle */
.voice-stop-btn {
    padding: 6px 12px;  /* Smaller padding */
    background: transparent;
    border: 1px solid rgba(255, 68, 68, 0.3);
    color: #ff4444;
    font-family: 'Roboto Mono', monospace;
    font-size: 10px;  /* Smaller text */
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.voice-stop-btn:hover {
    background: rgba(255, 68, 68, 0.1);
    border-color: #ff4444;
}

 
/* .send-icon-btn {
    position: absolute;
    right: 12px;
    bottom: 12px;
    background: transparent;
    border: none;
    color: #d4a574;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    border-radius: 4px;
    z-index: 100;
} */

/* Attached files - separate container above input */
.attached-files {
    position: relative;
    display: none;
    flex-wrap: nowrap !important;
    gap: 8px;
    margin-bottom: 12px;  /* Space between attachments and input */
    width: 100%;  /* Match input width */
    /* align-self: center; */
    padding: 0;  /* Remove any padding */
     
    /* left:15vh; */
    overflow-x: auto;
    overflow-y: hidden;  /* No vertical scroll */
}

.attached-files.has-files {
    display: flex;
}

.attached-file {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(42, 42, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    font-family: 'Roboto Mono', monospace;
    font-size: 11px;
    color: #ffffff;
    max-width: 250px;
}

.file-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.file-details {
    flex: 1;
    min-width: 0;
}

.file-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #ffffff;
    font-weight: 400;
}

.file-size {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 2px;
}

.file-remove-btn {
    background: none;
    border: none;
    color: #ff4444;
    cursor: pointer;
    padding: 4px;
    font-size: 16px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.file-remove-btn:hover {
    color: #ff6666;
    transform: scale(1.1);
}

.file-error {
    border-color: #ff4444;
    background: rgba(255, 68, 68, 0.1);
}

.file-error .file-name {
    color: #ff4444;
}

/* Remove old mode selector styles */
.search-mode-toggle,
.mode-selector {
    display: none !important;
}

/* Input mode icons container */
.input-mode-icons {
    position: absolute; 
    right: 40px; 
    bottom: 2px;
    display: flex;
    gap: 4px;
    align-items: center;
    z-index: 100;
    pointer-events: all;
    /* background: #1a1a1a; */
    padding: 4px;
    border-radius: 4px;
    justify-content: space-between;
    flex-shrink: 0;
}
/* Mode icon buttons */
.mode-icon-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    border-radius: 4px;
    position: relative;
}

.mode-icon-btn:hover {
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.05);
}

.mode-icon-btn.active {
    color: #d4a574;
    background: rgba(212, 165, 116, 0.1);
}

.mode-icon-btn:disabled {
    color: rgba(255, 255, 255, 0.2);
    cursor: not-allowed;
    opacity: 0.5;
}



/* 
#message-input {
    padding-right: 140px;
} */

/* Voice controls - show below input when active */
.voice-controls {
    display: none;
    align-items: center;
    justify-content: center;
}

.voice-controls.active {
    display: flex;
}

/* Hide text input when voice is active */
.input-wrapper.voice-hidden {
    display: none;
}

.voice-stop-btn {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid rgba(255, 68, 68, 0.3);
    color: #ff4444;
    font-family: 'Roboto Mono', monospace;
    font-size: 11px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s;
}

.voice-stop-btn:hover {
    background: rgba(255, 68, 68, 0.1);
    border-color: #ff4444;
}

/* Upgrade section inside auth panel */
.upgrade-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.upgrade-section .premium-card {
    background: linear-gradient(135deg, rgba(58, 58, 58, 0.3) 0%, rgba(42, 42, 42, 0.3) 100%);
    border: 1px solid var(--button-border);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.upgrade-section .premium-badge {
    display: inline-block;
    padding: 4px 10px;
    background: var(--button-bg);
    color: #ffffff;
    font-family: 'Rajdhani', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border-radius: 6px;
}

.upgrade-section .premium-title {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 6px;
}

.upgrade-section .premium-desc {
    font-family: 'Roboto Mono', monospace;
    font-size: 10px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.6;
}

.upgrade-section .premium-btn {
    width: auto;
    padding: 8px 16px;
    background: var(--button-bg);
    border: 1px solid var(--button-border);
    color: #ffffff;
    font-family: 'Rajdhani', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    margin: 0 auto;
    display: block;
}

.upgrade-section .premium-btn:hover {
    background: var(--button-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Center input area vertically when chat is empty */
.chat-area.empty-chat {
    justify-content: center;
}

.chat-area.empty-chat .messages {
    display: none; /* Hide empty messages container */
}

/* .chat-area.empty-chat .input-area {
    margin-top: auto;
    margin-bottom: auto;
}
  */

/* When messages exist, input slides to bottom */
/* .chat-area:not(.empty-chat) .input-area {
     position: static;
    transform: translateY(0);
    width: auto;
    animation: slideDown 0.5s ease-out;
} */
 

@keyframes slideDown {
    from {
        transform: translateY(-30vh);
        opacity: 0.5;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
.chat-header {
    flex-shrink: 0;
}

/* .messages {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 50% !important;
} */

/* .chat-area .messages {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
    display: flex;
    flex-direction: column;
 
    align-items: center;
    visibility: hidden;   
} */

.chat-area:not(.empty-chat) .messages {
    visibility: visible;
}


/* Input area pushed to bottom normally */
/* .chat-area .input-area {
   position: absolute;  
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70%;
    flex-shrink: 0;
} */

/* When empty, center the input in the remaining space */
/* .chat-area.empty-chat .messages {
    display: flex;
    align-items: center;
    justify-content: center;
} */

/* .chat-area.empty-chat .input-area {
    margin-top: auto;
    margin-bottom: auto;
     transform: translate(-50%, -50%);
     
} */

.auth-google-button {
    width: 100%;
    padding: 12px 20px;
    background: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #1a1a1a;
    font-family: 'Rajdhani', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
}

.auth-google-button:hover {
    background: #f8f8f8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.auth-google-button:disabled {
    background: #e0e0e0;
    color: #999;
    cursor: not-allowed;
    transform: none;
}

.auth-google-button svg {
    flex-shrink: 0;
}

/* Attached files scrollbar - very subtle */
.attached-files::-webkit-scrollbar {
    height: 2px;  /* Very thin */
}

.attached-files::-webkit-scrollbar-track {
    background: transparent;
}

.attached-files::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);  /* Very faint */
    border-radius: 1px;
}

.attached-files::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);  /* Slightly more visible on hover */
}

/* For Firefox */
.attached-files {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}



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

:root {
    --bg-primary: #0d0d0d;
    --bg-secondary: #1a1f2e;
    --bg-tertiary: #0d1117;
    --text-primary: #ffffff;
    --text-secondary: #ffffff;
    --text-muted: #ffffff;
    --neon-cyan: #d4a574;
    --neon-magenta: #ff006e;
    --neon-yellow: #ffff00;
    --success: #00ff41;
    --error: #ff0040;
    --glow-cyan: rgba(212, 165, 116, 0.3);
    --glow-magenta: rgba(255, 0, 110, 0.3);
    --button-bg: #3a3a3a;
    --button-hover: #4a4a4a;
    --button-border: #555;
}

body {
    font-family: 'Rajdhani', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
    position: relative;
}

.container {
    display: flex;
    height: 100vh;
}

/* ============================================
   NEWS SELECTION PANEL - LEFT SLIDING (NO PUSH)
   ============================================ */
.news-selection-panel {
    position: fixed;
    left: -15%;
    top: 0;
    width: 15%;
    height: 100vh;
    background: rgba(42, 42, 42, 0.98);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 10001;
    display: flex;
    flex-direction: column;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    overflow-y: auto;
}

.news-selection-panel.active {
    left: 0;
    z-index: 10006 !important;  /* BOOSTED - Highest */
}

.news-selection-panel::-webkit-scrollbar {
    width: 4px;
}

.news-selection-panel::-webkit-scrollbar-track {
    background: transparent;
}

.news-selection-panel::-webkit-scrollbar-thumb {
    background: #D4C4B0;
    border-radius: 2px;
}

.news-panel-header {
    padding: 20px 16px;
    border-bottom: 1px solid #E8E6DC;
    flex-shrink: 0;
    background: #EDECDD;
}

.news-panel-logo {
    font-size: 20px;
    font-weight: 700;
    color: #D4A574;
    letter-spacing: 2px;
    text-align: center;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.news-panel-subtitle {
    text-align: center;
    font-family: 'Roboto Mono', monospace;
    font-size: 9px;
    color: #8B7355;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.news-panel-location {
    margin-top: 12px;
    padding: 10px;
    background: #FFFFFF;
    border: 1px solid #E8E6DC;
    border-radius: 6px;
    font-family: 'Roboto Mono', monospace;
    font-size: 9px;
    color: #6B5D4F;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.news-panel-location svg {
    flex-shrink: 0;
}

.news-panel-location span {
    flex: 1;
    display: flex;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.news-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px;
    background: #EDECDD;
    flex-direction: column;
    align-items: center;
}

.news-panel-content::-webkit-scrollbar {
    width: 4px;
}

.news-panel-content::-webkit-scrollbar-track {
    background: transparent;
}

.news-panel-content::-webkit-scrollbar-thumb {
  background: #D4C4B0;
    border-radius: 2px;
}

.news-categories-section {
    margin-bottom: 16px;
}

.news-section-title {
    font-family: 'Roboto Mono', monospace;
    font-size: 10px;
    color: #D4A574;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(212, 165, 116, 0.3);
    font-weight: 600;
}

.news-categories-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.news-category-item {
    padding: 10px 12px;
    margin-bottom: 6px;
    width: 50%;
    background: #084536 !important;
    border: 1px solid #E8E6DC;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
 
}
.news-category-item:hover {
    background: #FDFCFA;
    border-color: #D4A574;
    transform: translateX(3px);
    box-shadow: 0 2px 4px rgba(212, 165, 116, 0.1);
}

.news-category-item.active {
    background: #FBF6EF;
    border-color: #D4A574;
    box-shadow: 0 2px 6px rgba(212, 165, 116, 0.15);
}

.news-category-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.news-category-info {
    flex: 1;
    min-width: 0;
    text-align: center;
}

.news-category-name {
    font-size: 11px;
    font-weight: 200 !important;
    color:white !important;
    font-family: 'Rajdhani', sans-serif;
    margin-bottom: 2px;
    text-align: center;
}
.news-category-desc {
    font-size: 8px;
    color:white;
    font-family: 'Roboto Mono', monospace;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}

.news-panel-close {
    padding: 16px 12px;
    border-top: 1px solid #E8E6DC;
    flex-shrink: 0;
    background: #EDECDD;
    display: flex;
    justify-content: center;
}

.news-panel-close-btn {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1px solid #E8A87C;
    color: #D4A574;
    font-family: 'Roboto Mono', monospace;
    /* font-size: 10px; */
    font-weight: 600;
    letter-spacing: 1px;
    /* text-transform: uppercase; */
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.news-panel-close-btn:hover {
    background: #FBF6EF;
    border-color: #D4A574;
    box-shadow: 0 2px 4px rgba(212, 165, 116, 0.1);
}

.news-panel-backdrop {
   position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);  /* Darker for better visibility */
    backdrop-filter: blur(4px);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s;
}

.news-panel-backdrop.active {
    opacity: 1;
    pointer-events: all;
    z-index: 10005 !important;  /* BOOSTED - Above everything */
}

/* ============================================
   NEWS OVERLAY - FULL SCREEN (NO HEADER)
   ============================================ */
.news-overlay {
     position: fixed;
    top: 0;
    left: 15%;
    right: 0;
    bottom: 0;
    background: #F6F5EF;
    z-index: 10000;
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.news-overlay.active {
    display: flex;
    flex-direction: column;
    z-index: 10004 !important;  /* Below news panel but above wizard */
}

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

/* Close button - floating in top right */
.news-overlay-close {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10003;
    background:#F6F5EF;
    color: #ff4444;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    letter-spacing: 1px;
    backdrop-filter: blur(10px);
}

.news-overlay-close:hover {
    background: rgba(255, 68, 68, 0.2);
    border-color: #ff4444;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 68, 68, 0.3);
}

.news-content {
    flex: 1;
    overflow-y: auto !important;  /* FORCE scrollable */
    padding: 32px;
    padding-top: 80px;
    background: #F6F5EF;
}

.news-content::-webkit-scrollbar {
    width: 8px;
}

.news-content::-webkit-scrollbar-track {
    background: transparent;
}

.news-content::-webkit-scrollbar-thumb {
    background: #3a3a3a;
    border-radius: 4px;
}

.news-content::-webkit-scrollbar-thumb:hover {
    background: #4a4a4a;
}
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
    max-width: 1600px;
    margin: 0 auto;
}

.news-card {
    background: rgba(42, 42, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-4px);
    border-color: rgba(212, 165, 116, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.news-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: rgba(0, 0, 0, 0.3);
}

.news-card-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.news-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.news-provider {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Roboto Mono', monospace;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
}

.news-provider-icon {
    width: 16px;
    height: 16px;
    border-radius: 3px;
}

.news-time {
    font-family: 'Roboto Mono', monospace;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
}

.news-title {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-snippet {
    font-family: 'Roboto Mono', monospace;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
}

.news-category-tag {
    padding: 4px 10px;
    background: rgba(212, 165, 116, 0.1);
    border: 1px solid rgba(212, 165, 116, 0.3);
    border-radius: 4px;
    font-family: 'Roboto Mono', monospace;
    font-size: 9px;
    font-weight: 600;
    color: #d4a574;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-read-btn {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid rgba(212, 165, 116, 0.3);
    color: #d4a574;
    border-radius: 4px;
    cursor: pointer;
    font-size: 10px;
    transition: all 0.3s;
    font-family: 'Roboto Mono', monospace;
}

.news-read-btn:hover {
    background: rgba(212, 165, 116, 0.1);
    border-color: #d4a574;
}

.news-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px;
    font-family: 'Roboto Mono', monospace;
    color: black
}

.news-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Roboto Mono', monospace;
}

.news-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.news-section-btn {
    /* width: 100%; */
    padding: 12px 16px;
    background: var(--button-bg);
    border: 1px solid var(--button-border);
    color: #ffffff;
    font-family: 'Rajdhani', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    margin-top: 12px;
}

.news-section-btn:hover {
    background: var(--button-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.news-section-btn svg {
    width: 18px;
    height: 18px;
}
  
.voice-wave-indicator {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(212, 165, 116, 0.1);
    padding: 12px 24px;
    border-radius: 50px;
    border: 1px solid rgba(212, 165, 116, 0.3);
}

.wave-container {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 32px;
}

.wave-bar {
    width: 3px;
    background: #d4a574;
    border-radius: 2px;
    transition: height 0.15s ease;
}

.wave-container.idle .wave-bar {
    animation: gentlePulse 1.5s ease-in-out infinite;
}

.wave-container.listening .wave-bar {
    animation: activePulse 0.6s ease-in-out infinite;
}

.wave-container.processing .wave-bar {
    animation: processingWave 1.2s ease-in-out infinite;
}

.wave-bar:nth-child(1) { height: 6px; animation-delay: 0s; }
.wave-bar:nth-child(2) { height: 12px; animation-delay: 0.1s; }
.wave-bar:nth-child(3) { height: 18px; animation-delay: 0.2s; }
.wave-bar:nth-child(4) { height: 24px; animation-delay: 0.3s; }
.wave-bar:nth-child(5) { height: 18px; animation-delay: 0.4s; }
.wave-bar:nth-child(6) { height: 12px; animation-delay: 0.5s; }
.wave-bar:nth-child(7) { height: 6px; animation-delay: 0.6s; }

@keyframes gentlePulse {
    0%, 100% { transform: scaleY(1); opacity: 0.6; }
    50% { transform: scaleY(1.3); opacity: 1; }
}

@keyframes activePulse {
    0%, 100% { transform: scaleY(0.8); opacity: 0.8; }
    50% { transform: scaleY(1.5); opacity: 1; }
}

@keyframes processingWave {
    0%, 100% { transform: scaleY(1); opacity: 0.7; }
    50% { transform: scaleY(1.2); opacity: 1; }
}

.voice-close-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid #d4a574;
    color: #d4a574;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    transition: all 0.2s ease;
    padding: 0;
}

.voice-close-btn:hover {
    background: #d4a574;
    color: #1a1a1a;
    transform: scale(1.1);
}


/* Categorized Sources Container */
/* .categorized-sources-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 12px;
} */

/* Category Section */
.source-category-section {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.1) 0%, rgba(244, 197, 144, 0.05) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.category-title {
    font-size: 16px;
    font-weight: 600;
    color: #d4a574;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-count {
    font-size: 11px;
    font-family: 'Roboto Mono', monospace;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 12px;
}

/* Query Groups */
.category-queries {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
/* 
.query-sources-group {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transition: all 0.3s;
}

.query-sources-group:hover {
    border-color: rgba(212, 165, 116, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
} */

/* Query Header */
.query-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    background: rgba(0, 0, 0, 0.2);
}
/* 
.query-header:hover {
    background: rgba(212, 165, 116, 0.05);
} */

/*  

.query-text {
    flex: 1;
    font-family: 'Roboto Mono', monospace;
    font-size: 12px;
    color: #ffffff;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.query-source-count {
    font-size: 10px;
    font-family: 'Roboto Mono', monospace;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 8px;
    border-radius: 4px;
    flex-shrink: 0;
} */

.query-toggle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    transition: transform 0.3s;
    flex-shrink: 0;
}

.query-toggle.expanded {
    transform: rotate(180deg);
}

/* Query Sources List - USE GRID LAYOUT */
.query-sources {
    max-height: 800px;
    overflow-y: auto;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    
    /* GRID LAYOUT - Same as sources-grid */
    display: grid;
    grid-template-columns: repeat(3, 30%);
    gap: 16px;
    width: 100%;
    justify-content: flex-start;
}

.query-sources.collapsed {
    max-height: 0;
    padding: 0;
    overflow: hidden;
    opacity: 0;
}

.query-sources::-webkit-scrollbar {
    width: 6px;
}

.query-sources::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.query-sources::-webkit-scrollbar-thumb {
    background: #d4a574;
    border-radius: 3px;
}

/* ============================================
   SOURCES GRID - 3 COLUMNS LAYOUT (EACH CARD 30%)
   ============================================ */

.sources-grid {
    display: flex;
    /* grid-template-columns: repeat(3, 30%); */
    gap: 16px;
    padding: 12px 0;
    width: 100%;
    max-width: 100%;
    justify-content: flex-start;
    align-content: start;
    margin-bottom: 0;
    padding-bottom: 0;
    flex-direction: column;
    flex-wrap: wrap;
}

/* Source card styling for BOTH categorized and non-categorized */
/* .source-card,
.query-sources .source-card {
    display: flex;
    gap: 12px;
    padding: 14px;
    background: rgba(0, 255, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
    min-height: 100px;
    align-items: flex-start;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
    height: 100%;
} */

/* .source-card:hover,
.query-sources .source-card:hover {
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(212, 165, 116, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
} */

/* Override the translateX for categorized sources to match non-categorized */
/* .query-sources .source-card:hover {
    transform: translateY(-2px);
} */


/* .source-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
} */
/* 
.source-card-title {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.source-card-description {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Roboto Mono', monospace;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
} */

/* .source-card {
    animation: sourceCardFadeIn 0.4s ease-out backwards;
}

.source-card:nth-child(1) { animation-delay: 0.05s; }
.source-card:nth-child(2) { animation-delay: 0.1s; }
.source-card:nth-child(3) { animation-delay: 0.15s; }
.source-card:nth-child(4) { animation-delay: 0.2s; }
.source-card:nth-child(5) { animation-delay: 0.25s; }
.source-card:nth-child(6) { animation-delay: 0.3s; }
.source-card:nth-child(7) { animation-delay: 0.35s; }
.source-card:nth-child(8) { animation-delay: 0.4s; }
.source-card:nth-child(9) { animation-delay: 0.45s; } */
/* 
@keyframes sourceCardFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
} */

/* Animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* 
.query-sources-group {
    animation: slideDown 0.3s ease-out;
}

.query-sources-group.loading .query-header {
    opacity: 0.6;
    pointer-events: none;
}

.query-sources-group.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 16px;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(212, 165, 116, 0.3);
    border-top-color: #d4a574;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
} */

/* Responsive adjustments for BOTH layouts */
/* @media (max-width: 1400px) {
    .sources-grid,
    .query-sources {
        grid-template-columns: repeat(2, 48%);
        gap: 14px;
    }
} */

/* @media (max-width: 900px) {
    .sources-grid,
    .query-sources {
        grid-template-columns: 100%;
        gap: 12px;
    }
} */

/* Ensure consistent card heights */
.tab-content {
    overflow: hidden;
}

/* Loading State */
/* .query-sources-group.loading .query-header {
    opacity: 0.6;
    pointer-events: none;
}

.query-sources-group.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 16px;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(212, 165, 116, 0.3);
    border-top-color: #d4a574;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
} */

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Add this to your existing CSS file - it won't conflict with your current sources grid */

/* Categorized Sources Container */
/* .categorized-sources-container {
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding: 12px;
} */

/* Query Group - Simplified */
/* .query-sources-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
} */

/* Query Header - Simple, No Collapse */

/* Query Sources Grid - 3 COLUMN LAYOUT */
/* .query-sources-grid {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    grid-template-columns: repeat(3, 30%);
    gap: 16px;
    width: 100%;
    justify-content: flex-start;
    background: #F2EFDA;
    margin-left: 16px;
    margin-bottom: 16px;
   border:1px solid red !important
} */

/* Source cards in categorized view use same styling */
/* .query-sources-grid .source-card {
    display: flex;
    gap: 12px;
    padding: 14px;
    background: #F2ECD3 ;
    border-radius: 8px;
 
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
    min-height: 100px;
    align-items: flex-start;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
    height: 100%;
}

.query-sources-grid .source-card:hover {
    background: #F5F0DA;
    border-color: rgba(212, 165, 116, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
} */

/* Responsive */
/* @media (max-width: 1400px) {
    .query-sources-grid {
        grid-template-columns: repeat(2, 48%);
        gap: 14px;
    }
}

@media (max-width: 900px) {
    .query-sources-grid {
        grid-template-columns: 100%;
        gap: 12px;
    }
    
    .query-header-simple {
        flex-wrap: wrap;
    }
    
    .query-text {
        flex-basis: 100%;
    }
} */

/* Animation */
/* .query-sources-group {
    animation: slideDown 0.3s ease-out;
} */

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

/* Assets Container */
.assets-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
}

.asset-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.asset-chart {
    display: flex;
    flex-direction: column;
}

/* Asset Header */
.asset-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.asset-type {
    font-size: 11px;
    font-weight: 600;
    color: #667eea;
    margin-right: 12px;
}

.asset-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.asset-download-btn {
    padding: 6px 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.asset-download-btn:hover {
    background: #5568d3;
}

/* Chart Tabs - Horizontally Aligned Left */
.chart-tabs {
    display: flex;
    justify-content: flex-start;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
    padding: 0 20px;
}

.tabs-left {
    display: flex;
    gap: 0;
}

.chart-tab {
    padding: 10px 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #666;
    transition: color 0.2s;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.chart-tab:hover {
    color: #333;
}

.chart-tab.active {
    color: #667eea;
    border-bottom: 2px solid #667eea;
    font-weight: 500;
}

/* Chart View */
.chart-view {
    min-height: 300px;
}

.chart-container {
    padding: 20px;
}

.chart-image {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Code Section */
.code-section {
    padding: 0;
    background: #1e1e1e;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: #2d2d2d;
    color: #fff;
    font-size: 12px;
}

.code-label {
    font-weight: 500;
    color: #fff;
}

.code-copy-btn {
    padding: 4px 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: background 0.2s;
}

.code-copy-btn:hover {
    background: #5568d3;
}

.code-section pre {
    margin: 0;
    background: #1e1e1e;
    padding: 20px;
    overflow-x: auto;
    max-height: 500px;
}

.code-section code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    color: #d4d4d4;
}

/* Syntax highlighting (if using highlight.js) */
.hljs {
    background: #1e1e1e !important;
    color: #d4d4d4;
}

.hljs-keyword {
    color: #569cd6;
}

.hljs-string {
    color: #ce9178;
}

.hljs-number {
    color: #b5cea8;
}

.hljs-comment {
    color: #6a9955;
}

.hljs-function {
    color: #dcdcaa;
}


.chart-tab {
    padding: 10px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #666;
    transition: color 0.2s;
    border-bottom: 2px solid transparent;
}

.chart-tab:hover {
    color: #333;
}

.chart-tab.active {
    color: #667eea;
    border-bottom: 2px solid #667eea;
    font-weight: 500;
}


/* Responsive Design for Split Screen */
/* @media (max-width: 1200px) {
    .split-screen-container {
        flex-direction: column;
    }
    
    .split-left,
    .split-right {
        width: 100%;
        height: 50%;
    }
    
    .split-left {
        border-right: none;
 
    }
} */

/* @media (max-width: 1024px) {
    .split-tabs {
        padding: 8px 12px;
    }
    
    .split-tab {
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .split-copy-btn {
        padding: 6px 10px;
        font-size: 10px;
    }
    
    .split-code-block {
        padding: 12px;
        font-size: 11px;
    }
} */
 /* Messages in split screen - 95% width */
/* .split-left .messages {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 95%;
    margin: 0 auto;  
   
}

.split-left .messages > * {
    width: 100%;
    max-width: 100%;
}

.chat-area:not(.split-screen-active) .messages {
    width: 80%;
}

.messages {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    background: transparent;
    align-items: flex-start;
    width: 80%;
} */


/* Toggle button - Fixed */
.panel-toggle-btn {
    display: flex;
    position: fixed;
    top: 10px;
    left: 10px; /* Inside the panel */
    width: 24px;
    height: 24px;
    background: #d4a574 !important;
    border: 2px solid #ffffff !important;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10000;
    transition: all 0.3s;
    color: #1a1a1a !important;
    padding: 0;
    min-width: 24px;
    min-height: 24px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: all !important;
}


.panel-toggle-btn:hover {
    background: rgba(212, 165, 116, 0.2);
    border-color: #d4a574;
    transform: scale(1.1);
}

.panel-toggle-btn svg {
    width: 12px;
    height: 12px;
    transition: transform 0.3s;
    flex-shrink: 0;
    /* display: block; */
    stroke: #1a1a1a;
}

.conversations-panel.collapsed .panel-toggle-btn svg {
    transform: rotate(180deg);
}

    /* Split screen input adjustments */
/* .split-left .input-area {
    flex-shrink: 0;
    padding: 20px;
    background: #1a1a1a;
 
} */

/* .split-left .input-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    align-items: center;
} */

/* Target the placeholder div that holds the input wrapper */

/* Input wrapper inside split view */
/* #split-input-placeholder .input-wrapper {
    position: relative;
    width: 100%; 
    max-width: 100%;
    height: 12vh;
    display: flex !important;
    flex-direction: column;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
} */

/* Attached files in split view */

/* App Versions Selector */
.app-versions-selector {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.versions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.versions-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Roboto Mono', monospace;
    font-size: 12px;
    font-weight: 600;
    color: #d4a574;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.versions-count {
    font-family: 'Roboto Mono', monospace;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 8px;
    border-radius: 4px;
}

.versions-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.version-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.version-item:hover {
    background: rgba(212, 165, 116, 0.05);
    border-color: rgba(212, 165, 116, 0.3);
    transform: translateX(2px);
}

.version-item.active {
    background: rgba(212, 165, 116, 0.1);
    border-color: rgba(212, 165, 116, 0.4);
    box-shadow: 0 0 10px rgba(212, 165, 116, 0.2);
}

.version-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #d4a574 0%, #f4c590 100%);
    color: #1a1a1a;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    font-family: 'Roboto Mono', monospace;
    flex-shrink: 0;
}

.version-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.version-title {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    font-family: 'Rajdhani', sans-serif;
}

.version-latest {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid rgba(0, 255, 65, 0.3);
    border-radius: 4px;
    font-size: 9px;
    font-weight: 700;
    color: #00ff41;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
    width: fit-content;
}

.version-current-badge {
    font-size: 18px;
    color: #d4a574;
    flex-shrink: 0;
}

/* App Preview Container */
.app-preview-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.app-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(212, 165, 116, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.app-preview-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    font-family: 'Rajdhani', sans-serif;
}

.app-version-badge {
    padding: 3px 8px;
    background: rgba(212, 165, 116, 0.2);
    border: 1px solid rgba(212, 165, 116, 0.3);
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    color: #d4a574;
    font-family: 'Roboto Mono', monospace;
}

.app-preview-actions {
    display: flex;
    gap: 8px;
}

.app-preview-iframe-container {
    height: 400px;
    background: white;
}

.app-preview-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}   

/* App Version Selector Dropdown */

/* App Preview Container */
.app-preview-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.app-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(212, 165, 116, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.app-preview-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    font-family: 'Rajdhani', sans-serif;
}

.app-version-badge {
    padding: 3px 8px;
    background: rgba(212, 165, 116, 0.2);
    border: 1px solid rgba(212, 165, 116, 0.3);
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    color: #d4a574;
    font-family: 'Roboto Mono', monospace;
}

.app-preview-actions {
    display: flex;
    gap: 8px;
}

.app-preview-iframe-container {
    height: 400px;
    background: white;
}

.app-preview-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}


/* Split code block with Prism syntax highlighting */
/* Prism token colors */
.token.tag {
    color: #e06c75 !important;
}

.token.attr-name {
    color: #d19a66 !important;
}

.token.attr-value,
.token.string {
    color: #98c379 !important;
}

.token.punctuation {
    color: #abb2bf !important;
}

.token.comment {
    color: #5c6370 !important;
    font-style: italic;
}

.token.doctype {
    color: #c678dd !important;
}

.token.prolog {
    color: #61afef !important;
}



/* ===================================================
   CLAUDE-STYLE FONT IMPORTS
   Add these at the very top of your CSS file
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Fira+Code:wght@400;500&display=swap');

/* ===================================================
   OPENAI THEME - COLOR VARIABLE CHANGES
   Replace the :root variables with these
   =================================================== */

:root {
    /* Background colors - Clean whites and light grays */
    --bg-primary: #ffffff;
    --bg-secondary: #f7f7f8;
    --bg-tertiary: #ececf1;
    
    /* Text colors - Dark grays for readability */
    --text-primary: #2d333a;
    --text-secondary: #565869;
    --text-muted: #8e8ea0;
    
    /* Accent colors - OpenAI green palette */
    --neon-cyan: #10a37f;        /* Primary green */
    --neon-magenta: #10a37f;     /* Keep consistent */
    --neon-yellow: #10a37f;      /* Keep consistent */
    --success: #10a37f;
    --error: #ef4146;
    
    /* Glow effects */
    --glow-cyan: rgba(16, 163, 127, 0.2);
    --glow-magenta: rgba(16, 163, 127, 0.2);
    
    /* Button colors */
    --button-bg: #10a37f;
    --button-hover: #0d8c6d;
    --button-border: #10a37f;
}

/* ===================================================
   SPECIFIC CLASS CHANGES
   Copy these to replace existing styles
   =================================================== */

/* Body */
body {
    background: red;
    color: #2d333a;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Loading Screen */
.loading-screen {
    background: #ffffff;
}

.loading-logo {
    color: #10a37f;
    text-shadow: 0 0 20px rgba(16, 163, 127, 0.3);
}

.loading-text {
    color: #565869;
}

.loading-bar {
    background: #ececf1;
}

.loading-progress {
    background: #10a37f;
    box-shadow: 0 0 10px rgba(16, 163, 127, 0.3);
    border: 1px solid red
}

/* Chat Area */
.chat-area {
    background: #ffffff;
    justify-content: center;
  
}

.chat-header {
    border-bottom: 1px solid #ececf1;
    background: rgba(247, 247, 248, 0.8);
}

.conversation-indicator-title {
    color: #2d333a;
}

.conversation-indicator-title.empty {
    color: #8e8ea0;
}

.chat-action-btn {
    border: 1px solid #d9d9e3;
    color: #565869;
    background: transparent;
}

.chat-action-btn:hover {
    border-color: #10a37f;
    color: #10a37f;
    background: rgba(16, 163, 127, 0.05);
}

.chat-title {
    color: #10a37f;
    text-shadow: none;
}

.chat-subtitle {
    color: #8e8ea0;
}

/* Messages */
.messages {
    background: #ffffff;
}

.messages::-webkit-scrollbar-thumb {
    background: #d9d9e3;
    box-shadow: none;
}

.messages::-webkit-scrollbar-thumb:hover {
    background: #c5c5d2;
}

/* Message Bubbles */
.message.user .message-content { 
    padding:7px;
    background: #EDECDD !important;
    width: fit-content;
    border-radius: 10px;
    align-items: center;
    font-weight: 400;
}

.message.assistant .message-content {
    /* background: #ffffff;
    color: #2d333a; */
    padding-top: 10px;
}

.message-content {
    background: #F6F5EF !important;
    /* border: 1px solid #ececf1;   */
    /* color: #2d333a; */
}

.response-content {
    background: transparent;
    color: #2d333a;
}

/* Message Content Elements */
.message-content h1,
.message-content h2,
.message-content h3 {
    color: #10a37f;
}

.message-content pre {
    background: #f7f7f8;
    border: 1px solid #ececf1;
}

.message-content pre code {
    color: #2d333a;
}

.message-content blockquote {
    border-left: 3px solid #10a37f;
    color: #565869;
}

.message-content a {
    color: #10a37f;
}

/* Streaming Indicator */
.streaming-dot {
    background: #10a37f;
    box-shadow: 0 0 10px rgba(16, 163, 127, 0.3);
}

/* Input Area */
.input-wrapper {
    background: #ffffff;
    border: 1px solid #d9d9e3;
}

.input-wrapper:focus-within {
    border-color: #10a37f;
    box-shadow: 0 0 0 2px rgba(16, 163, 127, 0.1);
}

#message-input {
    background: #ffffff;
    color: #2d333a;
    border: none;
}

#message-input::placeholder {
    color: #8e8ea0;
}

/* .send-icon-btn {
    color: #10a37f;
    background: transparent;
} */

.send-icon-btn:hover {
    color: #0d8c6d;
    background: rgba(16, 163, 127, 0.05);
}

.send-icon-btn:disabled {
    color: #d9d9e3;
}

.send-btn {
    background: #10a37f;
    border: 1px solid #10a37f;
    color: #ffffff;
}

.send-btn:hover {
    background: #0d8c6d;
    border-color: #0d8c6d;
}

.send-btn:disabled {
    background: #ececf1;
    color: #8e8ea0;
    border-color: #ececf1;
}

/* Panels */
.conversations-panel,
.control-panel {
    background: #f7f7f8;
    border-right: 1px solid #ececf1;
    border-left: 1px solid #ececf1;
}

/* Panel Sections - Improved spacing and visual hierarchy */
.panel-section {
    padding: 20px 16px;
    border-bottom: 1px solid #ececf1;
}

.panel-section:first-child {
    padding-top: 24px;
}

.panel-section:last-child {
    border-bottom: none;
    padding-bottom: 24px;
}

/* Tighter spacing for conversation list section */
.panel-section:has(.conversations) {
    padding: 16px 12px;
}

/* More breathing room for auth section */
.panel-section:has(#auth-section) {
    padding: 24px 16px;
}

/* Premium/upgrade section gets subtle background */
.panel-section:has(.premium-card) {
    background: #ffffff;
    padding: 20px 16px;
    margin: 8px;
    border-radius: 8px;
    border: 1px solid #ececf1;
}

.panel-logo {
    color: #10a37f;
    text-shadow: none;
    margin-bottom: 8px;
}

.panel-status {
    color: #8e8ea0;
}

/* Conversations list container */
.conversations {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0;
    margin: 0;
}

/* Section title improvements */
.section-title {
    color: #565869;
    border-bottom: 1px solid #ececf1;
    padding-bottom: 10px;
    margin-bottom: 16px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Conversations */
/* .conversation-item {
    background: #ffffff;
    border: 1px solid #ececf1;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 6px;
    transition: all 0.2s ease;
} */

/* .conversation-item:hover {
    background: #f7f7f8;
    border-color: #d9d9e3;
    transform: translateX(2px);
} */

/* .conversation-item.active {
    background: rgba(16, 163, 127, 0.08);
    border-color: #10a37f;
    box-shadow: 0 1px 3px rgba(16, 163, 127, 0.1);
} */

.delete-btn {
    color: #ef4146;
}

/* Buttons */
.new-conversation-btn,
.premium-btn,
.auth-button {
    background: #10a37f;
    border: 1px solid #10a37f;
    color: #ffffff;
    border-radius: 8px;
    padding: 10px 16px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.new-conversation-btn:hover,
.premium-btn:hover,
.auth-button:hover {
    background: #0d8c6d;
    border-color: #0d8c6d;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.new-conversation-btn:active,
.premium-btn:active,
.auth-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* Premium Card */
.premium-card {
    background: #113019 !important;
    /* background: linear-gradient(135deg, rgba(247, 247, 248, 0.8) 0%, rgba(236, 236, 241, 0.8) 100%); */
    border: 1px solid #d9d9e3;
 
}

.premium-badge {
    background: #10a37f;
    color: #ffffff;
}

.premium-title {
    color: #2d333a;
}

.premium-desc {
    color: #565869;
}
  

.reasoning-title {
    color: #10a37f;
}

.reasoning-toggle {
    color: #565869;
}

.reasoning-content {
    background: #F6F5EF !important;
}

.reasoning-step {
    background: #F6F5EF !important;
    border-left: 2px solid #10a37f;
}

.reasoning-step-label {
    color: #10a37f;
}

/* Sources */
.sources-toggle-header {
    background: rgba(16, 163, 127, 0.05);
}

.sources-toggle-header:hover {
    background: rgba(16, 163, 127, 0.1);
}

.sources-toggle-text {
    color: #10a37f;
}

.sources-list {
    background: #f7f7f8;
}

.source-link {
    background: #ffffff;
    color: #565869;
    border: 1px solid #ececf1;
}

.source-link:hover {
    background: rgba(16, 163, 127, 0.05);
    border-color: #10a37f;
}
/* 
.source-card {
    background: #ffffff;
    border: 1px solid #ececf1;
}

.source-card:hover {
    background: #f7f7f8;
    border-color: #10a37f;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.source-card-title {
    color: #2d333a;
}

.source-card-description {
    color: #565869;
} */

/* Auth Forms */
.auth-tab {
    border: 1px solid #d9d9e3;
    color: #565869;
}

.auth-tab:hover {
    border-color: #10a37f;
    color: #10a37f;
}

.auth-tab.active {
    background: #10a37f;
    border-color: #10a37f;
    color: #ffffff;
}

.auth-input {
    background: #ffffff;
    border: 1px solid #d9d9e3;
    color: #2d333a;
}

.auth-input:focus {
    border-color: #10a37f;
    background: #ffffff;
    box-shadow: 0 0 0 2px rgba(16, 163, 127, 0.1);
}

.auth-input::placeholder {
    color: #8e8ea0;
}

.auth-input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #ffffff inset !important;
    -webkit-text-fill-color: #2d333a !important;
    border: 1px solid #d9d9e3 !important;
}

.auth-guest-button {
    background: transparent;
    border: 1px solid #d9d9e3;
    color: #2d333a;
}

.auth-guest-button:hover {
    background: #f7f7f8;
    border-color: #10a37f;
}

.auth-message.error {
    background: rgba(239, 65, 70, 0.1);
    border: 1px solid #ef4146;
    color: #ef4146;
}

.auth-message.success {
    background: rgba(16, 163, 127, 0.1);
    border: 1px solid #10a37f;
    color: #10a37f;
}

.auth-user-info {
    background: transparent;
    border: 1px solid #ececf1;
}

.auth-user-icon {
    background: #10a37f;
    border: 1px solid #10a37f;
    color: #ffffff;
}

.auth-username {
    color: #2d333a;
}

.auth-status {
    color: #10a37f;
}

.auth-logout-button {
    border: 1px solid #ef4146;
    color: #ef4146;
}

.auth-logout-button:hover {
    background: rgba(239, 65, 70, 0.05);
}

.auth-google-button {
    background: #ffffff;
    border: 1px solid #d9d9e3;
    color: #2d333a;
}

.auth-google-button:hover {
    background: #f7f7f8;
    border-color: #10a37f;
}

/* Date Groups */
.date-header {
    background: #ffffff;
    border: 1px solid #ececf1;
    color: #2d333a;
}

.date-header:hover {
    background: #f7f7f8;
    border-color: #10a37f;
    box-shadow: 0 0 10px rgba(16, 163, 127, 0.1);
}

.date-count {
    background: rgba(16, 163, 127, 0.1);
    color: #10a37f;
}

.expand-icon {
    color: #565869;
}

.date-group-items {
    background: #ffffff;
    border: 1px solid #ececf1;
}

/* .filter-select {
    background: #ffffff;
    border: 1px solid #d9d9e3;
    color: #2d333a;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    transition: all 0.2s ease;
}

.filter-select:hover,
.filter-select:focus {
    border-color: #10a37f;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(16, 163, 127, 0.08);
}

.filter-select option {
    background: #ffffff;
    color: #2d333a;
} */

.search-mode-toggle {
    background: #ffffff;
    border: 1px solid #ececf1;
}

.search-mode-label {
    color: #565869;
   
}

.toggle-switch {
    background: #ececf1;
    border: 1px solid #d9d9e3;
}

.toggle-switch.active {
    background: #10a37f;
    border-color: #10a37f;
    box-shadow: 0 0 10px rgba(16, 163, 127, 0.2);
}

.toggle-slider {
    background: #ffffff;
}

.deep-search-badge {
    background: #10a37f;
    color: #ffffff;
    box-shadow: none;
}

/* Mode Buttons */
.mode-btn {
    background: #ffffff;
    border: 1px solid #ececf1;
    color: #565869;
}

.mode-btn:hover {
    border-color: #10a37f;
    color: #10a37f;
}

.mode-btn.active {
    background: #10a37f;
    border-color: #10a37f;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(16, 163, 127, 0.2);
}

/* Assets */
.asset-item {
    background: #ffffff;
    border: 1px solid #ececf1;
}

.asset-item:hover {
    background: #f7f7f8;
    border-color: #10a37f;
}

.asset-type {
    color: #10a37f;
}

.asset-title {
    color: #2d333a;
}

.asset-download-btn {
    border: 1px solid #10a37f;
    color: #10a37f;
}

.asset-download-btn:hover {
    background: rgba(16, 163, 127, 0.05);
    border-color: #0d8c6d;
}

/* Table */
.table-container th {
    background: rgba(16, 163, 127, 0.1);
    color: #10a37f;
    border: 1px solid #ececf1;
}

.table-container td {
    border: 1px solid #ececf1;
    color: #2d333a;
}

.table-container tbody tr:nth-child(even) {
    background: #f7f7f8;
}

.table-container tbody tr:hover {
    background: rgba(16, 163, 127, 0.05);
}

/* Export Menu */
.export-btn {
    border: 1px solid #d9d9e3;
    color: #565869;
}

.export-btn:hover {
    border-color: #10a37f;
    color: #10a37f;
    background: rgba(16, 163, 127, 0.05);
}

.export-dropdown {
    background: #ffffff;
    border: 1px solid #d9d9e3;
}

.export-option {
    color: #2d333a;
    border-bottom: 1px solid #ececf1;
}

.export-option:hover {
    background: rgba(16, 163, 127, 0.05);
    color: #10a37f;
}

/* Voice Mode */
.voice-mic-button {
    border: 1px solid #10a37f;
    background: transparent;
    color: #10a37f;
}

.voice-mic-button:hover {
    border-color: #0d8c6d;
    background: rgba(16, 163, 127, 0.05);
}

.voice-mic-button.listening {
    background: rgba(239, 65, 70, 0.05);
    border-color: #ef4146;
    color: #ef4146;
}

.voice-status {
    color: #565869;
}

.voice-indicator {
    color: #10a37f;
}

.voice-indicator.listening {
    color: #ef4146;
}

.voice-stop-btn {
    border: 1px solid #ef4146;
    color: #ef4146;
}

.voice-stop-btn:hover {
    background: rgba(239, 65, 70, 0.05);
}

.voice-wave-indicator {
    background: rgba(16, 163, 127, 0.05);
    border: 1px solid #10a37f;
}

.wave-bar {
    background: #10a37f;
}

.voice-close-btn {
    border: 2px solid #10a37f;
    color: #10a37f;
}

.voice-close-btn:hover {
    background: #10a37f;
    color: #ffffff;
}

/* Attached Files */
.attached-file {
    background: #f7f7f8;
    border: 1px solid #ececf1;
    color: brown;
}

.file-name {
    color: brown;
}

.file-size {
    color: #8e8ea0;
}

.file-remove-btn {
    color: #ef4146;
}

.file-remove-btn:hover {
    color: #d63940;
}

.file-error {
    border-color: #ef4146;
    background: rgba(239, 65, 70, 0.05);
}

.file-error .file-name {
    color: #ef4146;
}

/* Mode Icon Buttons */
.mode-icon-btn {
    background: transparent;
    color: #8e8ea0;
}

.mode-icon-btn:hover {
    color: #565869;
    background: #f7f7f8;
}

.mode-icon-btn.active {
    color: #10a37f;
    background: rgba(16, 163, 127, 0.05);
}

.mode-icon-btn:disabled {
    color: #d9d9e3;
}

/* News Panel */
.news-selection-panel {
  position: fixed;
    left: -15%;
    top: 0;
    /* width: 15%; */
    height: 100vh;
    background: #FFFFFF;
    border-right: 1px solid #E8E6DC;
    z-index: 900;
    display: flex;
    flex-direction: column;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
}

.news-panel-logo {
    color: #10a37f;
    text-shadow: none;
}

.news-panel-subtitle {
    color: #8e8ea0;
}

.news-panel-location {
    background: #ffffff;
    color: #565869;
}

.news-section-title {
    color: #10a37f;
    border-bottom: 1px solid rgba(16, 163, 127, 0.2);
}

.news-category-item {
    background: #ffffff;
    border: 1px solid #ececf1;
}

.news-category-item:hover {
    background: rgba(16, 163, 127, 0.05);
    border-color: #10a37f;
}

.news-category-item.active {
    background: rgba(16, 163, 127, 0.1);
    border-color: #10a37f;
    box-shadow: 0 0 15px rgba(16, 163, 127, 0.1);
}

.news-category-name {
    color: white;
}

.news-category-desc {
    color: #8e8ea0;
}

.news-panel-close-btn {
    border: 1px solid #ef4146;
    color: #ef4146;
}

.news-panel-close-btn:hover {
    background: rgba(239, 65, 70, 0.05);
}

.news-panel-backdrop {
    background: rgba(255, 255, 255, 0.5);
}

/* News Overlay */
.news-overlay {
    background:  #F6F5EF !important
}


.news-card {
    background: #F6F5EF ;
    border: 1px solid #ececf1;
}

.news-card:hover {
    border-color: #10a37f;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.news-provider {
    color: #8e8ea0;
}

.news-time {
    color: #8e8ea0;
}

.news-title {
    color: #2d333a;
}

.news-snippet {
    color: #565869;
}

.news-category-tag {
    background: rgba(16, 163, 127, 0.1);
    border: 1px solid #10a37f;
    color: #10a37f;
}

.news-read-btn {
    border: 1px solid #10a37f;
    color: #10a37f;
}

.news-read-btn:hover {
    background: rgba(16, 163, 127, 0.05);
}

.news-empty {
    color: #8e8ea0;
}

.news-section-btn {
    background: #10a37f;
    border: 1px solid #10a37f;
    color: #ffffff;
}

.news-section-btn:hover {
    background: #0d8c6d;
}

/* Panel Toggle Button */
.panel-toggle-btn {
    background: #10a37f !important;
    border: 2px solid #ffffff !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.panel-toggle-btn:hover {
    background: #0d8c6d !important;
    border-color: #ffffff !important;
}

.panel-toggle-btn svg {
    stroke: #ffffff;
}

/* Scrollbars - Light theme */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: #d9d9e3;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #c5c5d2;
}

/* Categorized Sources */
.source-category-section {
    background: #ffffff;
    border: 1px solid #ececf1;
}

.category-header {
    background: rgba(16, 163, 127, 0.05);
    border-bottom: 1px solid #ececf1;
}

.category-title {
    color: #10a37f;
}

.category-count {
    color: #565869;
    background: rgba(16, 163, 127, 0.1);
}

/* .query-sources-group {
    background: #F2EFDA;
    border: 1px solid #ececf1;
}

.query-sources-group:hover {
    border-color: #10a37f;
} */
 

  
/* App Versions */
.app-versions-selector {
    background: #ffffff;
    border: 1px solid #ececf1;
}

.versions-label {
    color: #10a37f;
}

.versions-count {
    color: #8e8ea0;
    background: rgba(16, 163, 127, 0.05);
}

.version-item {
    background: #f7f7f8;
    border: 1px solid #ececf1;
}

.version-item:hover {
    background: rgba(16, 163, 127, 0.05);
    border-color: #10a37f;
}

.version-item.active {
    background: rgba(16, 163, 127, 0.1);
    border-color: #10a37f;
    box-shadow: 0 0 10px rgba(16, 163, 127, 0.1);
}

.version-number {
    background: #10a37f;
    color: #ffffff;
}

.version-title {
    color: #2d333a;
}

.version-latest {
    background: rgba(16, 163, 127, 0.1);
    border: 1px solid #10a37f;
    color: #10a37f;
}

.version-current-badge {
    color: #10a37f;
}

.version-dropdown {
    background: rgba(16, 163, 127, 0.05);
    border: 1px solid #10a37f;
    color: #10a37f;
}

.version-dropdown:hover {
    background: rgba(16, 163, 127, 0.1);
}

.version-dropdown:focus {
    background: rgba(16, 163, 127, 0.15);
    border-color: #0d8c6d;
    box-shadow: 0 0 0 2px rgba(16, 163, 127, 0.1);
}

.dropdown-arrow {
    color: #10a37f;
}

/* Chart Tabs */
.chart-tabs {
    border-bottom: 1px solid #ececf1;
    background: #f7f7f8;
}

.chart-tab {
    color: #565869;
    border-bottom: 2px solid transparent;
}

.chart-tab:hover {
    color: #2d333a;
}

.chart-tab.active {
    color: #10a37f;
    border-bottom: 2px solid #10a37f;
}

.code-header {
    background: #ececf1;
    color: #2d333a;
}

.code-label {
    color: #2d333a;
}

.code-copy-btn {
    background: #10a37f;
    color: #ffffff;
}

.code-copy-btn:hover {
    background: #0d8c6d;
}

/* ===================================================
   ADDITIONAL ADJUSTMENTS
   =================================================== */

/* Typography System - Claude-style */
body, .message-content, .premium-desc, .auth-input, .conversation-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 400;
}

/* Headings */
h1, h2, h3, h4, h5, h6,
.chat-title,
.panel-logo,
.premium-title,
.auth-username,
.news-category-name,
.version-title,
.asset-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* Monospace/Code - Use Fira Code for better readability */
.loading-text,
.chat-subtitle,
.panel-status,
.section-title,
.reasoning-title,
.sources-toggle-text,
.auth-input,
.conversation-indicator-label,
.message-content pre,
.message-content code,
.reasoning-content,
.reasoning-step-content,
.source-link,
.auth-message,
.filter-select,
.search-mode-label,
.news-panel-subtitle,
.news-provider,
.news-time,
.news-snippet,
.query-text,
.source-card-description,
.version-dropdown,
.split-code-block,
.split-code-block code,
.code-label,
pre, code {
    font-weight: 400;
}

/* Button Text */
button,
.send-btn,
.new-conversation-btn,
.premium-btn,
.auth-button,
.auth-tab,
.mode-btn,
.chat-action-btn {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 500;
    letter-spacing: -0.01em;
}

/* Small text (labels, badges, tags) */
.conversation-indicator-label,
.premium-badge,
.auth-status,
.date-count,
.deep-search-badge,
.asset-type,
.news-category-desc,
.query-source-count,
.version-latest,
.chart-tab,
.news-category-tag {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* Message content adjustments */
.message-content {
    font-size: 15px;
    line-height: 1.6;
    font-weight: 400;
}

.message-content p {
    margin-bottom: 12px;
}

.message-content h1 {
    font-size: 28px;
    font-weight: 600;
    line-height: 1.3;
    margin-top: 24px;
    margin-bottom: 12px;
}

.message-content h2 {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
    margin-top: 20px;
    margin-bottom: 10px;
}

.message-content h3 {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    margin-top: 16px;
    margin-bottom: 8px;
}

.message-content code {
    font-size: 14px;
    font-weight: 400;
}

.message-content pre {
    font-size: 14px;
    line-height: 1.5;
}

/* Input area */
#message-input {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.5;
}

.mode {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.0;
 
    border: 1 px solid red;

}

#message-input::placeholder {
    font-weight: 400;
}

/* Panel titles */
.panel-logo {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.section-title {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* Conversation items */
.conversation-title {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
}

/* News items */
.news-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.news-snippet {
    font-size: 14px;
    line-height: 1.5;
}

/* Remove all text-shadow effects */
.loading-logo,
.chat-title,
.panel-logo,
.empty-icon {
    text-shadow: none;
}

/* Subtle shadows instead of glows */
/* .conversation-item.active, */
.news-category-item.active,
.mode-btn.active {
    box-shadow: 0 2px 8px rgba(16, 163, 127, 0.15);
}

/* Clean focus states */
*:focus {
    outline: none;
}

*:focus-visible {
    outline: 2px solid #10a37f;
    outline-offset: 2px;
}

/* ===================================================
   THEME FIXES - APPEND THESE TO END OF CSS
   =================================================== */

/* FIX: Ensure logo is always visible */
.panel-logo {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: #10a37f !important;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    z-index: 1;
    position: relative;
}

/* Ensure the panel section containing logo is always visible */
.conversations-panel .panel-section:first-child {
    display: block !important;
}

/* Don't hide first panel section even when collapsed */
.conversations-panel.collapsed .panel-section:first-child {
    display: block !important;
}
 
/* FIX: Input mode icons - Light theme override */
.input-mode-icons {
    background: #f7f7f8 !important;
    /* border: 1px solid #ececf1 !important; */
}

.mode-icon-btn {
    color: #8e8ea0 !important;
}

.mode-icon-btn:hover {
    color: #565869 !important;
    background: #ffffff !important;
}

.mode-icon-btn.active {
    color: #10a37f !important;
    background: rgba(16, 163, 127, 0.08) !important;
}

.mode-icon-btn:disabled {
    color: #d9d9e3 !important;
}

/* ===================================================
   CONVERSATIONS PANEL - IMPROVED TEXT CLARITY
   =================================================== */

/* Panel text - darker and bolder for better readability */
.panel-logo {
    color: #2d333a !important;
    font-weight: 700 !important;
}

.panel-status {
    color: #565869 !important;
    font-weight: 500 !important;
}

.section-title {
    color: #2d333a !important;
    font-weight: 600 !important;
}

/* Conversation items - clearer text */
.conversation-title {
    color: #2d333a !important;
    font-weight: 500 !important;
}

/* .conversation-item {
    color: #2d333a !important;
} */
/* 
.conversation-item:hover .conversation-title {
    color: #10a37f !important;
}

.conversation-item.active .conversation-title {
    color: #10a37f !important;
    font-weight: 600 !important;
} */

/* Date headers - clearer */
.date-header {
    color: #2d333a !important;
    font-weight: 600 !important;
}

.date-count {
    color: #10a37f !important;
    background: rgba(16, 163, 127, 0.15) !important;
    font-weight: 600 !important;
}

/* Auth section text */
.auth-username {
    color: #2d333a !important;
    font-weight: 600 !important;
}

.auth-status {
    color: #10a37f !important;
    font-weight: 500 !important;
}

/* .filter-select {
    color: #2d333a !important;
    font-weight: 500 !important;
} */
 
.news-category-desc {
    color: #565869 !important;
}

/* Premium card text */
.premium-title {
    color: #2d333a !important;
    font-weight: 600 !important;
}

.premium-desc {
    color: #565869 !important;
}

/* ===================================================
   SEARCH MODE INDICATOR - FIXED
   =================================================== */

/* Show badge for ALL modes (including normal) */
.input-wrapper::before,
.input-wrapper[data-mode-label="NORMAL"]::before,
.input-wrapper[data-mode-label="DEEP SEARCH"]::before,
.input-wrapper[data-mode-label="LAB MODE"]::before,
.input-wrapper[data-mode-label="VOICE"]::before {
    content: attr(data-mode-label);
    position: absolute;
    left: 16px;
    bottom: 2px;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    pointer-events: none;
    
    /* FORCE SAME STYLE - use !important */
    background: #f7f7f8 !important;
    color: #565869 !important;
    border: 1px solid #ececf1 !important;
    opacity: 1 !important;
}

 
/* Mode specific ICON colors only (keep same background) */
.input-wrapper[data-mode-label="NORMAL"]::before {
    color: #10a37f;
    border-color: rgba(16, 163, 127, 0.3);
}

.input-wrapper[data-mode-label="DEEP SEARCH"]::before {
    color: #667eea;
    border-color: rgba(102, 126, 234, 0.3);
}

.input-wrapper[data-mode-label="LAB MODE"]::before {
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.3);
}

.input-wrapper[data-mode-label="VOICE"]::before {
    color: #ec4899;
    border-color: rgba(236, 72, 153, 0.3);
}
 
.input-wrapper[data-mode-label]  {
    padding-left: 20px !important;
}  

.send-icon-btn {
    position: absolute;
    /* right: 12px; */
    top: 50% !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
    background: transparent;
    border: none;
    color: #10a37f;
    cursor: pointer;
    /* padding: 6px; */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    border-radius: 4px;
    z-index: 100;
}


/* ===================================================
   REASONING SECTION - IMPROVED STYLING
   =================================================== */

/* Reasoning section container */
.reasoning-section {
    /* background: #ffffff; */
    border: 1px solid #ececf1;
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
    /* box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); */
}

/* Reasoning header */
.reasoning-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
 
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    border-bottom: 1px solid #ececf1;
}
 

/* Reasoning title with icon */
.reasoning-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #2d333a;
    letter-spacing: 0;
}

/* Thinking icon animation */
.reasoning-icon {
    font-size: 16px;
    animation: spin 2s linear infinite;
}

.reasoning-icon.complete {
    animation: none;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Toggle arrow */
.reasoning-toggle {
    font-size: 14px;
    color: #8e8ea0;
    transition: transform 0.3s ease;
}

.reasoning-toggle.expanded {
    transform: rotate(180deg);
}

/* Reasoning content */
.reasoning-content {
    padding: 16px 18px;
    max-height: none;
    overflow-y: visible;
    display: none;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    line-height: 1.6;
    background: #ffffff;
    color: #2d333a;
}

.reasoning-content.expanded {
    display: block;
    animation: slideDown 0.3s ease-out;
}

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

/* Reasoning steps */
.reasoning-step {
    padding: 12px 16px;
    margin-bottom: 12px;
    background: #f7f7f8;
    border-left: 3px solid #10a37f;
    /* border-radius: 6px; */
    animation: stepFadeIn 0.4s ease-out;
}

.reasoning-step:last-child {
    margin-bottom: 0;
}

@keyframes stepFadeIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Step label */
.reasoning-step-label {
    color: #10a37f;
    font-weight: 600;
    font-size: 12px;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Step content */
.reasoning-step-content {
    color: #565869;
    line-height: 1.6;
    background: #F6F5EF !important;
}

/* Sources toggle in reasoning */
.sources-toggle-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding: 10px 14px;
    background: #ffffff;
    border: 1px solid #ececf1;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.sources-toggle-header:hover {
    background: #f7f7f8;
    border-color: #d9d9e3;
}

.sources-toggle-text {
    font-size: 11px;
    font-weight: 600;
    color: #10a37f;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.sources-toggle-icon {
    font-size: 12px;
    color: #8e8ea0;
    transition: transform 0.3s ease;
}

.sources-toggle-icon.expanded {
    transform: rotate(180deg);
}

/* Sources list in reasoning */
.sources-list {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: none;
    overflow-y: visible;
    padding: 12px;
    background: #f7f7f8;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.sources-list.collapsed {
    max-height: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
    opacity: 0;
}

/* Source links in reasoning */
.source-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #ffffff;
    border: 1px solid #ececf1;
    border-radius: 6px;
    text-decoration: none;
    color: #565869;
    font-size: 12px;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
}

.source-link:hover {
    background: #f7f7f8;
    border-color: #10a37f;
    transform: translateX(2px);
}
 
/* Scrollbar for reasoning content */
.reasoning-content::-webkit-scrollbar {
    width: 6px;
}

.reasoning-content::-webkit-scrollbar-track {
    background: transparent;
}

.reasoning-content::-webkit-scrollbar-thumb {
    background: #d9d9e3;
    border-radius: 3px;
}

.reasoning-content::-webkit-scrollbar-thumb:hover {
    background: #c5c5d2;
}   

.streaming-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    transition: opacity 0.3s ease;
 
}

.streaming-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Roboto Mono', monospace;
    margin-left: 8px;
}

.streaming-indicator.done .streaming-text {
    color: #00ff41;
    font-weight: 500;
}

.streaming-indicator.done .streaming-dot {
    background: #00ff41 !important;
    animation: none !important;
}

/* Make scrollbar visible - works in all browsers */
#attached-files {
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 165, 116, 0.6) rgba(255, 255, 255, 0.1);
}

#attached-files::-webkit-scrollbar {
    width: 8px;
}

#attached-files::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

#attached-files::-webkit-scrollbar-thumb {
    background: rgba(212, 165, 116, 0.6);
    border-radius: 4px;
}

#attached-files::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 165, 116, 0.9);
}


/* ========================================
   SURGICAL COLOR UPDATES
   Add these at the END of your existing CSS
   These will override specific elements only
======================================== */

/* ========================================
   BUTTONS - All to #174236
======================================== */

/* Send button */
.send-btn {
    background: #174236 !important;
    border: 1px solid #174236 !important;
    color: #FFFFFF !important;
}

.send-btn:hover {
    background: #0f2d24 !important;
    border-color: #0f2d24 !important;
}

/* New conversation button */
.new-conversation-btn {
    background: #174236 !important;
    border: 1px solid #174236 !important;
    color: #FFFFFF !important;
}

.new-conversation-btn:hover {
    background: #0f2d24 !important;
    border-color: #0f2d24 !important;
}

/* Auth buttons */
.auth-button {
    background: #174236 !important;
    border: 1px solid #174236 !important;
    color: #FFFFFF !important;
}

.auth-button:hover {
    background: #0f2d24 !important;
    border-color: #0f2d24 !important;
}

/* Auth tab active state */
.auth-tab.active {
    background: #174236 !important;
    border-color: #174236 !important;
    color: #FFFFFF !important;
}

/* Google auth button */
.auth-google-button {
    background: #FFFFFF !important;
    border: 1px solid #174236 !important;
    color: #174236 !important;
}

.auth-google-button:hover {
    background: #F6F5EF !important;
    border-color: #174236 !important;
}

/* Mode buttons active state */
.mode-btn.active {
    background: #174236 !important;
    border-color: #174236 !important;
    color: #FFFFFF !important;
}

/* Toggle switch active */
.toggle-switch.active {
    background: #174236 !important;
    border-color: #174236 !important;
}

/* News section button */
.news-section-btn {
    background: #174236 !important;
    border: 1px solid #174236 !important;
    color: #FFFFFF !important;
}

.news-section-btn:hover {
    background: #0f2d24 !important;
    border-color: #0f2d24 !important;
}

/* App buttons */
.app-fullscreen-btn,
.app-download-btn {
    background: #174236 !important;
    border: 1px solid #174236 !important;
    color: #FFFFFF !important;
}

.app-fullscreen-btn:hover,
.app-download-btn:hover {
    background: #0f2d24 !important;
    border-color: #0f2d24 !important;
}

/* Asset download button */
.asset-download-btn {
    border: 1px solid #174236 !important;
    color: #174236 !important;
}

.asset-download-btn:hover {
    background: rgba(23, 66, 54, 0.1) !important;
    border-color: #0f2d24 !important;
}

/* Code copy button */
.code-copy-btn {
    background: #174236 !important;
    border: 1px solid #174236 !important;
    color: #FFFFFF !important;
}

.code-copy-btn:hover {
    background: #0f2d24 !important;
}

/* Chart tab active */
.chart-tab.active {
    color: #174236 !important;
    border-bottom: 2px solid #174236 !important;
}

/* Version dropdown */
.version-dropdown {
    background: rgba(23, 66, 54, 0.05) !important;
    border: 1px solid #174236 !important;
    color: #174236 !important;
}

.version-dropdown:hover {
    background: rgba(23, 66, 54, 0.1) !important;
}

.version-dropdown:focus {
    background: rgba(23, 66, 54, 0.15) !important;
    border-color: #0f2d24 !important;
}

.dropdown-arrow {
    color: #174236 !important;
}

/* ========================================
   PREMIUM PANEL - Dark green background
======================================== */

.premium-card {
    background: #174236 !important;
    border: 1px solid #174236 !important;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.premium-badge {
    display: inline-block;
    padding: 6px 12px;
    background: #FFFFFF !important;
    color: #174236 !important;
    font-family: 'Rajdhani', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 12px;
    border-radius: 6px;
}

.premium-title {
    font-size: 16px;
    font-weight: 600;
    color: #FFFFFF !important;
    margin-bottom: 8px;
}

.premium-desc {
    font-family: 'Roboto Mono', monospace;
    font-size: 11px;
    color: #FFFFFF !important;
    opacity: 0.9;
    margin-bottom: 16px;
    line-height: 1.6;
}

.premium-btn {
    width: auto;
    padding: 8px 16px;
    background: #FFFFFF !important;
    border: 1px solid #FFFFFF !important;
    color: #174236 !important;
    font-family: 'Rajdhani', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 8px;
    margin: 0 auto;
    display: block;
}

.premium-btn:hover {
    background: #F6F5EF !important;
    border-color: #F6F5EF !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ========================================
   ACCENT ELEMENTS - #174236 color
======================================== */

/* Auth user icon */
.auth-user-icon {
    background: #174236 !important;
    border: 1px solid #174236 !important;
    color: #FFFFFF !important;
}

/* Auth status */
.auth-status {
    color: #174236 !important;
}

/* Deep search badge */
.deep-search-badge {
    background: #174236 !important;
}

/* Version number */
.version-number {
    background: linear-gradient(135deg, #174236 0%, #0f2d24 100%) !important;
}

/* Query number */
 
/* Loading logo */
.loading-logo {
    color: #174236 !important;
}

/* Panel logo */
.panel-logo {
    color: #174236 !important;
}

/* Reasoning title */
.reasoning-title {
    color: #174236 !important;
}

/* Reasoning step label */
.reasoning-step-label {
    color: #174236 !important;
}

/* Reasoning step border */
.reasoning-step {
    border-left: 3px solid #174236 !important;
}

/* Sources toggle text */
.sources-toggle-text {
    color: #174236 !important;
}

/* Message headings */
.message-content h1,
.message-content h2,
.message-content h3 {
    color: #174236 !important;
}

/* Message links */
.message-content a {
    color: #174236 !important;
}

/* Message blockquote */
.message-content blockquote {
    border-left: 3px solid #174236 !important;
}

/* Active conversation item */
/* .conversation-item.active {
    border-color: #174236 !important;
} */

/* Chat action button hover */
.chat-action-btn:hover {
    border-color: #174236 !important;
    color: #174236 !important;
    background: rgba(23, 66, 54, 0.05) !important;
}

/* Source link hover */
.source-link:hover {
    border-color: #174236 !important;
}

/* Source card hover */
/* .source-card:hover {
    border-color: #174236 !important;
} */

/* News category item active */
.news-category-item.active {
    border-color: #174236 !important;
}

/* News category tag */
.news-category-tag {
    background: rgba(23, 66, 54, 0.1) !important;
    border: 1px solid #174236 !important;
    color: #174236 !important;
}

/* News read button */
.news-read-btn {
    border: 1px solid #174236 !important;
    color: #174236 !important;
}

.news-read-btn:hover {
    background: rgba(23, 66, 54, 0.05) !important;
}


/* Mode icon button active */
.mode-icon-btn.active {
    color: #174236 !important;
    background: rgba(23, 66, 54, 0.08) !important;
}

/* Input wrapper focus */
.input-wrapper:focus-within {
    border-color: #174236 !important;
}

/* Auth input focus */
.auth-input:focus {
    border-color: #174236 !important;
}

/* Filter select hover/focus */
/* .filter-select:hover,
.filter-select:focus {
    border-color: #174236 !important;
} */

/* Streaming dots */
.streaming-dot {
    background: #174236 !important;
}

/* Send icon button */
.send-icon-btn {
    color: #174236 !important;
}

.send-icon-btn:hover {
    background: rgba(23, 66, 54, 0.1) !important;
}

/* Voice wave bars */
.wave-bar {
    background: #174236 !important;
}

/* Voice close button */
.voice-close-btn {
    border: 2px solid #174236 !important;
    color: #174236 !important;
}

.voice-close-btn:hover {
    background: #174236 !important;
    color: #FFFFFF !important;
}

/* Panel toggle button */
.panel-toggle-btn {
    background: #FFFFFF !important;
    border: 2px solid #174236 !important;
    color: #174236 !important;
}

.panel-toggle-btn svg {
    stroke: #174236 !important;
}
 
/* Asset type label */
.asset-type {
    color: #174236 !important;
}

/* Category title */
.category-title {
    color: #174236 !important;
}

/* Version latest badge */
.version-latest {
    background: rgba(23, 66, 54, 0.1) !important;
    border: 1px solid #174236 !important;
    color: #174236 !important;
}

/* Version current badge */
.version-current-badge {
    color: #174236 !important;
}

/* Asset code button active */
.asset-code-btn.active {
    background: rgba(23, 66, 54, 0.1) !important;
    border-color: #174236 !important;
}

/* News panel logo */
.news-panel-logo {
    color: #174236 !important;
}

/* News section title */
.news-section-title {
    color: #174236 !important;
    border-bottom: 1px solid rgba(23, 66, 54, 0.2) !important;
}

/* Category count badge */
.category-count {
    color: #174236 !important;
    background: rgba(23, 66, 54, 0.15) !important;
}

/* Date count badge */
.date-count {
    color: #174236 !important;
    background: rgba(23, 66, 54, 0.15) !important;
}

/* ========================================
   BACKGROUND COLORS - Keep as they are
   Main bg: #F6F5EF
   Panels stay as designed
======================================== */

/* These maintain your existing light backgrounds */
body {
    background: #F6F5EF !important;
}

.chat-area {
    background: #F6F5EF !important;
}

.messages {
    background: #F6F5EF !important;
}

.loading-screen {
    background: #F6F5EF !important;
}

/* Conversations Toggle Button */
.conversations-toggle-btn {
    width: 100%;
    padding: 12px;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
    color: #667eea;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Roboto Mono', monospace;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    margin-bottom: 12px;
}

.conversations-toggle-btn:hover {
    background: rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateY(-1px);
}

.conversations-toggle-btn svg {
    width: 16px;
    height: 16px;
}

/* Conversations Selection Panel Backdrop */
.conversations-panel-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.conversations-panel-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* Conversations Selection Panel */
.conversations-selection-panel {
    position: fixed;
    top: 0;
    left: -400px;
    width: 400px;
    height: 100vh;
    background: #1a1a1a;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000 !important;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.conversations-selection-panel.active {
    left: 0;
}

/* Panel Header */
.conversations-panel-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #E3DFC5;
}

.conversations-panel-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Roboto Mono', monospace;
    font-weight: 700;
    font-size: 16px;
    color: #084536;
}

.conversations-panel-logo svg {
    width: 24px;
    height: 24px;
    stroke: #084536;
}

.conversations-panel-close-btn {
    background: none;
    border: none;
    color: red;
    font-size: 32px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
}

.conversations-panel-close-btn:hover {
    color: #fff;
    transform: rotate(90deg);
}

/* Panel Content */
.conversations-panel-content {
     flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #EDECDD;
}

.conversations-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Reuse existing conversation item styles */
/* .conversations-list .conversation-item {
  padding: 12px 16px;
    background: #FFFFFF;
    border: 1px solid #E8E6DC;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.conversations-list .conversation-item:hover {
    background: #FDFCFA;
    border-color: #D4A574;
    box-shadow: 0 2px 4px rgba(212, 165, 116, 0.08);
    transform: translateY(-1px);
}

.conversations-list .conversation-item.active {
    background: #EDECDD;
    border-color: #D4A574;
    box-shadow: 0 2px 6px rgba(212, 165, 116, 0.12);
} */

.conversations-list .date-header-simple {
    font-family: 'Roboto Mono', monospace;
    font-size: 11px;
    color: #8B7355;
    text-transform: uppercase;
    padding: 16px 0 8px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    letter-spacing: 0.8px;
    font-weight: 500;
}

.conversations-list .date-count {
    background: #E8E6DC;
    color: #6B5D4F;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
}

/* .conversation-item .conversation-title {
    font-size: 14px;
    color: #2C2418;
    font-weight: 500;
    margin-bottom: 4px;
} */

.conversation-item .conversation-preview {
    font-size: 12px;
    color: #8B7355;
    line-height: 1.4;
}

.conversation-item .conversation-time {
    font-size: 11px;
    color: #A89B8C;
    font-family: 'Roboto Mono', monospace;
}

/* Scrollbar styling for light theme */
conversations-panel-content::-webkit-scrollbar {
    width: 8px;
}

conversations-panel-content::-webkit-scrollbar-track {
    background: #F6F5EF;
}

conversations-panel-content::-webkit-scrollbar-thumb {
    background: #D4C4B0;
    border-radius: 4px;
}

conversations-panel-content::-webkit-scrollbar-thumb:hover {
    background: #C4B4A0;
}

/* Empty state styling */
/* .conversations-list-empty {
    text-align: center;
    padding: 40px 20px;
    color: #8B7355;
}

.conversations-list-empty p {
    font-size: 14px;
    margin-bottom: 8px;
} */

/* Mobile Responsive */
/* @media (max-width: 1024px) {
    .conversations-selection-panel {
        width: 100%;
        left: -100%;
    }
    
    .conversations-selection-panel.active {
        left: 0;
    }
} */

/* Conversations Icon Button */
.conversations-icon-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: none;
    color: #174236;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin-bottom: 12px;
    position: relative;
}

.conversations-icon-btn:hover {
    background: rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateY(-1px);
}

.conversations-icon-btn svg {
    width: 20px;
    height: 20px;
}

/* Green Tooltip for icon button */
.conversations-icon-btn::after {
    content: 'Conversations';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 12px;
    padding: 8px 14px;
    background: #174236;
    color: white;
    /* font-size: 11px; */
    /* font-family: 'Roboto Mono', monospace; */
    /* font-weight: 600; */
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    pointer-events: none;
    z-index: 1000;
    /* box-shadow: 0 4px 12px rgba(0, 255, 65, 0.3); */
}

.conversations-icon-btn:hover::after {
    opacity: 1;
    visibility: visible;
    margin-left: 16px;
}
 

.conversations-icon-btn:hover::before {
    opacity: 1;
    visibility: visible;
    margin-left: 12px;
}

/* New Chat Icon Button */
.new-chat-icon-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: none;
    color: #174236;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin-bottom: 12px;
    position: relative;
}

.new-chat-icon-btn:hover {
    background: rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateY(-1px);
}

.new-chat-icon-btn svg {
    width: 20px;
    height: 20px;
}

/* Green Tooltip for new chat button */
.new-chat-icon-btn::after {
    content: 'New Chat';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 12px;
    padding: 8px 14px;
    background: #174236;
    color: white;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    pointer-events: none;
    z-index: 1000;
    /* box-shadow: 0 4px 12px rgba(0, 255, 65, 0.3); */
}

.new-chat-icon-btn:hover::after {
    opacity: 1;
    visibility: visible;
    margin-left: 16px;
}

 
.new-chat-icon-btn:hover::before {
    opacity: 1;
    visibility: visible;
    margin-left: 12px;
}

/* News Icon Button */
.news-icon-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: none;
    color: #174236;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin-bottom: 12px;
    position: relative;
}

.news-icon-btn:hover {
    background: rgba(23, 66, 54, 0.2);
    transform: scale(1.05);
    background: #174236;
    color:white

}

.news-icon-btn svg {
    width: 20px;
    height: 20px;
}

/* Tooltip for news button */
.news-icon-btn::after {
    content: 'Local News';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 12px;
    padding: 8px 14px;
    background: #174236;
    color: white;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    pointer-events: none;
    z-index: 1000;
}

.news-icon-btn:hover::after {
    opacity: 1;
    visibility: visible;
    margin-left: 16px;
}

/* Premium Icon Button */
.premium-icon-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: none;
    color: #174236;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin-top: 12px;
    position: relative;
}

.premium-icon-btn:hover {
    background: rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateY(-1px);
}

.premium-icon-btn svg {
    width: 20px;
    height: 20px;
}

/* Tooltip for premium button */
.premium-icon-btn::after {
    content: 'Upgrade';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 12px;
    padding: 8px 14px;
    background: #174236;
    color: white;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    pointer-events: none;
    z-index: 1000;
}

.premium-icon-btn:hover::after {
    opacity: 1;
    visibility: visible;
    margin-left: 16px;
}

/* Premium Popup Backdrop */
.premium-popup-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.premium-popup-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* Premium Popup Modal */
.premium-popup-modal {
    position: fixed;
    top: 50%;
     left: 50%;
    /* transform: translate(-50%, -50%) scale(0.9); */
    width: 90%;
    /* max-width: 500px; */
    background: #1a1a1a;
    border: 1px solid rgba(212, 165, 116, 0.3);
    border-radius: 16px;
    z-index: 9999;
    opacity: 0;
    /* visibility: hidden; */
    /* transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); */
    /* box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); */
}

.premium-popup-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* Popup Header */
.premium-popup-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.premium-popup-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Roboto Mono', monospace;
    font-weight: 700;
    font-size: 16px;
    color: #d4a574;
}

.premium-popup-title svg {
    width: 24px;
    height: 24px;
    stroke: #d4a574;
}

.premium-popup-close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 32px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
}

.premium-popup-close-btn:hover {
    color: #fff;
}

/* Popup Content */
.premium-popup-content {
    padding: 32px;
}

.premium-card-popup {
    text-align: center;
}

.premium-badge-large {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(135deg, #d4a574, #f0c987);
    color: #000;
    font-family: 'Roboto Mono', monospace;
    font-weight: 700;
    font-size: 12px;
    border-radius: 20px;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.premium-title-large {
    font-family: 'Roboto Mono', monospace;
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
}

.premium-price {
    font-family: 'Roboto Mono', monospace;
    font-size: 32px;
    font-weight: 700;
    color: #d4a574;
    margin-bottom: 32px;
}

.premium-features-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
    text-align: left;
}

.premium-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Roboto Mono', monospace;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.premium-feature-item svg {
    width: 20px;
    height: 20px;
    stroke: #00ff41;
    flex-shrink: 0;
}

.premium-upgrade-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #d4a574, #f0c987);
    border: none;
    color: #000;
    font-family: 'Roboto Mono', monospace;
    font-weight: 700;
    font-size: 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.premium-upgrade-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(212, 165, 116, 0.4);
}

.premium-upgrade-btn svg {
    width: 18px;
    height: 18px;
}

/* Mobile Responsive */
/* @media (max-width: 1024px) {
    .premium-popup-modal {
        width: 95%;
        max-width: none;
    }
    
    .premium-popup-content {
        padding: 24px;
    }
} */

/* Logout Icon Button */
.logout-icon-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: none;
    color: #174236;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin-top: 12px;
    position: relative;
}

.logout-icon-btn:hover {
    background: rgba(255, 68, 68, 0.15);
    border-color: rgba(255, 68, 68, 0.3);
    transform: translateY(-1px);
    color: #ff4444;
}

.logout-icon-btn svg {
    width: 20px;
    height: 20px;
}

/* Tooltip for logout button */
.logout-icon-btn::after {
    content: 'Logout';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 12px;
    padding: 8px 14px;
    background: #174236;
    color: white;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    pointer-events: none;
    z-index: 1000;
}

.logout-icon-btn:hover::after {
    opacity: 1;
    visibility: visible;
    margin-left: 16px;
}

/* Magic Link Form Styles */
.auth-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: rgba(23, 66, 54, 0.1);
    border: 1px solid rgba(23, 66, 54, 0.3);
    border-radius: 6px;
    margin-top: 12px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.auth-info svg {
    flex-shrink: 0;
    color: #174236;
}

/* Magic Verification State */
.magic-verification {
    text-align: center;
    padding: 20px 0;
 
}

.magic-verification.hidden {
    display: none;
}

.verification-icon {
    margin-bottom: 20px;
}

.verification-icon svg {
    color: #00ff41;
    animation: emailBounce 2s ease-in-out infinite;
}

@keyframes emailBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.verification-title {
    font-family: 'Roboto Mono', monospace;
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0 0 12px 0;
}

.verification-text {
    font-size: 14px;
    color: #333;
    margin: 0 0 8px 0;
    line-height: 1.5;
}

.verification-text strong {
    color: #333;
}

.verification-subtext {
    font-size: 12px;
    color: #333;
    margin: 0 0 24px 0;
    line-height: 1.5;
}

.auth-button-secondary {
 width: 100%;
    padding: 12px 20px;  
    background: #174236;
    border: 1px solid rgba(23, 66, 54, 0.4);
    color: #333;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Roboto Mono', monospace;
    font-size: 13px;
    /* font-weight: 600; */
    transition: all 0.2s;
    margin-bottom: 8px;
    box-sizing: border-box;  
    white-space: nowrap;  
}

.auth-button-secondary:hover {
    background: rgba(23, 66, 54, 0.3);
    border-color: rgba(23, 66, 54, 0.6);
}

.auth-button-text {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px solid #333;
    color: #333;
    cursor: pointer;
    font-family: 'Roboto Mono', monospace;
    font-size: 13px;
    transition: all 0.2s;
    border-radius: 6px;
    
}

.auth-button-text:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* Loading state */
#magic-btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#magic-btn-loading::after {
    content: '';
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Verifying page styles */
.verifying-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    text-align: center;
}

.verifying-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(0, 255, 65, 0.1);
    border-top-color: #00ff41;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 24px;
}

.verifying-text {
    font-family: 'Roboto Mono', monospace;
    font-size: 18px;
    color: #fff;
    margin-bottom: 8px;
}

.verifying-subtext {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}


/* Login Panel Styles */
.login-icon-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-top: 18px;
  
}

.login-icon-btn:hover {
    background: rgba(23, 66, 54, 0.2);
    transform: scale(1.05);
    background: #174236;
    color:white
}

.login-icon-btn svg {
    width: 20px;
    height: 20px;
    /* color: #174236; */
}





.about-icon-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-top: 18px;
  
}

.about-icon-btn:hover {
    background: rgba(23, 66, 54, 0.2);
    transform: scale(1.05);
    background: #174236;
    color:white
}

.about-icon-btn svg {
    width: 20px;
    height: 20px;
    /* color: #174236; */
}


.login-panel-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.login-panel-backdrop.active {
    opacity: 1;
    pointer-events: all;
}

.login-panel {
    position: fixed;
    top: 0;
    left:0;
    /* right: -450px; */
    width: 300px;
    height: 100vh;
    /* left: 60px; */
    /* background: linear-gradient(135deg, #174236 0%, #0f2a21 100%); */
    background: #F6F5EF;
    z-index: 20000;
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.3);
}

.login-panel.active {
    right: 0;
}

.login-panel-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.login-panel-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #333;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 2px;
}

.login-panel-logo svg {
    width: 24px;
    height: 24px;
}

.login-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 32px 24px;
}

/* Style the auth form inside the panel */
.login-panel .auth-logged-out {
    background: transparent;
    padding: 0;
    box-shadow: none;
}

.login-panel .auth-header {
    /* color: #10a37f; */
    margin-bottom: 32px;
}

.login-panel .auth-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #333;
    color: #333;
    font-size: 16px;
    font-weight: 300;
}

/* .login-panel .auth-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
} */

.login-panel .auth-input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
}

.login-panel .auth-button {
    background: #fff;
    color: #174236;
}

.login-panel .auth-button:hover {
    background: #f0f0f0;
}

.login-panel .auth-divider {
    color: rgba(255, 255, 255, 0.6);
}

.login-panel .auth-divider::before,
.login-panel .auth-divider::after {
    background: rgba(255, 255, 255, 0.2);
}

.login-panel .verification-icon svg {
    stroke: #333;
}

.login-panel .verification-title {
    color: #333;
}

.login-panel .verification-text,
.login-panel .verification-subtext {
    /* color: rgba(255, 255, 255, 0.8); */
    color: #333
}

.login-panel .auth-button-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #333;
    border: 1px solid #333;
}

.login-panel .auth-button-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.login-panel .auth-button-text {
    /* color: rgba(255, 255, 255, 0.8); */
    color:#333
}

.login-panel .auth-button-text:hover {
    color: #333;
}

/* Keep panel visible during auth states */
.login-panel.active {
    right: 0 !important;
}

.login-panel-backdrop.active {
    opacity: 1 !important;
    pointer-events: all !important;
}
/* .input-area {
    backdrop-filter: none;
    flex-shrink: 0;
    padding: 24px 0;
    display: flex;
    justify-content: center;
    width: 80%;
} */

/* .input-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 50vw;
    max-width: 40vw;
    min-width: 40vw;
    position: relative;
} */

/* .input-wrapper {
    position: relative;
    width: 80%;
    display: flex;
    flex-direction: column;
    background: white;
   
    color: #ffffff;
    border-radius: 20px;
    box-sizing: border-box;
    padding-bottom: 50px;  
 
} */

#message-input::-webkit-scrollbar {
    width: 8px;
}

#message-input::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
}
    
.send-icon-btn {
    position: absolute;
    bottom: 8px;
    right: 0px;
    z-index: 10;
}

body.logged-in .login-icon-btn {
    display: none !important;
}

#auth-logged-in
{
    margin-top: 20px
}


/* Remove white background when collapsing */
.conversations-panel {
    background: #F2F1E6 !important;
}

.conversations-panel.collapsed {
    background: #F2F1E6 !important;
}

.conversations-panel .panel-section {
    background: transparent !important;
}

.conversations-panel.collapsed .panel-section {
    background: transparent !important;
}

/* Ensure all child elements have transparent background when collapsed */
.conversations-panel.collapsed * {
    background: transparent !important;
}

/* ===================================================
   SPLIT SCREEN INPUT FIXES
   =================================================== */

/* .split-left .messages{
    width: 80% !important;
} */

/* Fix input wrapper alignment and styling in split mode */
/* .split-left .input-wrapper {
    background: red !important;
    border-radius: 20px !important;
    width: 140% !important;
    max-width: 140% !important;
} */

/* Fix input container in split mode */
/* .split-left .input-container {
    width: 90% !important;
    max-width: 90% !important;
    min-width: 90% !important;
} */

/* Fix mode icons background in split mode */

/* Cloud Icon Button */
.cloud-icon-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: none;
    color: #174236;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin-top: 12px;
    position: relative;
}

.cloud-icon-btn:hover {
    background: rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateY(-1px);
}

.cloud-icon-btn svg {
    width: 20px;
    height: 20px;
}

/* Tooltip for cloud button */
.cloud-icon-btn::after {
    content: 'Cloud Development';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 12px;
    padding: 8px 14px;
    background: #174236;
    color: white;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    pointer-events: none;
    z-index: 1000;
}

.cloud-icon-btn:hover::after {
    opacity: 1;
    visibility: visible;
    margin-left: 16px;
}

.cloud-wizard-backdrop {
    position: fixed;
    top: 0;
    left: 280px;
    width: calc(100% - 280px);
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.cloud-wizard-backdrop.active {
    opacity: 1;
    visibility: visible;
}

body .conversations-panel.collapsed ~ .cloud-wizard-backdrop {
    left: 60px;
    width: calc(100% - 60px);
}

/* Wizard Panel */
.cloud-wizard-panel {
    position: fixed;
    top: 0;
    left: 280px;
    width: calc(100% - 280px);
    height: 100vh;
    background: red;
    border-left: 1px solid #E8E6DC;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.05);
}

.cloud-wizard-panel.active {
    transform: translateX(0);
}

body .conversations-panel.collapsed ~ .cloud-wizard-panel {
    left: 60px;
    width: calc(100% - 60px);
}

.cloud-wizard-header {
    padding: 20px 24px;
    border-bottom: 1px solid #E8E6DC;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #F6F5EF;
    flex-shrink: 0;
}

.cloud-wizard-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Roboto Mono', monospace;
    font-weight: 700;
    font-size: 16px;
    color: #174236;
}

.cloud-wizard-logo svg {
    stroke: #174236;
}

.cloud-wizard-close-btn {
    background: none;
    border: none;
    color: #174236;
    font-size: 32px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
    border-radius: 4px;
}

.cloud-wizard-close-btn:hover {
    color: #ff4444;
    background: rgba(255, 68, 68, 0.1);
    transform: rotate(90deg);
}

.cloud-wizard-content {
    flex: 1;
    overflow: hidden;
    background: red;
    position: relative;
}

.wizard-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    background: white;
}

.cloud-wizard-content::-webkit-scrollbar {
    width: 8px;
}

.cloud-wizard-content::-webkit-scrollbar-track {
    background: #F6F5EF;
}

.cloud-wizard-content::-webkit-scrollbar-thumb {
    background: #D4C4B0;
    border-radius: 4px;
}

.cloud-wizard-content::-webkit-scrollbar-thumb:hover {
    background: #C4B4A0;
}

/* Ensure conversations panel stays visible */
.conversations-panel {
    position: relative;
    z-index: 10002 !important;
}

/* @media (max-width: 1024px) {
    .cloud-wizard-backdrop {
        left: 0;
        width: 100%;
    }
    
    .cloud-wizard-panel {
        left: 0;
        width: 100%;
    }
} */

.conversations-panel {
    position: relative;
    z-index: 100;
}

.chat-area {
    z-index: 50;
}

.control-panel {
    z-index: 100;
}

/* News Panel - Default */
.news-panel-backdrop {
    z-index: 9999;
}

.news-selection-panel {
    z-index: 10001;
}

/* Cloud Wizard Panel - Default */
.cloud-wizard-backdrop {
    z-index: 9999;
}

.cloud-wizard-panel {
    z-index: 10001;
}

/* WHEN CLOUD WIZARD IS OPEN - Boost conversations panel above wizard */
body:has(.cloud-wizard-panel.active) .conversations-panel {
    z-index: 10002 !important;
}

/* WHEN NEWS PANEL IS OPEN - Boost to highest */
body:has(.news-selection-panel.active) .news-panel-backdrop {
    z-index: 10003 !important;
}

body:has(.news-selection-panel.active) .news-selection-panel {
    z-index: 10004 !important;
}

/* If both are open (shouldn't happen, but just in case) - News wins */
body:has(.news-selection-panel.active):has(.cloud-wizard-panel.active) .news-selection-panel {
    z-index: 10010 !important;
}

body:has(.news-selection-panel.active):has(.cloud-wizard-panel.active) .news-panel-backdrop {
    z-index: 10009 !important;
}

/* News gets HIGHEST z-index when active */
.news-panel-backdrop.active {
    z-index: 10005 !important;
}

.news-selection-panel.active {
    z-index: 10006 !important;
}

.news-overlay.active {
    z-index: 10004 !important;
}

.news-overlay-close {
    z-index: 10007 !important;
}

.news-content {
    overflow-y: auto !important;
}

/* ============================================================================
   Z-INDEX FIX - Conversations Panel Above Auth
   ============================================================================ */

/* Conversations selection panel - needs to be above auth */
.conversations-selection-panel {
    position: fixed;
    top: 0;
    left: -400px;
    width: 400px;
    height: 100vh;
    background: #1a1a1a;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 10002 !important;  /* Boosted above auth */
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.conversations-selection-panel.active {
    left: 0;
    z-index: 10002 !important;
}

/* Backdrop for conversations panel */
.conversations-panel-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 10001 !important;  /* Just below panel */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.conversations-panel-backdrop.active {
    opacity: 1;
    visibility: visible;
    z-index: 10001 !important;
}

/* Auth section - lower z-index */
#auth-logged-in,
.auth-user-info,
.auth-logged-out {
    position: relative;
    z-index: 100;  /* Much lower than conversations panel */
}

/* Ensure auth container doesn't interfere */
.conversations-panel {
    z-index: 100;
}

.conversations-panel .panel-section {
    position: relative;
    z-index: 1;
}

/* Keep other panels at appropriate levels */
.control-panel {
    z-index: 100;
}

.chat-area {
    z-index: 50;
}

/* News panel stays highest when active */
.news-panel-backdrop.active {
    z-index: 10005 !important;
}

.news-selection-panel.active {
    z-index: 10006 !important;
}

/* Hide cloud wizard elements when conversations panel is collapsed */
body:has(.conversations-panel.collapsed) .cloud-wizard-header,
body:has(.conversations-panel.collapsed) .cloud-wizard-close-btn {
    display: none !important;
    visibility: hidden !important;
}

/* Or hide when panel is collapsed AND wizard is not active */
.conversations-panel.collapsed ~ .cloud-wizard-panel:not(.active) .cloud-wizard-header,
.conversations-panel.collapsed ~ .cloud-wizard-panel:not(.active) .cloud-wizard-close-btn {
    display: none !important;
}

    /* Nuclear option for cloud wizard */
.cloud-wizard-panel {
    display: none !important;
}

.cloud-wizard-panel.active {
    display: flex !important;
}

/* Ensure it doesn't take up space when hidden */
.cloud-wizard-panel:not(.active) {
    position: absolute !important;
    left: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}


/* ============================================
   USE CASES PANEL STYLES
   
   NOTE: Use Cases Icon is PUBLIC - always visible
   regardless of login status
   ============================================ */

/* Use Cases Icon Button */
/* .use-cases-icon-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 20px;
    position: relative;
    visibility: visible !important;
    opacity: 1 !important;
    display: flex !important;
} */

.use-cases-icon-btn {
    width: 42px;   /* ← Change from 20px */
    height: 42px;  /* ← Change from 20px */
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0; /* ← Add this to prevent shrinking */
}

/* Keep SVG icon at 20px */
.use-cases-icon-btn svg {
    width: 20px;
    height: 20px;
}
.use-cases-icon-btn:hover {
    background: #174236;
    color:white;
    border-color: rgba(212, 165, 116, 0.3);
    transform: translateY(-2px);
}

.use-cases-icon-btn:active {
    transform: translateY(0);
}

/* Use Cases Selection Panel (Category View) */
.use-cases-selection-panel {
    position: fixed;
    /* left: 60px; */
    top: 0;
    min-width: 300px;
    max-width: 300px;
    width: 100%;
    height: 100vh;
    background: #1a1a1a;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.use-cases-selection-panel.active {
    transform: translateX(0);
}



.use-cases-panel-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.use-cases-panel-close-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    padding-right: 20px;
}

.use-cases-panel-close-btn:hover {
    background: rgba(255, 68, 68, 0.2);
    border-color: rgba(255, 68, 68, 0.4);
}


.news-overlay-close-btn {
    width: 32px;
    height: 32px;
    margin-top:50px;
    margin-left:50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(246, 245, 239, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    padding:10px
}

.news-overlay-close-btn:hover {
    background: rgba(255, 68, 68, 0.2);
    border-color: rgba(255, 68, 68, 0.4);
}

/* Panel Content */
.use-cases-panel-content {
    min-width: 200px;
    max-width: 300px;
    width: 100%;
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #F6F5EF !important;
}

/* Category Grid */
.use-cases-categories {
    min-width: 100px;
    max-width: 250px;
    width: 100%;
    display: grid;
    /* grid-template-columns: repeat(2, 1fr); */
    gap: 12px;
    margin-bottom: 20px;
}

.use-case-category-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.use-case-category-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(212, 165, 116, 0.3);
    transform: translateY(-2px);
}

.use-case-category-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.use-case-category-name {
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    margin-bottom: 4px;
}

.use-case-category-count {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

/* Use Cases Overlay (Full Screen View) */
.use-cases-overlay {
    position: fixed;
    /* left: 60px; */
    top: 0;
    width: calc(100vw);
    height: 100vh;
    background: #1a1a1a;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
 
}

.use-cases-overlay.active {
    transform: translateX(0);
}

/* Overlay Header */
.use-cases-overlay-header {
    padding: 20px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1a1a1a;
}

.use-cases-overlay-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.use-cases-back-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.use-cases-back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(212, 165, 116, 0.3);
}

.use-cases-overlay-category-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.use-cases-overlay-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.use-cases-overlay-close:hover {
    background: rgba(255, 68, 68, 0.2);
    border-color: rgba(255, 68, 68, 0.4);
}

/* Overlay Content */
.use-cases-content {
    flex: 1;
    overflow-y: auto;
    /* padding: 30px; */
    background: #F6F5EF  ;
}

/* Use Case Cards Grid */
/* .use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    background: #F6F5EF; 
} */


.use-case-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(212, 165, 116, 0.3);
    transform: translateY(-2px);
}

.use-case-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.use-case-card-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.use-case-featured-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.use-case-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
    line-height: 1.4;
}

.use-case-card-description {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
    margin-bottom: 12px;
}

.use-case-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.use-case-tag {
    background: rgba(212, 165, 116, 0.1);
    border: 1px solid rgba(212, 165, 116, 0.2);
    
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.use-case-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.use-case-stats {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.use-case-stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

.use-case-difficulty {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 500;
}

.use-case-difficulty.beginner {
    background: rgba(76, 175, 80, 0.1);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.use-case-difficulty.intermediate {
    background: rgba(255, 152, 0, 0.1);
    color: #ff9800;
    border: 1px solid rgba(255, 152, 0, 0.2);
}

.use-case-difficulty.advanced {
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
    border: 1px solid rgba(244, 67, 54, 0.2);
}

/* Loading State */
.use-cases-loading {
    text-align: center;
    padding: 40px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}

/* Empty State */
.use-cases-empty {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.5);
}

.use-cases-empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.use-cases-empty-text {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
}

.use-cases-empty-subtext {
    font-size: 13px;
    opacity: 0.7;
}

/* Backdrop */
.use-cases-panel-backdrop {
    position: fixed;
    top: 0;
    left: 60px;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 9998;
}

.use-cases-panel-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* Scrollbar Styling */
.use-cases-panel-content::-webkit-scrollbar,
.use-cases-content::-webkit-scrollbar {
    width: 8px;
}

.use-cases-panel-content::-webkit-scrollbar-track,
.use-cases-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

.use-cases-panel-content::-webkit-scrollbar-thumb,
.use-cases-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.use-cases-panel-content::-webkit-scrollbar-thumb:hover,
.use-cases-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}




.use-case-header {
    background: #FDFCF9 !important;  /* Lighter than base #F6F5EF */
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 8px;
}

.messages:has(.use-case-header) ~ .input-area #message-input,
.messages:has(.use-case-header) ~ .input-area #send-btn,
.messages:has(.use-case-header) ~ .input-area .mode-icon-btn,
.messages:has(.use-case-header) ~ .input-area #file-upload-btn {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

/* Add to your CSS */
/* .messages:empty ~ .input-area {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 700px;
} */

.messages:empty {
    display: none;
}

.chat-area:has(.messages:empty) .chat-header {
    display: none;
}

/* ============================================
   ONLY COLOR CHANGES - LIGHTER backgrounds + DARKER fonts
   ============================================ */

/* Panel backgrounds - lighter than base */
.use-cases-panel-header {
    background: #FDFCF9 !important;  /* Lighter than #F6F5EF */
}

.use-cases-overlay-header {
    background: #FDFCF9 !important;  /* Lighter than #F6F5EF */
}

/* Category cards - lighter than base */
.use-case-category-card {
    background: #FDFCF9 !important;  /* Lighter than #F6F5EF */
}

.use-case-category-card:hover {
    background: #FFFFFF !important;  /* Pure white on hover */
}

/* Use case cards - lighter than base */
.use-case-card {
    background: #FDFCF9 !important;  /* Lighter than #F6F5EF */
}

.use-case-card:hover {
    background: #FFFFFF !important;  /* Pure white on hover */
}

/* Text colors - DARKER */
.use-case-category-name,
.use-case-card-title,
.use-cases-panel-title,
.use-cases-overlay-category-label {
    color: #1a1a1a !important;  /* Much darker */
}

.use-case-category-count,
.use-case-card-description,
.use-case-stat {
    color: #4a4a4a !important;  /* Darker gray */
}

/* Show lock icon on restricted modes when not logged in */
body:not(.logged-in) .mode-icon-btn[data-mode="deep"]::after,
body:not(.logged-in) .mode-icon-btn[data-mode="lab"]::after,
body:not(.logged-in) .mode-icon-btn[data-mode="voice"]::after {
    /* content: '🔒'; */
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 10px;
    opacity: 0.6;
}

body:not(.logged-in) .mode-icon-btn[data-mode="deep"],
body:not(.logged-in) .mode-icon-btn[data-mode="lab"],
body:not(.logged-in) .mode-icon-btn[data-mode="voice"] {
    opacity: 0.6;
    cursor: pointer;
}

body:not(.logged-in) .mode-icon-btn[data-mode="deep"]:hover,
body:not(.logged-in) .mode-icon-btn[data-mode="lab"]:hover,
body:not(.logged-in) .mode-icon-btn[data-mode="voice"]:hover {
    opacity: 0.8;
}

#auth-error {
    /* font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; */
    font-size: 14px;
    font-weight: 500;
}


/* Premium Popup Backdrop */
.premium-popup-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: none;
    z-index: 9999;
}

.premium-popup-backdrop.active {
    display: block;
}

/* Premium Popup Modal */
/* .premium-popup-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #2d2d2d;
    border-radius: 12px;
    max-width: 770px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 10000;
    padding: 28px 21px;
    display: none;
    box-shadow: 0 14px 42px rgba(0, 0, 0, 0.5);
} */

/* Hide scrollbar completely */
.premium-popup-modal::-webkit-scrollbar {
    display: none;
}

.premium-popup-modal {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.premium-popup-modal.active {
    display: block;
}

.premium-popup-close-btn {
    position: absolute;
    top: 11px;
    right: 11px;
    background: rgba(246, 245, 239, 0.1);
    border: 1px solid rgba(246, 245, 239, 0.2);
    color: #F6F5EF;
    width: 25px;
    height: 25px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.2s;
}

.premium-popup-close-btn:hover {
    background: rgba(246, 245, 239, 0.15);
}

.premium-popup-header {
    text-align: center;
    margin-bottom: 28px;
}

.premium-icon {
    font-size: 48px;
    margin-bottom: 11px;
}

.premium-popup-header h2 {
    font-size: 28px;
    color: #F6F5EF;
    margin: 0 0 8px 0;
    font-weight: 600;
}

.premium-popup-header p {
    font-size: 15px;
    color: rgba(246, 245, 239, 0.7);
    margin: 0;
}

/* Premium Packages - Horizontal Layout */
.premium-packages {
    display: flex;
    gap: 14px;
    margin: 21px 0;
    justify-content: center;
    flex-wrap: nowrap;
}

.premium-package {
    background: rgba(246, 245, 239, 0.05);
    border: 1px solid rgba(246, 245, 239, 0.15);
    border-radius: 8px;
    padding: 20px 17px;
    position: relative;
    transition: all 0.3s;
    flex: 1;
    min-width: 182px;
    max-width: 224px;
}

.premium-package:hover {
    transform: translateY(-3px);
    border-color: rgba(246, 245, 239, 0.3);
    box-shadow: 0 6px 17px rgba(0, 0, 0, 0.4);
    background: rgba(246, 245, 239, 0.08);
}

.premium-package.popular {
    border: 2px solid #F6F5EF;
    background: linear-gradient(135deg, rgba(246, 245, 239, 0.15) 0%, rgba(246, 245, 239, 0.08) 100%);
    transform: scale(1.05);
}

.premium-package.popular:hover {
    transform: scale(1.05) translateY(-3px);
}

.package-badge {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #F6F5EF 0%, #e5e4d8 100%);
    color: #1a1a1a;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    box-shadow: 0 3px 8px rgba(246, 245, 239, 0.3);
}

.package-header h3 {
    font-size: 22px;
    margin: 0 0 11px 0;
    color: #F6F5EF;
    font-weight: 600;
}

.package-price {
    margin-bottom: 6px;
}

.price-amount {
    font-size: 40px;
    font-weight: 700;
    color: #F6F5EF;
    line-height: 1;
}

.price-save {
    display: block;
    font-size: 13px;
    color: #00ff88;
    margin-top: 4px;
    font-weight: 600;
}

.package-credits {
    font-size: 15px;
    color: rgba(246, 245, 239, 0.8);
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(246, 245, 239, 0.15);
    font-weight: 500;
}

.package-features {
    margin-bottom: 17px;
}

.package-features .feature {
    font-size: 13px;
    color: rgba(246, 245, 239, 0.8);
    margin-bottom: 7px;
    padding-left: 3px;
}

.package-btn {
    width: 100%;
    padding: 10px;
    background: rgba(246, 245, 239, 0.1);
    border: 1px solid rgba(246, 245, 239, 0.25);
    color: #F6F5EF;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Roboto Mono', monospace;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.package-btn:hover {
    background: rgba(246, 245, 239, 0.15);
    transform: translateY(-1px);
    border-color: rgba(246, 245, 239, 0.4);
}

.package-btn.popular-btn {
    background: linear-gradient(135deg, #F6F5EF 0%, #e5e4d8 100%);
    border: none;
    color: #1a1a1a;
    box-shadow: 0 3px 8px rgba(246, 245, 239, 0.3);
}

.package-btn.popular-btn:hover {
    background: linear-gradient(135deg, #ffffff 0%, #F6F5EF 100%);
    box-shadow: 0 4px 11px rgba(246, 245, 239, 0.4);
}

.premium-footer {
    text-align: center;
    margin-top: 21px;
    padding-top: 17px;
    border-top: 1px solid rgba(246, 245, 239, 0.15);
}

.premium-footer p {
    font-size: 12px;
    color: rgba(246, 245, 239, 0.6);
    margin: 4px 0;
}

.pasted-file-attachment {
    margin-bottom: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}
 
body.logged-in .use-cases-panel,
body.logged-in .use-cases-icon-btn {
    display: none !important;
}
  

.input-area {
    width: 240px ; 
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    position: relative;
    justify-content: center;
    align-items: flex-start;
    box-sizing: border-box; 
    min-height: 100px;
}
 
.input-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    box-sizing: border-box;
}

.input-wrapper {
    width: 100%;
    margin-left: 10px;
    margin-right: 10px;
    min-width: 220px;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;  
    gap: 26px;
    position: relative;
    border-radius: 12px;
    margin-bottom: 10px;
    /* margin-left: 70px; */
    padding: 8px;
    max-height: 200px; 
}

/* #message-input {
    width: 90%;
    align-self: flex-start; 
    min-height: 40px;
    max-height: 100px;
  
    background: transparent;
    color: black;
    font-family: 'Roboto Mono', monospace;
    font-size: 14px;
    resize: none;
    margin-bottom: 20px;
    border-radius: 12px;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
    word-wrap: break-word;
    line-height: 1.5;
    outline: none;
    scrollbar-width: thin;
    height: auto; 
} */
 
#message-input {
    width: 90%;
    align-self: flex-start; 
    min-height: 40px;
    max-height: 150px;
    height: 40px;  /* Start at minimum */
    background: transparent;
    color: black;
    font-family: 'Roboto Mono', monospace;
    font-size: 14px;
    resize: none;
    margin-bottom: 5px;
    border-radius: 12px;
    box-sizing: border-box;
    overflow-y: hidden;
    overflow-x: hidden;
    word-wrap: break-word;
    line-height: 1.5;
    outline: none;
    scrollbar-width: thin;
    border: none;
}
 
.mode-icon-btn
{
    min-width:20px !important;
    max-width:30px !important;
    width: 100% !important;

    height: auto !important;
}


.mode-icon-btn svg
{
     min-width:20px !important;
    max-width:30px !important;
    width: 100% !important;

    height: auto !important;
}


#send-btn
{
    width:30px !important;
    height: 30px !important;
    margin-right: 10px;
}


#send-btn svg
{
    width:24px !important;
    height: 24px !important;
}

.messages:not(:empty) ~ .input-area {
    position: fixed;
    bottom: 1%;
    bottom: env(safe-area-inset-bottom, 0);
}

@supports (-webkit-touch-callout: none) {
    .messages:not(:empty) ~ .input-area {
       bottom: max(20px, calc(env(safe-area-inset-bottom) + 20px));
    }
}

  @media (min-width: 300px) and (max-width: 699px) {
    .messages 
    {
        /* margin-left: 60px !important; */
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100%!important;
        overflow-y: auto !important;
        /* margin-bottom: 200px !important; */
        margin-bottom: calc(env(safe-area-inset-bottom))
    }
   
} 

  @media (min-width: 700px) {
    .messages 
    {
        /* margin-left: 60px !important; */
        width: 640px !important;
        min-width: 540px !important;
        max-width: 640px!important;
        overflow-y: auto !important;
        /* margin-bottom: 200px !important; */
        margin-bottom: calc(env(safe-area-inset-bottom))
    } 
    
 }
 
    .use-cases-grid {
    display: flex;
    flex-wrap: wrap;  /* Allow items to wrap to next row */
    gap: 20px;
    background: #F6F5EF;
    width: 100% !important;
    min-width: 260px !important;
    max-width: 2000px !important;
    overflow-y: auto !important;
    /* margin-bottom: 200px !important; */
    margin-bottom: calc(env(safe-area-inset-bottom))
   
}

.use-cases-grid > * {
    flex: 1 1 350px;  /* Grow, shrink, base width of 350px */
    min-width: 200px;
    max-width: 200px;
    width: 100%;
}
 


/* =========================================SPLIT SCREEN =========================================== */
/* =========================================SPLIT SCREEN =========================================== */

@media(max-width:1200px)
{
    .split-screen-container
    {
        display: flex;
        flex-direction: column;
        width: calc(100% );
        gap:10px;
        z-index: 10000;
    }
    
    .split-left .input-area
    {
        display: none !important;
    }
       
    .split-right .split-tabs {
        flex: 0 0 auto;
        height: 48px;
        display: flex !important;
        background: #f7f7f8;
        border-bottom: 1px solid #E8E6DC;
    }

    #split-left-div
    {
        display: none !important;
    }

      .split-right.active ~ .split-left,
    .split-screen-container:has(.split-right.active) .split-left {
        display: none !important;
    }

    .split-right .split-tab-content {
        position: absolute !important;
        top:100px !important;
        left: 0 !important;
        right: 0 !important;
        width: calc(100% ) !important;
        height: calc(90%) !important;
        overflow: hidden;
        display: block !important;
        /* margin-left: 60px; */
        margin-right: 10px;
        margin-bottom: 10px;
    }
    
    .split-right .split-tab-content iframe,
    .split-right #split-preview-iframe {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        border: none;
        display: block;
    }

 
    .split-left .messages {
    margin-left: 0 !important;
    padding-left: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
}


}

@media(min-width:1200px)
{
    .split-screen-container
    {
        display: flex;
        flex-direction: row;
        margin-left: 60px;   
        width: calc(100% - 60px);   
        min-height: 100vh;
    }

    .split-left
    {
        margin-bottom: 150px;
        flex: 1;  /* Take up half the space */
        overflow-y: auto;
        width:100% !important;
        min-width: 40%;
        max-width: 40%;
    }
     .input-area {
        width:100% !important;
        min-width: 40%;
        max-width: 40%;
        display: flex;
        flex-direction: column;
        align-items: center;  
        position: relative;
        border-radius: 12px;
        margin-bottom: 10px;
    }
    
    .input-wrapper
    {
        width:100% !important;
        min-width: 540px;
        max-width: 540px;
    }
    .split-right
    {
        flex: 1;  /* Take up half the space */
        overflow-y: auto;
    }
    
    .split-tabs {
        flex-direction: row !important;
        display: flex;
        align-items: center;
        gap: 4px;
        padding: 12px 16px;
        background: #F2F1E6 !important;
        flex-shrink: 0;
        align-items: flex-start;
    }

    .split-right .split-tab-content {
        position: absolute !important;
        width: 60% !important;
        height: calc(90%) !important;
        overflow: hidden;
        display: block !important;
        margin-right: 10px;
    }
    
    #split-preview-iframe {
        position: absolute !important;
        width: 95% !important;
        height: 100% !important;
        display: block;
        overflow-y: hidden;
        /* scrollbar-width: 2px !important; */
    }

    .split-tab-content iframe
    {
        width:50% !important;
        overflow-y:hidden !important;
    }
}

@media (min-width: 300px) and (max-width: 699px) {
    .messages 
    {
        /* margin-left: 60px !important; */
        width: 100% !important;
        min-width: 95% !important;
        max-width: 95%!important;
        overflow-y: auto !important;
        /* padding-bottom: 200px !important; */
        margin-bottom: calc(env(safe-area-inset-bottom));
        top:100px !important
 
    }

    .split-tabs {
        flex-direction: column !important;
        display: flex;
        align-items: center;
        gap: 4px;
        padding: 12px 16px;
        background: #F2F1E6 !important;
        flex-shrink: 0;
        align-items: flex-start;
    }


} 

  @media (min-width: 700px) {
    .messages 
    {
        /* margin-left: 60px !important; */
        width: 640px !important;
        min-width: 540px !important;
        max-width: 640px!important;
        overflow-y: auto !important;
        /* padding-bottom: 200px !important; */
        margin-bottom: calc(env(safe-area-inset-bottom))
    } 
  }
   
.split-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    
}

.split-close:hover {
    background: rgba(255, 68, 68, 0.2);
    border-color: rgba(255, 68, 68, 0.4);
}

.main-panel-close-btn {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* background: rgba(255, 255, 255, 0.05); */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    position: absolute;
    right:20px;
    top:10px;
    font-size:18px
};


.main-panel-close-btn:hover {
    background: rgba(255, 68, 68, 0.2);
    border-color: rgba(255, 68, 68, 0.4);
    transform: translateY(-3px);
}


.login-panel-close-btn {
    width: 32px !important;
    height: 32px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    position: absolute;
    right:10px;
    top:10px;
    /* font-size:18px */
}

.login-panel-close-btn:hover {
    background: rgba(255, 68, 68, 0.2);
    border-color: rgba(255, 68, 68, 0.4);
}

.preview {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.preview:hover {
    background: #174236;
    border-color: rgba(255, 68, 68, 0.4);
    color: white;
    transform: translateY(-3px);
}

.code {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.code:hover {
    background: #174236;
    border-color: rgba(255, 68, 68, 0.4);
    color:white;
    transform: translateY(-3px);
}
 

.app-version-selector {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.version-dropdown {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: #FBF6EF !important;
    border: 1px solid #E8DFD0;
    border-radius: 6px;
    padding: 6px 32px 6px 12px;
    font-family: 'Roboto Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    color: #8B7355;
    cursor: pointer;
    transition: all 0.2s;
    outline: none;
    height: 30px !important;
}

.version-dropdown:hover {
    background: #F5EFE5;
    border-color: #D4C4B0;
}

.version-dropdown:focus {
    border-color: #8B7355;
    box-shadow: 0 0 0 2px rgba(139, 115, 85, 0.1);
}

.version-dropdown option {
    background: #FBF6EF;
    color: #8B7355;
    padding: 10px;
}

.dropdown-arrow {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #8B7355;
}
 
.use-case-card
{
    margin-left:10px;
    margin-top:10px
}
.use-case-card > *
{
    margin:10px;
}

.messages
{
    position: relative;
    top:60px !important;
    border:2px  !important;
}

.query-sources-grid
{
    display: flex;
    flex-direction: column;
    background: #EDECDD;
    border:none;
    width:100%;
    position: relative;
}

.source-card
{
    background: #F6F5EF;
    display: flex;
    flex-direction: row !important;
    position: relative;
    border-radius: 10px;
    margin:5px;
    transition: transform 0.3s ease;
    padding:5px
}

.source-card:hover
{
    transform: translateY(-4px)
}

.source-details
{
    display: flex;
    flex-direction: column;
    font-size: 11px;
    padding-left: 20px;
    flex-wrap: wrap;
}

.source-favicon {
    width: 18x !important;
    height: 18px !important;
    /* flex-shrink: 0; */
    border-radius: 4px;
    /* object-fit: contain; */
}


.query-header-simple {
    display: flex;
    flex-direction: row;
    background: #F2F1E6;
    border-radius: 6px; 
    align-items: center;
}

.query-number {
    width: 24px;
    height: 24px;
    background: #174236;
    color: white !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
    margin:10px
}

.query-text {
    flex: 1;
    font-size: 13px;
    line-height: 1.5;
    font-weight: 600;
    /* margin:10px */
}

.query-source-count {
    font-size: 10px;
    color: white;
    padding-right: 2px;
    border-radius: 4px;
    flex-shrink: 0;
}

.response-content
{
    font-size: 14px;
}

.source-url {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: break-word;  /* Breaks long words */
    word-break: break-all;      /* Breaks URLs anywhere if needed */
}

.message.user 
{
    padding-top:10px;
}

.filter-select
{
    height:30px;
    width:150px;
    border-radius: 6px;
} 

.conversations-list
{
    gap:0 !important;
    height: 300px;
    overflow-y: auto;
}

.conversation-item
{
    display: flex;
    align-items: center;
}


.news-selection-panel
{
    width:200px !important
}

.news-overlay
{
    left:0
}

.news-overlay-close-btn
{
    padding-left: 5px !important;
    padding-right: 5px !important;
    background : rgba(255, 68, 68, 0.2) !important
}

.news-overlay-close-btn {
    width: 100px;
    padding: 10px;
    background: transparent;
    border: 1px solid #E8A87C;
    color: black;
    font-family: 'Roboto Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

 @media (min-width: 700px) {
 
  .premium-popup-modal
    {
        width: 700px !important;
    }
}
 @media (min-width: 300px) and (max-width: 699px) {
    .premium-popup-modal
    {
        display: flex !important;
        overflow-y: auto;
        height: 90%;
        flex-direction: column !important;
    }

    .premium-popup-header
    {
        display: flex !important;
        flex-direction: column;
    }

    .premium-popup-content
    {
        display: flex;
        flex-direction: column;
        overflow-y: auto;
    }

    .premium-packages
    {
        display: flex !important; 
        flex-direction: column !important;
        justify-content: center;
        align-items: center;
        
    }

    .premium-package
    {
        padding:20px
    }
    
} 

.messages
{
    padding-bottom: 20px;
    margin-bottom: calc(200px + env(safe-area-inset-bottom)) !important
}
  
.split-left::-webkit-scrollbar-thumb
{
    background: darkgray;
}
  
::-webkit-scrollbar-thumb
{
    width: 6px !important;
}

.split-preview-iframe
{
    border: none !important;
}

/* @media (min-width: 1200px) {
    .chat-area {
    display: flex;
    flex-direction: column;
    align-items: center !important;
    width: 100%;
}

    .split-left {
        display: flex;
        justify-content: center !important;
        width: 40% !important;
        min-width: 480px !important;
        max-width: 560px !important;
        position: relative;
        border: 1px solid red;
        overflow: hidden !important;
        border:1px solid red
    }

    .split-left.messages {
        height: 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    
    .messages {
        height: 100% !important;
        width: 40% !important;
        min-width: 600px !important;
        max-width: 700px !important;

    }
    
    .messages .message {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .messages .message-content {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 480px !important;
        box-sizing: border-box !important;
    }
    
    .response-tabs {
        width: 100% !important;
        min-width: 480px !important;
        max-width: 560px !important;
        box-sizing: border-box !important;
    }
    
    .response-content {
        height: 100% !important;
        width: 100% !important;
        min-width: 600px !important;
        max-width: 700px !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
        border: 1px solid green !important;
    }
    
} */
 
.conversations-panel-backdrop {
    z-index: 9998 !important;
    pointer-events: auto; /* ← Important! */
}

.conversations-selection-panel {
    z-index: 9999 !important;
}









/* ===========================================
   SPLIT-RIGHT FIX
   Uses body.split-screen-active instead of 
   container.split-active
   =========================================== */

/* Force show split-right when body has split-screen-active */
body.split-screen-active .split-right,
body.split-screen-active .split-screen-container > .split-right,
body.split-screen-active #split-screen-container > .split-right {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex-direction: column !important;
    background: #1a1a1a !important;
    overflow: hidden !important;
}

/* Hide when body does NOT have split-screen-active */
body:not(.split-screen-active) .split-right,
body:not(.split-screen-active) .split-screen-container > .split-right,
body:not(.split-screen-active) #split-screen-container > .split-right {
    display: none !important;
}

/* ===========================================
   MOBILE/TABLET (<1200px): Fullscreen right
   =========================================== */
@media screen and (max-width: 1199px) {
    body.split-screen-active .split-screen-container,
    body.split-screen-active #split-screen-container {
        flex-direction: column !important;
    }
    
    /* Hide left panel */
    body.split-screen-active .split-left,
    body.split-screen-active #split-left-div {
        display: none !important;
    }
    
    /* Fullscreen right panel */
    body.split-screen-active .split-right {
        width: 100% !important;
        height: 100vh !important;
        min-height: 100vh !important;
        flex: 1 1 100% !important;
        border-left: none !important;
    }
}

/* ===========================================
   DESKTOP (>=1200px): 40/60 split
   =========================================== */
@media screen and (min-width: 1200px) {
    body.split-screen-active .split-screen-container,
    body.split-screen-active #split-screen-container {
        flex-direction: row !important;
    }
    
    /* Show left panel at 40% */
    body.split-screen-active .split-left,
    body.split-screen-active #split-left-div {
        display: flex !important;
        width: 40% !important;
        flex: 0 0 40% !important;
        min-width: 400px !important;
        align-items: center !important;
    }
    
    /* Right panel at 60% */
    body.split-screen-active .split-right {
        width: 60% !important;
        height: 100% !important;
        flex: 0 0 60% !important;
        min-width: 500px !important;
        border-left: 1px solid #333 !important;
    }
    
    /* Messages centered in left panel */
    body.split-screen-active .split-left .messages,
    body.split-screen-active .split-left .input-container,
    body.split-screen-active #split-left-div .messages,
    body.split-screen-active #split-left-div .input-container {
        max-width: 90% !important;
        min-width: auto !important;
    }
}

/* ===========================================
   NON-SPLIT STATE: Messages centered
   =========================================== */
@media screen and (min-width: 768px) {
    body:not(.split-screen-active) .split-left,
    body:not(.split-screen-active) #split-left-div {
        display: flex !important;
        width: 100% !important;
        align-items: center !important;
    }
    
    body:not(.split-screen-active) .messages,
    body:not(.split-screen-active) .input-container {
        max-width: 60% !important;
        min-width: 450px !important;
    }
}

@media screen and (max-width: 767px) {
    body:not(.split-screen-active) .messages,
    body:not(.split-screen-active) .input-container {
        max-width: 100% !important;
        min-width: auto !important;
    }
}

/* ===========================================
   SPLIT-RIGHT INTERNALS
   =========================================== */
body.split-screen-active .split-right .split-tabs {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 8px 12px !important;
    background: #252525 !important;
    border-bottom: 1px solid #333 !important;
    flex-shrink: 0 !important;
}

body.split-screen-active .split-right .split-content-area {
    flex: 1 !important;
    overflow: hidden !important;
    position: relative !important;
}

body.split-screen-active .split-right .split-tab-content {
    display: none !important;
    width: 100% !important;
    height: 100% !important;
}

body.split-screen-active .split-right .split-tab-content.active {
    display: block !important;
}

body.split-screen-active .split-right .split-preview-iframe,
body.split-screen-active .split-right #split-preview-iframe {
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    background: #fff !important;
}

/* ===========================================
   NON-SPLIT STATE: Messages centered with consistent padding
   =========================================== */

/* Mobile: 300px - 767px */
@media screen and (max-width: 767px) {
    body:not(.split-screen-active) .split-left,
    body:not(.split-screen-active) #split-left-div {
        display: flex !important;
        width: 100% !important;
        align-items: center !important;
    }
    
    body:not(.split-screen-active) .messages,
    body:not(.split-screen-active) .input-container {
        max-width: 100% !important;
        min-width: auto !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
        box-sizing: border-box !important;
    }
}

/* Tablet+: 768px and above */
@media screen and (min-width: 768px) {
    body:not(.split-screen-active) .split-left,
    body:not(.split-screen-active) #split-left-div {
        display: flex !important;
        width: 100% !important;
        align-items: center !important;
    }
    
    body:not(.split-screen-active) .messages,
    body:not(.split-screen-active) .input-container {
        max-width: 60% !important;
        min-width: 450px !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
        box-sizing: border-box !important;
    }
}

/* Large desktop: 1600px+ */
@media screen and (min-width: 1600px) {
    body:not(.split-screen-active) .messages,
    body:not(.split-screen-active) .input-container {
        max-width: 55% !important;
        min-width: 600px !important;
    }
}

/* ===========================================
   NON-SPLIT STATE: Fixed width matching 767px look
   =========================================== */
body:not(.split-screen-active) .split-left,
body:not(.split-screen-active) #split-left-div {
    display: flex !important;
    width: 100% !important;
    align-items: center !important;
    justify-content: center !important;
}

body:not(.split-screen-active) .messages,
body:not(.split-screen-active) .input-container {
    max-width: 735px !important;
    width: 100% !important;
    min-width: auto !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    box-sizing: border-box !important;
}

/* ===========================================
   SPLIT-TABS COLOR FIX
   =========================================== */
body.split-screen-active .split-right .split-tabs {
    background: #F6F5EF !important;
    border-bottom: 1px solid #ddd !important;
}

body.split-screen-active .split-right .split-tabs button {
    background: transparent !important;
    color: #333 !important;
    border: 1px solid #ccc !important;
}

body.split-screen-active .split-right .split-tabs button:hover {
    background: #174236 !important;
    color: #fff !important;
    border-color: #174236 !important;
}

body.split-screen-active .split-right .split-tabs button.active {
    background: #174236 !important;
    color: #fff !important;
    border-color: #174236 !important;
}

body.split-screen-active .split-right #split-app-select {
    background: #fff !important;
    border: 1px solid #ccc !important;
    color: #333 !important;
}

body.split-screen-active .split-right #split-app-select:hover,
body.split-screen-active .split-right #split-app-select:focus {
    border-color: #174236 !important;
}

/* ===========================================
   SPLIT MODE: Fix messages positioning
   =========================================== */
body.split-screen-active .split-left,
body.split-screen-active #split-left-div {
    position: relative !important;
    top: 0 !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

body.split-screen-active .split-left .messages,
body.split-screen-active #split-left-div .messages {
    position: relative !important;
    top: 0 !important;
    margin-top: 0 !important;
    transform: none !important;
}

body.split-screen-active .split-left .input-area,
body.split-screen-active #split-left-div .input-area,
body.split-screen-active .split-left .input-container,
body.split-screen-active #split-left-div .input-container {
    position: relative !important;
    top: 0 !important;
    bottom: 0 !important;
    margin-top: 0 !important;
    transform: none !important;
}

/* Ensure proper flex layout in split-left */
body.split-screen-active .split-left,
body.split-screen-active #split-left-div {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    overflow: hidden !important;
}

body.split-screen-active .split-left .messages,
body.split-screen-active #split-left-div .messages {
    flex: 1 !important;
    overflow-y: auto !important;
}

body.split-screen-active .split-left .input-area,
body.split-screen-active #split-left-div .input-area {
    flex-shrink: 0 !important;
}

/* ===========================================
   SPLIT MODE: Fix scrollbar alignment
   =========================================== */
body.split-screen-active .split-left,
body.split-screen-active #split-left-div {
    padding-top: 60px !important;
}

body.split-screen-active .split-left .messages,
body.split-screen-active #split-left-div .messages {
    padding-top: 0 !important;
}

/* ===========================================
   CLOSE BUTTONS STYLING - UNIFORM
   =========================================== */
button[id*="close"],
button[id*="Close"],
[id*="close-btn"],
#closeSplitScreen,
.split-close {
    background: #f8a5a5 !important;
    color: #5c1e1e !important;
    border: none !important;
    border-radius: 6px !important;
    width: 60px !important;
    height: 26px !important;
    padding: 0 !important;
    cursor: pointer !important;
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 36px !important;
    text-align: center !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

button[id*="close"]:hover,
button[id*="Close"]:hover,
[id*="close-btn"]:hover,
#closeSplitScreen:hover,
.split-close:hover {
    background: #f48fb1 !important;
    box-shadow: 0 0 12px rgba(244, 143, 177, 0.5) !important;
}

/* Hide any SVG icons inside (since we're using text now) */
button[id*="close"] svg,
button[id*="Close"] svg,
[id*="close-btn"] svg,
#closeSplitScreen svg,
.split-close svg {
    display: none !important;
}

/* Hide empty close buttons */
button[id*="close"]:empty,
[id*="close-btn"]:empty {
    display: none !important;
}

/* ===========================================
   SPLIT-RIGHT & IFRAME BACKGROUND FIX
   =========================================== */
body.split-screen-active .split-right {
    padding: 16px !important;
    box-sizing: border-box !important;
    background: #F6F5EF !important;
}

body.split-screen-active .split-right .split-tabs {
    margin: -16px -16px 16px -16px !important;
    padding: 8px 16px !important;
    background: #F6F5EF !important;
}

body.split-screen-active .split-right .split-content-area {
    background: #F6F5EF !important;
}

body.split-screen-active .split-right .split-tab-content {
    background: #F6F5EF !important;
}

body.split-screen-active .split-right .split-preview-iframe,
body.split-screen-active .split-right #split-preview-iframe {
    background: #F6F5EF !important;
    border-radius: 8px !important;
}

/* ===========================================
   SPLIT-RIGHT BACKGROUND - ABSOLUTE OVERRIDE
   =========================================== */
div.split-right,
.split-right,
#split-screen-container > .split-right,
#split-screen-container div.split-right,
.split-screen-container > .split-right,
.split-screen-container div.split-right,
body.split-screen-active .split-right,
body.split-screen-active #split-screen-container > .split-right,
html body.split-screen-active .split-right,
html body.split-screen-active div.split-right {
    background: #F6F5EF !important;
    background-color: #F6F5EF !important;
}

 /* ===========================================
   INPUT MODE ICONS - SMALLER & PROFESSIONAL
   =========================================== */
.input-mode-icons .mode-icon-btn svg,
#file-upload-btn svg {
    width: 14px !important;
    height: 14px !important;
    stroke: #666 !important;
    stroke-width: 2 !important;
}

.send-icon-btn svg {
    width: 16px !important;
    height: 16px !important;
    stroke: #174236 !important;
    stroke-width: 2 !important;
}

.input-mode-icons .mode-icon-btn:hover svg,
#file-upload-btn:hover svg {
    stroke: #174236 !important;
}

.input-mode-icons .mode-icon-btn.active svg {
    stroke: #174236 !important;
}

.send-icon-btn:hover svg {
    stroke: #0d2a22 !important;
}

/* Smaller button padding */
.mode-icon-btn {
    padding: 6px !important;
}

.send-icon-btn {
    padding: 8px !important;
}

/* ===========================================
   MODE LABEL - MINIMAL
   =========================================== */
.input-wrapper[data-mode-label]::before {
    font-size: 8px !important;
    letter-spacing: 1px !important;
    padding: 2px 5px !important;
    font-weight: 600 !important;
    opacity: 0.8 !important;
    text-transform: uppercase !important;
}

















/* ===========================================
   PRISM - CLAUDE THEME COLORS
   =========================================== */

 
#split-html-code .token {
    background: none !important;
}

/* Font size */
#split-html-code,
#split-html-code[class*="language-"] {
    font-size: 17px !important;
    line-height: 1.3 !important;
    font-weight: 520 !important;
}

#split-html-code {
    padding: 12px 16px !important;
    margin: 0 !important;
    display: block !important;
}
/* Base text - warm dark */
#split-html-code.language-markup {
    color: #2c2c2c !important;
}

/* HTML tags - Claude rust orange */
#split-html-code .token.tag {
    color: #C15F3C !important;
}

/* Tag names - darker rust */
#split-html-code .token.tag .tag {
    color: #A14A2F !important;
    font-weight: 600 !important;
}

/* Attributes - warm purple */
#split-html-code .token.attr-name {
    color: #8B5CF6 !important;
}

/* Attribute values / strings - warm blue */
#split-html-code .token.attr-value,
#split-html-code .token.string {
    color: #2563EB !important;
}

/* Punctuation - warm gray */
#split-html-code .token.punctuation {
    color: #4B5563 !important;
}

/* Comments - muted */
#split-html-code .token.comment {
    color: #6B7280 !important;
    font-style: italic !important;
}

/* CSS property names - rust orange */
#split-html-code .token.property {
    color: #C15F3C !important;
}

/* CSS selectors - warm purple */
#split-html-code .token.selector {
    color: #7C3AED !important;
    font-weight: 600 !important;
}

/* Numbers - warm orange */
#split-html-code .token.number {
    color: #D97706 !important;
}

/* Keywords - warm red */
#split-html-code .token.keyword,
#split-html-code .token.important {
    color: #DC2626 !important;
    font-weight: 600 !important;
}

/* Functions - purple */
#split-html-code .token.function {
    color: #7C3AED !important;
}

/* Doctype / meta - muted */
#split-html-code .token.doctype,
#split-html-code .token.prolog {
    color: #6B7280 !important;
}

/* ===========================================
   COPY HTML BUTTON
   =========================================== */
.split-copy-btn {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 6px !important;
    background: #174236 !important;
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    color: #333 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    color: white !important;
}

.split-copy-btn:hover {
    background: #174236 !important;
    color: #fff !important;
    border-color: #174236 !important;
}

.split-copy-btn svg {
    width: 14px !important;
    height: 14px !important;
}

@media (max-width: 700px) {
    .split-right .split-tabs {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 10px 12px !important;
        gap: 10px !important;
        border-bottom: 1px solid #ddd !important;
        min-height: auto !important;
        overflow: visible !important;
        height: auto !important;
        max-height: none !important;
    }
    
    .split-right .split-tabs .split-close {
        order: -1 !important;
    }
    
    .split-right .split-tabs > div:nth-child(2) {
        display: none !important;
    }
    
    .split-right .split-tabs > div:last-child {
        margin-left: auto !important;
    }
}




/* ===========================================
   INPUT - FIX OVERFLOW IN SPLIT MODE
   =========================================== */
/* ===========================================
   INPUT - FIX OVERFLOW IN SPLIT MODE
   =========================================== */
@media screen and (min-width: 1200px) {
    body.split-screen-active .split-left .input-area,
    body.split-screen-active #split-left-div .input-area {
        max-width: 90% !important;
        width: 90% !important;
        margin: 0 auto 10px !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }
    
    body.split-screen-active .split-left .input-container,
    body.split-screen-active #split-left-div .input-container {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
    
    body.split-screen-active .split-left #split-input-placeholder,
    body.split-screen-active #split-left-div #split-input-placeholder {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
    
    body.split-screen-active .split-left .input-wrapper,
    body.split-screen-active #split-left-div .input-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        display: flex !important;
    }
    
    body.split-screen-active .split-left #message-input,
    body.split-screen-active #split-left-div #message-input {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }
    
    body.split-screen-active .split-left .input-controls-column,
    body.split-screen-active #split-left-div .input-controls-column {
        flex: 0 0 auto !important;
    }
}

/* ===========================================
   GLOBAL SCROLLBAR STYLING
   =========================================== */

/* Webkit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 8px !important;
}

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

::-webkit-scrollbar-thumb {
    background: #555 !important;
    border-radius: 4px !important;
}

::-webkit-scrollbar-thumb:hover {
    background: #666 !important;
}

/* Firefox */
* {
    scrollbar-width: thin !important;
    scrollbar-color: #555 transparent !important;
}


/* Override the 200px margin */
body.split-screen-active .messages,
body.split-screen-active #split-messages,
body.split-screen-active #messages {
    margin-bottom: 20px !important;
    padding-bottom: 20px !important;
}


/* Remove cursor blinking from all controls in input-wrapper except message-input */
.input-wrapper *:not(#message-input) {
    caret-color: transparent !important;
}

.input-wrapper button,
.input-wrapper .mode-icon-btn,
.input-wrapper .send-icon-btn,
.input-wrapper input[type="file"] {
    caret-color: transparent !important;
    cursor: pointer !important;
}

/* Keep cursor visible only in message-input */
#message-input {
    caret-color: auto !important;
}

.mode-icon-btn.mode-locked {
    opacity: 0.3 !important;
    cursor: not-allowed !important;
}


/* Streaming message */
.streaming-message {
    position: relative;
}

/* In-progress reasoning step */
.reasoning-step.in-progress {
    opacity: 0.8;
    padding: 8px 12px;
}

.reasoning-step.in-progress .streaming-indicator {
    display: flex;
    gap: 4px;
    align-items: center;
    bottom: max(20px, calc(env(safe-area-inset-bottom) + 20px));
}

/* Streaming dots */
.streaming-indicator {
    display: flex;
    gap: 4px;
    padding: 8px 0;
    bottom: max(20px, calc(env(safe-area-inset-bottom) + 20px));
}

.streaming-dot {
    width: 6px;
    height: 6px;
    background: #d4a574;
    border-radius: 50%;
    animation: streamingPulse 1.4s infinite ease-in-out;
}

.streaming-dot:nth-child(1) { animation-delay: 0s; }
.streaming-dot:nth-child(2) { animation-delay: 0.2s; }
.streaming-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes streamingPulse {
    0%, 80%, 100% { 
        transform: scale(0.8); 
        opacity: 0.5; 
    }
    40% { 
        transform: scale(1.2); 
        opacity: 1; 
    }
}

/* Response streaming indicator */
.response-streaming {
    margin-top: 10px;
}

/* Processing notice */
.processing-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(212, 165, 116, 0.1);
    border: 1px solid rgba(212, 165, 116, 0.3);
    border-radius: 8px;
    margin-top: 10px;
    color: #d4a574;
    font-size: 14px;
}

.processing-icon {
    display: flex;
    gap: 4px;
}

.processing-notice .streaming-dot {
    width: 6px;
    height: 6px;
    background: #d4a574;
    border-radius: 50%;
    animation: streamingPulse 1.4s infinite ease-in-out;
}

.processing-notice .streaming-dot:nth-child(1) { animation-delay: 0s; }
.processing-notice .streaming-dot:nth-child(2) { animation-delay: 0.2s; }
.processing-notice .streaming-dot:nth-child(3) { animation-delay: 0.4s; }

/* Processing notice */
.processing-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(212, 165, 116, 0.1);
    border: 1px solid rgba(212, 165, 116, 0.3);
    border-radius: 8px;
    margin-top: 10px;
    color: #d4a574;
    font-size: 14px;
}

.processing-icon {
    display: flex;
    gap: 4px;
    padding-bottom: 10px !important;
}

.bg-process-msg
{
    padding-bottom: 10px !important;
}
.refresh-btn {
    margin-left: auto;
    padding: 6px 12px;
    background: #174236;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.refresh-btn:hover {
    background: #e0b88a;
    transform: scale(1.02);
}

.refresh-btn:active {
    transform: scale(0.98);
}

@media screen and (max-width: 1199px) {
    /* Ensure toggle button is above split screen */
    #toggleBtn,
    .panel-toggle-btn,
    #panel-toggle-btn {
        z-index: 1100 !important;
        position: fixed !important;
    }
    
    /* Hide split-right on mobile when active */
    body.split-screen-active .split-right {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1000;
    }
    
    /* Add close button for split-right on mobile */
    body.split-screen-active .split-right .split-close-btn {
        display: block !important;
    }
}

@media screen and (max-width: 1199px) {
    body.split-screen-active .split-right .split-tab-content {
        padding: 0 !important;
        margin: 0 !important;
        top: 0 !important;
        height: 100% !important;
    }
    
    body.split-screen-active .split-right .split-tab-content iframe {
        padding: 0 !important;
        margin: 0 !important;
    }
}

/* Markdown syntax highlighting - Light theme */
.language-markdown {
    color: #333 !important;
    background: #f8f8f8 !important;
}

.language-markdown .token.title {
    color: #d4a574;
    font-weight: bold;
}

.language-markdown .token.title .token.punctuation {
    color: #d4a574;
}

.language-markdown .token.bold {
    color: #1a1a1a;
    font-weight: bold;
}

.language-markdown .token.italic {
    color: #6a3d00;
    font-style: italic;
}

.language-markdown .token.strike {
    text-decoration: line-through;
    color: #999;
}

.language-markdown .token.list.punctuation {
    color: #d4a574;
}

.language-markdown .token.url,
.language-markdown .token.url-reference {
    color: #2e7d32;
}

.language-markdown .token.url > .token.content {
    color: #1565c0;
}

.language-markdown .token.blockquote.punctuation {
    color: #2e7d32;
}

.language-markdown .token.code,
.language-markdown .token.code-snippet {
    color: #c41a16;
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 4px;
    border-radius: 3px;
}

.language-markdown .token.hr.punctuation {
    color: #1565c0;
}

.language-markdown .token.table-header {
    color: #1565c0;
    font-weight: bold;
}

.language-markdown .token.table {
    color: #333;
}

.language-markdown .token.punctuation {
    color: #999;
}

/* Code block container for light theme */
#split-html-code.language-markdown {
    color: #333 !important;
}


/* Background */
#split-html-code,
#split-html-code[class*="language-"],
code[class*="language-"],
pre[class*="language-"] {
    background: #FAF9F5      !important;
    background-color: #FAF9F5      !important;
}

/* Fix premium popup blocking touches when hidden */
.premium-popup-backdrop,
.premium-popup-modal {
    display: none;
    pointer-events: none;
    visibility: hidden;
}

/* Only enable when active/shown */
.premium-popup-backdrop.show,
.premium-popup-backdrop.active,
.premium-popup-modal.show,
.premium-popup-modal.active {
    display: block;
    display: flex;
    pointer-events: auto;
    visibility: visible;
}

.answer-header {
    display: flex;
    justify-content: flex-end;
    padding: 8px 12px 4px;
}

.copy-answer-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
    /* padding: 20px !important; */
}

.copy-answer-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
}

.copy-answer-btn.copied {
    background: #174236 !important;
    border-color: rgba(0, 255, 136, 0.3);
    color: white !important;
    
}

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

#message-input {
    padding:2px !important;
}

 .global-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
}

.global-overlay.active {
    display: flex;
    padding:20px
}
 

/* ============================================
   BILLING PANEL STYLES - REDESIGNED
   Base: #F6F5EF | Buttons: #174236 | Font: #174236
   ============================================ */

/* Billing Icon Button */
.billing-icon-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: none;
    color: #174236;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin-top: 12px;
    position: relative;
}

.billing-icon-btn:hover {
    background: rgba(23, 66, 54, 0.1);
    transform: translateY(-1px);
}

.billing-icon-btn svg {
    width: 20px;
    height: 20px;
}

/* Tooltip for billing button */
.billing-icon-btn::after {
    content: 'Billing';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 12px;
    padding: 8px 14px;
    background: #174236;
    color: white;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    pointer-events: none;
    z-index: 1000;
}

.billing-icon-btn:hover::after {
    opacity: 1;
    visibility: visible;
    margin-left: 16px;
}

/* Billing Panel Backdrop */
.billing-panel-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(23, 66, 54, 0.3);
    backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.billing-panel-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* Billing Panel */
.billing-panel {
    position: fixed;
    top: 0;
    right: -450px;
    width: 400px;
    max-width: 100vw;
    height: 100vh;
    background: #F6F5EF;
    border-left: 1px solid rgba(23, 66, 54, 0.1);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 40px rgba(23, 66, 54, 0.15);
    color: #174236;
}

.billing-panel.active {
    right: 0;
}

/* Panel Header */
.billing-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(23, 66, 54, 0.1);
    background: #174236;
}

.billing-panel-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Roboto Mono', monospace;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    color: white;
}

.billing-panel-logo svg {
    width: 20px;
    height: 20px;
    stroke: white;
}

.billing-panel-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.billing-panel-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Panel Content */
.billing-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    color: #174236;
}

.billing-panel-content::-webkit-scrollbar {
    width: 6px;
}

.billing-panel-content::-webkit-scrollbar-track {
    background: transparent;
}

.billing-panel-content::-webkit-scrollbar-thumb {
    background: rgba(23, 66, 54, 0.2);
    border-radius: 3px;
}

.billing-panel-content::-webkit-scrollbar-thumb:hover {
    background: rgba(23, 66, 54, 0.3);
}

/* Balance Card */
.billing-balance-card {
    background: white;
    border: 1px solid rgba(23, 66, 54, 0.1);
    border-radius: 16px;
    padding: 24px;
    position: relative;
    box-shadow: 0 4px 20px rgba(23, 66, 54, 0.08);
}

.balance-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.balance-label {
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #174236;
    opacity: 0.6;
}

.balance-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #174236;
    font-weight: 500;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #174236;
    box-shadow: 0 0 8px rgba(23, 66, 54, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.balance-amount {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 20px;
}

.balance-amount .currency {
    font-size: 24px;
    font-weight: 300;
    color: #174236;
    opacity: 0.6;
}

.balance-amount .amount {
    font-size: 42px;
    font-weight: 700;
    color: #174236;
    font-family: 'Roboto Mono', monospace;
    letter-spacing: -1px;
}

.balance-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding-top: 20px;
    border-top: 1px solid rgba(23, 66, 54, 0.1);
    margin-bottom: 20px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #174236;
    opacity: 0.5;
}

.stat-value {
    font-size: 14px;
    font-weight: 600;
    color: #174236;
    font-family: 'Roboto Mono', monospace;
}

.add-funds-btn {
    width: 100%;
    padding: 14px 20px;
    background: #174236;
    border: none;
    border-radius: 10px;
    color: white;
    font-family: 'Roboto Mono', monospace;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.add-funds-btn:hover {
    background: #1e5346;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(23, 66, 54, 0.25);
}

.add-funds-btn svg {
    stroke: white;
}

/* Billing Section */
.billing-section {
    background: white;
    border: 1px solid rgba(23, 66, 54, 0.1);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(23, 66, 54, 0.05);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: #174236;
    margin: 0;
}

.section-period {
    font-size: 11px;
    color: #174236;
    opacity: 0.6;
    font-family: 'Roboto Mono', monospace;
}

.refresh-history-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(23, 66, 54, 0.05);
    border: 1px solid rgba(23, 66, 54, 0.1);
    color: #174236;
    opacity: 0.6;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.refresh-history-btn:hover {
    background: #174236;
    border-color: #174236;
    color: white;
    opacity: 1;
}

/* Usage Grid */
.usage-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.usage-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #F6F5EF;
    border-radius: 8px;
    border: 1px solid rgba(23, 66, 54, 0.05);
}

.usage-icon {
    font-size: 20px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 8px;
    border: 1px solid rgba(23, 66, 54, 0.1);
}

.usage-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.usage-value {
    font-size: 18px;
    font-weight: 700;
    color: #174236;
    font-family: 'Roboto Mono', monospace;
}

.usage-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #174236;
    opacity: 0.6;
}

/* Payment History List */
.payment-history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
}

.payment-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 20px;
    color: #174236;
    opacity: 0.5;
    font-size: 12px;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(23, 66, 54, 0.1);
    border-top-color: #174236;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.payment-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #F6F5EF;
    border: 1px solid rgba(23, 66, 54, 0.05);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.payment-item:hover {
    background: rgba(23, 66, 54, 0.03);
    border-color: rgba(23, 66, 54, 0.1);
}

.payment-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.payment-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.payment-icon.success {
    background: rgba(23, 66, 54, 0.1);
    border: 1px solid rgba(23, 66, 54, 0.2);
    color: #174236;
}

.payment-icon.pending {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.2);
    color: #174236;
}

.payment-icon.failed {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #174236;
}

.payment-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.payment-package {
    font-size: 13px;
    font-weight: 600;
    color: #174236;
}

.payment-date {
    font-size: 11px;
    color: #174236;
    opacity: 0.6;
    font-family: 'Roboto Mono', monospace;
}

.payment-amount-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.payment-amount {
    font-size: 15px;
    font-weight: 700;
    color: #174236;
    font-family: 'Roboto Mono', monospace;
}

.payment-status {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.payment-status.paid {
    background: rgba(23, 66, 54, 0.1);
    color: #174236;
}

.payment-status.pending {
    background: rgba(255, 193, 7, 0.1);
    color: #174236;
}

.payment-status.failed {
    background: rgba(239, 68, 68, 0.1);
    color: #174236;
}

.payment-status.refunded {
    background: rgba(107, 114, 128, 0.1);
    color: #174236;
}

/* Empty State */
.payment-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.payment-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.payment-empty-text {
    font-size: 14px;
    color: #174236;
    opacity: 0.7;
    margin-bottom: 8px;
}

.payment-empty-subtext {
    font-size: 12px;
    color: #174236;
    opacity: 0.5;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .billing-panel {
        width: 100vw;
        right: -100vw;
    }
    
    .billing-panel.active {
        right: 0;
    }
    
    .balance-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .stat-item {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .usage-grid {
        grid-template-columns: 1fr;
    }
}












.voice-input-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    
    /* border: 1px solid rgba(23, 66, 54, 0.2); */
    color: #174236;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.voice-input-btn:hover {
    background: rgba(23, 66, 54, 0.1);
    border-color: #174236;
}

.voice-input-btn:active {
    transform: scale(0.95);
}

/* Language Selector */
.voice-language-selector {
     margin-bottom: 0;
    /* padding: 12px 16px; */
    display: flex;
    justify-content: flex-end;  
    background: #F6F5EF;
    border-bottom: 1px solid rgba(23, 66, 54, 0.1);
    gap:10px    
}

.voice-language-selector select {
    /* padding: 10px 16px; */
    font-size: 12px;
    border: 1px solid rgba(23, 66, 54, 0.2);
    border-radius: 8px;
    background: #F6F5EF;
    color: #174236;
    cursor: pointer;
    min-width: 180px;
    outline: none;
    transition: all 0.2s ease;
    display: inline-block; 
    
}

.voice-language-selector select:hover {
    border-color: #174236;
}

.voice-language-selector select:focus {
    border-color: #174236;
    box-shadow: 0 0 0 2px rgba(23, 66, 54, 0.1);
}

/* Voice Modal Overlay */
.voice-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(23, 66, 54, 0.4);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.voice-modal.active {
    opacity: 1;
    visibility: visible;
}

/* Voice Modal Content */
.voice-modal-content {
    background: #F6F5EF;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    padding: 24px;
    box-shadow: 0 20px 60px rgba(23, 66, 54, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.voice-modal.active .voice-modal-content {
    transform: scale(1) translateY(0);
}

/* Modal Header */
.voice-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.voice-modal-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Roboto Mono', monospace;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    color: #174236;
}

.voice-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(23, 66, 54, 0.05);
    border: 1px solid rgba(23, 66, 54, 0.1);
    color: #174236;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.voice-modal-close:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* Visualizer */
.voice-visualizer-container {
    background: rgba(23, 66, 54, 0.05);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#voice-visualizer {
    width: 100%;
    height: 80px;
    border-radius: 8px;
}

/* Timer */
.voice-timer-container {
    text-align: center;
    margin-bottom: 24px;
}

.voice-timer {
    font-family: 'Roboto Mono', monospace;
    font-size: 36px;
    font-weight: 700;
    color: #174236;
    display: block;
    margin-bottom: 8px;
}

.voice-status {
    font-size: 13px;
    color: #174236;
    opacity: 0.6;
}

/* Record Button */
.voice-controls {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.voice-record-btn {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #174236;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 4px 20px rgba(23, 66, 54, 0.3);
}

.voice-record-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 30px rgba(23, 66, 54, 0.4);
}

.voice-record-btn:active {
    transform: scale(0.95);
}

.voice-record-btn.recording {
    background: #ef4444;
    animation: pulse-recording 1.5s infinite;
}

@keyframes pulse-recording {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(239, 68, 68, 0);
    }
}

.voice-record-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Transcription Preview */
.voice-transcription-container {
    min-height: 60px;
    background: white;
    border: 1px solid rgba(23, 66, 54, 0.1);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.voice-transcription {
    font-size: 14px;
    color: #174236;
    margin: 0;
    line-height: 1.5;
    min-height: 20px;
}

.voice-transcription:empty::before {
    content: 'Your transcription will appear here...';
    color: #174236;
    opacity: 0.4;
    font-style: italic;
}

/* Action Buttons */
.voice-actions {
    display: flex;
    gap: 12px;
}

.voice-cancel-btn {
    flex: 1;
    padding: 14px 20px;
    background: transparent;
    border: 1px solid rgba(23, 66, 54, 0.2);
    border-radius: 10px;
    color: #174236;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.voice-cancel-btn:hover {
    background: rgba(23, 66, 54, 0.05);
    border-color: rgba(23, 66, 54, 0.3);
}

.voice-send-btn {
    flex: 1;
    padding: 14px 20px;
    background: #174236;
    border: none;
    border-radius: 10px;
    color: white;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.voice-send-btn:hover:not(:disabled) {
    background: #1e5346;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(23, 66, 54, 0.3);
}

.voice-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.voice-send-btn svg {
    stroke: white;
}

/* Loading Spinner */
.voice-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Voice Indicator in Chat */
.voice-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(23, 66, 54, 0.1);
    border-radius: 50%;
    margin-right: 8px;
    font-size: 12px;
}

/* Speak Button */
.speak-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    background: rgba(23, 66, 54, 0.05);
    border: 1px solid rgba(23, 66, 54, 0.1);
    border-radius: 6px;
    color: #174236;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-left: 8px;
}

.speak-btn:hover {
    background: rgba(23, 66, 54, 0.1);
    border-color: rgba(23, 66, 54, 0.2);
}

.speak-btn.speaking {
    background: #174236;
    color: white;
    border-color: #174236;
    animation: pulse-speaking 1.5s infinite;
}

@keyframes pulse-speaking {
    0%, 100% { box-shadow: 0 0 0 0 rgba(23, 66, 54, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(23, 66, 54, 0); }
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .voice-modal-content {
        width: 95%;
        padding: 20px;
    }
    
    .voice-timer {
        font-size: 28px;
    }
    
    .voice-record-btn {
        width: 64px;
        height: 64px;
    }
    
    .speak-btn {
        opacity: 1;
    }
}

/* Hide delete button by default */
.conversation-item .delete-btn {
    opacity: 0;
    pointer-events: none;
}

/* Show on hover */
.conversation-item:hover .delete-btn {
    opacity: 1;
    pointer-events: auto;
}

/* Always show for active item */
/* Always show for active item */
.conversation-item.active .delete-btn {
    opacity: 1 !important;
    pointer-events: auto !important;
    display: block !important;
    visibility: visible !important;
}

.conversation-item.active
{
    padding:3px;
    background: #E4E3DA       !important;
    border-radius: 6px;
    align-items: center;
    font-weight: 400;
}

.voice-icon-btn
{
    border: none !important;
}
 
/* Panel Header */
.use-cases-panel-header {
    min-width: 240px;
    max-width: 300px;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1a1a1a;
    padding: 10px !important; /* Add this */
}


.use-case-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 300px !important;
    max-width: 300px;
}

.use-case-category-icon  .use-case-category-name .use-case-category-count{
    display: none !important;
}


/* Hide news-btn2 when logged in */
#auth-logged-in:not(.hidden) ~ #news-btn2,
body.logged-in #news-btn2 {
    display: none !important;
}


@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

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

/* ========== DEEPSHIP ICON ========== */
.deepship-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #00d4aa 0%, #174236 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 212, 170, 0.3);
}

.deepship-icon svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: white;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.deepship-icon.sm { width: 32px; height: 32px; border-radius: 8px; }
.deepship-icon.sm svg { width: 18px; height: 18px; }

.deepship-icon.lg { width: 64px; height: 64px; border-radius: 16px; }
.deepship-icon.lg svg { width: 36px; height: 36px; }

/* ========== ABOUT OVERLAY ========== */
.about-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.about-overlay.active {
    opacity: 1;
    visibility: visible;
}

.about-card {
    background: #111;
    border: 1px solid #222;
    border-radius: 20px;
    width: 80%;
    padding: 24px;
    position: relative;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.about-overlay.active .about-card {
    transform: scale(1) translateY(0);
}

.about-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: #1a1a1a;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.about-close:hover {
    background: #252525;
}

.about-close svg {
    width: 16px;
    height: 16px;
    stroke: #666;
    stroke-width: 2;
}

.about-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
    padding-right: 40px;
}

.about-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2a8c6e;
    letter-spacing: 2px;
}

.header-link {
    color: #2a8c6e;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    transition: opacity 0.2s;
}

.header-link:hover {
    opacity: 0.8;
}

.about-tagline {
    color: #888;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

.about-features {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    justify-content: space-evenly;
}

.about-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
    padding: 16px 12px;
    background: #1a1a1a;
    border-radius: 12px;
    transition: background 0.2s;
    width: 240px;
    height: 240px;
    flex-shrink: 0;
}

.about-feature:hover {
    background: #1f1f1f;
}

/* 200px cards for 300-400px screens */
@media (max-width: 400px) {
    .about-feature {
        width: 160px;
        height: 160px;
    }
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.2) 0%, rgba(23, 66, 54, 0.3) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-icon svg {
    width: 24px;
    height: 24px;
    stroke: #00d4aa;
    fill: none;
    stroke-width: 2;
}

.feature-text h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.feature-text p {
    font-size: 0.75rem;
    color: #999;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.about-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid #222;
}

.about-link {
    color: #00d4aa;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: opacity 0.2s;
}

.about-link:hover {
    opacity: 0.8;
}

.about-link svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.about-version {
    font-size: 0.75rem;
    color: #444;
} 

 .streaming-indicator {
    padding-bottom: 40px;
    bottom:  calc(env(safe-area-inset-bottom) + 240px) !important;
}

.messages
{
    padding-bottom: 40px !important;
    bottom:  calc(env(safe-area-inset-bottom) + 240px) !important;
}

.query-sources-grid
{
    /* padding-bottom: 40px !important; */
    bottom:  calc(env(safe-area-inset-bottom) ) !important;
}

.hands-free-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hands-free-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #174236;
}

.hands-free-toggle label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #174236;
    cursor: pointer;
    user-select: none;
}

.hands-free-toggle label svg {
    opacity: 0.6;
}

.message-input
{
    height: 60px !important;
}

.voice-language-selector
{
    padding-top: 20px;
}


/*
DO NOT DELETE

.speak-iframe-btn {
    position: absolute;
    bottom: 16px;
    right: 120px;  
    background: #d4a574;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 10;
    transition: background 0.2s;
}

.speak-iframe-btn:hover {
    background: #c69564;
}

.speak-iframe-btn svg {
    width: 16px;
    height: 16px;
}

  .voice-language-selector
{
    margin-bottom: 20px;
}

.split-left .voice-language-selector
{
    margin-bottom: 20px;
} */

.messages{
    padding-top: 10px;
}

.input-area
{
    padding-top: 20px !important;
}/* High-contrast Prism colors for light backgrounds */

/* Comments - Medium gray */
pre code .token.comment,
pre code .token.prolog,
pre code .token.doctype,
pre code .token.cdata {
    color: #708090 !important;
    font-style: italic !important;
}

/* Punctuation - Dark gray */
pre code .token.punctuation {
    color: #999 !important;
}

/* Numbers, booleans, constants - Orange/Red */
pre code .token.property,
pre code .token.tag,
pre code .token.boolean,
pre code .token.number,
pre code .token.constant,
pre code .token.symbol,
pre code .token.deleted {
    color: #d73a49 !important;
}

/* Strings - Green */
pre code .token.selector,
pre code .token.attr-name,
pre code .token.string,
pre code .token.char,
pre code .token.builtin,
pre code .token.inserted {
    color: #22863a !important;
}

/* Operators, entities - Teal */
pre code .token.operator,
pre code .token.entity,
pre code .token.url,
pre code .language-css .token.string,
pre code .style .token.string {
    color: #005cc5 !important;
}

/* Keywords - Purple/Magenta */
pre code .token.atrule,
pre code .token.attr-value,
pre code .token.keyword {
    color: #d73a49 !important;
    font-weight: bold !important;
}

/* Functions, classes - Blue */
pre code .token.function,
pre code .token.class-name {
    color: #6f42c1 !important;
    font-weight: 600 !important;
}

/* Variables, regex - Dark orange */
pre code .token.regex,
pre code .token.important,
pre code .token.variable {
    color: #e36209 !important;
}

/* Optional: Add background to code blocks */
pre[class*="language-"] {
    background: #f6f8fa !important;
    border: 1px solid #e1e4e8 !important;
    border-radius: 6px !important;
    padding: 16px !important;
}

code[class*="language-"] {
    color: #24292e !important;
}

/* Increase code font size */
pre code,
code[class*="language-"],
pre[class*="language-"] {
    font-size: 17px !important; /* Standard is usually 13px, so this is +2px */
    line-height: 1.6 !important; /* Adjust line spacing too for readability */
}


.use-case-header
{
    margin-top: 30px !important;
}

#split-app-select
{
    background: #F6F5EF !important;
    color: black !important;
}

#split-app-select option {
    background: #F6F5EF !important;
    color: black !important;
    font-size: 13px;
    font-weight: 500;
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(23, 66, 54, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.popup-box {
    background: #F6F5EF;
    color: #174236;
    border-radius: 12px;
    padding: 24px 28px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(23, 66, 54, 0.3);
    position: relative;
    transform: scale(0.9) translateY(-20px);
    transition: transform 0.3s ease;
}

.popup-overlay.active .popup-box {
    transform: scale(1) translateY(0);
}

.popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border: none;
    background: #174236;
    color: #F6F5EF;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-close:hover {
    opacity: 0.8;
    transform: scale(1.1);
}

.popup-message {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
    padding-right: 20px;
}

.conversations-selection-panel {
width: 100% !important;
max-width: 300px !important;
min-width: 300px !important;
}