/* 移动端通用样式 */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f9fafb;
    color: #1a1a1a;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* 顶部导航栏 */
.top-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: white;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.location-info {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.location-name {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
}

.icon-chevron-down {
    width: 16px;
    height: 16px;
    background: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* 主内容区 */
.main-content {
    padding: 16px;
    min-height: calc(100vh - 140px);
}

/* 底部导航栏 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.04);
    padding-bottom: env(safe-area-inset-bottom, 8px);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: #9ca3af;
    padding: 6px 12px;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-item svg {
    width: 24px;
    height: 24px;
}

.nav-item span {
    font-size: 11px;
    font-weight: 500;
}

.nav-item.active {
    color: #667eea;
}

.nav-item:active {
    transform: scale(0.95);
}

/* 通用按钮样式 */
button {
    font-family: inherit;
    cursor: pointer;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

button:active {
    transform: scale(0.98);
}

/* 徽章样式 */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* 安全区域适配 */
@supports (padding: env(safe-area-inset-bottom)) {
    .bottom-nav {
        padding-bottom: calc(8px + env(safe-area-inset-bottom));
    }
}
