/* 首页文章特色图片圆角（核心代码） */
/* 通用适配：先匹配大部分主题的特色图片类名 */
.post-thumbnail img, 
.entry-thumbnail img,
.featured-image img,
.wp-post-image {
    border-radius: 12px !important; /* 圆角大小，可改：8px=小圆角，16px=大圆角，50%=圆形 */
    overflow: hidden !important; /* 防止图片内容溢出圆角 */
    box-sizing: border-box !important; /* 避免边框影响圆角 */
}

/* 针对inpandora主题（精准适配） */
/* 如果上面通用代码无效，删除上面，用这行 */
.inpandora-post-thumbnail img {
    border-radius: 12px !important;
    overflow: hidden !important;
}
.post-thumbnail img {
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important; /* 轻微阴影 */
    transition: all 0.3s ease !important; /* 鼠标悬浮动画 */
}
/* 鼠标悬浮时轻微放大 */
.post-thumbnail img:hover {
    transform: scale(1.02) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
}

/* ===== 首页文章卡片图片 - 响应式固定尺寸 ===== */
.home .post-thumbnail,
.blog .post-thumbnail,
.archive .post-thumbnail {
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;      /* 水平居中，底部间距20px */
    overflow: hidden;
    border-radius: 12px;      /* 圆角，可调整 */
}

.home .post-thumbnail a,
.blog .post-thumbnail a,
.archive .post-thumbnail a {
    display: block;
    width: 100%;
    height: 100%;
}

.home .post-thumbnail img,
.blog .post-thumbnail img,
.archive .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;       /* 关键：裁剪填充，不变形 */
}

/* ===== 移动端适配 (屏幕宽度 ≤ 768px) ===== */
@media (max-width: 768px) {
    .home .post-thumbnail,
    .blog .post-thumbnail,
    .archive .post-thumbnail {
        width: 120px;        /* 手机端缩小至120x120 */
        height: 120px;
        border-radius: 10px; /* 稍小圆角 */
    }
}

/* ===== 标题样式（居中） ===== */
.home .entry-title,
.blog .entry-title,
.archive .entry-title {
    margin: 0 0 10px;
    text-align: center;
    font-size: 1.6em;
    font-weight: 600;
    line-height: 1.3;
}

.home .entry-title a,
.blog .entry-title a,
.archive .entry-title a {
    color: #222;
    text-decoration: none;
}

/* ===== 版本号样式 ===== */
.home .post-version,
.blog .post-version,
.archive .post-version {
    text-align: center;
    margin: 8px 0 4px;
    font-size: 1.1em;
    color: #666;
}

.home .post-version span,
.blog .post-version span,
.archive .post-version span {
    font-weight: 500;
}

/* ===== 游戏类型样式 ===== */
.home .post-genre,
.blog .post-genre,
.archive .post-genre {
    text-align: center;
    margin: 4px 0 0;
    font-size: 1.1em;
    color: #0073aa;
    font-weight: 500;
}

.home .post-genre span,
.blog .post-genre span,
.archive .post-genre span {
    color: #666;
}

/* ===== 移动端字体微调 ===== */
@media (max-width: 768px) {
    .home .entry-title,
    .blog .entry-title,
    .archive .entry-title {
        font-size: 1.3em;
    }
    
    .home .post-version,
    .blog .post-version,
    .archive .post-version,
    .home .post-genre,
    .blog .post-genre,
    .archive .post-genre {
        font-size: 1em;
    }
}

