/* ===================== */
/* 字型 & 全域設定        */
/* ===================== */

html, body {
    margin: 0;
    padding: 0;
    /* 讓頁面高度充足，footer可固定在底部 */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* 原本 style_others.css 的字體先挪到這裡，
       也可以按需保留 base.html 原有 font-family 等設定 */
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: #ffffff;
}

main {
    flex: 1;
    padding: 20px 15px;
}

a {
    text-decoration: none;
    color: #333; /* 預設連結顏色，可視需求調整 */
}

a:hover {
    color: #555;
}

/* 讓 .noto-sans-tc-unique 的設定於此集中管理 */
.noto-sans-tc-unique {
    font-family: "Noto Sans TC", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
}

.noto-sans-tc-bold {
    font-family: "Noto Sans TC", sans-serif;
    font-optical-sizing: auto;
    font-weight: 600;
    font-style: normal;
}

/* ===================== */
/* Header 樣式 (以 base.html 原本為主) */
/* ===================== */
header {
    background-color: #9B90C2; /* base.html原本的 header BG */
    color: #ffffff;           /* base.html原本的 header 文字色 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;          /* 可自行調整左右 padding */
    border-bottom: 1px solid #ddd; /* 有需要可保留/移除底線 */
}

header .logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

header .logo img {
    /* 若需要固定大小可自行調整 */
    max-width: 50px;
}

header .logo h1 {
    color: #ffffff;   /* 保持白色 */
    margin-left: 10px;
    margin: 0;
    font-size: 1.8em; /* 原先可能約 1.8em */
}

.header-right {
    display: flex;
    align-items: center;
}

/* 讓每個 nav 間距和文字樣式跟 base.html 相同 */
.header-right nav {
    margin-right: 20px;
}

/* 最後一個 nav 特別 margin-left 處理可用以下方式 */
/* .header-right nav:last-child {
    margin-left: 20px;
    margin-right: 0;
} */

/* 因 base.html 中使用了 inline onmouseover / onmouseout
   控制 a:hover 變色 #FFD700, 這邊也可在CSS直接寫: */
.header-right nav a {
    color: #ffffff;
}

.header-right nav a:hover {
    color: #FFD700;
}

/* ===================== */
/* Footer 樣式 (以 base.html 原本為主) */
/* ===================== */
footer {
    background-color: #9B90C2; /* base.html原本的 footer BG */
    color: #ffffff;           /* base.html原本的 footer 文字色 */
    text-align: center;
    padding: 10px 0;          /* 可自行調整上下 padding */
    margin-top: auto;         /* 使 footer 置底 */
}

footer img {
    width: 100px;
    height: 35px;
    margin-top: 10px;
}

/* ===================== */
/* 主要內容區塊的標題等   */
/* ===================== */
main h2 {
    text-align: center;
    font-size: 1.8em;
    margin-bottom: 20px;
}

/* ===================== */
/* 操作按鈕樣式           */
/* ===================== */
.action-buttons {
    text-align: center;
    margin-bottom: 15px;
}

.action-buttons .button {
    display: inline-block;
    margin: 0 10px;
    padding: 8px 15px;
    background-color: #333333;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    /* 字型統一 */
    font-family: "Noto Sans TC", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
}

.action-buttons .button:hover {
    background-color: #555;
}

/* 下載按鈕樣式 */
.download-button {
    display: inline-block;
    margin: 0 10px;
    padding: 8px 15px;
    background-color: #4CAF50; /* 可下載時的顏色 */
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    /* 字型統一 */
    font-family: "Noto Sans TC", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
}

.download-button:disabled {
    background-color: #A9A9A9; /* 不可下載時的顏色 */
    cursor: not-allowed;
}

.download-button:hover:not(:disabled) {
    background-color: #45a049;
}

/* ===================== */
/* 表格樣式               */
/* ===================== */
table {
    width: 90%;
    border-collapse: collapse;
    margin: 20px auto;
    /* 字型統一 */
    font-family: "Noto Sans TC", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
}

table thead {
    background-color: #f2f2f2;
}

table th, table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: center;
    font-size: 1em;
}

table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* 表格內的按鈕樣式 */
.table-button {
    display: inline-block;
    margin: 5px;
    padding: 5px 15px;
    background-color: #9B90C2;
    color: #fff;
    border-radius: 4px;
    font-size: 0.9em;
    cursor: pointer;
    /* 字型統一 */
    font-family: "Noto Sans TC", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
}

.table-button:hover {
    background-color: #592C63;
    color: #fff;
}

/* 下拉式選單 */
form {
    margin-bottom: 20px;
}

select {
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
