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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 414px;
    margin: 0 auto;
    background-color: white;
    position: relative;
}

/* 顶部标题栏 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #ededed;
    border-bottom: 1px solid #d9d9d9;
    position: relative;
    z-index: 100;
}

.header h1 {
    font-size: 17px;
    font-weight: 500;
    color: #000;
}

.header-actions {
    display: flex;
    gap: 20px;
}

.header-actions i {
    font-size: 18px;
    color: #333;
    cursor: pointer;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    overflow-y: auto;
    background-color: #f5f5f5;
}

.page {
    display: none;
    height: 100%;
}

.page.active {
    display: block;
}

/* 微信页面样式 */
.chat-list {
    background-color: white;
}

.chat-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid #e5e5e5;
    cursor: pointer;
    transition: background-color 0.2s;
}

.chat-item:hover {
    background-color: #f5f5f5;
}

.chat-item .avatar {
    width: 50px;
    height: 50px;
    border-radius: 5px;
    margin-right: 12px;
}

.chat-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header .name {
    font-size: 16px;
    font-weight: 500;
    color: #000;
}

.chat-header .time {
    font-size: 12px;
    color: #999;
}

.chat-preview {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-preview .message {
    font-size: 14px;
    color: #999;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.unread-count {
    background-color: #ff4d4f;
    color: white;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    margin-left: 8px;
}

/* 通讯录页面样式 */
.contacts-list {
    background-color: white;
}

.contact-section {
    margin-bottom: 10px;
}

.section-header {
    background-color: white;
}

.contact-item.special {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid #e5e5e5;
    cursor: pointer;
    transition: background-color 0.2s;
}

.contact-item.special:hover {
    background-color: #f5f5f5;
}

.contact-item.special i:first-child {
    width: 20px;
    margin-right: 12px;
    color: #333;
}

.contact-item.special span {
    flex: 1;
    font-size: 16px;
    color: #000;
}

.contact-item.special i:last-child {
    color: #ccc;
    font-size: 14px;
}

.section-title {
    padding: 8px 20px;
    background-color: #f5f5f5;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.contact-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid #e5e5e5;
    cursor: pointer;
    transition: background-color 0.2s;
}

.contact-item:hover {
    background-color: #f5f5f5;
}

.contact-item .avatar {
    width: 40px;
    height: 40px;
    border-radius: 5px;
    margin-right: 12px;
}

.contact-item .name {
    font-size: 16px;
    color: #000;
}

/* 发现页面样式 */
.discover-list {
    background-color: white;
}

.discover-section {
    margin-bottom: 10px;
}

.discover-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid #e5e5e5;
    cursor: pointer;
    transition: background-color 0.2s;
}

.discover-item:hover {
    background-color: #f5f5f5;
}

.discover-item i:first-child {
    width: 20px;
    margin-right: 12px;
    color: #333;
    font-size: 16px;
}

.discover-item span {
    flex: 1;
    font-size: 16px;
    color: #000;
}

.discover-item i:last-child {
    color: #ccc;
    font-size: 14px;
}

.discover-item .thumbnail {
    width: 30px;
    height: 30px;
    border-radius: 5px;
    margin-left: auto;
    margin-right: 8px;
}

/* 我的页面样式 */
.profile-content {
    background-color: #f5f5f5;
    height: 100%;
}

.profile-header {
    display: flex;
    align-items: center;
    padding: 20px;
    background-color: white;
    margin-bottom: 10px;
    cursor: pointer;
}

.profile-header .profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    margin-right: 15px;
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 18px;
    font-weight: 500;
    color: #000;
    margin-bottom: 5px;
}

.profile-id {
    font-size: 14px;
    color: #999;
}

.profile-header i:last-child {
    color: #333;
    font-size: 20px;
}

.profile-section {
    background-color: white;
    margin-bottom: 10px;
}

.profile-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid #e5e5e5;
    cursor: pointer;
    transition: background-color 0.2s;
}

.profile-item:hover {
    background-color: #f5f5f5;
}

.profile-item:last-child {
    border-bottom: none;
}

.profile-item i:first-child {
    width: 20px;
    margin-right: 12px;
    color: #333;
    font-size: 16px;
}

.profile-item span {
    flex: 1;
    font-size: 16px;
    color: #000;
}

.profile-item i:last-child {
    color: #ccc;
    font-size: 14px;
}

/* 底部导航栏 */
.bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0;
    background-color: #f8f8f8;
    border-top: 1px solid #d9d9d9;
    position: relative;
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 5px 15px;
    cursor: pointer;
    transition: color 0.2s;
    color: #999;
}

.nav-item.active {
    color: #07c160;
}

.nav-item i {
    font-size: 20px;
    margin-bottom: 2px;
}

.nav-item span {
    font-size: 12px;
}

/* 响应式设计 */
@media (max-width: 414px) {
    .app-container {
        max-width: 100%;
        height: 100vh;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 动画效果 */
.page {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 选中状态 */
.chat-item:active,
.contact-item:active,
.discover-item:active,
.profile-item:active {
    background-color: #e5e5e5;
}
