@charset "utf-8";
/* CSS Document */

body,
html {
    min-height: 640px;
    height: auto;
    min-height: 100vh;
    overflow-x: hidden;
    margin: 0;
    display: flex;
    flex-direction: column;
    background-image: url('/img/BGtexture.png');
    background-repeat: repeat;
    font-family: sans-serif;
}

/* --- 共通選單結構 --- */


.menu {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 8vh;
    /* 統一高度 */
    min-height: 70px;
    padding: 0 30px;
    z-index: 999;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    background-image: linear-gradient(to right, rgba(255, 254, 236, 0.8) 0%, rgba(5, 11, 25, 0.7) 40%, rgba(5, 11, 25, 0.7) 95%, rgba(133, 80, 25, 0.7) 100%);
}

/* --- 背後模糊效果 --- */
.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按鈕 */
.menu-toggle {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 28px;
    z-index: 1001;
}

/* 預設選單連結 (桌機) */
.menu-links {
    display: flex;
    gap: 20px;
    list-style: none;
}

/* 頂部連結預設水平排列 */
.menu-links {
    display: flex;
    gap: 15px;
}

/* MENU按鈕預設隱藏 */
.menu-toggle {
    display: none;
}

/* --- 手機版 RWD 共通邏輯 --- */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        /* 顯示按鈕 */
        background: none;
        border: none;
        color: #162D4A;
        font-size: 28px;
        cursor: pointer;
    }

    .menu-links {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 20px;
        gap: 15px;

        /* 定位與隱藏狀態 */
        position: fixed;
        top: 0;
        /* 從頂部開始 */
        left: 0;
        width: 100%;
        height: auto;
        min-height: 250px;

        /* 動態滑出效果 */
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
        z-index: 1000;
    }

    /* 當 JS 觸發 .show 時滑下 */
    .menu-links.show {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
}

.menu-links .btn {
    display: block;
    width: 194px;
    height: 76px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    cursor: pointer;

}

.main-content {
    flex: 1;
    min-height: calc(100vh - 100px);
    /* 確保內容區域不會太小 */
}

/* LOGO 預設靠左 */

.logo-link {
    display: inline-block;
}

.AvectorLOGO {
    width: 90%;
    height: 100%;
    /* 或給固定尺寸 */
    max-height: 60px;
    /* 自訂，避免放大超出 menu */
    min-height: 55px;
    min-width: 137px;
    display: block;
    /* 移除底部空隙 */
    object-fit: contain;
    /* 保持比例 */
}


/* 下列區塊分隔線 */
.gamelist {
    padding: 0 5vw;
    margin-bottom: 21px;
}

.yellowtag {
    display: flex;
    align-items: flex-end;
    margin-bottom: 10px;
}

.lineY {
    flex: 1;
    height: 5px;
    background: #FFBA19;
    z-index: 1;
    min-width: 0;
}

.yellowtagimg {
    transform: translateY(40%);
    flex: 0 0 auto;
    z-index: 5;
}



/* 最底部資訊 */
.footer {
    background-color: #1C1D29;
    padding-bottom: 5%;
    width: 100%;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-sizing: border-box;
    padding: 4px 8px;
    overflow: hidden;
    position: relative;
    /* 必須要有 */
    grid-template-columns: repeat(9, 1fr);
}

.footer-connect {
    width: 100%;
    padding: 1% 0;
}

.footer-links {
    gap: 6px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 4px;
    max-height: 48px;
    overflow: hidden;
}

.footer-links a,
.footer-links span {
    color: #eac04f;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    font-size: 18px;
}

/* 手機版最底部資訊 */
@media (max-width: 768px) {
    .footer {
        height: 20vh;
        padding-bottom: 5%;
    }

    .footer-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        max-height: 58px;
        line-height: 1.3;
        gap: 6px;
        max-width: 90%;
        margin: 2% auto;
    }

    .footer-links a {
        grid-template-columns: repeat(5, 1fr);
        text-align: center;
    }

    /* 隱藏「使用者合約」後面那個 */
    .footer-links span:nth-of-type(3) {
        display: none;
    }
}

.footer-links :hover,
.footer-links :hover {
    color: #FFE08C;
}

