:root {
    --bg: #0b1020;
    --card: #111a33;
    --text: #e9edf7;
    --muted: #b7c0d8;
    --line: rgba(255, 255, 255, .12);
    --accent: #7aa7ff;
    --accent2: #7affc6;
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
    background: linear-gradient(180deg, #070a14 0%, #0b1020 40%, #070a14 100%);
    color: var(--text);
    line-height: 1.78
}

a {
    color: inherit
}

.wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding: 28px 16px 80px
}

header {
    padding: 18px 0 10px
}

.badge {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    background: rgba(122, 167, 255, .12);
    border: 1px solid rgba(122, 167, 255, .25);
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 13px
}

h1 {
    font-size: 34px;
    line-height: 1.2;
    margin: 14px 0 10px
}

.sub {
    color: var(--muted);
    max-width: 920px
}

.grid {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 16px;
    margin-top: 18px
}

.card {
    background: rgba(17, 26, 51, .75);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px;
    backdrop-filter: blur(10px)
}

.card h2 {
    margin: 0 0 10px;
    font-size: 20px
}

.kpi {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 12px
}

.kpi .box {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px;
    background: rgba(255, 255, 255, .03)
}

.kpi .t {
    font-size: 12px;
    color: var(--muted)
}

.kpi .v {
    font-size: 18px;
    margin-top: 4px
}

.btns {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    text-decoration: none;
    background: rgba(255, 255, 255, .04)
}

.btn.primary {
    border-color: rgba(122, 167, 255, .35);
    background: linear-gradient(135deg, rgba(122, 167, 255, .18), rgba(122, 255, 198, .10))
}

.btn:hover {
    transform: translateY(-1px)
}

.note {
    font-size: 13px;
    color: var(--muted);
    margin-top: 10px
}

.toc ol {
    margin: 0;
    padding-left: 18px
}

.toc a {
    text-decoration: none;
    color: var(--muted)
}

.toc a:hover {
    color: var(--text)
}

section {
    margin-top: 16px
}

h3 {
    font-size: 18px;
    margin: 0 0 10px
}

p {
    margin: 10px 0
}

/* ====== 修正排行表跑版：固定欄寬、避免直排、按鈕不換行 ====== */

/* 外層保持可橫向捲動（小螢幕） */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 14px;
    border: 1px solid var(--line);
}

/* 表格：固定版面配置，避免欄位被擠到超窄直排 */
.table-wrap table {
    width: 100%;
    min-width: 1200px;
    /* 你這張表欄位多，建議至少 1200~1400 */
    table-layout: fixed;
    /* ★關鍵：固定欄寬，避免小欄位被壓到直排 */
    border-collapse: collapse;
}

/* 內容換行規則：長文欄位可換行，小欄位不換行 */
.table-wrap th,
.table-wrap td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
    word-break: break-word;
    /* 長文字可斷行 */
    overflow-wrap: anywhere;
}

/* 表頭：不要被擠到直排 */
.table-wrap th {
    white-space: nowrap;
    /* ★關鍵：表頭不換行 */
    font-size: 13px;
    color: var(--muted);
    background: rgba(255, 255, 255, .03);
}

/* ====== 指定每一欄的寬度（依你的截圖欄位順序） ====== */
/* 1 排名 */
.table-wrap th:nth-child(1),
.table-wrap td:nth-child(1) {
    width: 70px;
    text-align: left;
    white-space: nowrap;
}

/* 2 平台 */
.table-wrap th:nth-child(2),
.table-wrap td:nth-child(2) {
    width: 240px;
    /* 平台 + tag + 遊戲類型 */
}

/* 3 適合族群 */
.table-wrap th:nth-child(3),
.table-wrap td:nth-child(3) {
    width: 260px;
}

/* 4 特色亮點 */
.table-wrap th:nth-child(4),
.table-wrap td:nth-child(4) {
    width: 300px;
}

/* 5 出金體感（小欄位：不換行、置中） */
.table-wrap th:nth-child(5),
.table-wrap td:nth-child(5) {
    width: 110px;
    text-align: center;
    white-space: nowrap;
    /* ★避免「快～中」被擠成直排 */
}

/* 6 優惠/返水（小欄位：不換行、置中） */
.table-wrap th:nth-child(6),
.table-wrap td:nth-child(6) {
    width: 110px;
    text-align: center;
    white-space: nowrap;
}

/* 7 風控透明度（小欄位：不換行、置中） */
.table-wrap th:nth-child(7),
.table-wrap td:nth-child(7) {
    width: 120px;
    text-align: center;
    white-space: nowrap;
    /* ★避免「風控透明度」被擠成三行直排 */
}

