.ollama-chatbot {
    position: fixed;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.ollama-chatbot-right {
    bottom: 20px;
    right: 20px;
}

.ollama-chatbot-left {
    bottom: 20px;
    left: 20px;
}

.ollama-chatbot-toggle {
    width: 60px;
    height: 60px;
    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: transform 0.2s, box-shadow 0.2s;
}

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

.ollama-chatbot-window {
    display: none;
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 500px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    flex-direction: column;
}

.ollama-chatbot-left .ollama-chatbot-window {
    right: auto;
    left: 0;
}

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

.ollama-chatbot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    color: #fff;
}

.ollama-chatbot-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.ollama-chatbot-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.ollama-chatbot-close:hover {
    opacity: 1;
}

.ollama-chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #f9fafb;
}

.ollama-chat-message {
    margin-bottom: 12px;
    display: flex;
}

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

.ollama-chat-message.bot {
    justify-content: flex-start;
}

.ollama-chat-bubble {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.ollama-chat-message.user .ollama-chat-bubble {
    background: #4F46E5;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.ollama-chat-message.bot .ollama-chat-bubble {
    background: #fff;
    color: #1f2937;
    border: 1px solid #e5e7eb;
    border-bottom-left-radius: 4px;
}

.ollama-chatbot-input {
    display: flex;
    padding: 12px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
    gap: 8px;
}

.ollama-chatbot-input input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.ollama-chatbot-input input:focus {
    border-color: #4F46E5;
}

.ollama-chatbot-input button {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.2s;
}

.ollama-chatbot-input button:hover {
    opacity: 0.9;
}

.ollama-chatbot-input button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ollama-chat-typing {
    display: flex;
    gap: 4px;
    padding: 10px 14px;
}

.ollama-chat-typing span {
    width: 8px;
    height: 8px;
    background: #9ca3af;
    border-radius: 50%;
    animation: ollama-typing 1.4s infinite;
}

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

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

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

@media (max-width: 480px) {
    .ollama-chatbot-window {
        width: calc(100vw - 40px);
        height: 70vh;
    }
}

.ollama-content-generator,
.ollama-translator,
.ollama-image-generator,
.ollama-form-container {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.ollama-content-generator h3,
.ollama-translator h3,
.ollama-image-generator h3 {
    margin-top: 0;
}

.ollama-cg-field,
.ollama-tr-field,
.ollama-ig-field,
.ollama-form-field {
    margin-bottom: 15px;
}

.ollama-cg-field label,
.ollama-tr-field label,
.ollama-ig-field label,
.ollama-form-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}

.ollama-cg-field select,
.ollama-cg-field textarea,
.ollama-tr-field select,
.ollama-tr-field textarea,
.ollama-ig-field textarea,
.ollama-form-field input,
.ollama-form-field textarea,
.ollama-form-field select {
    width: 100%;
    max-width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

.ollama-btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.ollama-btn-primary {
    background-color: #4F46E5;
    color: #fff;
}

.ollama-btn-primary:hover {
    background-color: #4338ca;
}

.ollama-cg-result,
.ollama-tr-result,
.ollama-ig-result,
.ollama-form-result {
    margin-top: 20px;
    padding: 15px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}

#ollama-cg-output,
#ollama-tr-output,
.ollama-form-result {
    white-space: pre-wrap;
    line-height: 1.6;
}

#ollama-ig-output img {
    max-width: 100%;
    border-radius: 8px;
}

.ollama-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top-color: #4F46E5;
    border-radius: 50%;
    animation: ollama-spin 0.8s linear infinite;
}

@keyframes ollama-spin {
    to {
        transform: rotate(360deg);
    }
}
