:root {
    --bs-body-bg: #f5f5f5;
    --bs-body-color: #333;
    --font-family-base: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-family-mono: 'Roboto Mono', monospace;
}

html, body {
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

body {
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    font-family: var(--font-family-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 卡片样式 */
.card.shadow-sm {
    max-width: 300px !important;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.01) !important;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* 源地址样式 */
.repo-url {
    font-family: var(--font-family-mono);
    word-break: break-all;
    user-select: all;
    -webkit-user-select: all;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* 粒子背景样式 */
#particles-js {
    position: fixed;
    width: 100vw;
    min-height: 100vh;
    height: 100vh;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    background-color: var(--bs-body-bg);
    opacity: 0.8;
    -webkit-transform: translate3d(0,0,0);
    transform: translate3d(0,0,0);
}

#app {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    -webkit-tap-highlight-color: transparent;
}

/* 按钮样式 */
.btn-cydia, .btn-sileo {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

.btn-cydia {
    background-color: #8B4513;
    border-color: #8B4513;
    color: white;
}

.btn-cydia:hover {
    background-color: #733A0F;
    color: white;
}

.btn-sileo {
    background-color: #2ECC71;
    border-color: #2ECC71;
    color: white;
}

.btn-sileo:hover {
    background-color: #27AE60;
    color: white;
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
    :root {
        --bs-body-bg: #1a1a1a;
        --bs-body-color: #fff;
    }
    
    .card.shadow-sm {
        background: rgba(20, 20, 20, 0.01) !important;
        border-color: rgba(255, 255, 255, 0.08);
    }
    
    .text-muted {
        color: #b0b0b0 !important;
    }
    
    .particles-js-canvas-el {
        opacity: 0.5;
    }
}

/* 移动端适配 */
@media screen and (max-width: 576px) {
    .repo-url {
        font-size: 14px;
        padding: 10px !important;
    }
}

/* Safari特定样式 */
@supports (-webkit-touch-callout: none) {
    html, body {
        height: -webkit-fill-available;
        min-height: -webkit-fill-available;
    }
    
    #particles-js, #app {
        min-height: -webkit-fill-available;
    }
}

/* 按钮容器样式 */
.d-flex.flex-column.align-items-center {
    gap: 1.2rem !important;  /* 强制设置间距 */
    padding: 0.5rem 0;  /* 添加上下内边距 */
}

/* 按钮基础样式 */
.btn {
    margin: 0.5rem 0;  /* 添加按钮外边距 */
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 移动端适配 */
@media screen and (max-width: 576px) {
    .card-body {
        padding: 1.5rem 1rem !important;  /* 调整卡片内边距 */
    }

    .repo-url {
        font-size: 14px;
        padding: 10px !important;
        margin-bottom: 1rem !important;  /* 增加源地址下方间距 */
    }

    .d-flex.flex-column.align-items-center {
        gap: 1rem !important;  /* 移动端稍微减小间距 */
    }

    .btn {
        margin: 0.3rem 0;  /* 移动端调整按钮外边距 */
        height: 38px;
    }
}