html {
    scroll-behavior: smooth;
}


/* span setting */

.text-bold {
    font-weight: bold;
}

body {
    margin: 0;
    padding: 0;
}

.link:hover {
    cursor: pointer;
}

nav ul {
    margin: 0;
}

.name_img{
    width: 40%;
}

nav li {
    list-style-type: none;
    float: left;
}

#main_logo {
    position: relative;
    z-index: 1;
    margin-bottom: 400px;
}

#main_bottom {

    position: absolute;
    bottom: 0;
    left: 0;
    margin-bottom: -300px;
}


/* sponsor */
/* 贊助商列表 */
.sponsorList {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem;
    justify-content: center;
}

/* 贊助商圖片容器 */
.sponsor {
    flex: 1 1 260px;
    /* 增加最小寬度 */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 贊助商圖片 */
.sponsor img {
    width: 100%;
    max-width: 260px;
    max-height: 156px;
    /* 增加30% */
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

/* 懸停效果 */
.sponsor img:hover {
    transform: scale(1.1);
}

/* information table */

.master-information {
    list-style-type: none;
    text-align: left;
}

.master-information li {
    margin-bottom: 1rem;
}


/* tab */

.tab {
    display: flex;
    justify-content: center;
}


/* Style the buttons inside the tab */

.tab_container {
    display: grid;
    padding: 0 3rem;
}

.tab button {
    width: 14%;
}

.tab button:first-child {
    background-color: inherit;
    float: left;
    border: none;
    outline: none;
    cursor: pointer;
    /* padding: 14px 16px; */
    /* transition: 0.3s; */
    /* font-size: 17px; */
    /* border-radius: 5px 5px 0 0; */
    /* border: 1px black solid; */
    /* margin-right: 0.5rem; */
}

.tab_btn {
    position: relative;
    width: 100%;
}

.tab button:not(:first-child) {
    background-color: inherit;
    float: left;
    border: none;
    outline: none;
    cursor: pointer;
    /* padding: 14px 16px; */
    /* transition: 0.3s; */
    /* font-size: 17px; */
    /* border-radius: 5px 5px 0 0; */
    /* border: 1px black solid; */
    /* margin: 0 0.5rem; */
}


/* Change background color of buttons on hover */


/* .tab button:hover {
    background-color: #ddd;
} */


/* Create an active/current tablink class */


/* .tab button.active {
    border-left: 1px black solid;
    border-right: 1px black solid;
    border-top: 1px black solid;
    border-bottom: 1px white solid;
    border-radius: 5px 5px 0 0;
} */


/* Style the tab content */

.tab_content {
    /* background: url("/material/master/background.png") no-repeat center; */
    /* background-size: 100% 100%; */
    border-radius: 15px;
    background: rgb(255, 255, 255);
    background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(150, 188, 191, 1) 100%);
    padding: 1.5rem;
    /* display: none; */
}

.tabcontent {
    display: none;
    text-align: center;
    font-size: 18px;
}

.tabcontent table,
th,
td {
    margin: auto;
    text-align: left;
    border: 1px solid black;
    border-collapse: collapse;
    font-size: 18px;
    /* border-top: none; */
}

.tabcontent ul {
    list-style: none;
}

.tabcontent ol li,
.tabcontent ul li {
    text-align: left;
    margin-bottom: 0.5rem;
}

.tabcontent ul li::before {
    content: "•";
    color: black;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

.rulebook th,
td {
    font-size: 18px;
    padding: 0.5rem;
}

.skill th,
td {
    font-size: 18px;
    padding: 0.5rem;
}


/* 滑鼠浮動特效 */

nav li a {
    padding: 0 20px;
    text-decoration: none;
    color: white;
    font-size: 20px;
}

header {
    height: 100px;
    padding: 1.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.title {
    font-weight: bold;
    font-size: 40px;
}

.link_info {
    align-self: flex-end;
    z-index: 5;
    margin-bottom: 3rem;
    font-size: 60px;
}

.subtitle {
    font-weight: bold;
    text-align: center;
    font-size: 25px;
}

#live .container table {
    margin-left: auto;
    margin-right: auto;
    font-size: 20px;
}

#live .container table {
    margin-left: auto;
    margin-right: auto;
    border-spacing: 30px;
}

.information-button {
    margin: 0 30px;
}

#live_cloud_img {
    position: absolute;
    left: 50%;
    opacity: 0;
    height: 150px;
}

.info_cloud_img {
}

.click_img_cred:hover {
    animation: rotate360 4s linear infinite;
}

.information-button:hover {
    /* box-shadow: 0px 0px 20px black; */
}

.link_doc {
    display: flex;
    justify-content: center;
    margin-top: 50px;
    margin-bottom: 100px;
}

footer {
    text-align: center;
}

#contact_us {
    text-align: left;
    margin: 50px auto;
    font-size: 20px;
    display: flex;
    justify-content: space-between;
}

.contact_icon {
    display: flex;
    white-space: nowrap;
    margin: 0 20px;
}