.footer-copyright {
    color: #8F94B3;
    font-size: 12px;
    line-height: 1.2;
    max-height: 36px;
    overflow: hidden;
}

.footer-images {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
    position: relative;
    /* 必加：讓 z-index 有作用 */
    z-index: 1;
    /* 確保圖片比 footer 高 */
    transform: translateY(18%);
}

.footer-images img {
    width: 20vw;
    height: auto;
    max-width: 382px;
}

@media (max-width: 768px) {
    .footer-images {
        display: none;
    }
}

/* 遮罩背景 */
.modal-overlay {
    display: none;
    /* 預設隱藏 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;

    /* --- 核心置中設定 --- */
    align-items: center;
    /* 垂直置中 */
    justify-content: center;
    /* 水平置中 */
}

.modal-content {
    position: relative;
    width: 100vw;
    max-width: 713px;
    /* 移除原本可能干擾置中的 top 或 transform */
    top: auto;
    margin: 0;
}

/* 背景圖容器 */
.card-box {
    background-image: url("/img/card.png");
    width: 100%;
    min-width: 357px;
    aspect-ratio: 713 / 509;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    position: relative;
    /* 新增：定義此容器為查詢對象，讓文字能根據容器寬度縮放 */
    container-type: inline-size;
}

/* LOGO 容器：負責撐開高度與設定間距 */
.logo-wrapper {
    width: 100%;
    min-width: 430px;
    position: relative;
    display: flex;
    justify-content: flex-start;
    /* 確保 LOGO 在左邊 */
    margin-bottom: -30px;
    z-index: 15;
}

.modal-logo {
    width: 30%;
    /* 您設定的寬度 */
    height: auto;
    display: block;
    transition: opacity 0.3s ease;
}

.logo-Nitw {
    width: 30%;
}

.logo-itw {
    width: 60%;
    top: 5px;
}

.logo-big2 {
    width: 50%;
    margin-bottom: -20px;
}

.logo-tan9 {
    width: 40%;
    margin-bottom: -10px;
}

.logo-13card {
    width: 50%;
    margin-bottom: -10px;
}

.logo-solitaire {
    width: 40%;
    margin-bottom: -10px;
}

.logo-TexasHoldem {
    width: 35%;
    margin-top: 10px;
    margin-bottom: -15px;
}

.logo-darkchess {
    width: 40%;
    margin-bottom: -10px;
}

.logo-blackJack {
    width: 45%;
}

.logo-red {
    width: 40%;
    margin-bottom: -10px;
}

@media (max-width:512px) {
    .modal-logo {
        margin-bottom: 10px;
    }

    .logo-big2 {
        margin-bottom: -3px;
    }

    .logo-13card {
        width: 45%;
        margin-bottom: 5px;
    }

    .logo-darkchess {
        margin-bottom: -2px;
    }
}

/* 文字圖層容器 */
.modal-text-layer {
    position: absolute;
    flex-direction: column;
    height: 100%;
    width: 100%;
    display: flex;
    /* 實現多欄排版 */
    color: #fff;
    text-shadow: 1px 1px 2px #000;
}

.modal-close {
    position: absolute;
    /* 絕對定位，不參與 Flex 佈局 */

    /* 調整位置，數值可依視覺調整 */
    margin-top: -8%;
    right: 20px;
    z-index: 9999;
    /* 確保它在 LOGO 和所有內容之上 */

    /* 樣式設定 */
    font-size: 50px;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
    line-height: 1;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    /* 增加陰影防止白底看不清 */
}

/* 如果希望滑鼠移上去有效果 */
.modal-close:hover {
    color: #ffba19;
    /* 變成金色 */
    transform: scale(1.1);
}

/* 如果希望在小螢幕上位置也跟著縮放，可以使用 cqw */
@media(max-width: 512px) {
    .modal-close {
        top: -3cqw;
        right: 2cqw;
        font-size: 35px;
    }
}

.cardavatar {
    position: absolute;
    width: 16.1%;
    /* 115 / 713 */
    height: 22.2%;
    /* 113 / 509 */
    top: 8%;
    /* 根據原圖位置調整 */
    left: 6%;
    border: 0.4cqw solid #670400;
    /* 邊框也隨比例縮放 */
    border-radius: 5px;
    z-index: 2;
    overflow: hidden;
}

