:root {
    --primary: #3498db;
    --secondary: #27ae60;
    --danger: #e74c3c;
    --accent: #e67e22;
    --bg: #f4f7f6;
    --card-bg: #ffffff;
}

body {
    font-family: "Microsoft JhengHei", sans-serif;
    max-width: 800px;
    margin: 20px auto;
    padding: 15px;
    background-color: var(--bg);
    color: #2c3e50;
    line-height: 1.5;
}

.card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

h2 {
    border-left: 5px solid var(--primary);
    padding-left: 12px;
    font-size: 1.2rem;
    margin-top: 0;
}

.subtitle {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-bottom: 8px;
}

.divider {
    border: 0;
    border-top: 1px solid #eee;
    margin: 20px 0;
}

/* 表單樣式 */
.add-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.member-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

input[type="text"], select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

/* 按鈕樣式 */
button {
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 15px;
    transition: 0.2s;
}

.btn-main { background: var(--primary); color: white; width: 100%; font-size: 18px; }
.btn-secondary { background: var(--secondary); color: white; flex: 1; }
.btn-danger { background: var(--danger); color: white; flex: 1; }
#addBtn { background: #34495e; color: white; }

.action-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

button:hover { opacity: 0.9; transform: translateY(-1px); }

/* 結果顯示 */
.random-result {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--accent);
    text-align: center;
    margin-top: 15px;
}

.result-details {
    text-align: center;
    background: #fff9f4;
    padding: 10px;
    border-radius: 8px;
    margin-top: 10px;
    font-size: 0.9rem;
    display: none;
}

/* 表格樣式 */
.table-container { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin-top: 10px; }
th, td { border: 1px solid #eee; padding: 10px; text-align: center; }
th { background: #f8f9fa; font-size: 0.9rem; }

.member-item {
    text-align: left;
    font-size: 0.85rem;
    margin: 2px 0;
}

.status-tag {
    font-size: 12px;
    color: var(--secondary);
    float: right;
    display: none;
}

@media (max-width: 600px) {
    .member-inputs { grid-template-columns: 1fr; }
}

/* 餐點選單的外層容器 */
.meal-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

/* 放大刪除按鈕 */
.btn-delete-meal {
    background-color: #ffeded;
    color: #e74c3c;
    border: 1px solid #ffcaca;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px; /* 放大文字 */
    line-height: 1;
    transition: all 0.2s;
}

.btn-delete-meal:hover {
    background-color: #e74c3c;
    color: white;
}

/* 讓新增餐點按鈕更有型 */
.btn-add-meal {
    background-color: #f0f7ff;
    color: #2980b9;
    border: 1px dashed #2980b9;
    border-radius: 4px;
    padding: 6px 15px;
    cursor: pointer;
    font-size: 14px;
}

.btn-add-meal:hover {
    background-color: #2980b9;
    color: white;
}

body { font-family: "Microsoft JhengHei", sans-serif; background-color: #f4f7f6; padding: 20px; color: #333; }
.card { background: white; padding: 20px; border-radius: 12px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); margin-bottom: 20px; }
h2 { border-left: 5px solid #3498db; padding-left: 10px; margin-top: 0; }
.subtitle { font-size: 0.9rem; color: #666; margin-bottom: 10px; }
.divider { border: 0; border-top: 1px solid #eee; margin: 20px 0; }

/* 手動新增區塊 */
.add-form { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.add-form input { padding: 8px; border: 1px solid #ddd; border-radius: 4px; }
#newName { width: 200px; }
.member-inputs { display: flex; flex-grow: 1; gap: 10px; }

/* 按鈕樣式 */
button { cursor: pointer; border: none; border-radius: 4px; transition: 0.2s; }
.btn-main { background-color: #3498db; color: white; padding: 10px 20px; width: 100%; font-size: 16px; }
.btn-secondary { background-color: #95a5a6; color: white; padding: 8px 15px; }
.btn-danger { background-color: #e74c3c; color: white; padding: 8px 15px; }
#addBtn { background-color: #2ecc71; color: white; padding: 8px 20px; }

/* 排程表樣式 */
table { width: 100%; border-collapse: collapse; margin-top: 10px; }
th, td { border: 1px solid #eee; padding: 12px; text-align: left; }
th { background-color: #f8f9fa; }

/* 動態餐點列 */
.meal-wrapper { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.btn-delete-meal { background-color: #ffeded; color: #e74c3c; border: 1px solid #ffcaca; padding: 6px 12px; font-weight: bold; font-size: 16px; }
.btn-delete-meal:hover { background-color: #e74c3c; color: white; }
.btn-add-meal { background-color: #f0f7ff; color: #2980b9; border: 1px dashed #2980b9; padding: 6px 15px; font-size: 14px; margin-top: 5px; }

.status-tag { font-size: 0.8rem; color: #27ae60; display: none; margin-left: 10px; }
.random-result { font-size: 24px; font-weight: bold; color: #e67e22; text-align: center; margin: 20px 0; }
.result-details { text-align: center; color: #7f8c8d; }