/* styles.css - 暗黑主题完整版（含移动端优化） */
/* 基础样式 */
body {
    margin: 0;
    -webkit-text-size-adjust: 100%;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    background: #121212;
    color: #e0e0e0;
}

/* 弹性布局兼容 */
.flex-container {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
}

/* 主容器 */
.install-card {
    width: 90%;
    max-width: 580px;
    margin: 20px auto;
    background: #1e1e1e;
    border-radius: 12px;
    -webkit-border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

/* 导航栏 */
.nav-bar {
    height: 64px;
    border-bottom: 1px solid #333333;
    background: #2a2a2a;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
}

.nav-content {
    padding: 0 16px;
    height: 100%;
    display: -webkit-flex;
    display: flex;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    -webkit-align-items: center;
    align-items: center;
}

.nav-title {
    margin: 0;
    font-size: 1.25rem;
    color: #ffffff;
}

.close-icon {
    font-size: 24px;
    color: #888888;
}

/* 应用信息 */
.app-info {
    padding: 16px;
    border-bottom: 1px solid #333333;
}

.app-icon {
    width: 72px;
    height: 72px;
    border-radius: 16%;
    -webkit-border-radius: 16%;
    margin-right: 16px;
    filter: brightness(0.9);
}

.app-details {
    flex: 1;
}

.app-name {
    margin: 0;
    color: #ffffff;
    font-size: 1.5rem;
}

.app-version {
    color: #a0a0a0;
    margin: 4px 0;
}

.app-meta {
    color: #707070;
    margin: 4px 0;
}

/* 信息项 - 新增文本换行 */
.info-item {
    padding: 12px 16px;
    border-bottom: 1px solid #333333;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-word;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
}

.no-border {
    border-bottom: none;
}

.info-label {
    color: #808080;
    font-size: 14px;
    margin-bottom: 4px;
}

/* 信息值优化 */
.info-value {
    color: #d0d0d0;
    font-size: 16px;
    line-height: 1.4;  /* 新增行高优化 */
}

.app-description {
    color: #b0b0b0;
    line-height: 1.5;
    margin: 8px 0 0;
}

/* 安装区域 */
.install-section {
    padding: 24px;
    text-align: center;
}

/* 按钮容器 */
.button-container {
    display: flex;
    gap: 15px;
    flex-direction: column;
    margin-left: auto;  /* 替代 margin: 0 auto 20px; */
    margin-right: auto;
    margin-bottom: 20px;
    max-width: 400px;
}

.install-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 24px;
    background: #e1344a;
    color: #ffffff;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 500;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 2px 8px rgba(225, 52, 74, 0.3);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 8px;
}

.install-btn:active {
    transform: scale(0.96) translateY(1px);
    filter: brightness(0.9);
}

.install-note {
    color: #707070;
    font-size: 14px;
    margin-top: 12px;
}
/* 移动端专属修复 */
@media (max-width: 480px) {
    .info-item {
        /* 强制所有字符换行 */
        word-break: break-all;
        /* 禁用连字符 */
        -webkit-hyphens: none;
        hyphens: none;
        /* 处理flex容器 */
        min-width: 0; /* 关键修复 */
    }
    
    /* 处理弹性容器 */
    .flex-container {
        min-width: 0;
        overflow-wrap: anywhere;
    }
    
    /* 特殊字符处理 */
    .info-value a {
        word-break: break-all;
        display: inline-block;
        max-width: 100%;
    }
}
/* 响应式设计 */
@media screen and (max-width: 480px) {
    .install-card {
        width: 100%;
        margin: 0;
        border-radius: 0;
        -webkit-border-radius: 0;
        background: #000000;
    }
    
    .app-icon {
        width: 60px;
        height: 60px;
    }
    
    .button-container {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 12px;
        padding: 0 10px;
    }
    
    .install-btn {
        flex: 1 1 45%;
        min-width: 140px;
        padding: 14px 16px;
        font-size: 0.95rem;
    }
    
    /* 移动端文本优化 */
    .info-item {
        word-break: break-all;
        hyphens: none;
        padding: 12px;
    }
    
    @media (max-width: 320px) {
        .install-btn {
            flex: 1 1 100%;
        }
    }
    
    @media (orientation: landscape) {
        .button-container {
            flex-direction: row;
            flex-wrap: nowrap;
        }
    }
}

/* 兼容性回退 */
@supports not (display: flex) {
    .flex-container {
        display: block;
    }
    
    .nav-content {
        display: block;
        padding-top: 20px;
    }
    
    .app-details {
        margin-top: 12px;
        color: #cccccc;
    }
    
    .button-container {
        display: block;
    }
    
    .install-btn {
        display: block;
        margin-bottom: 10px;
    }
}

/* 暗色模式增强 */
@media (prefers-color-scheme: dark) {
    .install-card {
        background: #1a1a1a;
    }
}

/* 按钮悬停效果 */
@media (hover: hover) {
    .install-btn:hover {
        filter: brightness(1.1);
        box-shadow: 0 4px 12px rgba(225, 52, 74, 0.4);
    }
}

/* 中文换行优化 */
:lang(zh) {
    word-break: break-all;
    hyphens: none;
}