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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

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

/* Header */
.header {
    background: #2b6cb0;
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.avatar {
    font-size: 2.5rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
}

.header-text {
    display: flex;
    flex-direction: column;
}

.title {
    font-size: 1.3rem;
    font-weight: 600;
}

.subtitle {
    font-size: 0.85rem;
    opacity: 0.9;
}

.btn-reset {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

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

/* Messages area */
.messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

.message {
    display: flex;
    margin-bottom: 16px;
    animation: slideIn 0.3s ease;
}

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

.message-content {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 12px;
    line-height: 1.5;
    font-size: 0.95rem;
}

.message.bot .message-content {
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.message.user {
    justify-content: flex-end;
}

.message.user .message-content {
    background: #2b6cb0;
    color: white;
}

.message-content p {
    margin-bottom: 8px;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.message-content ul {
    margin-left: 20px;
    margin-top: 8px;
    margin-bottom: 8px;
}

.message-content li {
    margin-bottom: 4px;
}

.message-content strong {
    font-weight: 600;
}

.message-content a {
    color: #2b6cb0;
    text-decoration: underline;
}

.message.user .message-content a {
    color: white;
    text-decoration: underline;
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    background: white;
    width: fit-content;
    border-radius: 12px;
    margin: 0 20px 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: #2b6cb0;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

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

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: translateY(0);
    }
    30% {
        opacity: 1;
        transform: translateY(-8px);
    }
}

/* Input area */
.input-area {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    background: white;
    border-top: 1px solid #e2e8f0;
}

#messageInput {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #cbd5e0;
    border-radius: 24px;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

#messageInput:focus {
    border-color: #2b6cb0;
}

.btn-send {
    width: 48px;
    height: 48px;
    background: #2b6cb0;
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-send:hover {
    background: #2c5282;
    transform: scale(1.05);
}

.btn-send:active {
    transform: scale(0.95);
}

.btn-send:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    transform: none;
}

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

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

.messages::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

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

/* Mobile responsive */
@media (max-width: 600px) {
    body {
        padding: 0;
    }
    
    .container {
        max-width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .header {
        padding: 16px;
    }
    
    .title {
        font-size: 1.1rem;
    }
    
    .subtitle {
        font-size: 0.8rem;
    }
    
    .messages {
        padding: 16px;
    }
    
    .message-content {
        max-width: 85%;
        font-size: 0.9rem;
    }
}