.cardavatar2 {
    /* 底層裝飾也同樣改用百分比與 cqw */
    position: absolute;
    background-color: #F6C36E;
    width: 16.1%;
    height: 22.2%;
    top: 8.2%;
    left: 6.2%;
    border: 0.5cqw solid #F6C36E;
    border-radius: 5px;
    z-index: 1;
}

.cardavatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 圖片容器定位 */
.player-rank-container {
    position: absolute;
    top: 8%;
    left: 25%;

    width: 29.4cqw;
    aspect-ratio: 210 / 52;

    display: flex;
    align-items: center;
    justify-content: flex-end;
    /* 圖片靠右對齊玩家名稱 */
}

.player-rank-img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.playername {
    /*background-color:rgba(99,126,255,0.51);*/
    position: absolute;
    width: 38%;
    height: 7cqw;
    top: 8.5%;
    right: 7%;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    /* 禁止換行 */
    overflow: hidden;
    /* 隱藏溢出 */
    font-size: 5.5cqw;
    /* 預設基準大小 */
}

.playername span {
    display: inline-block;
}

.cardtop-info {
    position: absolute;
    display: flex;
    justify-content: space-between;
    align-items: center;

    width: 67%;
    right: 8%;
    font-size: 3.8cqw;
    color: #fff;
}

.cardpoint {
    top: 18%;
}

.accounttime {
    top: 25%;
}

.card-title {
    text-align: left;
    color: #fff;
    -webkit-text-stroke: 7px #810009;
    /* 為了防止邊框向內吃掉文字*/
    paint-order: stroke fill;
}

@media(max-width: 720px) {
    .card-title {
        -webkit-text-stroke: 6px #810009;
    }
}

@media(max-width: 512px) {
    .card-title {
        -webkit-text-stroke: 5px #810009;
    }
}

.card-values {
    text-align: right;
}

.playerrecord {
    position: absolute;
    display: flex;
    flex-direction: column;
    width: 86.4%;
    /* 計算方式: 616(設計寬) / 713(總寬) ≈ 86.4% */
    aspect-ratio: 616 / 280;
    left: 50%;
    transform: translateX(-50%);
    bottom: 9%;
    /* 滾動設定 */
    overflow-y: auto;
    padding: 1cqw 0.5cqw;
    gap: 0.5cqw;
    /* 隱藏 Firefox 的捲軸 */
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
    transition: scrollbar-color 0.3s;
}

/* 1. 定義捲軸本體寬度 */
.playerrecord::-webkit-scrollbar {
    width: 4px;
}

/* 2. 預設讓捲軸軌道與滑塊都變成透明 */
.playerrecord::-webkit-scrollbar-track {
    background: transparent;
}

.playerrecord::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 10px;
    transition: background 0.3s ease;
}

/* 3. 當滑鼠移入 (Hover) 或正在點擊滑動 (Active) 時，顯示捲軸顏色 */
.playerrecord:hover::-webkit-scrollbar-thumb,
.playerrecord:active::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
}

