* { 
    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; 
    align-items: center; 
    justify-content: center; 
    padding: 20px;
}

.container { 
    width: 100%; 
    max-width: 900px; 
    height: 600px; 
    background: white; 
    border-radius: 15px; 
    box-shadow: 0 10px 40px rgba(0,0,0,.3); 
    display: flex; 
    flex-direction: column; 
    overflow: hidden; 
}

.header { 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); 
    color: white; 
    padding: 20px; 
    text-align: center; 
    border-bottom: 1px solid rgba(0,0,0,.1); 
}

.header h1 { 
    font-size: 24px; 
    margin-bottom: 5px; 
}

.header p { 
    font-size: 12px; 
    opacity: .9; 
}

.chat-messages { 
    flex: 1; 
    overflow-y: auto; 
    padding: 20px; 
    background: #fff; 
    display: flex; 
    flex-direction: column; 
    gap: 15px; 
}

.message { 
    display: flex; 
    gap: 10px; 
    animation: slideIn .3s ease; 
}

@keyframes slideIn { 
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    } 
    to { 
        opacity: 1; 
        transform: translateY(0); 
    } 
}

.message.user { 
    justify-content: flex-end; 
}

.message.assistant { 
    justify-content: flex-start; 
}

.message-avatar { 
    width: 35px; 
    height: 35px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: white; 
    font-weight: bold; 
    flex-shrink: 0; 
}

.user .message-avatar { 
    background: #667eea; 
}

.assistant .message-avatar { 
    background: #764ba2; 
}

.message-content { 
    max-width: 70%; 
    padding: 12px 16px; 
    border-radius: 12px; 
    word-wrap: break-word; 
    line-height: 1.5; 
    font-size: 14px; 
}

.user .message-content { 
    background: #667eea; 
    color: white; 
    border-bottom-right-radius: 4px; 
}

.assistant .message-content { 
    background: #f0f0f0; 
    color: #333; 
    border-bottom-left-radius: 4px; 
}

.loading-indicator { 
    display: flex; 
    gap: 5px; 
    padding: 12px 16px; 
}

.loading-dot { 
    width: 8px; 
    height: 8px; 
    border-radius: 50%; 
    background: #999; 
    animation: bounce 1.4s infinite; 
}

.loading-dot:nth-child(2) { 
    animation-delay: .2s; 
}

.loading-dot:nth-child(3) { 
    animation-delay: .4s; 
}

@keyframes bounce { 
    0%, 80%, 100% { 
        opacity: .3; 
        transform: translateY(0); 
    } 
    40% { 
        opacity: 1; 
        transform: translateY(-10px); 
    } 
}

.input-section { 
    padding: 20px; 
    background: #f8f9fa; 
    border-top: 1px solid #e9ecef; 
    display: flex; 
    gap: 10px; 
}

.input-wrapper { 
    flex: 1; 
    display: flex; 
    gap: 10px; 
}

.chat-input { 
    flex: 1; 
    padding: 12px 15px; 
    border: 1px solid #dee2e6; 
    border-radius: 8px; 
    font-size: 14px; 
    font-family: inherit; 
    resize: none; 
    max-height: 100px; 
}

.chat-input:focus { 
    outline: none; 
    border-color: #667eea; 
    box-shadow: 0 0 0 3px rgba(102,126,234,.1); 
}

.send-button { 
    padding: 12px 24px; 
    background: #667eea; 
    color: white; 
    border: none; 
    border-radius: 8px; 
    cursor: pointer; 
    font-weight: 600; 
    transition: background .3s; 
}

.send-button:hover:not(:disabled) { 
    background: #5568d3; 
}

.send-button:disabled { 
    background: #ccc; 
    cursor: not-allowed; 
}

@media (max-width: 600px) { 
    .message-content { 
        max-width: 100%; 
    } 
    .header h1 { 
        font-size: 20px; 
    } 
}
