/* 全局样式重置与基础设定 */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { 
    margin: 0; 
    padding: 0; 
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; 
    background-color: #f5f5f5; 
    color: #333;
    padding-top: env(safe-area-inset-top); /* 适配 iOS 灵动岛/刘海屏 */
    padding-bottom: env(safe-area-inset-bottom); /* 适配 iOS 底部小黑条 */
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: #fff;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom); /* 适配 iPhone X 底部黑条 */
    z-index: 1000;
}
.nav-item {
    text-decoration: none;
    color: #999;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 10px;
}
.nav-item.active { color: #4a90e2; }
.nav-item .icon { font-size: 20px; margin-bottom: 2px; }

/* 适配桌面端最大宽度时底部导航居中 */
@media (min-width: 600px) {
    .bottom-nav { width: 600px; left: 50%; transform: translateX(-50%); }
}

.app-container { 
    max-width: 600px; 
    margin: 0 auto; 
    min-height: 100vh; 
    background: #fff; 
    position: relative; 
    overflow-x: hidden;
    box-shadow: 0 0 20px rgba(0,0,0,0.05); /* 增加阴影，在桌面端更像手机 */
}

/* 通用头部导航样式 */
.app-header {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    background: #fff;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0; /* 配合 body padding-top 使用 */
    z-index: 100;
}
.header-left { width: 40px; display: flex; align-items: center; }
.header-center { flex: 1; padding: 0 10px; }
.header-right { width: 40px; display: flex; justify-content: flex-end; align-items: center; }

.user-avatar-small { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; display: block; }

/* 简单的 PWA 安装引导提示样式（默认隐藏） */
.ios-install-guide {
    display: none; /* 仅在检测到 iOS 且未安装时显示，需配合 JS */
    margin: 20px;
    padding: 15px;
    background: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 8px;
    color: #856404;
    font-size: 13px;
    text-align: center;
}