/* === 手機版優化 (≤768px) === */
@media only screen and (max-width: 768px) {
    /* 表格轉卡片佈局 */
    .table-type1 {
        overflow: visible !important;
    }
    .table-lineage > thead {
        display: none;
    }
    .table-lineage > tbody > tr {
        display: block;
        margin-bottom: 8px;
        padding: 10px 12px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        position: relative;
    }
    .table-lineage > tbody > tr:nth-of-type(odd) {
        background-color: rgba(255,255,255,0.03);
    }
    .table-lineage > tbody > tr > td {
        display: inline-block;
        padding: 2px 4px !important;
        border: 0 !important;
        vertical-align: middle;
    }
    /* 伺服器名稱 - 獨佔一行 */
    .table-lineage > tbody > tr > td:nth-child(1) {
        display: block;
        font-size: 16px;
        font-weight: bold;
        margin-bottom: 4px;
        padding-left: 0 !important;
    }
    /* 開機時間 */
    .table-lineage > tbody > tr > td:nth-child(2) {
        font-size: 13px;
        color: rgba(255,255,255,0.6);
    }
    /* 私服特色 */
    .table-lineage > tbody > tr > td:nth-child(3) {
        display: block;
        font-size: 13px;
        color: rgba(255,255,255,0.5);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
    /* 隱藏次要欄位 */
    .table-lineage > tbody > tr > td:nth-child(5), /* 位置 */
    .table-lineage > tbody > tr > td:nth-child(6), /* 經驗 */
    .table-lineage > tbody > tr > td:nth-child(8)  /* 金錢 */
    {
        display: none !important;
    }
    /* 官網、版本 - 行內顯示 */
    .table-lineage > tbody > tr > td:nth-child(4),
    .table-lineage > tbody > tr > td:nth-child(7) {
        font-size: 12px;
    }
    /* 操作按鈕靠右 */
    .table-lineage > tbody > tr > td:nth-child(9),
    .table-lineage > tbody > tr > td:nth-child(10) {
        float: right;
        margin-top: -30px;
    }

    /* 欄寬覆蓋 */
    .lineage-list .table-type1 thead th:nth-of-type(n) {
        width: auto !important;
    }

    /* 標題縮小 */
    h2.title {
        font-size: 18px;
        text-align: center;
    }

    /* 主 LOGO 縮放 */
    .main-logo-banner img {
        max-width: 80%;
        height: auto;
    }

    /* 角色動畫隱藏 */
    .people-left, .people-right, .people {
        display: none !important;
    }

    /* 容器間距 */
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }

    /* footer 列表 */
    .footer-lineage-list li {
        width: 50% !important;
        font-size: 13px;
    }

    /* 金框邊框縮小 */
    .gold-border {
        border-width: 12px 22px;
    }

    /* table-type1 邊框 */
    .table-type1 {
        border-width: 8px;
        margin-bottom: 20px;
    }

    /* 表格字體 */
    .table-lineage {
        font-size: 14px;
    }

    /* 搜尋欄 */
    #header .search-bar {
        position: static;
        margin-top: 10px;
    }
}

/* === 更小螢幕 (≤480px) === */
@media only screen and (max-width: 480px) {
    body {
        font-size: 14px;
    }
    h2.title {
        font-size: 16px;
    }
    .table-lineage {
        font-size: 13px;
    }
    .table-lineage > tbody > tr > td:nth-child(1) {
        font-size: 15px;
    }
    /* 更多欄位隱藏 */
    .table-lineage > tbody > tr > td:nth-child(4), /* 官網 */
    .table-lineage > tbody > tr > td:nth-child(7)  /* 版本 */
    {
        font-size: 11px;
    }
    .main-logo-banner img {
        max-width: 90%;
    }
    .lineage-top .tops > .top-item img {
        max-width: 100%;
    }
    .footer-lineage-list li {
        width: 100% !important;
    }
}
