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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    display: flex;
    height: 100vh;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.sidebar {
    width: 320px;
    background: rgba(255, 255, 255, 0.98);
    padding: 24px;
    overflow-y: auto;
    box-shadow: 2px 0 20px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.logo h2 {
    color: #667eea;
    font-size: 24px;
    margin-bottom: 4px;
}

.subtitle {
    color: #666;
    font-size: 14px;
}

.features h3, .notes-section h3, .quick-actions h3 {
    font-size: 14px;
    color: #333;
    margin-bottom: 12px;
    font-weight: 600;
}

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

.feature {
    background: linear-gradient(135deg, #667eea15, #764ba215);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
}

.notes-section {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 12px;
}

.notes-list {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 12px;
}

.note-item {
    background: white;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    border-left: 3px solid #667eea;
    cursor: pointer;
    transition: transform 0.2s;
}

.note-item:hover {
    transform: translateX(4px);
}

.note-title {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    margin-bottom: 4px;
}

.note-category {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    margin-top: 4px;
}

.loading {
    text-align: center;
    color: #999;
    padding: 20px;
    font-size: 14px;
}

.refresh-btn, .action-btn, .new-chat-btn {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

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

.refresh-btn:hover {
    background: #5568d3;
    transform: translateY(-1px);
}

.action-btn {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    margin-bottom: 8px;
    text-align: left;
}

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

.quick-actions {
    display: flex;
    flex-direction: column;
}

.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
    margin: 20px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

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

.chat-header h1 {
    font-size: 24px;
}

.new-chat-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 8px 16px;
    width: auto;
}

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

.chat {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message {
    max-width: 80%;
    padding: 14px 18px;
    border-radius: 16px;
    line-height: 1.5;
    animation: slideIn 0.3s ease-out;
}

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

.user {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.assistant {
    background: #f0f2f5;
    color: #333;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.assistant strong {
    color: #667eea;
}

.assistant code {
    background: #e8eaed;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

.assistant ul, .assistant ol {
    margin-left: 20px;
    margin-top: 8px;
}

.assistant li {
    margin-bottom: 4px;
}

.input-area {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    transition: border-color 0.2s;
}

input:focus {
    outline: none;
    border-color: #667eea;
}

button {
    padding: 14px 28px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

button:active {
    transform: translateY(0);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #5568d3;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        max-height: 40vh;
    }
    
    .main {
        margin: 0;
        border-radius: 0;
    }
}
