.custom-gpt-chat-container {
    max-width: 800px;
    margin: 20px auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.custom-gpt-chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.custom-gpt-chat-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.custom-gpt-clear-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.custom-gpt-clear-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.custom-gpt-messages {
    height: 400px;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

.custom-gpt-messages::-webkit-scrollbar {
    width: 6px;
}

.custom-gpt-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.custom-gpt-messages::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.custom-gpt-messages::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.custom-gpt-welcome {
    text-align: center;
    color: #666;
    padding: 40px 20px;
}

.custom-gpt-welcome p {
    font-size: 16px;
    margin: 0;
}

.message {
    margin-bottom: 20px;
    display: flex;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.user {
    justify-content: flex-end;
}

.message-content {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 18px;
    word-wrap: break-word;
    line-height: 1.5;
}

.message.user .message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.message.assistant .message-content {
    background: white;
    color: #333;
    border: 1px solid #e0e0e0;
    border-bottom-left-radius: 4px;
}

.message.assistant .message-content pre {
    background: #f5f5f5;
    padding: 10px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 10px 0;
}

.message.assistant .message-content code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 14px;
}

.custom-gpt-input-container {
    display: flex;
    padding: 15px;
    background: white;
    border-top: 1px solid #e0e0e0;
    gap: 10px;
    align-items: flex-end;
}

#custom-gpt-input {
    flex: 1;
    border: 2px solid #e0e0e0;
    border-radius: 24px;
    padding: 12px 20px;
    font-size: 15px;
    resize: none;
    font-family: inherit;
    transition: border-color 0.3s;
}

#custom-gpt-input:focus {
    outline: none;
    border-color: #667eea;
}

.custom-gpt-send-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
}

.custom-gpt-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.custom-gpt-send-btn:active {
    transform: scale(0.95);
}

.custom-gpt-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.send-icon {
    font-size: 18px;
}

.custom-gpt-loading {
    padding: 10px 20px;
    text-align: center;
}

.loading-dots {
    display: inline-flex;
    gap: 6px;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #667eea;
    animation: bounce 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

@media (max-width: 768px) {
    .custom-gpt-chat-container {
        margin: 10px;
        border-radius: 8px;
    }
    
    .custom-gpt-messages {
        height: 300px;
    }
    
    .message-content {
        max-width: 85%;
    }
}