/* 全局样式 */
:root {
    --primary-color: #07C160;
    --primary-light: #e8f8e8;
    --text-color: #333;
    --border-color: #e5e5e5;
    --bg-color: #f8f8f8;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, Segoe UI, Arial, Roboto, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft Yahei', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding: 0;
    margin: 0;
    width: 100%;
    overflow-x: hidden; /* 防止水平滚动 */
}

.container {
    max-width: 750px;
    margin: 0 auto;
    padding: 0;
    background-color: white;
    min-height: 100vh;
}

.page {
    padding-bottom: 40px;
}

.weui-btn_primary {
    background-color: var(--primary-color) !important;
    color: white !important;
}

.weui-btn_default {
    background-color: #f8f8f8 !important;
    color: var(--primary-color) !important;
    box-shadow: 0 0 0 1px #ddd !important; /* 使用阴影代替边框 */
}

.weui-btn_warn {
    background-color: #fa5151 !important;
    color: white !important;
}

.weui-btn_primary:not(.weui-btn_disabled):active {
    background-color: #07B053;
}

/* 欢迎页样式 */
.welcome-page {
    padding: 20px;
    text-align: center;
}

.header {
    margin-bottom: 30px;
}

.page-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.page-subtitle {
    font-size: 16px;
    color: #999;
    margin-top: 0;
}

.qrcode-container {
    margin: 30px 0;
    padding: 20px;
    background-color: var(--primary-light);
    border-radius: 12px;
}

.qrcode-image {
    width: 200px;
    height: 200px;
    display: block;
    margin: 0 auto 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.qrcode-tips {
    font-size: 14px;
    color: #666;
    margin: 10px 0;
}

.invitation-form {
    max-width: 400px;
    margin: 0 auto;
}

/* 导航栏样式 */
.weui-navigation-bar {
    text-align: center;
    padding: 12px 0;
    background-color: #07C160;
    color: white;
    position: sticky;
    top: 0;
    z-index: 500;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 45px; /* 固定高度 */
    box-sizing: border-box; /* 确保padding不会增加元素高度 */
    width: 100%;
    overflow: hidden; /* 防止内容溢出 */
}

.weui-navigation-bar__title {
    font-size: 18px;
    font-weight: bold;
    color: #ffffff;
    line-height: 1.2; /* 确保文字垂直居中 */
}

/* 选项卡样式 */
.weui-navbar {
    background-color: white;
    position: sticky;
    top: 45px;
    z-index: 500;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    width: 100%;
    height: 45px; /* 固定高度 */
    box-sizing: border-box; /* 确保padding不会增加元素高度 */
    overflow: hidden; /* 防止内容溢出 */
}

.weui-navbar__item {
    flex: 1;
    text-align: center;
    padding: 12px 0;
    font-size: 14px;
    position: relative;
    cursor: pointer;
    color: #333333;
    box-sizing: border-box; /* 确保padding不会增加元素高度 */
    overflow: hidden; /* 防止内容溢出 */
}

.weui-bar__item_on {
    color: var(--primary-color);
    font-weight: bold;
}

.weui-bar__item_on:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 25%;
    right: 25%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 1.5px;
}

.weui-tab__panel {
    padding: 20px 15px;
}

/* 面板样式 */
.weui-panel {
    margin-top: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.weui-panel__hd {
    padding: 12px 15px 10px;
    color: #444;
    font-size: 15px;
    font-weight: bold;
    background-color: var(--primary-light);
    border-bottom: 1px solid var(--border-color);
}

.weui-media-box {
    padding: 15px;
}

.weui-media-box__title {
    font-size: 16px;
    margin-bottom: 8px;
    color: #333;
}

.weui-media-box__desc {
    color: #555;
    line-height: 1.6;
}

/* 输入区域样式 */
.weui-cells__title {
    margin-top: 20px;
    margin-bottom: 8px;
    color: #444;
    font-size: 15px;
    font-weight: bold;
}

.weui-cells {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-bottom: 15px;
}

.weui-cell:not(:last-child):after {
    left: 15px;
}

.weui-cell__hd {
    padding-right: 15px;
}

.weui-label {
    color: #555;
}

/* 按钮区域样式 */
.weui-btn-area {
    margin: 20px 15px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    justify-content: center;
}

.weui-btn {
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 16px;
    margin-bottom: 10px;
    width: 100%; /* 确保按钮宽度一致 */
    box-sizing: border-box;
}

/* 按钮网格布局 */
.button-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2列布局 */
    gap: 15px; /* 增加按钮之间的间距 */
    width: 100%;
    align-items: stretch; /* 确保所有项目拉伸到相同高度 */
}

