        :root {
            --primary: #4361ee;
            --primary-light: #4f46e5;
            --background: #f8fafc;
            --card-bg: #ffffff;
            --text-primary: #1e293b;
            --text-secondary: #64748b;
            --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        }

        @media (prefers-color-scheme: dark) {
            :root {
                --background: #0f172a;
                --card-bg: #1e293b;
                --text-primary: #f8fafc;
                --text-secondary: #94a3b8;
            }
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', system-ui, sans-serif;
        }

        body {
            background: var(--background);
            min-height: 50vh;/* 距离顶部 */
            display: grid;
            place-items: center;
            padding: 1rem;
        }

        .chat-container {
            width: 100%;
            max-width: 800px;
            height: 80vh;
            background: var(--card-bg);
            border-radius: 1.5rem;
            box-shadow: var(--shadow);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .chat-header {
            padding: 1.5rem;
            background: var(--primary);
            color: white;
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        .chat-header i {
            font-size: 1.5rem;
        }

        .chat-messages {
            flex: 1;
            padding: 1.5rem;
            overflow-y: auto;
            scroll-behavior: smooth;
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
        }

        .message {
            max-width: 80%;
            display: flex;
            gap: 1rem;
            animation: messageIn 0.3s ease-out forwards;
            opacity: 0;
            transform: translateY(20px);
        }

        @keyframes messageIn {
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .message.user {
            align-self: flex-end;
            flex-direction: row-reverse;
        }

        .message-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: var(--primary-light);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            flex-shrink: 0;
        }

        .message-bubble {
            padding: 1rem 1.5rem;
            border-radius: 1.25rem;
            line-height: 1.5;
            position: relative;
            max-width: 600px;
        }

        .message.bot .message-bubble {
            background: rgba(var(--primary), 0.1);
            color: var(--text-primary);
            border-radius: 1.25rem 1.25rem 1.25rem 0.5rem;
        }

        .message.user .message-bubble {
            background: var(--primary);
            color: white;
            border-radius: 1.25rem 1.25rem 0.5rem 1.25rem;
        }

        .input-area {
            padding: 1.5rem;
            border-top: 1px solid rgba(0, 0, 0, 0.1);
            background: var(--card-bg);
            display: flex;
            gap: 1rem;
        }

        .input-wrapper {
            flex: 1;
            position: relative;
        }

        #user-input {
            width: 100%;
            padding: 1rem 1.5rem;
            border: none;
            border-radius: 1rem;
            background: rgba(var(--primary), 0.05);
            color: var(--text-primary);
            font-size: 1rem;
            transition: all 0.2s;
        }

        #user-input:focus {
            outline: none;
            box-shadow: 0 0 0 2px var(--primary);
        }

        button {
            padding: 1rem 1.5rem;
            border: none;
            border-radius: 1rem;
            background: var(--primary);
            color: white;
            cursor: pointer;
            transition: transform 0.1s;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        button:hover {
            background: var(--primary-light);
        }

        button:active {
            transform: scale(0.98);
        }

        .typing-indicator {
            padding: 1rem;
            color: var(--text-secondary);
            display: none;
            gap: 0.5rem;
            align-items: center;
        }

        .typing-dots {
            display: flex;
            gap: 0.25rem;
        }

        .typing-dot {
            width: 6px;
            height: 6px;
            background: var(--text-secondary);
            border-radius: 50%;
            animation: typing 1.4s infinite;
        }

        @keyframes typing {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-4px); }
        }

        @media (max-width: 768px) {
            .chat-container {
                height: 95vh;
                border-radius: 1rem;
            }
            
            .message-bubble {
                max-width: 85%;
            }
        }
        

.product-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    padding: 1rem 0;
}

.product-card {
    background: var(--card-bg);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-4px);
}

.product-image {
    width: 180px;
    height: 180px;
    margin: 0 100px;
    object-fit: cover;
}

.product-info {
    padding: 1rem;
}

.product-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.product-price {
    color: var(--primary);
    font-size: 1.25rem;
    font-weight: 700;
}

.product-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

.product-link {
    display: block;
    text-align: center;
    padding: 0.5rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    margin-top: 1rem;
}