/* ===== 移动端：强制文章列表为2列网格 ===== */
@media (max-width: 768px) {
    /* 目标容器：首页、分类页等所有文章列表 */
    .articles-list.list-mode-b,
    .articles-list {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important; /* 2列等宽 */
        gap: 24px !important;            /* 卡片间距，可调 */
        padding: 0 24px !important;      /* 左右留边 */
    }

    /* 卡片内部：移除原列表模式下可能的多余边距 */
    .articles-list.list-mode-b .post-item,
    .articles-list .post-item {
        width: 100% !important;          /* 卡片撑满网格列 */
        margin-bottom: 20px !important;
        padding: 0 !important;
    }

    /* 图片容器：自适应卡片宽度，保持正方形 */
    .articles-list .post-thumbnail {
        width: 100% !important;          /* 宽度占满卡片 */
        height: auto !important;         /* 高度由padding撑开 */
        aspect-ratio: 1 / 1 !important;  /* 强制1:1正方形 */
        margin-bottom: 12px !important;
        border-radius: 10px !important;
    }

    /* 图片本身：完全填充正方形 */
    .articles-list .post-thumbnail img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    /* 标题：缩小字号，适配小屏幕 */
    .articles-list .entry-title {
        font-size: 1.1em !important;
        margin: 0 0 6px !important;
        line-height: 1.3 !important;
        text-align: center !important;
    }

    /* 版本号 & 类型：精简显示 */
    .articles-list .post-version,
    .articles-list .post-genre {
        font-size: 0.9em !important;
        margin: 4px 0 !important;
        text-align: center !important;
    }

    /* 版本号标签略缩小 */
    .articles-list .post-version span,
    .articles-list .post-genre span {
        font-size: 0.9em !important;
    }
}

/* 首页卡片图片 - 响应式正方形 */
.post-thumbnail {
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
    overflow: hidden;
    border-radius: 12px;
}
.post-thumbnail a {
    display: block;
    width: 100%;
    height: 100%;
}
.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 移动端缩小图片 */
@media (max-width: 768px) {
    .post-thumbnail {
        width: 120px;
        height: 120px;
    }
}

/* 标题样式 */
.entry-title {
    margin: 0 0 10px;
    text-align: center;
    font-size: 1.6em;
    font-weight: 600;
    line-height: 1.3;
}
.entry-title a {
    color: #222;
    text-decoration: none;
}

/* 版本/类型 */
.post-version,
.post-genre {
    text-align: center;
    margin: 8px 0 4px;
    font-size: 1.1em;
    color: #666;
}
.post-version span,
.post-genre span {
    font-weight: 500;
}
.post-genre {
    color: #0073aa;
}
.post-genre span {
    color: #666;
}

/* 属性小标签 */
.post-badges {
    margin: 8px 0 0;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}
