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

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f7f8fa;
    color: #333;
    font-size: 14px;
    line-height: 1.6;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    min-height: 100vh;
    background: #fff;
}

/* 顶部导航 */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    padding: 12px 16px;
    color: #fff;
    box-shadow: 0 2px 8px rgba(255, 154, 158, 0.3);
}

.header h1 {
    font-size: 18px;
    font-weight: 600;
    text-align: center;
}

.header .nav-right {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
}

.header .nav-right a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    margin-left: 12px;
}

/* 版块标签 */
.board-tabs {
    display: flex;
    overflow-x: auto;
    padding: 10px 12px;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    gap: 8px;
    -webkit-overflow-scrolling: touch;
}

.board-tabs::-webkit-scrollbar {
    display: none;
}

.board-tab {
    flex-shrink: 0;
    padding: 6px 14px;
    background: #f5f5f7;
    border-radius: 20px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
}

.board-tab.active {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    color: #fff;
}

/* 帖子卡片 */
.post-card {
    padding: 16px;
    border-bottom: 8px solid #f7f8fa;
}

.post-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.post-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #f0f0f0;
    margin-right: 10px;
    object-fit: cover;
}

.post-user-info {
    flex: 1;
}

.post-nickname {
    font-weight: 500;
    color: #333;
    font-size: 15px;
}

.post-time {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}

.post-board-tag {
    font-size: 11px;
    padding: 2px 8px;
    background: #fff0f3;
    color: #ff6b81;
    border-radius: 10px;
}

/* 帖子内容 */
.post-content {
font-size: 15px;
    line-height: 1.7;
    color: #333;
    margin-bottom: 10px;
    white-space: pre-line; /* 改这里：合并多余空格，只保留换行 */
    word-break: break-all;
    text-indent: 0; /* 强制取消首行缩进 */
    padding: 0; /* 确保无内边距 */
    margin: 0 0 10px 0;
}

.post-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    margin-bottom: 10px;
}

.post-images.single {
    grid-template-columns: 1fr;
}

.post-images img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
}

.post-images.single img {
    aspect-ratio: auto;
    max-height: 300px;
}

/* 操作栏 */
.post-actions {
    display: flex;
    justify-content: space-around;
    padding-top: 10px;
    border-top: 1px solid #f5f5f5;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    padding: 4px 12px;
    border-radius: 4px;
    transition: background 0.2s;
}

.action-btn:hover {
    background: #f5f5f5;
}

.action-btn.liked {
    color: #ff6b81;
}

.action-btn .icon {
    font-size: 16px;
}

/* 评论区 */
.comment-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f5f5f5;
}

.comment-item {
    display: flex;
    margin-bottom: 10px;
    font-size: 13px;
}

.comment-nick {
    color: #576b95;
    font-weight: 500;
    margin-right: 6px;
    flex-shrink: 0;
}

.comment-content {
    color: #333;
    word-break: break-all;
}

.comment-input-box {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.comment-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e5e5e5;
    border-radius: 20px;
    outline: none;
    font-size: 13px;
}

.comment-input:focus {
    border-color: #ff9a9e;
}

.comment-submit {
    padding: 8px 16px;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
}

/* 发布按钮悬浮 */
.publish-btn {
    position: fixed;
    right: 20px;
    bottom: 80px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    color: #fff;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(255, 154, 158, 0.4);
    text-decoration: none;
    z-index: 99;
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    background: #fff;
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    border-top: 1px solid #f0f0f0;
    z-index: 90;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 11px;
    color: #999;
    text-decoration: none;
    gap: 2px;
}

.nav-item.active {
    color: #ff6b81;
}

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

/* 表单页面 */
.form-page {
    padding: 20px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #666;
    font-size: 14px;
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s;
}

.form-input:focus {
    border-color: #ff9a9e;
}

.form-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 10px;
}

.form-link {
    text-align: center;
    margin-top: 16px;
    color: #666;
    font-size: 14px;
}

.form-link a {
    color: #ff6b81;
    text-decoration: none;
}

/* 发布页 */
.publish-page {
    padding: 16px;
}

.publish-textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    font-size: 15px;
    outline: none;
    resize: vertical;
    font-family: inherit;
}

.upload-area {
    margin-top: 12px;
}

.upload-preview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 10px;
}

.upload-preview .img-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
}

.upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-preview .del-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
}

.upload-btn {
    width: 100%;
    aspect-ratio: 1;
    border: 2px dashed #ddd;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
    cursor: pointer;
    font-size: 12px;
}

.upload-btn .plus {
    font-size: 28px;
    line-height: 1;
    margin-bottom: 4px;
}

