.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}
/* Poprawka dla wiadomości użytkownika */
.user-message .message-content,
.user-message .message-content p {
    color: #ffffff !important;  /* Wymuszenie białego koloru */
    font-weight: 500;
}

.chatbot-button {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.chatbot-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 600px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 40px rgba(0,0,0,0.16);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.chatbot-window.active {
    display: flex;
}

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

.chatbot-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.chatbot-close:hover {
    background: rgba(255,255,255,0.2);
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
    scrollbar-width: thin;
    scrollbar-color: #667eea #f8f9fa;
    background: #f8f9fa;
}

.chatbot-message {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    animation: slideIn 0.3s ease;
    max-width: 80%;
}

.bot-message {
    margin-right: auto;
    margin-left: 0;
}

.user-message {
    margin-left: auto;
    margin-right: 0;
    flex-direction: row-reverse;
}

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

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

.bot-message .message-avatar {
    background: #e9ecef;
    margin-right: 12px;
    margin-left: 0;
}

.user-message .message-avatar {
    background: #4355f9;
    color: white;
    margin-left: 12px;
    margin-right: 0;
}

.message-content {
    padding: 12px 16px;
    border-radius: 18px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    max-width: calc(100% - 76px);
}

.bot-message .message-content {
    background: #ffffff;
    color: #2c3e50;
    border: 1px solid #e0e0e0;
}

.user-message .message-content {
    background: #4355f9;
    color: #ffffff;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(67,85,249,0.25);
}

.message-content p {
    margin: 0;
    font-size: 15px;
    line-height: 1.4;
    letter-spacing: 0.2px;
}

.chatbot-topics {
    padding: 16px;
    background: white;
    border-top: 1px solid #e9ecef;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 150px;
    overflow-y: auto;
}

.topic-button {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    color: #495057;
}

.topic-button:hover {
    background: #4355f9;
    color: white;
    border-color: #4355f9;
    transform: translateY(-2px);
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    margin-left: 52px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    margin: 0 2px;
    background-color: #4355f9;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}

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

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

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

/* Responsive - FIXED VERSION */
@media (max-width: 480px) {
    .chatbot-container {
        bottom: 10px;
        right: 10px;
        left: 10px;
        width: auto;
    }
    
    .chatbot-button {
        position: absolute;
        bottom: 0;
        right: 0;
        width: 60px;
        height: 60px;
    }
    
    .chatbot-window {
        position: fixed;
        top: 25%;
        left: 15px;
        right: 15px;
        width: auto;
        height: 500px;
        max-height: 60vh;
        border-radius: 12px;
        bottom: auto;
    }
    
    .chatbot-messages {
        padding: 15px;
    }

    .message-content {
        max-width: 75%;
    }
    
    .chatbot-header {
        padding: 15px 20px;
    }
    
    .chatbot-topics {
        padding: 12px 16px;
    }
}