.button-grid .weui-btn {
    margin: 0 !important; /* 强制移除所有外边距 */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 15px !important; /* 强制统一内边距 */
    white-space: nowrap; /* 防止文本换行 */
    height: 44px !important; /* 强制固定高度 */
    box-sizing: border-box;
    border: none !important; /* 移除所有边框 */
}

/* 图表样式 */
canvas {
    width: 100%;
    max-height: 300px;
}

/* 页脚样式 */
.weui-footer {
    padding: 15px;
    color: #999;
    font-size: 14px;
    text-align: center;
}

/* 底部统计信息样式 */
.stats-footer {
    margin: 20px auto;
    padding: 0 15px 20px;
    max-width: 700px;
    box-sizing: border-box;
}

.stats-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 0;
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background-color: var(--primary-light);
}

.stats-title {
    display: flex;
    align-items: center;
    padding: 12px 15px 10px;
    font-size: 15px;
    font-weight: bold;
    color: #444;
    background-color: var(--primary-light);
    border-bottom: 1px solid var(--border-color);
}

.stats-icon {
    margin-right: 10px;
    font-size: 18px;
}

.stats-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 15px;
}

.stats-item {
    flex: 1;
    min-width: 120px;
    margin: 5px 10px;
    text-align: center;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 6px;
}

.stats-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.stats-value {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.stats-value.highlight-text {
    color: var(--primary-color);
    font-size: 28px;
}

/* 响应式调整 */
@media (max-width: 480px) {
    .weui-tab__panel {
        padding: 15px 10px;
    }
    
    .weui-panel {
        border-radius: 6px;
        margin-left: 10px;
        margin-right: 10px;
        margin-top: 15px;
        margin-bottom: 15px;
    }
    
    .weui-navbar__item {
        font-size: 13px;
        padding: 10px 0;
    }
    
    .qrcode-image {
        width: 150px;
        height: 150px;
    }
    
    /* 移动端输入框调整 */
    .weui-cell {
        padding: 8px 12px;
    }
    
    .weui-label {
        width: auto;
        min-width: 80px;
    }
    
    .stats-item {
        min-width: 100px;
        margin: 5px;
        padding: 10px;
    }
    
    .stats-value {
        font-size: 20px;
    }
    
    .stats-value.highlight-text {
        font-size: 24px;
    }
    
    .weui-navigation-bar {
        padding: 10px 0;
    }
    
    .weui-navigation-bar__title {
        font-size: 16px;
    }
    
    /* 移动端按钮改为竖排 */
    .button-grid {
        grid-template-columns: 1fr; /* 单列布局 */
        gap: 10px; /* 减小间距 */
        align-items: center; /* 确保所有项目垂直居中对齐 */
    }
    
    .button-grid .weui-btn {
        padding: 10px 15px;
        white-space: nowrap;
        height: 44px; /* 保持固定高度 */
        margin: 0;
    }
    
    .weui-btn-area {
        margin: 15px 10px; /* 减小边距 */
    }
    
    .stats-footer {
        margin: 15px 10px; /* 减小边距 */
        padding: 0 5px 15px;
    }
    
    .stats-title {
        padding: 10px 12px 8px;
        font-size: 14px;
    }
    
    .stats-content {
        padding: 12px 10px;
    }
    
    .stats-label {
        font-size: 12px;
        margin-bottom: 5px;
    }
}

/* 桌面端宽屏调整 */
@media (min-width: 768px) {
    .container {
        border-left: 1px solid var(--border-color);
        border-right: 1px solid var(--border-color);
        max-width: 800px;
    }
    
    .weui-cells {
        max-width: 700px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .weui-btn-area {
        max-width: 700px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .weui-panel {
        max-width: 700px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* 修复输入框布局问题 */
.weui-cell {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    position: relative;
    box-sizing: border-box;
    width: 100%;
}

.weui-cell__bd {
    flex: 1;
    min-width: 0;
}

.weui-input, .weui-select {
    border: 1px solid #e5e5e5;
    padding: 8px 10px;
    border-radius: 4px;
    color: #333;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    height: 40px;
    line-height: 24px;
    font-size: 16px;
}

.weui-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='6' viewBox='0 0 12 6'%3E%3Cpath fill='%23666' d='M6 6L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

/* 高亮文本样式 */
.highlight-text {
    color: #07C160;
    font-weight: bold;
    font-size: 16px;
}

.highlight-keyword {
    color: #FF6B00;
    font-weight: bold;
    font-size: 16px;
    background-color: #FFF3E0;
    padding: 2px 5px;
    border-radius: 3px;
}

/* 底部间距 */
.bottom-spacing {
    height: 30px;
    width: 100%;
}

/* 防止页面滚动条导致的页面晃动 */
html {
    overflow-y: scroll; /* 始终显示滚动条 */
} 