static/style.css
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 800px;
    height: 90vh;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: 20px;
}

.header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.header-buttons {
    display: flex;
    gap: 10px;
}

.header-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 0.9rem;
    opacity: 0.9;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a67d8;
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-danger {
    background: #e53e3e;
    color: white;
}

.btn-danger:hover {
    background: #c53030;
}

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

.message {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 15px;
    max-width: 80%;
    animation: slideIn 0.3s ease-out;
}

.user-message {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 5px;
}

.bot-message {
    background: white;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Message content styling */
.message-content {
    margin-bottom: 8px;
    line-height: 1.5;
}

.message-text {
    margin-top: 8px;
}

/* Markdown styling for bot messages */
.bot-message .message-text h1,
.bot-message .message-text h2,
.bot-message .message-text h3,
.bot-message .message-text h4,
.bot-message .message-text h5,
.bot-message .message-text h6 {
    margin: 16px 0 8px 0;
    font-weight: 600;
}

.bot-message .message-text h1 { font-size: 1.5rem; }
.bot-message .message-text h2 { font-size: 1.3rem; }
.bot-message .message-text h3 { font-size: 1.1rem; }
.bot-message .message-text h4 { font-size: 1rem; }

.bot-message .message-text p {
    margin: 8px 0;
    line-height: 1.6;
}

.bot-message .message-text ul,
.bot-message .message-text ol {
    margin: 8px 0;
    padding-left: 20px;
}

.bot-message .message-text li {
    margin: 4px 0;
}

.bot-message .message-text blockquote {
    border-left: 4px solid #667eea;
    padding-left: 16px;
    margin: 12px 0;
    background: rgba(102, 126, 234, 0.05);
    padding: 12px 16px;
    border-radius: 4px;
}

.bot-message .message-text code {
    background: #f1f3f4;
    color: #d73a49;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.bot-message .message-text pre {
    background: #f6f8fa;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    padding: 16px;
    margin: 12px 0;
    overflow-x: auto;
    position: relative;
}

.bot-message .message-text pre code {
    background: none;
    color: inherit;
    padding: 0;
    border-radius: 0;
    font-size: 0.85em;
    line-height: 1.45;
}

.bot-message .message-text table {
    border-collapse: collapse;
    margin: 12px 0;
    width: 100%;
}

.bot-message .message-text th,
.bot-message .message-text td {
    border: 1px solid #e1e4e8;
    padding: 8px 12px;
    text-align: left;
}

.bot-message .message-text th {
    background: #f6f8fa;
    font-weight: 600;
}

.bot-message .message-text a {
    color: #667eea;
    text-decoration: none;
}

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

.bot-message .message-text strong {
    font-weight: 600;
}

.bot-message .message-text em {
    font-style: italic;
}

.bot-message .message-text hr {
    border: none;
    border-top: 1px solid #e1e4e8;
    margin: 16px 0;
}

/* Code copy button */
.bot-message .message-text pre {
    position: relative;
}

.bot-message .message-text pre:hover::after {
    content: "📋 Copy";
    position: absolute;
    top: 8px;
    right: 8px;
    background: #667eea;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    cursor: pointer;
    z-index: 10;
}

.timestamp {
    font-size: 0.75rem;
    opacity: 0.7;
    text-align: right;
}

.input-container {
    padding: 20px;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
}

#messageInput {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 25px;
    outline: none;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

#messageInput:focus {
    border-color: #667eea;
}

.status-bar {
    padding: 10px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #666;
}

.session-info {
    font-family: monospace;
    background: #e2e8f0;
    padding: 4px 8px;
    border-radius: 4px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

.close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
    transition: color 0.3s ease;
}

.close:hover {
    color: #000;
}

.share-link-container {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

#shareLinkInput {
    flex: 1;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8f9fa;
    font-family: monospace;
    font-size: 0.9rem;
}

.share-note {
    font-size: 0.9rem;
    color: #666;
    margin-top: 15px;
}

.shared-footer {
    padding: 20px;
    text-align: center;
    background: #f8f9fa;
    border-top: 1px solid #e2e8f0;
    color: #666;
}

.shared-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.shared-footer a:hover {
    text-decoration: underline;
}

/* Loading and typing indicators */
.typing-indicator {
    display: none;
    padding: 15px;
    margin-bottom: 20px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 15px;
    border-bottom-left-radius: 5px;
    max-width: 80%;
}

.typing-dots {
    display: inline-flex;
    gap: 4px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: #667eea;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

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

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

@keyframes typingBounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        height: 100vh;
        margin: 0;
        border-radius: 0;
    }
    
    .header {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 1.2rem;
    }
    
    .message {
        max-width: 90%;
    }
    
    .input-container {
        padding: 15px;
    }
    
    .btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

/* Scrollbar Styling */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

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

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


.personal-data-container{max-width:800px;margin:0 auto;padding:20px;background:#fff;border-radius:15px;box-shadow:0 4px 15px rgba(0,0,0,.1)}