﻿/* Toàn bộ CSS của bạn đã được tối ưu */
        body {
            font-family: 'Segoe UI', sans-serif;
            background-color: #f0f2f5;
        }

        /* Nút Icon tròn - Góc trên bên phải */
        #chat-icon {
            position: fixed;
            top: 20px;
            right: 20px;
            width: 60px;
            height: 60px;
            background-color: #0084ff;
            border-radius: 50%;
            display: none; /* Hiện sau 2s */
            align-items: center;
            justify-content: center;
            font-size: 30px;
            color: white;
            cursor: pointer;
            box-shadow: 0 4px 15px rgba(0,0,0,0.2);
            z-index: 2000;
            transition: transform 0.3s;
        }
        #chat-icon:hover { transform: scale(1.1); }

        /* Container Chat - Góc trên bên phải */
        #chat-container {
            display: none; 
            position: fixed;
            top: 90px; 
            right: 20px;
            width: 350px;
            height: 500px;
            background: white;
            border-radius: 15px;
            box-shadow: 0 8px 24px rgba(0,0,0,0.15);
            flex-direction: column;
            z-index: 1999;
            overflow: hidden;
            animation: fadeIn 0.4s ease-out;
        }

        #chat-header {
            background: #0084ff;
            color: white;
            padding: 15px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-weight: bold;
        }

        #close-chat {
            background: rgba(255,255,255,0.2);
            border: none;
            color: white;
            width: 30px;
            height: 30px;
            border-radius: 50%;
            cursor: pointer;
            font-size: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        #chat-box {
            flex: 1;
            padding: 15px;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 10px;
            background: #fff;
        }

        /* Bong bóng chat */
        .message {
            max-width: 80%;
            padding: 10px 15px;
            border-radius: 18px;
            font-size: 14px;
            line-height: 1.4;
        }
        .user-message { align-self: flex-end; background: #0084ff; color: white; border-bottom-right-radius: 4px; }
        .bot-message { align-self: flex-start; background: #e4e6eb; color: #050505; border-bottom-left-radius: 4px; }

        /* Input area */
        .input-area {
            display: flex;
            padding: 10px;
            border-top: 1px solid #eee;
        }
        #user-input { flex: 1; border: none; padding: 10px; outline: none; }
        #send-button { background: #0084ff; color: white; border: none; padding: 10px 15px; border-radius: 8px; cursor: pointer; }

        /* Form đặt hàng */
        #order-form {
            display: none;
            position: fixed;
            top: 90px;
            right: 390px;
            width: 300px;
            background: white;
            border-radius: 15px;
            box-shadow: 0 10px 25px rgba(0,0,0,0.1);
            z-index: 2001;
            overflow: hidden;
        }
        .order-form-content { padding: 20px; }
        #order-form h3 { background: #0084ff; color: white; margin: 0; padding: 15px; font-size: 16px; text-align: center; }
        #order-form input { width: 100%; padding: 10px; margin: 10px 0; border: 1px solid #ddd; border-radius: 8px; box-sizing: border-box; }
        #submit-order { width: 100%; padding: 12px; background: #28a745; color: white; border: none; border-radius: 8px; cursor: pointer; font-weight: bold; }

        /* Hiệu ứng gõ */
        .typing { align-self: flex-start; background: #e4e6eb; padding: 10px 15px; border-radius: 18px; display: none; }
        .typing span { height: 8px; width: 8px; background: #90949c; border-radius: 50%; display: inline-block; margin: 0 1px; animation: bounce 1s infinite; }
        .typing span:nth-child(2) { animation-delay: 0.2s; }
        .typing span:nth-child(3) { animation-delay: 0.4s; }

        @keyframes bounce { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-5px); } }
        @keyframes fadeIn { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
    </style>