/* 提示消息 */
.tip-msg {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

/* 后台样式 */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.admin-header {
    background: #fff;
    padding: 16px 24px;
    margin-bottom: 20px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.admin-menu {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.admin-menu a {
    padding: 10px 20px;
    background: #fff;
    border-radius: 8px;
    text-decoration: none;
    color: #666;
}

.admin-menu a.active {
    background: #ff6b81;
    color: #fff;
}

.admin-table {
    width: 100%;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.admin-table th, .admin-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.admin-table th {
    background: #f9f9f9;
    font-weight: 500;
}

.btn-small {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    border: none;
    cursor: pointer;
    margin-right: 6px;
}

.btn-danger {
    background: #ff4757;
    color: #fff;
}

.btn-warning {
    background: #ffa502;
    color: #fff;
}

.btn-primary {
    background: #5352ed;
    color: #fff;
}

.status-badge {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
}

.status-normal {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-banned {
    background: #ffebee;
    color: #c62828;
}

/* 响应式 */
@media (max-width: 600px) {
    .container {
        max-width: 100%;
    }
    
    .publish-btn {
        right: 16px;
        bottom: 70px;
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
}
/* 点赞人列表 */
.like-list {
    background: #f7f8fa;
    border-radius: 4px;
    padding: 6px 10px;
    margin-top: 10px;
    font-size: 13px;
    color: #576b95;
    line-height: 1.5;
}

.like-list .like-icon {
    margin-right: 4px;
}

/* 查看全部评论 */
.view-all-comments {
    font-size: 13px;
    color: #576b95;
    margin-top: 8px;
    cursor: pointer;
}

/* 帖子内容可点击 */
.post-content {
    cursor: pointer;
}

/* 个人中心 - 修复版 */
.profile-header {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    padding: 20px 16px 60px;
    color: #fff;
    position: relative;
}

.profile-main {
    display: flex;
    align-items: center;
    gap: 14px;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid #fff;
    object-fit: cover;
    flex-shrink: 0;
}

.profile-info-wrap {
    flex: 1;
    min-width: 0;
}

.profile-nickname {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-meta {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 2px;
}

.profile-signature {
    font-size: 12px;
    opacity: 0.85;
    margin-top: 4px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.edit-profile-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 5px 12px;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 16px;
    color: #fff;
    font-size: 12px;
    text-decoration: none;
}

/* 数据统计卡片 */
.profile-stats {
    display: flex;
    background: #fff;
    margin: -36px 16px 0;
    border-radius: 10px;
    padding: 14px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    position: relative;
    z-index: 2;
}

.stat-item {
    flex: 1;
    text-align: center;
    border-right: 1px solid #f0f0f0;
}

.stat-item:last-child {
    border-right: none;
}

.stat-num {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    line-height: 1.2;
}

.stat-label {
    font-size: 11px;
    color: #999;
    margin-top: 3px;
}

/* 标签页 */
.profile-tabs {
    display: flex;
    border-bottom: 1px solid #f0f0f0;
    margin-top: 16px;
    background: #fff;
}

.profile-tab {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    font-size: 14px;
    color: #666;
    position: relative;
}

.profile-tab.active {
    color: #ff6b81;
    font-weight: 500;
}

.profile-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: #ff6b81;
    border-radius: 1px;
}

/* 我的帖子列表 */
.my-post-list {
    padding: 0 16px 80px;
    background: #fff;
    min-height: 200px;
}

.my-post-item {
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
    position: relative;
    padding-right: 60px;
}

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

.my-post-content {
    font-size: 14px;
    color: #333;
    line-height: 1.6;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    cursor: pointer;
}

.my-post-meta {
    font-size: 11px;
    color: #999;
    display: flex;
    justify-content: space-between;
}

.my-post-actions {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.my-post-actions button {
    font-size: 11px;
    padding: 3px 8px;
    border: 1px solid #ffb6b9;
    background: #fff;
    border-radius: 4px;
    color: #ff4757;
    cursor: pointer;
}

/* 编辑资料页 */
.edit-page {
    padding: 16px;
    padding-bottom: 40px;
}

.avatar-upload {
    text-align: center;
    padding: 16px 0 20px;
}

.avatar-upload img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 8px;
    border: 2px solid #ffd1dc;
}

.avatar-upload label {
    color: #ff6b81;
    font-size: 13px;
    cursor: pointer;
}
/* 编辑资料页 */
.edit-page {
    padding: 16px;
}

.avatar-upload {
    text-align: center;
    padding: 20px 0;
}

.avatar-upload img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
}

.avatar-upload label {
    color: #ff6b81;
    font-size: 14px;
    cursor: pointer;
}
/* 首页帖子内容空白修复 */
.post-card .post-content {
    text-indent: 0 !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
    line-height: 1.7;
    white-space: pre-line;
}
.post-card .post-content:first-line {
    line-height: 1.7;
}
.post-card .post-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}