/* 基本重置與字體設定 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Microsoft JhengHei", Arial, sans-serif;
    background-color: #f4f7f6;
    color: #333;
    padding: 20px;
}

/* 主容器置中與最大寬度 */
.container {
    max-width: 800px;
    margin: 0 auto;
}

/* 標題樣式 */
h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #2c3e50;
}

h2 {
    margin-bottom: 15px;
    color: #34495e;
}

/* 卡片樣式設計，讓畫面看起來更乾淨 */
.card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

/* 表單樣式 */
form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

input {
    flex: 1;
    min-width: 150px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

button {
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

button:hover {
    background-color: #2980b9;
}

/* 刪除按鈕特別設定為紅色系 */
.delete-btn {
    background-color: #e74c3c;
    padding: 5px 10px;
    font-size: 14px;
}

.delete-btn:hover {
    background-color: #c0392b;
}

/* 修改數量按鈕樣式 */
.edit-btn {
    background-color: #f39c12;
    padding: 5px 10px;
    font-size: 14px;
    margin-right: 5px;
}

.edit-btn:hover {
    background-color: #d68910;
}

/* 表格樣式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

th, td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid #eee;
}

th {
    background-color: #f8f9fa;
}

/* 當沒有資料時的提示文字置中 */
.empty-message {
    text-align: center;
    color: #999;
    font-style: italic;
}

/* 頂部區塊樣式 */
.header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.header-section h1 {
    margin-bottom: 0;
}
.auth-btn {
    background-color: #27ae60;
    margin-left: 5px;
}
.auth-btn:hover {
    background-color: #2ecc71;
}

/* Modal 樣式 */
.modal-overlay {
    display: none; /* 預設隱藏 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.modal-overlay.active {
    display: flex;
}
.modal-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    width: 300px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}
.modal-content h2 {
    text-align: center;
    margin-bottom: 20px;
}
.modal-content input {
    width: 100%;
    margin-bottom: 10px;
}
.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}
.cancel-btn {
    background-color: #95a5a6;
}
.cancel-btn:hover {
    background-color: #7f8c8d;
}
