* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: sans-serif;
}

.menu::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: -1;
    /* 不要蓋到內容 */
}

.menu-links .btn {
    display: block;
    width: 194px;
    height: 76px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    cursor: pointer;

}

@media (max-width: 1200px) {
    .menu-toggle {
        color: #FFE083;
        display: block !important;
        margin-left: auto;
        z-index: 1000;
        cursor: pointer;
    }

    .menu-links {
        display: flex;
        /* 必須為 flex 才能排成一列 */
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        flex-direction: column;
        align-items: center;
        padding: 50px 0;
        gap: 12px;
        background-color: rgba(28, 29, 41, 0.9);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);

        transform: translateY(-100%);
        opacity: 0;
        transition: transform 0.4s ease, opacity 0.3s ease;
        z-index: 998;
        pointer-events: none;
        /* 隱藏時不可點擊 */
    }

    .menu-links.show {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }
}

/*返回頂部*/
.backtop {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 104px;
    height: 104px;
    background-image: url("/img/backtop.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border: none;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

/* 顯示按鈕用 */
.backtop.show {
    opacity: 1;
    pointer-events: auto;
}

/* 桌機懸停縮小 */
@media (hover: hover) and (pointer: fine) {
    .backtop:hover {
        transform: scale(0.95);
    }
}

/* 手機：按鈕尺寸變小 + 點擊縮小效果 */
@media (hover: none),
(max-width: 768px) {
    .backtop {
        width: 56px;
        height: 56px;
    }

    .backtop:active {
        transform: scale(0.85);
    }
}

.logo-link {
    display: inline-block;
}

.AvectorLOGO {
    height: 100%;
    /* 或給固定尺寸 */
    max-height: 60px;
    /* 自訂，避免放大超出 menu */
    display: block;
    /* 移除底部空隙 */
    object-fit: contain;
    /* 保持比例 */
}

@media (max-width: 768px) {
    .AvectorLOGO {
        max-height: 40px;
    }
}


/* 下載專區說明 */
.frame_all {
    padding: 0 0 1% 0;
}

.frameBG {
    width: 100%;
    background-color: #FDF2D0;
    display: flex;
    align-items: center;
    /* 垂直置中 */
    justify-content: center;
    /* 水平置中 */
    position: relative;
    z-index: 0;
    /* 確保在線條之下 */
    padding: 3px 0;
}

.download-text {
    display: flex;
    flex-direction: column;
    text-align: center;
    z-index: 1;
    /* 在 frameBG 內容中略高，但低於黃線 */
    position: relative;
    margin: 10px 0;
}

.download-text p {
    color: #3F1906;
    font-weight: bold;
    font-size: clamp(1.2rem, 2vw, 1.3em);
    /*最小字, 相對字, 最大字*/
    flex-wrap: nowrap;
}

.guide-img {
    width: 171px;
    height: 59px;
    vertical-align: middle;
    margin-left: 6px;
    /* 讓圖片與文字之間有點間距，可依需要微調 */
}

@media (max-width: 768px) {
    .frame_all img[src*="/img/tag_download.webp"] {
        max-width: 200px;
        height: auto;
        /* 確保等比例縮放 */
    }

    .frameBG {
        flex-direction: column;
        align-items: center;
        /* 確保垂直排列時內容居中 */
    }

    .guide-img {
        width: 120px;
        height: auto;
    }
}

/* 下拉選單 */
#game-select {
    display: block;
    margin: 0 auto;
    padding: 0 5px;
    font-size: 1.1rem;
    height: 2em;
    line-height: 1.5em;
    text-align: center;
    border-radius: 5px;
}

/* 遊戲資訊區域 */
.game-section {
    /* 新增的父容器樣式 */
    display: none;
    /* 預設隱藏，由 JS 控制顯示 */
    width: 100%;
    flex-direction: column;
    justify-content: flex-start;
}

.LOGO-wrapper {
    max-width: 30%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 5% -5px 5%;
    /* 垂直留白＋水平置中 */
    pointer-events: none;
    user-select: none;
}

.LOGO-wrapper img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 遊戲版本資訊 */
.gamenews-text {
    display: flex;
    position: relative;
    flex-direction: column;
    text-align: start;
    line-height: 1.2em;
    z-index: 1;
    margin: 20px 0;
}

.gamenews-text p {
    color: #3F1906;
    font-weight: bold;
    font-size: clamp(1rem, 1.2vw, 1.2em);
    /*最小字, 相對字, 最大字*/
    flex-wrap: nowrap;
}

@media (max-width: 768px) {
    .LOGO-wrapper {
        max-width: 60%;
        margin-bottom: 12px;
    }

    .gamenews-text {
        padding: 0 5%;
        line-height: 0.8em;
        text-align: center;
    }

    .gamenews-text P {
        line-height: 1em;
    }
}

.downloadbtn {
    width: 171px;
    height: 59px;
    vertical-align: middle;
}

.downloadbtn:hover {
    cursor: pointer;
    transform: scale(0.95);
}

/* 標題背景 */
.accordion {
    width: 100%;
    max-width: 1178px;
    margin: 10px auto;
    border: none;
    box-sizing: border-box;
    padding: 0 3vw;
    /* 增加左右留白，避免貼邊 */
}

.title-icon-box {
    width: 100%;
    display: flex;
    /* 確保啟動 Flex 佈局 */
    flex-direction: row;
    /* 設定為水平排列 */
    align-items: center;
    /* 垂直居中對齊 */
    justify-content: space-between;
    /* 讓標題靠左，圖示靠右 */
}

@media (max-width: 768px) {
    .title-icon-box {
        flex-direction: column;
    }
}

.accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100px;
    max-height: 100px;
    padding: 12px 20px 12px 24px;

    background-image: url('/img/downloadtiltleBG.webp');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;

    cursor: pointer;
    color: #FFFCEF;
    box-sizing: border-box;
}

