body,
ul,
li,
h1,
h2,
h3,
h4,
h5,
h6,
p,
span {
    margin: 0;
    padding: 0;
    font-family: 'Microsoft JhengHei';
    font-size: 18px;
}
.grey {
    color: #828282;
}

body {
    position: relative;
}

header {
    background-color: #143159 !important;
    position: absolute;
    top: 0;
    z-index: 100;
}

.banner-box {
    position: relative;
}

.banner-box > h2 {
    font-size: 48px;
    color: #ffffff;
}

/* 按鈕動畫 */

.more {
    position: relative;
    display: flex;
    justify-content: center;
    width: 110px; /* 初始宽度 */
    transition: width 0.5s; /* 添加宽度的过渡效果 */
}

.move {
    position: absolute;
    transition: all 0.5s ease;
}

.arrow-img {
    right: 0px;
}

.more-text {
    letter-spacing: 2px;
}

/* 表格樣式 */

table {
    border-collapse: collapse;
}

td {
    text-align: center;
    font-weight: 700;
    letter-spacing: 2px;
    padding: 10px 20px;
    border: #ffffff 2px solid;
   
    font-size: 16px;
}
.underline {
    text-decoration: underline;
    border-radius: 1px;
}
.lightblue {
    color: #4aaecd;
}
.bg-grey {
    background-color: #f5f5f5;
}

.bg-darkgrey {
    background-color: #f4f4f4;
}

.bd-t-blue {
    border-top: #4aaecd solid 3px !important;
    border-collapse: separate;
}

.bd-t-grey {
    border-top: #d9d9d9 solid 2px !important;
}
.bd-b-grey {
    border-bottom: #d9d9d9 solid 2px !important;
}
.bd-r-grey {
    border-right: #d9d9d9 solid 2px !important;
}
.bd-l-grey {
    border-left: #d9d9d9 solid 2px !important;
}

.button {
    background: #d9d9d9;
    color: #000000;
    padding: 10px 40px;
    border-radius: 30px;
    cursor: pointer;
    transition: background-color 0.5s ease; /* 添加漸變效果 */
}

.button:hover {
    background: #5db430;
}

td > p {
    line-height: 2em;
}

