* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #f5f5f5;
    padding-bottom: 60px;  /* 为底部 tab 留空 */
}

/* 顶部导航 */
.header {
    background-color: #07c160;
    color: white;
    padding: 12px 16px;
    font-size: 18px;
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* 底部 Tab 栏 */
.tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    border-top: 1px solid #e9e9e9;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}
.tab-item {
    text-align: center;
    flex: 1;
    color: #999;
    text-decoration: none;
    font-size: 12px;
}
.tab-item.active {
    color: #07c160;
}
.tab-item span {
    display: block;
    font-size: 22px;
    margin-bottom: 4px;
}

/* 通用容器 */
.container {
    padding: 16px;
    background-color: white;
    margin-bottom: 10px;
}

/* 表单 */
input, textarea, select {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
}
button {
    background-color: #07c160;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    width: 100%;
    font-size: 16px;
    margin-top: 8px;
    cursor: pointer;
}
button:active { opacity: 0.8; }

/* 聊天区域 */
.chat-area {
    height: 60vh;
    overflow-y: auto;
    background-color: #f0f0f0;
    padding: 12px;
    border-radius: 8px;
}
.message {
    margin-bottom: 12px;
    display: flex;
}
.message-mine { justify-content: flex-end; }
.message-other { justify-content: flex-start; }
.message-bubble {
    max-width: 70%;
    padding: 8px 12px;
    border-radius: 18px;
    background-color: white;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.message-mine .message-bubble { background-color: #dcf8c5; }
.message-name { font-size: 11px; color: #666; margin-bottom: 4px; }

/* 红包卡片 */
.redpacket-card {
    background-color: #fef5e8;
    border: 1px solid #ffd4a3;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 10px;
}
.redpacket-card button {
    background-color: #fa9d3b;
    margin-top: 8px;
}

/* 群列表/好友列表 */
.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #eee;
}
.list-item .info { flex: 1; }
.list-item .name { font-weight: bold; }
.list-item .desc { font-size: 12px; color: #888; }
.search-bar {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: white;
}
.search-bar input { flex: 1; margin: 0; }
.search-bar button { width: auto; padding: 0 16px; margin: 0; }

/* 我的页面 */
.avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #ccc;
    display: inline-block;
}
.menu-item {
    padding: 12px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
}