/* --- 基础重置 --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    background-color: #ffffff;
    color: #333;
    /* 防止iOS弹性滚动导致露底 */
    overflow-x: hidden;
}

/* --- 顶部导航栏 (Header) --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 100;
    
    /* 核心适配代码：顶部内边距 = 系统安全区域 */
    padding-top: env(safe-area-inset-top);
    
    /* 底部边框 */
    border-bottom: 1px solid rgba(240, 240, 240, 0.5);
}

.header-content {
    height: 44px; /* 标准导航栏高度 */
    display: flex;
    align-items: center;
    padding: 0 20px;
    font-size: 22px;
    font-weight: 600;
    color: #000;
}

/* --- 主内容区域 --- */
.main-container {
    /* 为顶部导航栏留出空间：44px + 顶部安全区域 */
    padding-top: calc(44px + env(safe-area-inset-top));
    /* 为底部标签栏留出空间：50px + 底部安全区域 */
    padding-bottom: calc(50px + env(safe-area-inset-bottom));
    min-height: 100vh;
}

/* --- 快捷访问区域 --- */
.section-title {
    font-size: 14px;
    color: #999;
    margin: 20px 20px 15px;
}

.quick-access {
    display: flex;
    padding: 0 20px;
    gap: 25px;
}

.icon-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.icon-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-circle svg {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.icon-label {
    font-size: 13px;
    color: #999;
}

/* 颜色定义 */
.bg-blue { background-color: #e8f2ff; }
.fill-blue { fill: #007aff; }

.bg-purple { background-color: #f5e8ff; }
.stroke-purple { stroke: #bf5af2; stroke-width: 2.5; fill: none; }

.bg-green { background-color: #e8ffef; }
.stroke-green { stroke: #34c759; stroke-width: 2.5; fill: none; }

/* --- 最近聊天 (空状态) --- */
.empty-state {
    margin-top: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.empty-icon {
    width: 80px;
    height: 80px;
    fill: #cccccc;
    margin-bottom: 20px;
    filter: brightness(0) saturate(100%) invert(70%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(95%) contrast(90%);
}

.empty-text {
    color: #999;
    font-size: 15px;
}

/* --- 底部标签栏 (Tab Bar) --- */
.tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(240, 240, 240, 0.5);
    display: flex;
    justify-content: space-around;
    z-index: 100;

    /* 核心适配代码：底部内边距 = 系统安全区域 */
    padding-bottom: env(safe-area-inset-bottom);
    height: calc(50px + env(safe-area-inset-bottom)); /* 总高度包含安全区 */
}

.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 50px; /* 图标区域的固定高度 */
    color: #999;
    font-size: 10px;
}

.tab-item.active {
    color: #007aff;
}

.tab-item svg {
    width: 24px;
    height: 24px;
    margin-bottom: 3px;
    fill: currentColor;
}

/* 简单的分割线模拟截图中的布局 */
.divider {
    height: 10px;
    background-color: #f7f7f7;
    margin-top: 25px;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}