@media screen and (max-width: 767px) {
    .management-container {
        width: 100%;
    }

    .management-container > nav {
        width: 100%;
        background-color: #f4f4f4;
        padding: 40px 0;
    }

    .management-container > nav > ul {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;
        gap: 16px;
    }

    .management-container > nav > ul > li {
        padding: 10px 0;
    }
    .management-container > nav > ul > li > a {
        color: #4aaecd;
        text-align: center;
        padding: 10px 20px;
        font-size: 16px;
        border-radius: 40px;
        border: #4aaecd solid 1px;
    }

    .icon {
        position: fixed;
        top: 50%;
        right: 20px;
        transform: translateY(-50%);
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        gap: 20px;
        z-index: 5;
    }
    .icon > a > img {
        max-width: 60px;
    }

    .table-box {
        width: 100%;
        overflow: auto;
    }

    .area1 {
        width: 100%;
        margin: 70px 0 0 0;
    }
    .area1 > .content {
        width: 100%;
    }
    .area1 > .content > .banner-box {
        width: 100%;
        height: 400px;
        background-image: url('/images/m-stock-banner.png');
        background-size: cover; /* 讓圖片覆蓋整個區域 */
        background-position: center; /* 讓圖片居中 */
        background-repeat: no-repeat; /* 防止圖片重複 */
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .area1 > .content > .banner-box img {
        width: 100%;
    }

    /* ----- */

    .area2 {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .area2 > .content {
        width: calc(100% - 60px);
        font-weight: 700;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .area2 > .content > .container {
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        margin: 100px 0;
        gap: 10px;
    }
    .area2 > .content > .container > span {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        margin: 0 0 30px 0;
    }

    /* 底線 */
    .area2 > .content > .container > span::after {
        content: '';
        display: block;
        width: 30px;
        height: 5px;
        background-color: #5db430;
        margin-top: 5px;
    }

    .area2 > .content > .container {
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        margin: 80px 0;
    }
    .area2 > .content > .container > p {
    }

    .area2 > .content > .container > a {
        width: fit-content;
        text-align: center;
        background-color: #5db430;
        color: #ffffff;
        padding: 10px 30px;
    }
	
	* --- 表格響應式轉換 (核心邏輯) --- */
	
	 .rules-container { width: 100%; }
    .area1 { margin: 70px 0 0 0; }

    .area2 > .content {
        width: calc(100% - 40px);
		margin: 40px auto;
    }
    .container > span {
		margin-bottom: 30px;
	}
	.container > span::after {
		content: '';
        display: block;
        width: 30px;
        height: 5px;
        background-color: #5db430;
        margin-top: 5px;
		margin-left: auto;
		margin-right: auto;
	}

    /* 1. 隱藏電腦版的表頭 */
    .rules-container .table-box thead {
        display: none;
    }

    /* 2. 把 tr 變成 Flex 容器，並允許換行 */
    .rules-container .table-box tbody tr {
        display: flex;
        flex-wrap: wrap;
        border-bottom: 1px solid #e0e0e0;
        padding-bottom: 10px;
        margin-bottom: 10px;
    }
	.rules-container .table-box tbody tr:last-child {
		border-bottom: none;
	}

    /* 3. 把 td 變成 Flex 子項目 */
    .rules-container .table-box tbody td {
        border: none;
        padding: 8px 5px;
        box-sizing: border-box; /* 避免 padding 影響寬度計算 */
        display: flex;
        align-items: center;
        white-space: normal; /* 允許文字換行 */
		font-size: 16px;
    }

    /* 4. 分配寬度：奇數 td (標題) 佔 70%，偶數 td (PDF) 佔 30% */
    .rules-container .table-box tbody td:nth-child(odd) {
        flex-basis: 70%;
        text-align: left;
        font-weight: bold;
		padding-left: 10px;
    }
    .rules-container .table-box tbody td:nth-child(even) {
        flex-basis: 30%;
        justify-content: center; /* 讓 PDF 連結置中 */
    }

    /* 5. 處理最後一行的 rowspan 特殊情況 */
    .rules-container .table-box tbody tr td[rowspan="2"] {
        flex-basis: 70%; /* 同樣設定寬度 */
		text-align: left;
		padding-left: 10px;
		align-self: center; /* 讓它在交叉軸置中 */
    }
	
	
	
	
	
	
	
	
	
}

@media screen and (min-width: 768px) {
    .management-container {
        width: 100%;

    }

    .management-container > nav {
        width: 100%;
        background-color: #f4f4f4;
        padding: 40px 0;
    }

    .management-container > nav > ul {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .management-container > nav > ul > li {
        padding: 10px 30px;
    }
    .management-container > nav > ul > li > a {
        color: #4aaecd;
        text-align: center;
        padding: 10px 30px;
        font-size: 18px;
        border-radius: 20px;
        border: #4aaecd solid 1px;
    }

    .icon {
        position: fixed;
        top: 50%;
        right: 20px;
        transform: translateY(-50%);
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        gap: 20px;
        z-index: 5;
    }
    .icon > a > img {
        max-width: 60px;
    }

    .area1 {
        width: 100%;
    }
    .area1 > .content {
        width: 100%;
    }
    .area1 > .content > .banner-box {
        width: 100%;
        height: 500px;
        background-image: url('/images/stock-banner.png');
        background-size: cover; /* 讓圖片覆蓋整個區域 */
        background-position: center; /* 讓圖片居中 */
        background-repeat: no-repeat; /* 防止圖片重複 */
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .area1 > .content > .banner-box img {
        width: 100%;
    }
    /* ----- */

    .area2 {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .area2 > .content {
        max-width: 1280px;
        width: calc(100% - 400px);
        font-weight: 700;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .area2 > .content > .container {
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        margin: 100px 0;
        gap: 10px;
    }
    .area2 > .content > .container > span {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        margin: 0 0 30px 0;
    }

    /* 底線 */
    .area2 > .content > .container > span::after {
        content: '';
        display: block;
        width: 30px;
        height: 5px;
        background-color: #5db430;
        margin-top: 5px;
    }

    .area2 > .content > .container {
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        margin: 80px 0;
    }
    .area2 > .content > .container > p {
    }

    .area2 > .content > .container > a {
        width: fit-content;
        text-align: center;
        background-color: #5db430;
        color: #ffffff;
        padding: 10px 30px;
    }
}