.contact_icon img {
    width: 30px;
    object-fit: contain;
}

.click_icon {
    margin: 40px;
}


/* animation */

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: scale(0.7);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.fadeIn-show {
    animation: fadeIn ease 2s;
}

@keyframes rotate360 {
    100% {
        transform: rotateY(360deg);
    }
}


/* animation */


/* mobile */

@media only screen and (max-width: 1500px) {
    .tab {
        flex-wrap: wrap;
    }

    .tab button {
        width: 25%;
    }
}


/* Extra large devices (large laptops and desktops, 1200px and up) */

@media only screen and (max-width: 1200px) {
    .tab {
        flex-wrap: wrap;
    }

    .tab button {
        width: 28%;
    }

    .tab_btn {
        
    }

    /*
    .tab_container {
        display: flex;
        padding: 0 1rem;
    } */
    /* .tab_content {
        position: relative;
        top: 1px;
        right: 1px;
        overflow-x: scroll;
    }
    .tabcontent {
        width: 1000px;
    } */
    /* .tab button:first-child {
        width: 125px;
        margin: 0 0 0.5rem 0;
        border-radius: 5px 0 0 5px;
    }
    .tab button:not(:first-child) {
        margin: 0.5rem 0;
        border-radius: 5px 0 0 5px;
    }
    .tab button.active {
        border-left: 1px black solid;
        border-right: 1px white solid;
        border-top: 1px black solid;
        border-bottom: 1px black solid;
        border-radius: 5px 0 0 5px;
    } */
    #contact_us {
        flex-direction: column;
        margin: 1rem auto;
    }

    .contact_icon {
        margin: 1rem;
    }

    .click_icon {
        margin: 1rem;
    }

    .link_doc {
        padding: 0 5%;
        flex-direction: column;
    }

    .information-button {
        margin: 0rem 0;
    }

    #main_logo {
        position: relative;
        z-index: 1;
        margin-bottom: 250px;
    }

    #main_bottom {

        position: absolute;
        bottom: 0;
        left: 0;
        margin-bottom: -50px;
    }
}

@media only screen and (max-width: 768px) {
    header {
        padding: 1.5rem 1rem;
    }

    .tab button {
        width: 40%;
    }

    .tab_container {
        padding: 0 1rem;
    }

    .link_doc {
        margin-bottom: 0px;
    }

    .sponsorList {
        gap: 0.8rem;
        padding: 0.5rem;
    }

    .sponsor {
        flex: 1 1 180px;
    }

    .sponsor img {
        max-width: 180px;
        max-height: 130px;
    }

    #main_logo {
        position: relative;
        z-index: 1;
        margin-bottom: 150px;
    }

    #main_bottom {

        position: absolute;
        bottom: 0;
        left: 0;
        margin-bottom: -50px;
    }
}

@media only screen and (max-width: 500px) {
    .link_info {
        align-self: flex-end;
        z-index: 5;
        margin-top: 5rem;
        font-size: 40px;
    }

    .tab button {
        width: 50%;
    }

    .link_doc {
        padding: 0;
    }

    .sponsorList {
        gap: 0.5rem;
        padding: 0.3rem;
    }

    .sponsor {
        flex: 1 1 150px;
    }

    .sponsor img {
        max-width: 150px;
        max-height: 104px;
    }

    #main_logo {
        position: relative;
        z-index: 1;
        margin-bottom: 0px;
    }

    #main_bottom {

        position: absolute;
        bottom: 0;
        left: 0;
        margin-bottom: -200px;
    }
}

/* ==========================================
   Responsive Navigation
========================================== */

/* 桌面版 nav 樣式（原本的） */
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.5rem;
    /* 項目之間距離 */
}

.main-nav li a {
    color: black;
    /* 依你原本顏色調整 */
    text-decoration: none;
    font-size: 1.1rem;
}

/* 漢堡按鈕 - 預設隱藏 */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: black;
    /* 依主題改顏色 */
    border-radius: 2px;
    transition: all 0.3s;
}

/* 手機版（768px 以下） */
@media (max-width: 1240px) {

    .menu-toggle {
        display: flex;
    }

    .main-nav {
        position: absolute;
        top: 120px;
        left: 0;
        width: 100%;
        background: #ffeb99;
        /* 跟 header 背景一致 */
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s ease;
        z-index: 999;
        padding: 1rem 0;
    }

    .main-nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .main-nav li a {
        font-size: 1.3rem;
        padding: 0.5rem 1rem;
        display: block;
    }

    /* 漢堡變 X */
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
}

/* Logo 樣式 */
header a img {
    display: block;
    /* 避免底部空白 */
    object-fit: contain;
    /* 保持比例，不裁剪 */
}

/* 手機版調整 */
@media (max-width: 768px) {
    header a img {
        max-height: 60px;
        /* 手機時縮小，但保持比例 */
    }

    /* 調整 header padding，讓 logo 不擠 */
    header>div {
        padding: 0 15px;
    }
}