@media (max-width:768px) {
    .accordion-header {
        padding: 12px 20px 12px 10px;
    }
}

.title-text {
    display: grid;
    /* 使用 Grid 讓子元素重疊 */
    place-items: center;
    /* 水平垂直居中 */
    justify-content: flex-start;
    right: 0;
    position: relative;
    font-size: 2rem;
    font-weight: bold;
    line-height: 1;
    /* 設定固定行高，確保兩層一致 */
    text-align: center;
    word-break: break-word;
    flex: 1;
    text-align: left;
}

.title-text .fill,
.title-text .strok {
    grid-area: 1 / 1;
    /* 關鍵：兩者都放在第 1 行第 1 列，達成重疊 */
    padding: 0 5px;
    /* 留一點左右間距 */
}

.title-text .fill {
    z-index: 2;
    color: #93FF5E;
}

.title-text .strok {
    z-index: 1;
    color: transparent;
    -webkit-text-stroke: 4px #134C69;
    /* 描邊可以稍微加粗 */
}

/* 手機版自適應 */
@media (max-width: 768px) {
    .title-text {
        margin-bottom: 5px;
        font-size: 1.8rem;
        text-align: center;

    }
}

@media (max-width: 468px) {
    .title-text {
        margin-bottom: 5px;
        font-size: 1.1rem;
    }
}

.accordion-header .arrow {
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 10px solid white;
    transition: transform 0.3s ease;
    z-index: 1;
}

.accordion.active .arrow {
    transform: rotate(180deg);
}

.accordion-content {
    display: none;
    padding: 10px 0;
    color: #333;
    animation: fadeIn 0.3s ease-in-out;
}

.accordion-content table {
    width: 95% !important;
    /* 強制表格填滿父容器 */
    max-width: 100%;
    /* 防止超出 */
    table-layout: fixed;
    /* 確保 td 的百分比寬度生效 */
    word-wrap: break-word;
    /* 防止長文字撐破表格 */
}

/* 針對表格中的偶數列 (even) 設定背景顏色 */
.accordion-content table tr:nth-child(even) {
    background-color: #FFF8E2;
    /* 這裡換成您想要的顏色，例如淺灰色 */
}

/* 如果想設定奇數列 (odd) */
.accordion-content table tr:nth-child(odd) {
    background-color: #fffcef;
    /* 保持您原本的米黃色 */
}

.accordion-content img {
    width: 20vw;
    max-width: 300px;
    height: auto;
}

.accordion.active .accordion-content {
    display: block;
}

@media (max-width:768px) {
    .accordion-content img {
        width: 28vw;
        height: auto;
    }
}

.accordion-content td:nth-child(1) {
    width: 50%;
    padding: 5px;
}

.accordion-content td:nth-child(2) {
    width: 25%;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.QRcode {
    margin: auto 5px;
}

.QRcode img {
    display: block;
    width: 74px;
    height: 74px;
}

.icon {
    display: flex;
    flex-direction: row;
    /* 讓圖示本身也水平排列 */
    justify-content: center;
    align-items: center;
    width: auto;
    max-height: 70px;
    margin-right: 2px;
}

.icon img {
    min-height: 30px;
}

@media (max-width: 768px) {
    .QRcode {
        margin-right: 0;
    }

    .icon {
        margin-right: 15px;
    }

    .icon img {
        width: 20px;
        min-height: 20px;
    }
}