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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #080810;
    color: #c8c0c0;
    height: 100vh;
    overflow: hidden;
}

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

.sidebar {
    width: 260px;
    background: #060610;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-right: 1px solid #2a2a4a;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #6c63ff, #3b82f6);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    color: white;
}

.brand h1 {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.new-chat-btn {
    background: #2a2a4a;
    border: 1px solid #3a3a5a;
    color: #e0e0e0;
    padding: 12px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.new-chat-btn:hover {
    background: #3a3a5a;
}

.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.chat-header {
    padding: 16px 24px;
    border-bottom: 1px solid #2a2a4a;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #16162b;
}

.voice-toggle {
    margin-left: auto;
    background: #2a2a4a;
    border: 1px solid #3a3a5a;
    color: #e0e0e0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.voice-toggle:hover {
    background: #3a3a5a;
}

.chat-header h2 {
    font-size: 16px;
    font-weight: 600;
}

.status {
    font-size: 12px;
    color: #4ade80;
    background: rgba(74, 222, 128, 0.1);
    padding: 3px 10px;
    border-radius: 20px;
}

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

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

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

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

.welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    gap: 16px;
}

.welcome-icon {
    font-size: 48px;
    margin-bottom: 8px;
}

.welcome h2 {
    font-size: 24px;
    color: #fff;
}

.welcome p {
    color: #888;
    font-size: 15px;
}

.suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    justify-content: center;
}

.suggestion {
    background: #2a2a4a;
    border: 1px solid #3a3a5a;
    color: #c0c0e0;
    padding: 10px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.suggestion:hover {
    background: #3a3a5a;
    color: #fff;
    transform: translateY(-1px);
}

.message {
    display: flex;
    gap: 12px;
    max-width: 80%;
    animation: fadeIn 0.3s ease;
}

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

.message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.message.bot .message-avatar {
    background: linear-gradient(135deg, #6c63ff, #3b82f6);
}

.message.user .message-avatar {
    background: #4a4a6a;
}

.message-content {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.message.bot .message-content {
    background: #22223a;
    border: 1px solid #2a2a4a;
    border-top-left-radius: 4px;
}

.message.user .message-content {
    background: #6c63ff;
    color: white;
    border-top-right-radius: 4px;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 4px 0;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #8a2030;
    border-radius: 50%;
    animation: bounce 1.4s infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

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

.input-area {
    padding: 16px 24px;
    border-top: 1px solid #2a2a4a;
    background: #16162b;
}

#chatForm {
    display: flex;
    gap: 10px;
    max-width: 800px;
    margin: 0 auto;
    align-items: center;
}

.upload-btn {
    background: #2a2a4a;
    border: 1px solid #3a3a5a;
    color: #a0a0c0;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}

.upload-btn:hover {
    background: #3a3a5a;
    color: #e0e0e0;
}

.message-image {
    max-width: 250px;
    max-height: 250px;
    border-radius: 12px;
    margin-top: 8px;
    cursor: pointer;
    transition: transform 0.2s;
}

.message-image:hover {
    transform: scale(1.02);
}

.bot-drawing {
    border-radius: 12px;
    margin-top: 8px;
    background: #1a1a2e;
    border: 1px solid #3a3a5a;
}

#userInput {
    flex: 1;
    background: #22223a;
    border: 1px solid #3a3a5a;
    color: #e0e0e0;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

#userInput:focus {
    border-color: #6c63ff;
}

#userInput::placeholder {
    color: #666;
}

#sendBtn {
    background: #6c63ff;
    border: none;
    color: white;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.1s;
}

#sendBtn:hover {
    background: #5b52ff;
}

#sendBtn:active {
    transform: scale(0.95);
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .messages {
        padding: 16px;
    }

    .message {
        max-width: 90%;
    }

    .input-area {
        padding: 12px 16px;
    }
}
