body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f4f7f9;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.chat-container {
    width: 90%;
    max-width: 600px;
    height: 80vh;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    background-color: #007bff;
    color: white;
    padding: 1rem;
    font-size: 1.2rem;
    text-align: center;
}

#chat-window {
    flex-grow: 1;
    padding: 1.5rem;
    overflow-y: auto;
    border-bottom: 1px solid #e0e0e0;
}

.message {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
}

.message.user {
    align-items: flex-end;
}

.message.bot {
    align-items: flex-start;
}

.message-bubble {
    padding: 0.75rem 1rem;
    border-radius: 18px;
    max-width: 80%;
    line-height: 1.5;
}

.message.user .message-bubble {
    background-color: #007bff;
    color: white;
    border-bottom-right-radius: 4px;
}

.message.bot .message-bubble {
    background-color: #e9ecef;
    color: #333;
    border-bottom-left-radius: 4px;
}

.message .sender {
    font-size: 0.8rem;
    color: #666;
    margin: 0 0.5rem 0.2rem;
}

#chat-form {
    display: flex;
    padding: 1rem;
    background-color: #f8f9fa;
}

#user-input {
    flex-grow: 1;
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    margin-right: 0.5rem;
}

#user-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

button {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #0056b3;
}

/* --- 建議問題容器 --- */
#suggestions {
    padding: 0.5rem 1.5rem 1rem;
    display: flex;      /* 讓內部元素(按鈕)可以並排 */
    flex-wrap: wrap;    /* 當空間不足時，自動換行 */
    gap: 0.5rem;        /* 按鈕之間的間距 */
    justify-content: flex-start; /* (可選) 讓按鈕從左邊開始排列 */
}

/* --- 建議問題按鈕 --- */
.suggestion-btn {
    /* 外觀樣式 */
    background-color: #f1f3f5;
    color: #007bff;
    border: 1px solid #dee2e6;
    border-radius: 16px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 100px;
    
    /* 關鍵：內邊距(padding)決定了文字與邊框的距離 */
    /* 上下 0.5rem，左右 1rem。寬度由文字長度 + 左右padding決定 */
    padding: 0.5rem 1rem; 
    
    /* 沒有設定 width，所以寬度是自動的 */
    /* width: 150px; <-- 我們沒有加這一行 */
}

.suggestion-btn:hover {
    background-color: #e9ecef;
    border-color: #007bff;
}