.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 500;
    color: white;
}
.badge-google { background: #4caf50; }
.badge-google-need { background: #ff9800; }
.badge-network { background: #9e9e9e; }
.badge-network-need { background: #2196f3; }
.badge-scientific { background: #f44336; }
.badge-language { background: #673ab7; }

/* 支持系统图标 */
.post-support {
    text-align: center;
    margin: 8px 0 0;
    font-size: 1.2em;
    color: #666;
}
.post-support span {
    font-size: 0.9em;
    margin-left: 4px;
}

/* 移动端字体微调 */
@media (max-width: 768px) {
    .entry-title {
        font-size: 1.2em;
    }
    .post-version,
    .post-genre,
    .post-support {
        font-size: 0.9em;
    }
}

.post-version .os-icon {
    margin-left: 8px;
    font-size: 1.1em;
}

/* ===== 文章页游戏信息卡片 - 四列两行彩色药丸 ===== */
body .game-info-card {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

body .game-info-card h3 {
    margin: 0 0 20px 0;
    font-size: 1.3em;
    font-weight: 600;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 12px;
}

/* ----- 四列网格（桌面端）----- */
body .game-info-list {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 12px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

/* ----- 每个属性项 = 彩色药丸 ----- */
body .game-info-item {
    background: #f8f9fa !important;
    border: 1px solid #e9ecef !important;
    border-radius: 40px !important;  /* 超大圆角，药丸风格 */
    padding: 8px 12px !important;
    text-align: center !important;
    color: #2c3e50 !important;
    font-size: 0.9em !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

/* ----- 游戏类型项特殊处理：去掉背景边框，让内部标签独立显示 ----- */
body .game-info-item:has(.game-type-tags) {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    display: block !important;
}

/* 游戏类型内部标签容器 */
body .game-type-tags {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    justify-content: center !important;
}

/* 可点击游戏类型标签 */
body .game-tag-link {
    background: #e7f1ff !important;
    color: #0073aa !important;
    padding: 6px 14px !important;
    border-radius: 30px !important;
    font-size: 0.85em !important;
    text-decoration: none !important;
    border: 1px solid transparent !important;
    transition: all 0.2s !important;
    display: inline-block !important;
}
body .game-tag-link:hover {
    background: #0073aa !important;
    color: white !important;
    border-color: #0073aa !important;
}

/* ----- 为不同属性分配不同的柔和背景色（可选，不喜可删）----- */
body .game-info-item:nth-child(1) { background: #fff4e6 !important; border-color: #ffd8b8 !important; } /* 版本号 */
body .game-info-item:nth-child(3) { background: #e6f7e6 !important; border-color: #c3e6c3 !important; } /* 游戏大小 */
body .game-info-item:nth-child(4) { background: #fff0f0 !important; border-color: #ffc9c9 !important; } /* 谷歌服务 */
body .game-info-item:nth-child(5) { background: #e6f3ff !important; border-color: #b8d9ff !important; } /* 网络要求 */
body .game-info-item:nth-child(6) { background: #f3e6ff !important; border-color: #d9b8ff !important; } /* 语言 */
body .game-info-item:nth-child(7) { background: #fff9e6 !important; border-color: #ffeab8 !important; } /* 支持系统 */

/* ----- 标签文字（如“版本号：”）与值合并显示 ----- */
body .game-info-label {
    font-weight: 600 !important;
    margin-right: 4px !important;
    color: #495057 !important;
}

body .game-color-black,
body .game-color-gray,
body .game-color-green,
body .game-color-red {
    font-weight: 500 !important;
}

/* 支持系统图标样式 */
body .support-os-icon {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}
body .support-os-icon i {
    font-size: 1.2em !important;
}
body .fa-android { color: #3ddc84 !important; }
body .fa-apple { color: #555 !important; }

/* ----- 移动端适配：自动变为两列 ----- */
@media (max-width: 768px) {
    body .game-info-list {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    body .game-info-item {
        padding: 6px 10px !important;
        font-size: 0.85em !important;
    }
}

/* 解决某些主题可能存在的列表默认样式干扰 */
.game-info-list .game-info-item {
    list-style: none !important;
}
.game-info-list .game-info-item::before {
    display: none !important;
}

/* ----- MOD 标签样式（彩色药丸）----- */
.badge-mod {
    display: inline-block;
    background: #ffd166 !important;
    color: #2d3e50 !important;
    padding: 6px 14px !important;
    border-radius: 30px !important;
    font-size: 0.85em !important;
    font-weight: 600 !important;
    border: 1px solid #e6b800 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important;
    text-align: center;
}

/* 适配四列网格中的MOD项（自动成为独立彩色格子） */
.game-info-list .badge-mod {
    width: 100%;
}

/* ----- MOD标签 - 统一风格（桌面+移动端）----- */
.badge-mod,
.game-info-item .badge-mod {
    display: inline-block;
    background: #ffb347 !important;  /* 温暖的橘金色，与“免谷歌”等区分 */
    color: #1e1e1e !important;
    font-weight: 600 !important;
    border-radius: 30px !important;
    border: 1px solid #e69500 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important;
    transition: all 0.2s ease !important;
    
    /* 桌面端默认尺寸 */
    padding: 6px 14px !important;
    font-size: 0.85em !important;
    line-height: 1.4 !important;
    text-align: center !important;
    white-space: nowrap !important;  /* 默认不换行 */
}

/* 文章页四列网格中的MOD标签——占满整个格子，居中 */
.game-info-item .badge-mod {
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;   /* 网格内允许换行 */
    word-break: break-word !important;
}

/* 首页卡片小圆点区域的MOD标签——与“免谷歌”等完全平齐 */
.post-badges .badge-mod {
    padding: 4px 10px !important;     /* 略小，与其他小圆点一致 */
    font-size: 0.75em !important;
    line-height: 1.3 !important;
    white-space: nowrap !important;
}

/* ----- 移动端统一缩小调整（≤768px）----- */
@media (max-width: 768px) {
    .badge-mod,
    .game-info-item .badge-mod {
        padding: 5px 10px !important;
        font-size: 0.75em !important;
    }
    
    /* 首页卡片小圆点区域进一步缩小 */
    .post-badges .badge-mod {
        padding: 3px 8px !important;
        font-size: 0.7em !important;
    }
    
    /* 文章页四列网格中的MOD标签移动端自动缩小 */
    .game-info-item .badge-mod {
        padding: 5px 8px !important;
        font-size: 0.75em !important;
    }
}

/* MOD标签悬停效果（可选） */
.badge-mod:hover {
    background: #ff9f1a !important;
    border-color: #cc7a00 !important;
    color: #000 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1) !important;
}

/* ===== 导航条 - 宽度与 .container 完全同步 ===== */

/* 背景通栏 */
.taptap-nav {
    width: 100%;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    margin: 0 0 25px 0;
    padding: 0;
    box-sizing: border-box;
}

/* 内容容器：宽度策略完全复制 .container (.pw) */
.nav-scroll {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    
    /* ---------- 宽度与 .container 同步 ---------- */
    max-width: 1200px;        /* >1280px 时的宽度（请按实际调整） */
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;       /* 与 .container 内边距一致（请按实际调整） */
    padding-right: 20px;
    padding-top: 10px;
    padding-bottom: 10px;
    box-sizing: border-box;
    
    /* 超出滚动（精致细滚动条） */
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #c0c0c0 #f5f5f5;
}

/* 自定义滚动条 */
.nav-scroll::-webkit-scrollbar { height: 4px; }
.nav-scroll::-webkit-scrollbar-track { background: #f5f5f5; border-radius: 4px; }
.nav-scroll::-webkit-scrollbar-thumb { background: #c0c0c0; border-radius: 4px; }
.nav-scroll::-webkit-scrollbar-thumb:hover { background: #a0a0a0; }

/* 导航项卡片 - 固定大小，绝不压缩 */
.nav-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f8f9fa;
    color: #2c3e50;
    padding: 8px 18px;
    border-radius: 40px;
    font-size: 0.95em;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    flex-shrink: 0;           /* 禁止缩小，保证可读性 */
}

.nav-item i {
    font-size: 1.1em;
    color: #0073aa;
}

.nav-item:hover {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,115,170,0.15);
}

/* ----- 断点：≤1280px 时，宽度改为 95%（与 .pw 完全一致）----- */
@media (max-width: 1280px) {
    .nav-scroll {
        max-width: 95%;               /* 与 .pw 的 max-width:95% 同步 */
        padding-left: 2.5%;           /* 可选：让左右留白也与 .pw 一致 */
        padding-right: 2.5%;         /* 实际 .pw 可能没有额外内边距，请按需调整 */
    }
}

/* ----- 移动端覆盖：完全占满屏幕宽度，保持滑动 ----- */
@media (max-width: 768px) {
    .nav-scroll {
        max-width: none !important;   /* 移除宽度限制 */
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 14px 20px !important; /* 左右留白 20px，触摸区域增高 */
        overflow-x: auto;
    }
    .nav-item {
        padding: 10px 18px;
        font-size: 0.9em;
    }
}

/* ----- 彻底消除两个导航栏之间的所有垂直间距 ----- */

/* 游戏导航底部边距归零 */
.taptap-nav {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* 应用导航顶部边距归零 */
.app-nav {
    margin-top: 0 !important;
    padding-top: -12px !important;   /* 仅用内边距制造分行效果，数值可调 */
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    

}

/* 移动端同样处理 */
@media (max-width: 768px) {
    .app-nav {
        padding-top: 1px !important;
        border-top: 1px solid #eaeef2;
    }
}

/* 标题行内价格标签 - 小字、删除线 */
.post-price-inline {
    display: inline-block;
    margin-left: 8px;
    font-size: 0.7em;      /* 远小于标题字体 */
    font-weight: normal;
    line-height: 1;
    vertical-align: middle;
}

.price-original {
    text-decoration: line-through;
    color: #999;
}

.price-free {
    color: #e67e22;
    font-weight: 500;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .post-price-inline {
        font-size: 0.95em;
        margin-left: 5px;
    }
}

/* ===== 全部分类下拉菜单 - 完美修复版 ===== */

/* ---------- 公共样式（所有设备）---------- */
.category-dropdown {
    position: relative;
    display: inline-block;  /* 确保按钮可见 */
    vertical-align: middle;
}

/* 下拉按钮 - 始终可见 */
.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 30px;
    padding: 8px 16px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

/* 图标 - 使用FontAwesome，并内置Unicode后备字符 */
.dropdown-toggle .fa-grid {
    font-size: 16px;
    color: #0073aa;
}
/* 如果FontAwesome加载失败，图标会显示后备字符“☰” */
.dropdown-toggle .fa-grid::before {
    content: "☰";          /* 后备符号，字体图标会覆盖它 */
    font-family: 'Font Awesome 6 Free', sans-serif; /* 正常时使用FA字体 */
}

.dropdown-toggle:hover {
    background: #e0e0e0;
    border-color: #ccc;
}

/* ---------- 下拉菜单 - 默认隐藏（核心修复） ---------- */
.dropdown-menu {
    display: none !important;  /* 强制隐藏，防止意外显示 */
}

/* ---------- 桌面端样式 (≥769px) ---------- */
@media (min-width: 769px) {
    .category-dropdown {
        margin-right: 15px;  /* 与搜索框间距 */
    }

    /* 下拉菜单面板 - 悬停显示 */
    .category-dropdown:hover .dropdown-menu {
        display: block !important;  /* 悬停时显示 */
        position: absolute;
        top: 110%;
        right: 0;
        left: auto;
        width: auto;              /* 宽度自适应内容 */
        min-width: 280px;        /* 最小宽度，可调整 */
        max-width: 90vw;        /* 最大宽度，防止超宽屏溢出 */
        background: white;
        border: 1px solid #e0e0e0;
        border-radius: 16px;
        box-shadow: 0 8px 25px rgba(0,0,0,0.12);
        padding: 20px;
        z-index: 99999;
    }

    /* 分组标题 */
    .group-title {
        font-size: 15px;
        font-weight: 600;
        color: #0073aa;
        margin-bottom: 12px;
        padding-bottom: 8px;
        border-bottom: 2px solid #f0f0f0;
        grid-column: 1 / -1;
    }

    /* 分类项网格 - 一行3列，居中 */
    .dropdown-group {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px 12px;
        margin-bottom: 20px;
        justify-items: center;
        align-items: center;
    }

    /* 胶囊样式 - 自适应宽度，文字居中，浅蓝色 */
    .dropdown-group .dropdown-item {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 4px 12px;
        background: #e6f3ff !important;
        color: #0073aa !important;
        border-radius: 30px;
        font-size: 13px;
        text-decoration: none;
        white-space: nowrap;
        border: 1px solid transparent;
        transition: all 0.2s;
        line-height: 1.4;
    }

    .dropdown-group .dropdown-item:hover {
        background: #0073aa !important;
        color: white !important;
        border-color: #0073aa;
    }
}

/* ---------- 移动端样式 (≤768px) ---------- */
@media (max-width: 768px) {
    /* 移动端按钮微调 */
    .category-dropdown {
        margin-left: 10px;
    }
    .dropdown-toggle {
        padding: 6px 12px;
        font-size: 13px;
    }
    .dropdown-toggle .fa-grid {
        font-size: 14px;
    }

    /* 移动端 - 底部抽屉菜单（完全保留原样式） */
    .dropdown-menu {
        position: fixed !important;
        top: auto !important;
        left: 10px !important;
        right: 10px !important;
        bottom: 10px !important;
        width: auto !important;
        max-width: none !important;
        min-width: 0 !important;
        max-height: 80vh;
        overflow-y: auto;
        padding: 15px !important;
        border-radius: 20px !important;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.15) !important;
        background: white;
        border: 1px solid #e0e0e0;
        display: none !important;  /* 默认隐藏，由JS控制显示 */
        z-index: 99999;
    }

    /* 移动端禁用悬停显示 */
    .category-dropdown:hover .dropdown-menu {
        display: none !important;
    }

    /* 移动端网格 - 一行2列 */
    .dropdown-group {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 6px 10px;
        margin-bottom: 15px;
        justify-items: center;
        align-items: center;
    }

    .dropdown-group .dropdown-item {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 6px 12px;
        background: #e6f3ff !important;
        color: #0073aa !important;
        border-radius: 30px;
        font-size: 12px;
        text-decoration: none;
        white-space: normal;
        word-break: break-word;
        text-align: center;
        line-height: 1.3;
        border: 1px solid transparent;
        width: auto;
    }

    .group-title {
        font-size: 14px;
        margin-bottom: 10px;
        padding-bottom: 6px;
        grid-column: 1 / -1;
    }
}