/* ============================================================
 * APP 按钮（赛事数据展示 2.0 全站通用）
 * ------------------------------------------------------------
 * 位置：一律在页面「上方」，不再用左下角悬浮。
 *   1. 内联版 .app-dl-inline：插进各页标题栏 / 头部卡片里，
 *      跟着标题走，窄屏自动换行，永远不会和返回键、截图键打架。
 *   2. 兜底版 .app-dl-fixed：页面没有标题栏时（极少数）贴右上角。
 *
 * 为什么不做成「固定悬浮在顶部」：
 *   各页标题栏结构不同（.title-container 居中 / .v2top 两侧绝对定位 /
 *   query 自绘 flex 行），固定定位在 390px 下必然压住截图键或返回键。
 *   插进标题栏由 flex 排版，任何宽度都不会重叠。
 *
 * 兼容性（见仓库 AGENTS.md）：
 *   * 跳转地址一律绝对路径 /其他/APP/（EdgeOne Pages 不支持相对路径）
 *   * 图标是内联 SVG，不依赖 CDN，断网也能正常显示
 * ============================================================ */

.app-dl {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 32px;
    padding: 0 14px 0 8px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: linear-gradient(135deg, #5cc463, #3d8b40);
    color: #fff;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .3px;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    flex: none;
    box-shadow: 0 6px 16px -9px rgba(76, 175, 80, .95), inset 0 1px 0 rgba(255, 255, 255, .35);
    transition: transform .22s cubic-bezier(.2, .8, .2, 1), box-shadow .22s, background .22s;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
}

.app-dl:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #63cd6a, #43964a);
    box-shadow: 0 10px 20px -10px rgba(76, 175, 80, 1), inset 0 1px 0 rgba(255, 255, 255, .35);
}

.app-dl:active { transform: translateY(0) scale(.97); }

.app-dl-ico {
    width: 20px;
    height: 20px;
    flex: none;
    border-radius: 6px;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(255, 255, 255, .22);
}

.app-dl-ico svg { width: 12px; height: 12px; display: block; }

.app-dl-txt { display: block; }

/* ---------- 兜底：页面没有标题栏时，插一条轻量顶部条 ---------- */
/* characterpool / playerfile 没有 .title-container，按钮跟着这条走 */
.app-dl-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 10px 16px 0;
    margin: 0;
}

/* ---------- 卡片式页面（feedback.html） ---------- */
/* body 是 flex 居中，插顶部条会破坏布局；改成绝对定位到卡片右上角 */
.app-dl.app-dl-card {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
}

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
    .app-dl {
        height: 30px;
        padding: 0 12px 0 7px;
        font-size: 11.5px;
        gap: 6px;
    }
    .app-dl-ico { width: 18px; height: 18px; border-radius: 5px; }
    .app-dl-ico svg { width: 11px; height: 11px; }
    .app-dl-bar { padding: 8px 10px 0; }
    .app-dl.app-dl-card { top: 10px; right: 10px; }
}

/* 超窄屏：只留图标，别把标题挤成两行 */
@media (max-width: 420px) {
    .app-dl {
        width: 30px;
        height: 30px;
        padding: 0;
        gap: 0;
        justify-content: center;
    }
    .app-dl-txt { display: none; }
    .app-dl-ico { width: 20px; height: 20px; background: transparent; }
    .app-dl-ico svg { width: 14px; height: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    .app-dl { transition: none; }
    .app-dl:hover { transform: none; }
}