/* 8 行動裝置（小欄位：不換行、置中） */
.table-wrap th:nth-child(8),
.table-wrap td:nth-child(8) {
    width: 110px;
    text-align: center;
    white-space: nowrap;
}

/* 9 連結/按鈕 */
.table-wrap th:nth-child(9),
.table-wrap td:nth-child(9) {
    width: 170px;
    text-align: center;
}

/* 按鈕永遠不換行，避免被擠爆 */
.table-wrap .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    max-width: 100%;
}

/* Tag 太多時不要把平台欄撐爆 */
.table-wrap .pill {
    display: inline-flex;
    white-space: nowrap;
    margin: 6px 6px 0 0;
}

/* 小螢幕：允許橫向捲動，並把 min-width 稍微降低 */
@media (max-width: 900px) {
    .table-wrap table {
        min-width: 1050px;
    }
}


th,
td {
    padding: 12px 12px;
    border-bottom: 1px solid var(--line);
    vertical-align: top
}

th {
    font-size: 13px;
    color: var(--muted);
    text-align: left;
    background: rgba(255, 255, 255, .03)
}

tr:hover td {
    background: rgba(255, 255, 255, .02)
}

.pill {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    border: 1px solid var(--line);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    color: var(--muted);
    margin-left: 6px
}

.rank {
    font-weight: 800
}

.cta {
    /* display: flex; */
    gap: 10px;
    flex-wrap: wrap
}

.cta a {
    white-space: nowrap
}

.two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px
}

ul,
ol {
    margin: 8px 0 0;
    padding-left: 18px;
    color: var(--muted)
}

.warn {
    border-left: 3px solid rgba(255, 200, 90, .9);
    background: rgba(255, 200, 90, .08);
    padding: 12px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 200, 90, .18)
}

.ok {
    border-left: 3px solid rgba(122, 255, 198, .9);
    background: rgba(122, 255, 198, .08);
    padding: 12px 12px;
    border-radius: 12px;
    border: 1px solid rgba(122, 255, 198, .18)
}

.faq details {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, .02);
    margin-bottom: 10px
}

.faq summary {
    cursor: pointer;
    font-weight: 800
}

footer {
    margin-top: 20px;
    color: var(--muted);
    font-size: 13px
}

.hr {
    height: 1px;
    background: var(--line);
    margin: 16px 0
}

.small {
    font-size: 13px;
    color: var(--muted)
}

.chiprow {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px
}

.chip {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, .03);
    font-size: 13px;
    color: var(--muted)
}

@media (max-width:1000px) {
    table {
        min-width: 860px
    }
}

@media (max-width:900px) {
    h1 {
        font-size: 28px
    }

    .grid {
        grid-template-columns: 1fr
    }

    .two {
        grid-template-columns: 1fr
    }

    table {
        min-width: 820px
    }
}

/* ===== 頂部選單 ===== */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(180deg, #0a1022, #0b1430);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.nav-inner {
    max-width: 1200px;
    margin: auto;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.nav-logo {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    letter-spacing: .5px;
}

/* 選單 */
.nav-menu {
    list-style: none;
    display: flex;
    gap: 22px;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu a,
.nav-menu span {
    color: #cfd6ff;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu span:hover {
    color: #fff;
}

/* 下拉選單 */
.has-sub:hover .sub-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.sub-menu {
    position: absolute;
    top: 120%;
    left: 0;
    min-width: 180px;
    background: #0f1a3a;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 12px;
    padding: 8px 0;
    list-style: none;
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: .2s ease;
}

.sub-menu li a {
    display: block;
    padding: 10px 16px;
    font-size: 14px;
}

.sub-menu li a:hover {
    background: rgba(255, 255, 255, .06);
}

/* 手機漢堡 */
.nav-toggle {
    display: none;
    font-size: 22px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
}

/* ===== RWD ===== */
@media (max-width:900px) {
    .nav-toggle {
        display: block;
    }

    .nav-menu {
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: #0b1430;
        flex-direction: column;
        gap: 0;
        border-bottom: 1px solid rgba(255, 255, 255, .08);
        display: none;
    }

    .nav-menu li {
        border-top: 1px solid rgba(255, 255, 255, .08);
    }

    .nav-menu a,
    .nav-menu span {
        display: block;
        padding: 14px 16px;
    }

    .nav-menu.open {
        display: flex;
    }

    /* 手機版子選單直接展開 */
    .sub-menu {
        position: static;
        opacity: 1;
        transform: none;
        pointer-events: auto;
        border: none;
        background: #0e1835;
        border-radius: 0;
    }
}