@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: linear-gradient(135deg, #667eea, #764ba2);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
}

.container {
    width: 100%;
    max-width: 1000px;
    height: 90vh;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-header {
    padding: 20px;
    background: rgba(255, 255, 255, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.profile {
    display: flex;
    align-items: center;
}

.avatar {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #6a11cb, #2575fc);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 15px;
    color: white;
    font-size: 20px;
}

.info h2 {
    color: white;
    font-size: 18px;
    font-weight: 500;
}

.info p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.message {
    max-width: 90%;
    margin-bottom: 20px;
    position: relative;
}

.user-message {
    align-self: flex-end;
    max-width: 75%;
}

.ai-message {
    align-self: flex-start;
    max-width: 85%;
}

.message-content {
    padding: 16px 20px;
    border-radius: 18px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.user-message .message-content {
    background: rgba(255, 255, 255, 0.9);
    border-bottom-right-radius: 4px;
    color: #333;
}

.ai-message .message-content {
    background: rgba(255, 255, 255, 0.2);
    border-bottom-left-radius: 4px;
    color: white;
}

.message-content p {
    margin-bottom: 10px;
    line-height: 1.5;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.message-content strong,
.message-content b {
    font-weight: 700;
}

.message-content h3,
.message-content h4 {
    margin-top: 15px;
    margin-bottom: 10px;
    font-weight: 600;
}

.message-content ul,
.message-content ol {
    margin-left: 20px;
    margin-bottom: 10px;
}

.message-content li {
    margin-bottom: 5px;
}

.chat-input {
    padding: 15px;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

#user-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 20px;
    padding: 12px 20px;
    color: white;
    outline: none;
    font-size: 15px;
}

#user-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

#send-button {
    background: linear-gradient(135deg, #6a11cb, #2575fc);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-left: 10px;
    color: white;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s;
}

#send-button:hover {
    transform: scale(1.05);
}


@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message {
    animation: fadeIn 0.3s ease;
}


.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}


.typing-indicator {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    align-self: flex-start;
}

.typing-indicator span {
    height: 8px;
    width: 8px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
    animation: bounce 1.3s linear infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.15s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.3s;
    margin-right: 0;
}

@keyframes bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-4px); }
}


.thinking-section {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    padding: 15px;
    margin-top: 15px;
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.8);
    border-left: 3px solid rgba(255, 255, 255, 0.3);
}

.thinking-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.thinking-header i {
    margin-right: 8px;
}

.thinking-content {
    white-space: pre-wrap;
    line-height: 1.4;
}


@media (max-width: 768px) {
    .container {
        height: 100vh;
        max-width: 100%;
        border-radius: 0;
    }
    
    body {
        padding: 0;
    }
    
    .message {
        max-width: 95%;
    }
    
    .user-message {
        max-width: 85%;
    }
    
    .ai-message {
        max-width: 90%;
    }
}

@media (max-width: 480px) {
    .chat-header {
        padding: 15px;
    }
    
    .chat-messages {
        padding: 15px;
    }
    
    .message-content {
        padding: 12px 16px;
    }
    
    .avatar {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .info h2 {
        font-size: 16px;
    }
    
    .info p {
        font-size: 12px;
    }
}