/* 針對 Firefox 的滑動顯示 */
.playerrecord:hover {
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.record-values {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    color: black;
    text-shadow: none;
}

/* 設定奇數列 (1, 3, 5...) 的背景色 */
.record-values:nth-child(odd) {
    background-color: #E7E5CE;
}

.card-dropdown {
    position: absolute;

    top: 3%;
    right: 3%;
    z-index: 20;
    /* 確保在最上層 */

    width: 25cqw;
    min-width: 80px;
    font-size: 2.5cqw;
    padding: 0.5cqw 2cqw 0.5cqw 1cqw;
    text-align: center;

    background-color: rgba(0, 0, 0, 0.6);
    /* 半透明黑背景 */
    color: #fff;
    border: 0.2cqw solid #FFBA19;
    /* 金色邊框 */
    border-radius: 4px;
    cursor: pointer;
    outline: none;

    /* 隱藏原生樣式並加上自定義箭頭 (選用) */
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23FFBA19%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7cqw top 50%;
    background-size: 1.5cqw auto;
    padding-right: 3cqw;
    /* 為箭頭留空間 */
}

/* 當滑鼠移過時 */
.card-dropdown:hover {
    background-color: rgba(0, 0, 0, 0.8);
    border-color: #fff;
}

/* 下拉選單內的選項樣式 (部分瀏覽器支援有限) */
.card-dropdown option {
    background-color: #333;
    color: #fff;
}

.vertical-scroll-container {
    width: 70vw;
    /* 設定為視窗寬度的 90% */
    height: 550px;
    /* 固定高度以觸發滾動 */
    margin: 10px auto;
    /* 上下間距 20px，左右 auto 達成水平置中 */
    border: 5PX solid #FFE7AC;
    background-color: #FFFDF0;
    border-radius: 12px;
    overflow: hidden;
    /* 確保子元素圓角不破框 */
    display: flex;
    flex-direction: column;
    background-color: #FFFDF0;
}

.scroll-list {
    flex: 1;
    /* 填滿父容器剩餘空間 */
    overflow-y: auto;
    /* 開啟垂直滾動 */
    padding: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    /* 項目之間的間距 */
    box-sizing: border-box;
}

.list-item {
    width: 100%;
    /* 寬度填滿 90vw 扣除 padding 的部分 */
    padding: 25px;
    flex-shrink: 0;
    /* 重要：防止內容被壓縮高度 */
}

@media (max-width:768px) {
    .vertical-scroll-container {
        width: 90vw;
    }

    .scroll-list {
        margin-left: -5px;
        padding: 0;
    }
}

/* 遊戲介紹 Flex 容器 */
.game-intro-flex {
    display: flex;
    flex-direction: row;
    /* 桌機端橫向並排 */
    justify-content: center;
    /* 整體水平置中 */
    align-items: flex-start;
    /* 頂部對齊 */
    gap: 5px;
    /* 左右兩區的間距 */
    width: 100%;
    padding: 10px 0;
}

/* 左右兩組的共同設定 */
.intro-group {
    flex: 1;
    /* 兩邊等寬 */
    max-width: 500px;
    /* 限制最大寬度防止在大螢幕太散 */
    text-align: center;
    /* 內容物（文字與圖片）水平置中 */
}

.intro-group img {
    display: block;
    margin: 5px auto;
    /* 圖片置中並給予間距 */
}

/* 媒體查詢：手機端 (螢幕小於 768px 時) */
@media (max-width: 768px) {
    .game-intro-flex {
        flex-direction: column;
        /* 改為垂直排列 */
        align-items: center;
        /* 垂直排列時水平置中 */
        gap: 5px;
    }

    .intro-group {
        width: 100%;
        /* 手機端佔滿寬度 */
        max-width: none;
    }
}

/* 讓滾動條好看一點 */
.scroll-list::-webkit-scrollbar {
    width: 8px;
}

.scroll-list::-webkit-scrollbar-track {
    background: transparent;
}

.scroll-list::-webkit-scrollbar-thumb {
    background: #FFBA19;
    border-radius: 10px;
}

.scroll-list::-webkit-scrollbar-thumb:hover {
    background: #FFCB7C;
    cursor: pointer;
}

.connection_title {
    /* 負值的 spread 配合位移 */
    box-shadow: inset 0 -15px 0 0 rgba(255, 209, 21, 0.5); display: flex;
}

.connection_title h1 {
    color: #EB7700;
    text-shadow: 0 0 5px #FFFFFF;
}

/* 牌型說明欄位 */
.card-container {
    padding: 10px;
    margin-bottom: 5px;
}

/* 上方排版：Icon、文字、圖片橫向對齊 */
.card-header {
    display: flex;
    align-items: center;
    /* 垂直置中對齊 */
    gap: 8px;
    /* 元素之間的間距 */
}

/* 圖片設定 */
.inline-img {
    height: 5vw;
    max-height: 59px;
    min-height: 22px;
    width: auto;
    display: block;
}

/* 針對行動裝置的微調（可選） */
@media (max-width: 768px) {
    .inline-img {
        /* 在手機版，vw 的比例通常要調大一點，視覺才不會太小 */
        height: 5vw;
    }
}

/* 下方說明文字 */
.card-body {
    font-size: 16px;
    line-height: 1.5;
    color: #333;
    word-break: break-all;
    /* 確保長文字會正常換行 */
    margin-bottom: 5px;
}