/* ============================================================
   子比主题 - APP下载插件 前端样式 (v1.9.15)
   设计理念：应用宝风格 + 现代化视觉升级
   - 柔和阴影 + 精致渐变
   - 移动优先响应式
   - 完整 RTL 维语适配
   ============================================================ */

/* ===== 全局容器 ===== */
.zib-app-archive-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px 40px;
    background: #f5f5f7;
    border-radius: 0;
}

/* 短代码模式：突破主题内容容器宽度限制，与列表页保持一致 */
.zib-app-shortcode {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding-left: max(16px, calc(50vw - 600px)) !important;
    padding-right: max(16px, calc(50vw - 600px)) !important;
    box-sizing: border-box;
    font-size: 14px;
    line-height: 1.5;
    color: #1a1a1a;
    background: #f5f5f7 !important;
    overflow-x: clip;
}

/* 短代码模式：消除主题文章容器白底与内边距，使整页背景/宽度与独立 /app/ 页完全一致
   （:has() 渐进增强；不支持的浏览器退化为容器水平全屏，功能不受影响） */
main:has(.zib-app-shortcode) {
    background: #f5f5f7;
}

article:has(.zib-app-shortcode),
.wp-posts-content:has(.zib-app-shortcode),
.entry-content:has(.zib-app-shortcode) {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
}

/* ===== 页头 ===== */
.zib-app-archive-header {
    text-align: center;
    margin-bottom: 24px;
    padding: 8px 0 4px;
}

