body {
    font-family: 'Roboto', sans-serif;
    background-color: #f0f4f8;
    margin: 0;
    padding: 20px;
}

.chatbot-container {
    max-width: 400px;
    margin: 0 auto;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.chatbot-header {
    background-color: #0073aa;
    color: #fff;
    padding: 10px;
    text-align: center;
}

.chatbot-messages {
    height: 300px;
    overflow-y: auto;
    padding: 10px;
    border-bottom: 1px solid #ccc;
}

.chatbot-input {
    display: flex;
    padding: 10px;
}

.chatbot-input input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.chatbot-input button {
    padding: 10px;
    background-color: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.chatbot-input button:hover {
    background-color: #005177;
}

.message {
    margin: 5px 0;
}

.message.user {
    text-align: right;
    color: #0073aa;
}

.message.bot {
    text-align: left;
    color: #333;
}

/* Chatbot container styling */
#ccp-chatbot {
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
    background-color: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

/* Chat window styling */
#ccp-chat-window {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#ccp-messages {
    width: 100%;
    min-height: 100px;
    max-height: 300px;
    padding: 15px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-family: 'Consolas', monospace;
    font-size: 14px;
    line-height: 1.5;
    overflow-y: auto;
    margin-top: 15px;
    position: relative;
}

/* Copy button styling */
.copy-button {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 6px 12px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    opacity: 0.9;
    transition: all 0.2s ease;
    z-index: 10;
}

.copy-button:hover {
    opacity: 1;
    transform: translateY(-1px);
}

/* Input and button styling */
#ccp-user-input {
    width: 100%;
    min-height: 80px;
    padding: 12px 15px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-family: 'Consolas', monospace;
    font-size: 14px;
    resize: vertical;
    margin-bottom: 15px;
    transition: border-color 0.2s ease;
}

#ccp-user-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

#ccp-send-button {
    width: 150px;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: block;
    margin: 0 auto;
}

#ccp-send-button:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
}

#ccp-send-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* User and bot messages */
.ccp-user-message, .ccp-bot-message {
    font-family: monospace;
    margin: 5px 0;
}

.ccp-bot-message code {
    display: block;
    width: 100%;
}

/* New sections styling */
.ccp-sections-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

.ccp-section {
    margin-bottom: 40px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 25px;
    box-sizing: border-box;
    width: 100%;
}

#ccp-explainer, #ccp-debugger {
    width: 100%;
    background-color: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#ccp-formula-input, #ccp-debug-input {
    width: calc(100% - 2px);
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
}

#ccp-formula-input:focus, #ccp-debug-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

#ccp-explanation-result, #ccp-debug-result {
    width: calc(100% - 2px);
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
    min-height: 100px;
    max-height: 300px;
    padding: 15px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-family: 'Consolas', monospace;
    font-size: 14px;
    line-height: 1.5;
    overflow-y: auto;
    margin-top: 15px;
    position: relative;
}

#ccp-explain-button, #ccp-debug-button {
    width: 150px;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: block;
    margin: 0 auto;
}

#ccp-explain-button:hover, #ccp-debug-button:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
}

#ccp-explain-button:disabled, #ccp-debug-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

.loading {
    color: #666;
    font-style: italic;
}

.error {
    color: #dc3545;
    padding: 10px;
    border-radius: 4px;
    background-color: #fff;
    border: 1px solid #dc3545;
    margin: 10px 0;
}

/* Force all elements to respect box sizing */
*, *:before, *:after {
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .ccp-sections-container {
        padding: 10px;
    }
    
    .ccp-section {
        padding: 15px;
    }
    
    #ccp-send-button, #ccp-explain-button, #ccp-debug-button {
        width: 100%;
    }
}