/* 全局樣式 */
body {
    font-family: 'Microsoft YaHei', 'Noto Sans CJK SC', sans-serif;
    background-color: #1a1a1a;
    color: #d6d6d6;
    margin: 0;
    padding: 20px;
    line-height: 1.6;
}

/* 標題樣式 */
h3 {
    text-align: center;
    color: #d6d6d6;
    font-size: 24px;
    margin: 20px 0;
}

/* 表格樣式 */
table {
    width: 100%;
    max-width: 1025px;
    margin: 0 auto;
    border-collapse: collapse;
    background-color: #300000;
    color: #d6d6d6;
    font-size: 16px;
    border: 2px solid #000000; /* 保留黑色外框 */
}

/* 表格單元格樣式 */
td {
    padding: 15px;
    text-align: center;
    vertical-align: middle;
    border: 2px solid #000000; /* 保留單元格黑色邊框 */
}

/* 黑色背景的單元格 */
td[bgcolor="#181818"] {
    background-color: #181818;
}

/* 紅色背景的單元格 */
td[bgcolor="#300000"] {
    background-color: #300000;
}

/* 文字顏色 */
font[color="orange"] {
    color: #ff8c00;
}

font[color="red"] {
    color: #ff0000;
}



/* 左對齊單元格，帶內邊距 */
td[align="left"] {
    text-align: left;
    padding-left: 10%;
}

/* 圖片間距 */
td[align="center"] img + img {
    margin-left: 5px;
}

/* 確保文字和圖片垂直對齊 */
td[align="center"] {
    display: table-cell;
    vertical-align: middle;
}

.btn-group {
    width: 100%; /* 確保按鈕組滿寬 */
}
.btn-group button {
    background-color: #252525; /* 綠色背景 */
    border: 1px solid black; /* 綠色邊框 */
    color: white; /* 白文字 */
    padding: 10px 24px; /* 與範例一致的內距 */
    cursor: pointer; /* 手型游標 */
    float: left; /* 水平排列 */
    font-size: 0.875rem; /* 保持原字體大小 */
    transition: background-color 0.2s ease; /* 懸停平滑過渡 */
}
.btn-group:after {
    content: "";
    clear: both;
    display: table; /* 清除浮動 */
}
.btn-group button:not(:last-child) {
    border-right: none; /* 防止雙邊框 */
}
/* 懸停效果 */
.btn-group button:hover {
    background-color: #3e8e41; /* 懸停變深綠色 */
}

.btn-group button:disabled {
    background: #444444;
    cursor: not-allowed;
    opacity: 0.6;
}

:root {
    --primary-color: #afafaf; /* 主要文字顏色 */
    --navbar-bg: #300000; /* 導航欄背景色 */
    --highlight-color: #c8b478; /* 高亮顏色 */
    --button-color: #800000c0; /* 按鈕預設紅色 */
    --button-hover-color: #3e8e41; /* 懸停時綠色 */
}

        /* 右下角浮動按鈕 */
        .scroll-to-top {
            position: fixed;
            bottom: 20px;
            right: 20px;
            width: 50px;
            height: 50px;
            background-color: var(--button-color); /* 紅色 */
            color: #fff; /* 白色箭頭 */
            border: none;
            border-radius: 50%; /* 圓形 */
            font-size: 1.5rem;
            font-weight: bold;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
            transition: background-color 0.3s ease, transform 0.3s ease;
            z-index: 1000;
        }

        .scroll-to-top:hover {
            background-color: var(--button-hover-color); /* 懸停時綠色 */
            transform: scale(1.1); /* 輕微放大效果 */
        }


/* 響應式設計 */
@media screen and (max-width: 768px) {
    /* 手機端字體大小縮小 */
/* 響應式設計 */
@media screen and (max-width: 768px) {
    /* 手機端字體大小調整 */
    body {
        padding: 0.6rem; /* 原 10px = 10 ÷ 16 = 0.625rem */
        font-size: 0.8rem; /* 原 13px = 13 ÷ 16 = 0.8125rem */
    }

    h3 {
        font-size: 1rem; /* 原 18px = 18 ÷ 16 = 1.125rem */
    }

    table {
        font-size: 0.8rem; /* 原 13px = 13 ÷ 16 = 0.8125rem */
        width: 100%;
        border: 0.06rem solid #000000; /* 原 1px = 1 ÷ 16 = 0.0625rem */
    }

    /* 單元格內邊距縮小 */
    td {
        padding: 0.5rem; /* 原 8px = 8 ÷ 16 = 0.5rem */
        border: 0.06rem solid #000000; /* 原 1px = 1 ÷ 16 = 0.0625rem */
    }

    /* 左對齊單元格內邊距縮小 */
    td[align="left"] {
        padding-left: 5%;
    }



    /* 調整單元格寬度以適應小屏幕 */
    td[width="50%"] {
        width: 50%;
        box-sizing: border-box;
    }

    /* 圖片容器 */
    td[align="center"] {
        text-align: center;
        vertical-align: middle;
    }
    .btn-group button {
        font-size: 0.75rem;
        padding: 8px 16px; /* 手機端縮小內距 */
    }

    .scroll-to-top {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }    
}
}