/* ==================== 手机版专用样式 ==================== */

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4CAF50;
    --primary-hover: #45a049;
    --text-color: #333;
    --text-muted: #666;
    --bg-color: #f5f5f5;
    --card-bg: #fff;
    --border-color: #e0e0e0;
}

.mobile-body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    padding-bottom: 70px;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ==================== 头部 ==================== */
.mobile-header {
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.mobile-header-inner {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
}

.mobile-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
}

.mobile-logo i {
    font-size: 24px;
}

.mobile-header-search-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #666;
    font-size: 18px;
}

/* ==================== 主内容区 ==================== */
.mobile-main {
    padding: 10px;
    min-height: calc(100vh - 120px);
}

/* ==================== 区块 ==================== */
.mobile-section {
    background: #fff;
    border-radius: 12px;
    margin-bottom: 10px;
    overflow: hidden;
}

.mobile-section-title {
    padding: 15px;
    font-size: 15px;
    font-weight: 600;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ==================== 帖子列表 ==================== */
.mobile-post-list {
    display: flex;
    flex-direction: column;
}

.mobile-post-item {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    display: block;
}

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

.mobile-post-item.pinned {
    background: #fffbf0;
}

.mobile-post-title {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
}

.mobile-post-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #999;
    flex-wrap: wrap;
}

.mobile-post-category {
    background: var(--primary-color);
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
}

/* ==================== 底部导航 ==================== */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 60px;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: #999;
    font-size: 10px;
    flex: 1;
    height: 100%;
    position: relative;
}

.mobile-nav-item i {
    font-size: 20px;
}

.mobile-nav-item.active {
    color: var(--primary-color);
}

.mobile-nav-publish {
    position: relative;
    top: -10px;
}

.publish-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.publish-btn i {
    font-size: 20px;
}

.nav-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.nav-badge {
    position: absolute;
    top: 5px;
    right: 10px;
    background: #ff4444;
    color: #fff;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

/* ==================== 用户卡片 ==================== */
.mobile-user-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 10px;
    text-align: center;
}

.mobile-user-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
}

.mobile-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mobile-user-avatar i {
    font-size: 40px;
    color: #ccc;
}

.mobile-user-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.mobile-user-badge {
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
}

.mobile-user-signature {
    color: #999;
    font-size: 13px;
    margin-bottom: 15px;
}

.mobile-user-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.mobile-user-stat {
    text-align: center;
    text-decoration: none;
    color: inherit;
}

a.mobile-user-stat:active {
    opacity: 0.7;
}

.mobile-user-stat-value {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.mobile-user-stat-label {
    font-size: 12px;
    color: #999;
}

.mobile-user-medals {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.mobile-user-medal img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* ==================== 菜单区块 ==================== */
.mobile-menu-section {
    background: #fff;
    border-radius: 12px;
    margin-bottom: 10px;
    padding: 15px;
}

.mobile-menu-title {
    font-size: 14px;
    color: #999;
    margin-bottom: 15px;
}

.mobile-menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.mobile-menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
}

.mobile-menu-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.mobile-menu-item span {
    font-size: 12px;
    color: #666;
}

.mobile-menu-badge {
    position: absolute;
    top: -5px;
    right: 5px;
    background: #ff4444;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.mobile-menu-list {
    display: flex;
    flex-direction: column;
}

.mobile-menu-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    color: #333;
    font-size: 14px;
}

.mobile-menu-list-item i:first-child {
    width: 24px;
    text-align: center;
    font-size: 18px;
}

/* ==================== 搜索页面 ==================== */
.mobile-search-box {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 10px;
}

.mobile-search-form {
    display: flex;
    gap: 10px;
}

.mobile-search-input {
    flex: 1;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
}

.mobile-search-btn {
    padding: 12px 20px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
}
