body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    padding: 20px;
    background-color: #f4f7f6;
}

h1 {
    color: #333;
}

/* 標籤容器，使用 Flexbox 讓標籤自動換行排列 */
.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px; /* 標籤之間的間距 */
    margin-bottom: 25px;
}

/* 每個標籤的容器 (我們用 label 標籤) */
.tag-item {
    position: relative; /* 關鍵！讓內部的 checkbox 可以相對於它定位 */
    display: inline-block;
    background-color: #ffffff;
    border: 2px solid #ddd;
    border-radius: 20px;
    padding: 8px 15px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    user-select: none; /* 讓文字無法被選取，點擊體驗更好 */
    padding-right: 30px; /* 右邊留出空間給 checkbox */
}

/* 標籤內的 checkbox */
.tag-item input[type="checkbox"] {
    position: absolute; /* 關鍵！讓 checkbox 脫離文檔流 */
    top: -5px;          /* 定位到右上角 */
    right: -5px;
    
    /* 讓 checkbox 變大一點比較好點擊 */
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* 當 checkbox 被勾選時，改變標籤的樣式 */
.tag-item input[type="checkbox"]:checked + span {
    color: #007bff;
    font-weight: bold;
}

/* 也可以直接改變整個 label 的邊框 */
.tag-item:has(input[type="checkbox"]:checked) {
    border-color: #007bff;
    background-color: #e7f3ff;
}

/* 提交按鈕樣式 */
.submit-btn {
    padding: 12px 25px;
    font-size: 16px;
    color: #fff;
    background-color: #28a745;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.submit-btn:hover {
    background-color: #218838;
}

.input-group {
    margin-top: 20px;
    margin-bottom: 25px;
}

.input-group label {
    font-weight: bold;
    margin-right: 10px;
}

.input-group input[type="number"] {
    padding: 8px;
    font-size: 16px;
    width: 100px;
    border: 1px solid #ccc;
    border-radius: 4px;
}