/* ========================================
 * 下载底部栏 - 公共组件
 * 每个页面通过 download-bar.js 自动注入
 * ======================================== */

/* 主体容器：固定在页面底部 */
.app-download-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    user-select: none;
    -webkit-user-select: none;
    font-family: 'PingFang SC', 'STHeiti', 'Microsoft YaHei', Helvetica, Arial, sans-serif;
}

/* 上半部分：黑色背景 - 下载信息区 */
.app-download-bar__promo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background-color: #1a1a1a;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

/* 左侧文字区域 */
.app-download-bar__text {
    flex: 1;
    min-width: 0;
}

.app-download-bar__title {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-download-bar__subtitle {
    font-size: 12px;
    color: #aaaaaa;
    line-height: 1.4;
    margin: 2px 0 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 右侧下载按钮 */
.app-download-bar__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 15px;
    padding: 8px 20px;
    background: linear-gradient(135deg, #FF9500, #FF6B00);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(255, 149, 0, 0.4);
}

.app-download-bar__btn:hover {
    background: linear-gradient(135deg, #FFAA33, #FF8533);
    transform: scale(1.03);
    box-shadow: 0 3px 12px rgba(255, 149, 0, 0.5);
}

.app-download-bar__btn:active {
    transform: scale(0.97);
}

/* 下载图标 SVG */
.app-download-bar__icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 5px;
    vertical-align: -2px;
}

/* 下半部分：浏览器导航栏 */
.app-download-bar__nav {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 6px 0;
    padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
    background-color: #f5f5f5;
    border-top: 1px solid #e0e0e0;
}

.app-download-bar__nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 28px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.app-download-bar__nav-item:hover {
    opacity: 0.8;
}

.app-download-bar__nav-item svg {
    width: 22px;
    height: 22px;
    fill: #007AFF;
}

/* 页面底部留白，防止内容被遮挡 */
body.has-download-bar {
    padding-bottom: 90px !important;
}

/* 移动端适配 */
@media (max-width: 767px) {
    .app-download-bar__promo {
        padding: 8px 12px;
    }
    .app-download-bar__title {
        font-size: 14px;
    }
    .app-download-bar__subtitle {
        font-size: 11px;
    }
    .app-download-bar__btn {
        padding: 6px 16px;
        font-size: 13px;
        border-radius: 16px;
    }
    body.has-download-bar {
        padding-bottom: 80px !important;
    }
}

/* 桌面端限制宽度居中 */
@media (min-width: 768px) {
    .app-download-bar {
        max-width: 500px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 12px 12px 0 0;
        overflow: hidden;
    }
}
