:root {
    --primary-color: #FF5DAB;
    --secondary-color: #F5F7FA;
    --text-color: #333333;
    --border-color: #E1E4E8;
    --success-color: #28A745;
    --error-color: #DC3545;
    --user-message-color: #FF5DAB;
}

#chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.chatbot-toggle {
    position: absolute;
    bottom: 0;
    right: 0;
    background: #FF5DAB;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.chatbot-toggle:hover {
    transform: scale(1.05);
    background: #FF3D9B;
}

.chatbot-toggle .close-text {
    display: none;
}

.chatbot-toggle.active .open-text {
    display: none;
}

.chatbot-toggle.active .close-text {
    display: block;
}

#chatbot {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 300px;
    max-height: 500px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    display: none;
    flex-direction: column;
}

.chatbot-header {
    background: #FF5DAB;
    color: white;
    padding: 12px 15px;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 50px;
    box-sizing: border-box;
}

.chatbot-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
}

#restart-button {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: white;
    cursor: pointer;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 14px;
    transition: all 0.2s ease;
}

#restart-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
}

#chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    max-height: 400px;
}

.message {
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
}

.message:not(.user) {
    position: relative;
    padding-top: 20px;
}

.message:not(.user)::before {
    content: "Anime Store.JP BOT";
    position: absolute;
    top: 0;
    left: 0;
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.message.user {
    align-items: flex-end;
}

.message-content {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 15px;
    background: #f0f0f0;
    max-width: fit-content;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.message.user .message-content {
    background: #FF5DAB;
    color: white;
    border-top-right-radius: 4px;
}

#chat-options {
    padding: 10px;
    border-top: 1px solid #eee;
}

.options-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.option {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
    cursor: pointer;
    transition: background-color 0.2s;
    text-align: left;
    font-size: 14px;
    max-width: fit-content;
    min-width: 200px;
}

.option:hover {
    background: #f8f9fa;
}

.option.success {
    border-color: #28a745;
    color: #28a745;
}

.option.error {
    border-color: #dc3545;
    color: #dc3545;
}

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
}

.message {
    margin-bottom: 15px;
    animation: fadeIn 0.3s ease-in;
    display: flex;
    flex-direction: column;
}

.message:not(.user) .message-content {
    background-color: var(--secondary-color);
    border-top-left-radius: 4px;
}

.chat-options {
    padding: 15px;
    border-top: 1px solid var(--border-color);
}

.options-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.option-button {
    background-color: white;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9em;
    text-align: left;
    margin: 0;
    width: fit-content;
}

.option-button:hover {
    background-color: var(--primary-color);
    color: white;
}

.option-button.disabled,
.option-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    border-color: var(--border-color);
    color: var(--text-color);
    background-color: #f5f5f5;
}

.feedback-button {
    background-color: white;
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 2px;
    font-size: 0.9em;
}

.feedback-button.success {
    border-color: var(--success-color);
    color: var(--success-color);
}

.feedback-button.error {
    border-color: var(--error-color);
    color: var(--error-color);
}

.feedback-button:hover {
    filter: brightness(0.95);
}

.feedback-button.disabled,
.feedback-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    background-color: #f5f5f5;
}

.chatbot-footer {
    padding: 10px;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.restart-button {
    background-color: var(--secondary-color);
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
    color: var(--text-color);
}

.restart-button:hover {
    background-color: #E8EAED;
}

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

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .chatbot-container {
        width: 100%;
        height: 100vh;
        max-width: none;
        border-radius: 0;
        border: none;
    }
    
    .message-content {
        max-width: 90%;
    }
}

.chat-input button {
    background: #FF5DAB;
}

.chat-input button:hover {
    background: #FF3D9B;
}

.category-button {
    background: #FF5DAB;
}

.bot-message .feedback-button {
    background: #FF5DAB;
} 