body { background: #0f1117 !important; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2d3154; border-radius: 3px; }

@keyframes bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-8px); }
}

.app-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f1117 0%, #1a1040 100%);
    font-family: 'Inter', sans-serif;
    padding: 0;
}

.chat-header {
    background: linear-gradient(90deg, #1a1d27 0%, #2a1f5c 100%);
    border-bottom: 1px solid #2d3154;
    padding: 16px 24px;
    backdrop-filter: blur(10px);
}

.chat-window {
    height: 62vh;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scroll-behavior: smooth;
}

.input-area {
    background: #1a1d27;
    border-top: 1px solid #2d3154;
    padding: 16px 24px;
}

.user-bubble {
    background: linear-gradient(135deg, #6c63ff 0%, #8b3cf7 100%);
    color: #fff;
    border-radius: 18px 18px 4px 18px;
    padding: 12px 16px;
    max-width: 75%;
    align-self: flex-end;
    box-shadow: 0 4px 15px rgba(108,99,255,0.3);
    font-size: 0.95rem;
    line-height:  1.6;
    white-space: pre-wrap;
}

.bot-bubble {
    background: #22263a;
    color: #e8eaf6;
    border-radius: 18px 18px 18px 4px;
    padding: 12px 16px;
    max-width: 80%;
    align-self: flex-start;
    border: 1px solid #2d3154;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    font-size: 0.95rem;
    line-height:  1.6;
    white-space: pre-wrap;
}

.flagged-bubble {
    background: #2d1515;
    color: #ff6b6b;
    border-radius: 18px 18px 18px 4px;
    padding: 12px 16px;
    max-width: 80%;
    align-self: flex-start;
    border: 1px solid #ff6b6b33;
    font-size: 0.95rem;
    line-height:  1.6;
}

/* User Subtitle */
.user-bubble-label {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.6);
    margin-bottom: 4px;
    text-align: right;
}
.user-bubble-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/* Bot Subtitle */
.bot-bubble-container {
     display: flex;
     flex-direction: column;
     align-items: flex-start;
}
.bot-bubble-label {
    margin-bottom: 4px;
    display: flex;
    align-items: center;
}
.bot-bubble-icon {
    font-size: 1.1rem;
    margin-right: 8px;
}
.bot-bubble-name {
    font-size: 0.75rem;
    color: #8892b0;
}

/* Source items */
.source-item {
    background: transparent;
    border: none;
    border-bottom: 1px solid #2d3154;
    padding: 6px 0;
}
.source-item-title {
    font-size: 0.8rem;
    color: #e8eaf6;
}
.source-item-meta {
    font-size: 0.72rem;
    color: #8892b0;
    margin-left: 6px;
}
.source-btn {
    color: #8b85ff;
    padding: 4px 0;
    font-size: 0.8rem;
    text-decoration: none;
}
.source-collapse-container {
     margin-top: 8px;
     background: #1a1d27cc;
     border-radius: 8px;
     padding: 8px 12px;
     display: none;
}

/* Controls */
.query-input-field {
    background: #22263a;
    border: 1px solid #2d3154;
    color: #e8eaf6;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.95rem;
}
.query-input-field:focus { 
    border-color: #6c63ff !important; 
    box-shadow: 0 0 0 0.2rem rgba(108,99,255,0.25) !important; 
    background: #22263a; 
    color: #e8eaf6; 
}

.send-btn {
    background: linear-gradient(135deg, #6c63ff 0%, #8b3cf7 100%);
    border: none;
    border-radius: 12px;
    padding: 12px 20px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(108,99,255,0.4);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.clear-btn {
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.85rem;
    border-color: #2d3154;
    color: #8892b0;
}

.suggestion-btn {
    border-radius: 20px;
    font-size: 0.78rem;
    border-color: #2d3154;
    color: #8892b0;
    padding: 4px 12px;
    transition: all 0.2s;
}
.suggestion-btn:hover { 
    border-color: #6c63ff !important; 
    color: #6c63ff !important; 
}
