body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f4f7f6;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 15px;
    box-sizing: border-box;
}

.container {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 100%;
    max-width: 400px;
}

h1, h2 {
    color: #007bff;
    margin-top: 0;
}

p { color: #666; line-height: 1.6; }

/* --- ▼▼▼ 修改後的按鈕樣式 (推薦) ▼▼▼ --- */

/* 使用群組選擇器，讓兩個按鈕共享相同的基礎樣式 */
#scanButton,
#authButton {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
    margin-top: 20px;
    margin-bottom: 20px;
}

/* (可選) 如果想讓認證按鈕有不同顏色，可以單獨覆蓋 */
#authButton {
    background-color: #28a745; /* 綠色，代表安全或登入 */
}


/* 共享 hover 狀態 */
#scanButton:hover,
#authButton:hover {
    background-color: #0056b3;
}
/* 覆蓋認證按鈕的 hover 顏色 */
#authButton:hover {
    background-color: #218838;
}


/* 共享 disabled 狀態 */
#scanButton:disabled,
#authButton:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.status-box {
    margin-top: 20px;
    padding: 12px;
    border-radius: 8px;
    font-weight: bold;
    min-height: 24px;
    word-wrap: break-word;
}
.status-success { background-color: #d4edda; color: #155724; }
.status-error { background-color: #f8d7da; color: #721c24; }
.status-info { background-color: #e9ecef; color: #495057; }

#log-container {
    margin-top: 25px;
    text-align: left;
    background-color: #e9ecef;
    padding: 15px;
    border-radius: 8px;
}

#log {
    font-family: "Courier New", Courier, monospace;
    word-wrap: break-word;
    white-space: pre-wrap;
    max-height: 150px;
    overflow-y: auto;
}

.link-container {
    text-align: center;
    margin-top: 20px;
}
.link-container a {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
}
.link-container a:hover { text-decoration: underline; }

/* style.css (新增的樣式) */

.welcome-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #e9f5ff;
    padding: 8px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #b3d7ff;
}

#welcome-message {
    margin: 0;
    font-weight: bold;
    color: #004085;
}

.logout-button {
    background-color: #dc3545; /* 紅色，表示警告或結束操作 */
    color: white;
    border: none;
    padding: 8px 15px;
    font-size: 14px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.logout-button:hover {
    background-color: #c82333;
}

/* style.css (在檔案末尾新增) */

.form-group {
    text-align: left;
    margin: 15px 0;
}
.form-group label {
    font-weight: bold;
    display: block;
    margin-bottom: 8px;
}
.form-group textarea {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-sizing: border-box;
    font-family: inherit;
}
.radio-group label {
    display: inline-block;
    margin-right: 20px;
    font-weight: normal;
    cursor: pointer;
}
.radio-group input {
    margin-right: 5px;
    vertical-align: middle;
}