.zib-app-archive-title {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 6px 0;
    color: #1a1a1a;
    letter-spacing: -0.6px;
    background: linear-gradient(135deg, #1a1a1a 0%, #3a3a3a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.zib-app-archive-subtitle {
    margin: 0;
    font-size: 14px;
    color: #8a8a8a;
    letter-spacing: 0.2px;
}

/* ===== 搜索栏 ===== */
.zib-app-search-bar {
    margin-bottom: 18px;
}

.zib-app-search-wrapper {
    position: relative;
    max-width: 560px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 28px;
    padding: 0 18px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1.5px solid #ececef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.zib-app-search-wrapper:focus-within {
    background: #fff;
    border-color: #00BE06;
    box-shadow: 0 0 0 4px rgba(0, 190, 6, 0.1), 0 4px 14px rgba(0, 190, 6, 0.08);
}

.zib-search-svg {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.zib-search-svg svg {
    width: 18px;
    height: 18px;
}

.zib-app-search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 14px;
    font-size: 14px;
    color: #333;
    outline: none;
}

.zib-app-search-input::placeholder {
    color: #bbb;
}

.zib-app-search-clear {
    background: none;
    border: none;
    cursor: pointer;
    color: #bbb;
    padding: 4px;
    display: flex;
    align-items: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.zib-app-search-clear:hover {
    background: #f0f0f2;
    color: #666;
}

.zib-app-search-clear svg {
    width: 16px;
    height: 16px;
}

/* ===== 分类导航（应用宝圆形图标风格） ===== */
.zib-app-catnav {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-bottom: 24px;
    padding: 18px 12px;
    background: #fff;
    border-radius: 16px;
    flex-wrap: wrap;
    border: 1px solid #f0f0f2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.zib-app-catnav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    text-decoration: none;
    color: #555;
    border-radius: 14px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 72px;
}

.zib-app-catnav-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: linear-gradient(135deg, #f5f7fa 0%, #ecf0f5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    overflow: hidden;
}

.zib-app-catnav-icon svg {
    width: 30px;
    height: 30px;
}

.zib-app-catnav-label {
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    transition: color 0.2s ease;
}

.zib-app-catnav-item:hover {
    transform: translateY(-3px);
    color: #008018;
}

.zib-app-catnav-item:hover .zib-app-catnav-icon {
    background: linear-gradient(135deg, #fff 0%, #ecfdf5 100%);
    border-color: #00D623;
    box-shadow: 0 8px 20px rgba(0, 190, 6, 0.28);
}

.zib-app-catnav-item.active .zib-app-catnav-icon {
    background: linear-gradient(135deg, #00BE06 0%, #00D623 100%);
    border-color: #00A005;
    box-shadow: 0 6px 18px rgba(0, 190, 6, 0.4);
}

.zib-app-catnav-item.active .zib-app-catnav-icon svg path,
.zib-app-catnav-item.active .zib-app-catnav-icon svg rect,
.zib-app-catnav-item.active .zib-app-catnav-icon svg circle {
    fill: #fff !important;
    stroke: #fff !important;
    fill-opacity: 0.95 !important;
    opacity: 1 !important;
}

.zib-app-catnav-item:hover .zib-app-catnav-icon svg path,
.zib-app-catnav-item:hover .zib-app-catnav-icon svg rect,
.zib-app-catnav-item:hover .zib-app-catnav-icon svg circle {
    opacity: 1 !important;
}

.zib-app-catnav-item.active {
    color: #008018;
    font-weight: 600;
}

/* ===== 精选横幅轮播（应用宝大视觉风格） ===== */
.zib-app-banner {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 24px;
    height: var(--banner-height, 200px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14), 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* 横幅配色方案：纯净三色混合渐变（文字可读性由 content 层定向暗角负责，不压全局色彩） */
.zib-app-banner-slide.gradient-green { background: linear-gradient(135deg, #047857 0%, #059669 45%, #0d9488 100%); }
.zib-app-banner-slide.gradient-blue { background: linear-gradient(135deg, #0284c7 0%, #3b82f6 45%, #6366f1 100%); }
.zib-app-banner-slide.gradient-purple { background: linear-gradient(135deg, #7c3aed 0%, #a855f7 45%, #c026d3 100%); }
.zib-app-banner-slide.gradient-orange { background: linear-gradient(135deg, #ea580c 0%, #f43f5e 55%, #be185d 100%); }
.zib-app-banner-slide.gradient-dark { background: linear-gradient(135deg, #1e293b 0%, #312e81 55%, #0f172a 100%); }
.zib-app-banner-slide.gradient-coral { background: linear-gradient(135deg, #e11d48 0%, #db2777 50%, #ea580c 100%); }
.zib-app-banner-slide.gradient-twilight { background: linear-gradient(135deg, #4f46e5 0%, #8b5cf6 50%, #d946ef 100%); }

.zib-app-banner-track {
    position: relative;
    height: 100%;
    width: 100%;
}

.zib-app-banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    background: linear-gradient(135deg, rgba(15,23,42,0.20) 0%, rgba(15,23,42,0.08) 100%), linear-gradient(135deg, #047857 0%, #059669 45%, #0d9488 100%);
    box-sizing: border-box;
    opacity: 0;
    z-index: 1;
    transition: opacity 0.6s ease;
}

.zib-app-banner-slide.active {
    opacity: 1;
    z-index: 2;
}

/* 装饰光斑 */
.zib-app-banner-slide::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 50%;
    height: 160%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

.zib-app-banner-slide::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -10%;
    width: 40%;
    height: 120%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

.zib-app-banner-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 24px 36px;
    height: 100%;
}

/* 文字侧定向暗角：只护住文字一侧，不压全局色彩（RTL 自动镜像） */
.zib-app-banner-content::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to left, rgba(15, 23, 42, 0.44) 0%, rgba(15, 23, 42, 0.16) 36%, rgba(15, 23, 42, 0) 66%);
    pointer-events: none;
    z-index: -1;
}

.zib-app-banner-icon {
    flex-shrink: 0;
}

.zib-app-banner-icon img {
    width: 100px;
    height: 100px;
    border-radius: 24px;
    object-fit: cover;
    background: #fff;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.32), 0 0 0 4px rgba(255, 255, 255, 0.22);
    border: none;
}

.zib-app-banner-info {
    color: #fff;
    flex: 1;
    min-width: 0;
}

.zib-app-banner-tags {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
}

.zib-app-banner-name {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.3;
    margin: 0 0 6px 0;
    text-shadow: 0 1px 2px rgba(15, 23, 42, 0.45);
    word-break: break-word;
    overflow-wrap: break-word;
}

.zib-app-banner-desc {
    font-size: 14px;
    line-height: 1.65;
    margin: 0 0 12px 0;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 1px 2px rgba(15, 23, 42, 0.4);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.zib-app-banner-stats {
    display: flex;
    gap: 8px;
    align-items: center;
}

.zib-app-banner-stat {
    font-size: 12px;
    background: rgba(255, 255, 255, 0.18);
    padding: 4px 12px;
    border-radius: 999px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    font-weight: 600;
    text-shadow: 0 1px 1px rgba(15, 23, 42, 0.3);
}

.zib-app-banner-featured-tag {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.34) 0%, rgba(255, 255, 255, 0.18) 100%);
    padding: 4px 13px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.38);
    color: #fff;
    text-shadow: 0 1px 1px rgba(15, 23, 42, 0.3);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

/* 类型徽章在横幅内：实心白底胶囊（彩色文字/图标在白底上清晰，与下载按钮风格统一） */
.zib-app-banner-content .zib-app-type-badge.type-shouji,
.zib-app-banner-content .zib-app-type-badge.type-dianshi {
    background: #fff;
    border: none;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 999px;
    text-shadow: none;
}

/* 横幅下载按钮 */
.zib-app-banner-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 11px 28px;
    background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
    color: #1a1a1a;
    border-radius: 28px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22), 0 2px 6px rgba(0, 0, 0, 0.12);
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.zib-app-banner-download-btn:hover {
    background: linear-gradient(135deg, #fff 0%, #e8e8e8 100%);
    transform: translateY(-2px);
    color: #1a1a1a;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28), 0 4px 10px rgba(0, 0, 0, 0.15);
}

.zib-app-banner-download-btn:active {
    transform: scale(0.96);
}

.zib-app-banner-download-btn svg path {
    stroke: #1a1a1a !important;
}

.zib-app-banner-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 5;
}

.zib-app-banner-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.42);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.14);
}

.zib-app-banner-dot:hover {
    background: rgba(255, 255, 255, 0.72);
}

.zib-app-banner-dot.active {
    background: #fff;
    width: 26px;
    border-radius: 4px;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.22);
}

/* ===== 章节标题 ===== */
.zib-section-svg {
    width: 20px;
    height: 20px;
    vertical-align: middle;
}

.zib-section-svg-wrap {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin-inline-end: 6px;
}

.zib-section-svg-wrap svg {
    width: 20px;
    height: 20px;
}

/* ===== 无结果提示 ===== */
.zib-app-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.zib-app-no-results p {
    margin: 0;
    font-size: 15px;
}

/* ===== 卡片网格（移动优先：默认小屏1列） ===== */
.zib-app-grid {
    display: grid;
    gap: 10px;
    margin-bottom: 24px;
    grid-template-columns: 1fr;
}

@media (min-width: 481px) {
    .zib-app-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

@media (min-width: 768px) {
    .zib-app-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1025px) {
    .zib-app-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 14px;
    }
}

/* ===== 应用宝风格卡片 ===== */
.zib-app-card {
    background: linear-gradient(180deg, #ffffff 0%, #fcfcfd 100%);
    border-radius: 16px;
    padding: 16px 14px;
    box-shadow: 0 3px 10px rgba(17, 24, 39, 0.06), 0 1px 2px rgba(17, 24, 39, 0.04);
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.28s ease, border-color 0.28s ease;
    cursor: pointer;
    border: 1px solid #e4e9f0;
    position: relative;
    overflow: hidden;
}

.zib-app-card:hover {
    transform: translateY(-4px);
    border-color: #dfe4ea;
    box-shadow: 0 14px 30px rgba(17, 24, 39, 0.12), 0 6px 12px rgba(17, 24, 39, 0.06);
}

.zib-app-card-shouji:hover {
    border-color: rgba(59, 130, 246, 0.35);
    box-shadow: 0 14px 30px rgba(59, 130, 246, 0.16), 0 6px 12px rgba(59, 130, 246, 0.08);
}

.zib-app-card-dianshi:hover {
    border-color: rgba(139, 92, 246, 0.35);
    box-shadow: 0 14px 30px rgba(139, 92, 246, 0.16), 0 6px 12px rgba(139, 92, 246, 0.08);
}

.zib-app-card-featured {
    border-color: rgba(0, 138, 28, 0.35) !important;
    box-shadow: 0 4px 14px rgba(0, 138, 28, 0.12) !important;
}

.zib-app-card-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 卡片头部：名称+开发者独占顶部通栏（名称不再被图标/按钮挤压，单行完整展示） */
.zib-app-card-head {
    padding: 0 2px;
    margin-bottom: 10px;
}

.zib-app-card-head .zib-app-name-row {
    justify-content: center;
}

.zib-app-card-head .zib-app-developer {
    text-align: center;
}

/* 卡片底部通栏页脚：评分一侧、下载次数一侧，浅色分隔线避免颜色挤在一起 */
.zib-app-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #f3f4f6;
}

.zib-app-card-foot .zib-app-rating {
    flex-shrink: 0;
}

.zib-app-card-foot .zib-app-download-stats {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.zib-app-icon-wrapper {
    flex-shrink: 0;
}

.zib-app-icon {
    width: 58px;
    height: 58px;
    border-radius: 15px;
    object-fit: cover;
    background: #f0f0f2;
    box-shadow: 0 4px 10px rgba(17, 24, 39, 0.1);
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.28s ease;
}

.zib-app-card:hover .zib-app-icon {
    transform: scale(1.08) rotate(-2deg);
    box-shadow: 0 8px 18px rgba(17, 24, 39, 0.16);
}

.zib-app-icon-placeholder {
    width: 58px;
    height: 58px;
    border-radius: 15px;
    background: linear-gradient(135deg, #f0f0f2 0%, #e6e8ec 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c0c4cc;
    box-shadow: inset 0 1px 3px rgba(17, 24, 39, 0.06);
}

.zib-app-info {
    flex: 1;
    min-width: 0;
}

.zib-app-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.zib-app-name {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    color: #1a1a1a;
    line-height: 1.3;
    flex: 1;
    min-width: 0;
    text-align: center;
    /* 强制单行：任何设备都不换行，超长省略号 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* 省略号方向跟随文字本身（英文截尾部、维文截首部，始终保留名称开头） */
    unicode-bidi: plaintext;
}

.zib-app-featured-tag {
    position: absolute;
    top: 6px;
    inset-inline-end: 6px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 10px;
    font-weight: 700;
    color: #f97316;
    background: rgba(249, 115, 22, 0.13);
    padding: 2px 7px;
    border-radius: 5px;
    white-space: nowrap;
    border: 1px solid rgba(249, 115, 22, 0.25);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.zib-featured-svg {
    width: 11px;
    height: 11px;
    flex-shrink: 0;
}

.zib-app-developer {
    display: block;
    font-size: 12px;
    color: #9a9a9a;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.zib-app-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 4px;
}

.zib-app-rating-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.zib-app-rating {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.zib-app-rating .star {
    font-size: 12px;
    line-height: 1;
}

.zib-app-rating .star-full {
    color: #ffb400;
}

.zib-app-rating .star-half {
    color: #ffb400;
    position: relative;
    display: inline-block;
}

.zib-app-rating .star-half::after {
    content: '★';
    position: absolute;
    left: 0;
    top: 0;
    width: 50%;
    overflow: hidden;
    color: #e0e0e0;
}

.zib-app-rating .star-empty {
    color: #e0e0e0;
}

.zib-app-rating .rating-num {
    font-size: 12px;
    color: #ffb400;
    font-weight: 700;
    margin-left: 2px;
}

.zib-app-category-tag {
    font-size: 11px;
    color: #008018;
    background: rgba(0, 190, 6, 0.09);
    padding: 1px 8px;
    border-radius: 5px;
    font-weight: 500;
}

/* ===== APP类型徽章（彩色 SVG 图标） ===== */
.zib-app-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
    line-height: 1.4;
    white-space: nowrap;
    vertical-align: middle;
}

.zib-app-type-badge .zib-type-svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    vertical-align: middle;
}

.zib-app-type-badge em {
    font-style: normal;
}

.zib-app-type-badge.type-shouji {
    color: #2563eb;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.zib-app-type-badge.type-dianshi {
    color: #7c3aed;
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.25);
}

.zib-app-size {
    font-size: 11px;
    color: #9a9a9a;
}

.zib-app-download-stats {
    font-size: 11px;
    color: #b0b0b0;
    white-space: nowrap;
}

.zib-app-card-action {
    flex-shrink: 0;
}

.zib-app-download-btn-card {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 9px 18px;
    background: linear-gradient(135deg, #00a312 0%, #00c42a 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 22px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.2px;
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.22s ease, filter 0.22s ease;
    white-space: nowrap;
    overflow: hidden;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 163, 18, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.28);
    text-shadow: 0 1px 2px rgba(0, 80, 15, 0.35);
}

/* 下载图标 */
.zib-app-download-btn-card::before {
    content: '';
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M12 3v12m0 0l-4-4m4 4l4-4M5 21h14' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    filter: drop-shadow(0 1px 1px rgba(0, 60, 10, 0.3));
}

/* 光泽扫过效果 */
.zib-app-download-btn-card::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40%;
    background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.35) 50%, transparent 100%);
    transform: translateX(-180%) skewX(-18deg);
    transition: transform 0.6s ease;
    pointer-events: none;
}

.zib-app-download-btn-card:hover {
    color: #fff;
    transform: translateY(-2px);
    filter: brightness(1.05);
    box-shadow: 0 8px 20px rgba(0, 163, 18, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.zib-app-download-btn-card:hover::after {
    transform: translateX(280%) skewX(-18deg);
}

.zib-app-download-btn-card:active {
    transform: scale(0.94);
    box-shadow: 0 2px 6px rgba(0, 163, 18, 0.35), inset 0 2px 4px rgba(0, 80, 15, 0.25);
}

.zib-app-detail-btn-card {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 18px;
    background: linear-gradient(135deg, #f4f5f7 0%, #e9ebef 100%);
    color: #555;
    border-radius: 22px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid #e3e6ea;
    transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 6px rgba(17, 24, 39, 0.06);
}

.zib-app-detail-btn-card:hover {
    background: linear-gradient(135deg, #ffffff 0%, #f0f2f5 100%);
    color: #333;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(17, 24, 39, 0.12);
    border-color: #d5d9df;
}

.zib-app-detail-btn-card:active {
    transform: scale(0.94);
}

/* ===== 空状态 ===== */
.zib-app-no-apps {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.zib-app-no-apps p {
    margin: 0;
    font-size: 15px;
}

/* ===== 分页 ===== */
.zib-app-pagination {
    display: flex;
    justify-content: center;
    padding: 20px 0;
}

.zib-app-page-nav {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.zib-app-page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    text-decoration: none;
    color: #666;
    border-radius: 10px;
    font-size: 14px;
    background: #fff;
    border: 1px solid #e8e8ea;
    transition: all 0.2s ease;
    font-weight: 500;
}

.zib-app-page-numbers:hover {
    border-color: #00BE06;
    color: #008018;
    transform: translateY(-1px);
}

.zib-app-page-numbers.current {
    background: linear-gradient(135deg, #008a1c 0%, #00a312 100%);
    border-color: #008018;
    color: #fff;
    box-shadow: 0 3px 10px rgba(0, 138, 28, 0.32);
}

.zib-app-page-numbers.dots {
    color: #ccc;
    cursor: default;
    border: none;
    background: transparent;
}

.zib-app-page-numbers.dots:hover {
    color: #ccc;
    transform: none;
}

.zib-app-page-numbers.prev,
.zib-app-page-numbers.next {
    padding: 0 16px;
    gap: 4px;
}

/* ================================================
   热门下载 / 最新上架 板块（应用宝榜单风格）
   ================================================ */
.zib-app-side-section {
    background: #f4f6fa;
    padding: 22px;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    margin-bottom: 24px;
    border: 1px solid #e9edf3;
}

/* Top3 领奖台布局（奥运式：冠军居中升高，亚军/季军两侧稍矮） */
.zib-app-podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 12px;
    margin: 22px 0 0;
    position: relative;
    z-index: 1;
}

.zib-app-podium-item {
    flex: 0 1 232px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: #333;
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

/* 彩色投影随锦旗轮廓（drop-shadow 支持 clip-path 形状） */
.zib-app-podium-item.rank-1 { filter: drop-shadow(0 12px 18px rgba(217, 119, 6, 0.30)); }
.zib-app-podium-item.rank-2 { filter: drop-shadow(0 10px 16px rgba(100, 116, 139, 0.25)); }
.zib-app-podium-item.rank-3 { filter: drop-shadow(0 10px 16px rgba(146, 64, 14, 0.25)); }

/* 奥运领奖台位次：冠军居中升高，亚军在侧、季军在另一侧（RTL 自动镜像） */
.zib-app-podium-item.rank-2 { order: 1; }
.zib-app-podium-item.rank-1 { order: 2; margin-bottom: 20px; }
.zib-app-podium-item.rank-3 { order: 3; }

.zib-app-podium-item:hover {
    transform: translateY(-4px);
}

/* 皇冠 + 名次标签：叠在锦旗上沿 */
.zib-ribbon-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.zib-ribbon-crown {
    display: block;
    line-height: 0;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.20));
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.zib-app-podium-item:hover .zib-ribbon-crown {
    transform: translateY(-2px) scale(1.08);
}

.zib-ribbon-label {
    display: inline-block;
    margin-top: -9px;
    padding: 4px 15px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
    border: 2px solid rgba(255, 255, 255, 0.55);
    white-space: nowrap;
}

.rank-1 .zib-ribbon-label { background: linear-gradient(135deg, #f59e0b, #d97706); }
.rank-2 .zib-ribbon-label { background: linear-gradient(135deg, #94a3b8, #64748b); }
.rank-3 .zib-ribbon-label { background: linear-gradient(135deg, #cd8447, #92400e); }

/* 锦旗主体：底部中央下垂尖角（燕尾锦旗） */
.zib-ribbon-body {
    display: block;
    width: 100%;
    margin-top: -12px;
    padding: 26px 10px 30px;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 16px), 50% 100%, 0 calc(100% - 16px));
    position: relative;
}

.rank-1 .zib-ribbon-body { background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 55%, #d97706 100%); }
.rank-2 .zib-ribbon-body { background: linear-gradient(180deg, #e2e8f0 0%, #cbd5e1 55%, #94a3b8 100%); }
.rank-3 .zib-ribbon-body { background: linear-gradient(180deg, #e8b48a 0%, #cd8447 55%, #b5651d 100%); }

/* 斜向高光 */
.zib-ribbon-body::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, rgba(255, 255, 255, 0.30) 0%, rgba(255, 255, 255, 0) 46%);
    pointer-events: none;
}

/* 白色内嵌面板：内容贴白底，任何绶带颜色下都清晰 */
.zib-ribbon-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 12px 8px 10px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.zib-app-podium-icon {
    display: block;
    margin-bottom: 6px;
}

.zib-app-podium-icon img,
.zib-app-podium-icon .dashicons {
    width: 52px;
    height: 52px;
    border-radius: 13px;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f2;
    box-shadow: 0 4px 10px rgba(17, 24, 39, 0.1);
}

.zib-app-podium-icon .dashicons {
    font-size: 26px;
    color: #999;
}

.zib-podium-placeholder-icon svg {
    width: 32px;
    height: 32px;
}

/* 名称：强制单行，超出省略号，任何设备不换行 */
.zib-app-podium-name {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 6px;
    width: 100%;
    max-width: 100%;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    unicode-bidi: plaintext;
    padding: 0 2px;
    box-sizing: border-box;
}

.zib-app-podium-meta {
    font-size: 11px;
    color: #999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    width: 100%;
    margin-top: auto;
    padding-top: 8px;
}

/* 领奖台下载次数：独占一行居中，数字用 bdi 隔离避免 RTL 下错位 */
.zib-app-podium-downloads {
    display: block;
    width: 100%;
    text-align: center;
    line-height: 1.4;
    color: #a0a0a0;
    white-space: normal;
    word-break: keep-all;
}

.zib-app-podium-downloads bdi {
    font-weight: 700;
    color: #8a8a8a;
}

/* 排行榜区块暖色调 */
.zib-app-hot-section {
    background: linear-gradient(180deg, #fdf8ec 0%, #f4f6fa 32%);
}

/* 排行榜排序说明 */
.zib-app-podium-note {
    text-align: center;
    font-size: 12px;
    color: #98a2b3;
    margin: 0;
    padding: 0 0 2px;
}

.zib-app-section-title {
    font-size: 18px;
    color: #1a1a1a;
    margin: 0 0 16px;
    padding-inline-start: 12px;
    border-inline-start: 4px solid #00BE06;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.zib-app-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.zib-app-section-header .zib-app-section-title {
    margin: 0;
}

.zib-app-section-more {
    color: #008018;
    font-size: 13px;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s ease;
}

.zib-app-section-more:hover {
    opacity: 0.8;
}

/* ================================================
   APP 详情页
   ================================================ */
.zib-app-detail-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

.zib-app-breadcrumb {
    font-size: 13px;
    color: #888;
    margin-bottom: 16px;
}
.zib-app-breadcrumb a { color: #008018; text-decoration: none; font-weight: 600; }
.zib-app-breadcrumb a:hover { text-decoration: underline; }
.zib-app-breadcrumb .sep { margin: 0 8px; color: #ccc; }
.zib-app-breadcrumb .current { color: #333; }

.zib-app-detail-header {
    display: flex;
    align-items: center;
    gap: 24px;
    background: linear-gradient(135deg, rgba(0,0,0,0.20) 0%, rgba(0,0,0,0.10) 100%), linear-gradient(135deg, #00a312 0%, #00BE06 100%);
    padding: 32px;
    border-radius: 20px;
    box-shadow: 0 12px 36px rgba(0, 190, 6, 0.28);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.zib-app-detail-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.zib-app-detail-icon {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.zib-app-detail-icon img,
.zib-app-detail-icon .zib-app-icon-placeholder {
    width: 110px;
    height: 110px;
    border-radius: 24px;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 3px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.zib-app-detail-icon .dashicons { font-size: 54px; color: #999; }
.zib-app-detail-info { flex: 1; position: relative; z-index: 1; min-width: 0; }
.zib-app-detail-name {
    margin: 0 0 8px; font-size: 28px; color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.5px;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    unicode-bidi: plaintext;
}
.zib-app-detail-developer {
    color: rgba(255, 255, 255, 0.9); font-size: 14px; margin-bottom: 10px;
}
.zib-app-detail-meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
    font-size: 13px; color: rgba(255, 255, 255, 0.85);
}
.zib-app-detail-meta .zib-app-rating .star-empty {
    color: rgba(255, 255, 255, 0.3);
}
.zib-app-detail-meta .zib-app-category-tag {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    backdrop-filter: blur(6px);
}
.zib-app-detail-meta .zib-app-size,
.zib-app-detail-meta .zib-app-version {
    color: rgba(255, 255, 255, 0.85);
}
.zib-app-detail-action {
    display: flex; flex-direction: column; align-items: stretch; gap: 10px; min-width: 160px;
    position: relative; z-index: 1;
}
.zib-app-download-btn-primary {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%); color: #1a1a1a;
    padding: 14px 32px; border-radius: 12px;
    font-size: 16px; font-weight: 700; text-decoration: none;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.5);
}
.zib-app-download-btn-primary:hover {
    transform: translateY(-2px);
    color: #1a1a1a;
    background: linear-gradient(135deg, #fff 0%, #e8e8e8 100%);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25);
}
.zib-app-download-btn-primary:active {
    transform: scale(0.96);
}
.zib-app-no-download {
    color: rgba(255, 255, 255, 0.7); text-align: center;
    background: rgba(255, 255, 255, 0.15); padding: 12px; border-radius: 10px;
}

.zib-app-share-bar { display: flex; gap: 8px; }
.zib-app-share-btn {
    flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 4px;
    background: rgba(255, 255, 255, 0.18); color: #fff; border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 9px 12px; border-radius: 8px; font-size: 13px; cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.zib-app-share-btn:hover {
    background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
    color: #1a1a1a;
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}
.zib-app-share-btn:active {
    transform: scale(0.96);
}
.zib-app-share-tip {
    text-align: center; font-size: 12px; color: #fff; margin-top: 4px;
}

.zib-app-detail-section {
    background: #fff; padding: 24px; border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04); margin-bottom: 20px;
    border: 1px solid #f0f0f2;
}
.zib-app-section-title .dashicons { vertical-align: middle; color: #00BE06; }

/* 截图横向滚动画廊 */
.zib-app-screenshots-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 4px 12px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #c0c0c0 transparent;
}
.zib-app-screenshots-grid::-webkit-scrollbar { height: 6px; }
.zib-app-screenshots-grid::-webkit-scrollbar-track { background: transparent; }
.zib-app-screenshots-grid::-webkit-scrollbar-thumb {
    background: #c0c0c0; border-radius: 3px;
}
.zib-app-screenshots-grid::-webkit-scrollbar-thumb:hover { background: #999; }

.zib-app-screenshot-thumb {
    flex-shrink: 0;
    width: 170px;
    height: auto;
    border-radius: 12px;
    cursor: zoom-in;
    aspect-ratio: 9/16;
    object-fit: cover;
    border: 1px solid #eee;
    transition: transform .25s, box-shadow .25s;
    scroll-snap-align: start;
}
.zib-app-screenshot-thumb:hover {
    transform: scale(1.04);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.zib-app-description-content {
    font-size: 15px; line-height: 1.8; color: #444;
}
.zib-app-update-log-content {
    font-size: 14px; line-height: 1.8; color: #555;
    background: #f8f9fa; padding: 16px; border-radius: 10px;
}

/* 多平台下载按钮 */
.zib-app-download-platforms {
    display: flex; flex-wrap: wrap; gap: 12px;
}
.zib-app-download-platform {
    display: flex; align-items: center; gap: 12px;
    background: #f5f6fa; padding: 14px 20px; border-radius: 12px;
    text-decoration: none; color: #333; min-width: 180px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}
.zib-app-download-platform:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.1);
}
.zib-app-download-platform:active {
    transform: scale(0.96);
}
.zib-app-download-platform .dashicons { font-size: 28px; }

.zib-app-download-platform.zib-android-btn {
    background: rgba(21, 128, 61, 0.08);
    border-color: rgba(21, 128, 61, 0.4);
    color: #15803d;
}
.zib-app-download-platform.zib-android-btn:hover {
    background: rgba(21, 128, 61, 0.14);
    border-color: #15803d;
    box-shadow: 0 8px 22px rgba(21, 128, 61, 0.22);
}
.zib-android-btn .dashicons { color: #15803d; }

.zib-app-download-platform.zib-ios-btn {
    background: rgba(26, 26, 26, 0.04);
    border-color: rgba(26, 26, 26, 0.25);
    color: #1a1a1a;
}
.zib-app-download-platform.zib-ios-btn:hover {
    background: rgba(26, 26, 26, 0.1);
    border-color: #1a1a1a;
    box-shadow: 0 8px 22px rgba(26, 26, 26, 0.2);
}
.zib-ios-btn .dashicons { color: #1a1a1a; }

.zib-app-download-platform.zib-tv-btn {
    background: rgba(109, 40, 217, 0.08);
    border-color: rgba(109, 40, 217, 0.4);
    color: #6d28d9;
}
.zib-app-download-platform.zib-tv-btn:hover {
    background: rgba(109, 40, 217, 0.14);
    border-color: #6d28d9;
    box-shadow: 0 8px 22px rgba(109, 40, 217, 0.26);
}
.zib-tv-btn .dashicons { color: #6d28d9; }
.platform-info strong { display: block; font-size: 14px; font-weight: 700; }
.platform-info small { color: #5f6368; font-size: 12px; }

/* 二维码 */
.zib-app-qr-section { text-align: center; }
.zib-app-qr-code { width: 180px; height: 180px; border: 1px solid #eee; border-radius: 10px; }
.zib-app-qr-section p { color: #666; margin-top: 10px; }

/* 相关推荐卡片 */
.zib-related-grid { gap: 12px; }
.zib-app-related-card {
    display: flex; align-items: center; gap: 12px;
    background: #f8f9fa; padding: 12px; border-radius: 12px;
    text-decoration: none; color: #333; transition: all .2s;
}
.zib-app-related-card:hover { background: #eef0ff; transform: translateY(-2px); }
.zib-related-icon img,
.zib-related-icon .dashicons {
    width: 44px; height: 44px; border-radius: 10px; object-fit: cover;
    display: flex; align-items: center; justify-content: center; background: #fff;
}
.zib-related-icon .dashicons { font-size: 24px; color: #999; }
.zib-related-info { flex: 1; min-width: 0; }
.zib-related-info h3 { margin: 0; font-size: 14px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; unicode-bidi: plaintext; }
.zib-related-cat { font-size: 12px; color: #999; }

.zib-app-detail-back { text-align: center; margin: 24px 0; }
.zib-app-back-btn {
    display: inline-flex; align-items: center; gap: 4px;
    color: #008018; text-decoration: none; font-size: 14px;
    padding: 10px 24px; border: 1px solid #00BE06; border-radius: 24px;
    transition: all .2s;
}
.zib-app-back-btn:hover { background: #00BE06; color: #fff; }

/* ================================================
   截图全屏放大 / 微信扫码弹窗
   ================================================ */
.zib-app-screenshot-full-modal {
    position: fixed; inset: 0; z-index: 99999;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity .3s;
}
.zib-app-screenshot-full-modal.active { opacity: 1; pointer-events: auto; }
.zib-app-screenshot-overlay {
    position: absolute; inset: 0; background: rgba(0,0,0,0.85);
}
.zib-app-screenshot-full-modal img {
    position: relative; z-index: 1; max-width: 92vw; max-height: 92vh;
    border-radius: 8px; box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
.zib-app-screenshot-close {
    position: absolute; top: 20px; right: 24px; z-index: 2;
    background: rgba(255,255,255,0.15); color: #fff; border: none;
    width: 40px; height: 40px; border-radius: 50%; font-size: 24px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.zib-app-screenshot-close:hover { background: rgba(255,255,255,0.3); }

.zib-wechat-qr-modal .zib-wechat-qr-box {
    position: relative; z-index: 1; background: #fff; padding: 24px;
    border-radius: 16px; text-align: center; max-width: 320px;
}
.zib-wechat-qr-box h3 { margin: 0 0 16px; color: #1a1a1a; font-size: 18px; }
.zib-wechat-qr-box img { border: 1px solid #eee; }
.zib-wechat-qr-box p { margin: 12px 0 0; color: #666; font-size: 13px; }

/* ===== 响应式（移动优先，min-width 递增覆盖） ===== */
@media (max-width: 768px) {
    .zib-app-card,
    .zib-app-catnav-item,
    .zib-app-download-btn-card,
    .zib-app-banner-download-btn,
    .zib-app-podium-item,
    .zib-app-page-numbers,
    .zib-app-banner-dot {
        -webkit-tap-highlight-color: transparent;
    }
    .zib-app-catnav,
    .zib-app-screenshots-grid {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
    .zib-app-archive-container {
        padding-top: max(14px, env(safe-area-inset-top));
        padding-bottom: max(28px, env(safe-area-inset-bottom));
        padding-left: max(10px, env(safe-area-inset-left));
        padding-right: max(10px, env(safe-area-inset-right));
    }
    .zib-app-shortcode {
        padding-left: max(10px, env(safe-area-inset-left)) !important;
        padding-right: max(10px, env(safe-area-inset-right)) !important;
    }
}

@media (min-width: 481px) {
    .zib-app-icon,
    .zib-app-icon-placeholder {
        width: 52px;
        height: 52px;
    }
    .zib-app-name {
        font-size: 14px;
    }
    .zib-app-download-btn-card {
        padding: 7px 14px;
        font-size: 12px;
        gap: 4px;
    }
    .zib-app-download-btn-card::before {
        width: 13px;
        height: 13px;
    }
}

@media (min-width: 768px) {
    .zib-app-archive-container {
        padding: 24px 20px 40px;
    }
    .zib-app-icon,
    .zib-app-icon-placeholder {
        width: 56px;
        height: 56px;
    }
    .zib-app-name {
        font-size: 15px;
    }
    .zib-app-download-btn-card {
        padding: 6px 16px;
        font-size: 13px;
    }
    .zib-app-banner {
        height: min(var(--banner-height, 200px), 180px);
    }
    .zib-app-banner-icon img {
        width: 84px;
        height: 84px;
    }
    .zib-app-banner-name {
        font-size: 22px;
    }
}

@media (min-width: 1025px) {
    .zib-app-archive-container {
        padding: 28px 24px 48px;
    }
    .zib-app-archive-title {
        font-size: 28px;
    }
    .zib-app-banner {
        height: min(var(--banner-height, 200px), 200px);
    }
    .zib-app-banner-content {
        padding: 24px 32px;
        gap: 20px;
    }
    .zib-app-banner-icon img {
        width: 96px;
        height: 96px;
    }
    .zib-app-banner-name {
        font-size: 26px;
    }
    .zib-app-banner-desc {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    /* 手机端一行两个应用卡片 */
    .zib-app-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .zib-app-archive-title {
        font-size: 20px;
    }
    .zib-app-archive-subtitle {
        font-size: 12px;
    }
    .zib-app-banner {
        height: min(var(--banner-height, 200px), 150px);
        border-radius: 16px;
        margin-bottom: 16px;
    }
    .zib-app-banner-content {
        padding: 12px 14px;
        gap: 12px;
    }
    .zib-app-banner-icon img {
        width: 60px;
        height: 60px;
        border-radius: 14px;
        border-width: 2px;
    }
    .zib-app-banner-name {
        font-size: 16px;
        margin-bottom: 4px;
    }
    .zib-app-banner-desc {
        font-size: 11px;
        -webkit-line-clamp: 1;
        margin-bottom: 6px;
    }
    .zib-app-banner-tags {
        margin-bottom: 4px;
        gap: 6px;
    }
    .zib-app-banner-featured-tag {
        font-size: 10px;
        padding: 2px 8px;
    }
    .zib-app-banner-stat {
        font-size: 10px;
        padding: 2px 7px;
    }
    .zib-app-banner-download-btn {
        padding: 9px 18px;
        font-size: 13px;
        min-height: 38px;
    }
    .zib-app-banner-download-btn svg {
        width: 16px;
        height: 16px;
    }
    .zib-app-banner-dots {
        bottom: 8px;
        gap: 5px;
    }
    .zib-app-banner-dot {
        width: 7px;
        height: 7px;
    }
    .zib-app-banner-dot.active {
        width: 20px;
    }
    .zib-app-card {
        padding: 12px 10px;
        border-radius: 12px;
    }
    .zib-app-card:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    /* 手机端竖排紧凑卡片：图标/徽章/尺寸居中堆叠，去掉下载按钮（点击卡片进详情页下载） */
    .zib-app-card-main {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    .zib-app-card-action {
        display: none;
    }
    .zib-app-icon,
    .zib-app-icon-placeholder {
        width: 48px;
        height: 48px;
        border-radius: 12px;
    }
    .zib-app-name {
        font-size: 14px;
    }
    .zib-app-developer {
        font-size: 11px;
    }
    .zib-app-info {
        text-align: center;
    }
    .zib-app-meta {
        gap: 4px;
        justify-content: center;
        flex-wrap: wrap;
    }
    .zib-app-card-foot {
        font-size: 11px;
    }
    .zib-app-search-wrapper {
        max-width: 100%;
        border-radius: 28px;
        padding: 0 14px;
    }
    .zib-app-search-input {
        padding: 13px 10px;
        font-size: 16px; /* ≥16px 防止 iOS 自动缩放 */
    }
    .zib-app-catnav {
        gap: 6px;
        padding: 10px 6px;
        overflow-x: auto;
        flex-wrap: nowrap;
        justify-content: flex-start;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
        margin-bottom: 16px;
    }
    .zib-app-catnav::-webkit-scrollbar { display: none; }
    .zib-app-catnav-item {
        min-width: 58px;
        padding: 6px 6px;
        flex-shrink: 0;
        scroll-snap-align: start;
    }
    .zib-app-catnav-item:active {
        transform: scale(0.92);
        transition: transform 0.1s ease;
    }
    .zib-app-catnav-icon {
        width: 50px;
        height: 50px;
    }
    .zib-app-catnav-icon svg {
        width: 28px;
        height: 28px;
    }
    .zib-app-catnav-label {
        font-size: 11px;
        margin-top: 2px;
    }
    .zib-app-podium {
        gap: 8px;
        margin: 18px 0 0;
    }
    .zib-app-podium-item {
        flex: 1 1 0;
    }
    .zib-app-podium-item.rank-1 {
        margin-bottom: 14px;
    }
    .zib-ribbon-crown svg,
    .zib-ribbon-crown {
        width: 28px;
        height: 28px;
    }
    .zib-ribbon-label {
        font-size: 11px;
        padding: 3px 11px;
        margin-top: -7px;
    }
    .zib-ribbon-body {
        margin-top: -10px;
        padding: 20px 7px 24px;
        clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), 50% 100%, 0 calc(100% - 12px));
    }
    .zib-ribbon-inner {
        padding: 10px 5px 8px;
        border-radius: 10px;
    }
    .zib-app-podium-item:active {
        transform: scale(0.97);
        transition: transform 0.1s ease;
    }
    .zib-app-podium-icon img {
        width: 42px;
        height: 42px;
    }
    .zib-app-podium-name {
        font-size: 12px;
    }
    .zib-app-podium-meta {
        font-size: 10px;
    }
    .zib-app-side-section {
        padding: 14px 12px;
        border-radius: 14px;
        margin-bottom: 16px;
    }
    .zib-app-section-header {
        margin-bottom: 12px;
    }
    .zib-app-section-title {
        font-size: 15px;
    }
    .zib-app-detail-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        padding: 20px 16px;
        gap: 16px;
        border-radius: 14px;
    }
    .zib-app-detail-icon {
        display: flex;
        justify-content: center;
    }
    .zib-app-detail-icon img,
    .zib-app-detail-icon .zib-app-icon-placeholder {
        width: 84px;
        height: 84px;
    }
    .zib-app-detail-name {
        font-size: 20px;
    }
    .zib-app-detail-action {
        flex-direction: column;
        min-width: 0;
        width: 100%;
        gap: 8px;
    }
    .zib-app-detail-action > * {
        width: 100%;
        flex: 0 0 auto;
    }
    .zib-app-screenshot-thumb {
        width: 120px;
    }
    .zib-app-pagination {
        padding: 14px 0;
    }
    .zib-app-page-numbers {
        min-width: 38px;
        height: 38px;
        font-size: 14px;
        padding: 0 10px;
    }
    .zib-app-page-numbers.prev,
    .zib-app-page-numbers.next {
        padding: 0 14px;
    }
    .zib-app-no-results,
    .zib-app-no-apps {
        padding: 40px 16px;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .zib-app-banner {
        height: min(var(--banner-height, 200px), 170px);
    }
    .zib-app-banner-content {
        padding: 18px 24px;
        gap: 18px;
    }
    .zib-app-banner-icon img {
        width: 80px;
        height: 80px;
    }
    .zib-app-banner-name {
        font-size: 22px;
    }
    .zib-app-catnav {
        gap: 12px;
        padding: 14px 10px;
        overflow-x: auto;
        flex-wrap: nowrap;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .zib-app-catnav::-webkit-scrollbar { display: none; }
    .zib-app-catnav-item {
        flex-shrink: 0;
    }
    .zib-app-detail-header {
        padding: 24px 20px;
    }
    .zib-app-detail-icon img,
    .zib-app-detail-icon .zib-app-icon-placeholder {
        width: 88px;
        height: 88px;
    }
}

@media (max-width: 360px) {
    .zib-app-archive-title {
        font-size: 18px;
    }
    .zib-app-banner {
        height: min(var(--banner-height, 200px), 130px);
    }
    .zib-app-banner-content {
        padding: 10px 12px;
        gap: 10px;
    }
    .zib-app-banner-icon img {
        width: 52px;
        height: 52px;
        border-radius: 12px;
    }
    .zib-app-banner-name {
        font-size: 14px;
        margin-bottom: 2px;
    }
    .zib-app-banner-desc {
        display: none;
    }
    .zib-app-banner-stats {
        display: none;
    }
    .zib-app-banner-download-btn {
        padding: 8px 14px;
        font-size: 12px;
        min-height: 36px;
    }
    .zib-app-card {
        padding: 10px 8px;
    }
    .zib-app-icon,
    .zib-app-icon-placeholder {
        width: 48px;
        height: 48px;
        border-radius: 11px;
    }
    .zib-app-name {
        font-size: 14px;
    }
    .zib-app-download-btn-card {
        padding: 8px 14px;
        font-size: 13px;
        min-height: 38px;
    }
    .zib-app-category-tag,
    .zib-app-size {
        font-size: 10px;
    }
    .zib-app-rating .star {
        font-size: 11px;
    }
    .zib-app-rating .rating-num {
        font-size: 11px;
    }
    .zib-app-catnav-icon {
        width: 44px;
        height: 44px;
    }
    .zib-app-catnav-icon svg {
        width: 24px;
        height: 24px;
    }
    .zib-app-catnav-item {
        min-width: 52px;
    }
    .zib-app-podium-icon img {
        width: 38px;
        height: 38px;
    }
    .zib-app-podium-name {
        font-size: 11px;
    }
    .zib-app-search-input {
        font-size: 16px;
        padding: 12px 8px;
    }
}

/* 详情页响应式 */
@media (max-width: 768px) {
    .zib-app-detail-container { padding: 12px; }
    .zib-app-detail-header {
        flex-direction: column; align-items: stretch; text-align: center;
    }
    .zib-app-detail-icon { display: flex; justify-content: center; }
    /* 手机/平板端：下载按钮与分享按钮纵向堆叠，避免长维文标签横向溢出被裁切 */
    .zib-app-detail-action { flex-direction: column; min-width: 0; width: 100%; gap: 8px; }
    .zib-app-detail-action > * { width: 100%; flex: 0 0 auto; }
    .zib-app-detail-action .zib-app-share-bar { width: 100%; }
    .zib-app-share-btn {
        font-size: 12px;
        padding: 10px 8px;
        line-height: 1.4;
        min-width: 0;
        white-space: normal;
    }
    .zib-app-detail-name { font-size: 20px; }
    .zib-app-download-platforms { flex-direction: column; }
    .zib-app-download-platform { min-width: 0; }
}

/* ================================================
   RTL 维吾尔语从右往左布局适配
   ================================================ */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .zib-app-section-title {
    padding-left: 0;
    padding-right: 12px;
    border-left: none;
    border-right: 4px solid #00BE06;
}

[dir="rtl"] .zib-app-page-numbers.prev svg,
[dir="rtl"] .zib-app-page-numbers.next svg {
    transform: scaleX(-1);
}

[dir="rtl"] .zib-app-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

[dir="rtl"] .zib-app-back-btn svg,
[dir="rtl"] .zib-app-detail-back svg {
    transform: scaleX(-1);
}

[dir="rtl"] .zib-app-breadcrumb .sep {
    margin: 0 6px;
}

[dir="rtl"] .zib-search-svg {
    order: 2;
}
[dir="rtl"] .zib-app-search-input {
    padding-right: 42px;
    padding-left: 40px;
}
[dir="rtl"] .zib-app-search-clear {
    right: auto;
    left: 12px;
}

[dir="rtl"] .zib-app-screenshot-close {
    right: auto;
    left: 24px;
}

[dir="rtl"] .zib-app-card-action {
    text-align: center;
}

[dir="rtl"] .zib-app-banner-content {
    text-align: right;
}

/* RTL：文字列在左侧，暗角镜像到左侧 */
[dir="rtl"] .zib-app-banner-content::before {
    background: linear-gradient(to right, rgba(15, 23, 42, 0.44) 0%, rgba(15, 23, 42, 0.16) 36%, rgba(15, 23, 42, 0) 66%);
}

[dir="rtl"] .zib-app-no-apps,
[dir="rtl"] .zib-app-no-results {
    text-align: center;
}

[dir="rtl"] .zib-app-detail-info {
    text-align: right;
}

[dir="rtl"] .zib-app-section-more {
    text-align: left;
}

[dir="rtl"] .zib-app-banner-dots {
    display: flex;
    justify-content: center;
}

/* 确保LTR内容（如数字、URL、英文）不被反转 */
[dir="rtl"] .zib-app-size,
[dir="rtl"] .zib-app-version,
[dir="rtl"] .rating-num {
    direction: ltr;
    unicode-bidi: embed;
    display: inline-block;
}
