* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    padding-bottom: 70px;
}

.content {
    padding-bottom: 80px;
}

/* 轮播图 */
.carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: transparent;
}

.carousel {
    display: flex;
    transition: transform 0.4s ease;
}

.carousel-item {
    min-width: 100%;
    height: auto;
}

.carousel-item img {
    width: 100%;
    height: auto;
    display: block;
}

.carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}

.carousel-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    transition: all 0.3s;
}

.carousel-dot.active {
    width: 18px;
    border-radius: 3px;
    background: #fff;
}

/* 搜索栏 */
.search-bar {
    padding: 10px 15px;
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 20px;
    padding: 8px 15px;
    gap: 8px;
}

.my-posts-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background: #4a90e2;
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.3s;
}

.my-posts-btn:active {
    background: #357abd;
}

.search-input-wrap i {
    color: #999;
    font-size: 14px;
}

.search-input-wrap input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    outline: none;
    color: #333;
}

.search-input-wrap input::placeholder {
    color: #bbb;
}

/* 信息列表 - 朋友圈样式 */
.info-list {
    background: #fff;
}

.info-card {
    position: relative;
    padding: 15px;
    border-bottom: 1px solid #e5e5e5;
    background: #fff;
}

/* 作者头部 */
.card-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.card-avatar {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    overflow: hidden;
    flex-shrink: 0;
}

.card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-body {
    flex: 1;
    min-width: 0;
}

.card-author {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.author-name {
    font-size: 15px;
    font-weight: 600;
    color: #576b95;
}

.author-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 500;
}

.author-badge.enterprise {
    background: #ffecd2;
    color: #d35400;
}

.author-badge.personal {
    background: #d6eaf8;
    color: #2980b9;
}

/* 内容区 */
.card-content {
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    word-break: break-word;
    margin-bottom: 10px;
}

.card-content.collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 6;
    line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.view-more {
    color: #576b95;
    font-size: 15px;
    cursor: pointer;
    margin-bottom: 10px;
}

/* 九宫格图片 */
.card-images {
    display: grid;
    gap: 8px;
    margin-bottom: 10px;
}

.card-images.single {
    grid-template-columns: 1fr;
    max-width: 200px;
}

.card-images.double {
    grid-template-columns: repeat(2, 1fr);
    max-width: 280px;
}

.card-images.triple {
    grid-template-columns: repeat(3, 1fr);
    max-width: 280px;
}

.card-images.four {
    grid-template-columns: repeat(2, 1fr);
    max-width: 280px;
}

.card-images.five {
    grid-template-columns: repeat(3, 1fr);
    max-width: 280px;
}

.card-images.six {
    grid-template-columns: repeat(3, 1fr);
    max-width: 280px;
}

.card-images.grid {
    grid-template-columns: repeat(3, 1fr);
    max-width: 280px;
}

.card-images .img-item {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
    background: #f5f5f5;
}

.card-images.single .img-item {
    aspect-ratio: auto;
    max-height: 200px;
}

.card-images .img-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 底部信息 */
.card-footer {
    font-size: 12px;
    color: #999;
}

.card-meta {
    display: flex;
    align-items: center;
    width: 100%;
}

.meta-left {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.meta-item.location {
    color: #666;
}

.meta-item i {
    font-size: 12px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px 8px;
    border: none;
    background: #fff;
    border-radius: 5px;
    font-size: 11px;
    color: #666;
    cursor: pointer;
    width: auto;
    min-width: 40px;
    justify-content: center;
}

.action-btn i {
    font-size: 11px;
}

.action-btn.liked {
    border-color: rgba(245, 87, 108, 0.35);
    color: #f5576c;
}

.action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.card-actions-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
    margin-bottom: 8px;
}

.card-comment-preview {
    margin-top: 12px;
    margin-bottom: 12px;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 10px;
}

 .comment-preview-loading,
 .comment-preview-empty {
     font-size: 13px;
     color: #999;
 }

 .comment-preview-title {
     font-size: 13px;
     font-weight: 600;
     color: #333;
     margin-bottom: 6px;
 }

 .comment-preview-item {
     font-size: 13px;
     line-height: 1.5;
     color: #333;
     margin-top: 6px;
     word-break: break-word;
 }

 .comment-preview-author {
     color: #576b95;
     font-weight: 600;
 }

.top-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #ff6b6b;
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    z-index: 1;
}

/* 加载更多 */
.load-more {
    text-align: center;
    padding: 20px;
    background: #fff;
}

.loading-text {
    color: #999;
    font-size: 14px;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    background: #fff;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #ddd;
}

.empty-state p {
    font-size: 15px;
}

/* 悬浮发布按钮 */
.float-publish-btn {
    position: fixed;
    right: 20px;
    bottom: 90px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.4);
    cursor: pointer;
    z-index: 99;
    transition: transform 0.3s;
}

.float-publish-btn:active {
    transform: scale(0.95);
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    z-index: 100;
}

.nav-item {
    flex: 1;
    text-align: center;
    text-decoration: none;
    color: #999;
    padding: 5px;
}

.nav-item.active {
    color: #4a90e2;
}

.nav-item i {
    font-size: 20px;
    display: block;
    margin-bottom: 3px;
}

.nav-item span {
    font-size: 11px;
}

/* 图片预览 */
.image-preview-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.95);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.image-preview-modal.show {
    display: flex;
}

.image-preview-modal img#previewImg {
    max-width: 90vw !important;
    max-height: 80vh !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
}

.preview-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
    z-index: 10;
}

.preview-prev,
.preview-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10;
}

.preview-prev:hover,
.preview-next:hover {
    background: rgba(0, 0, 0, 0.5);
}

.preview-prev {
    left: 20px;
}

.preview-next {
    right: 20px;
}

.preview-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 10;
}

/* 骨架屏样式 */
.skeleton-card {
    pointer-events: none;
}

.skeleton-avatar {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

.skeleton-line {
    height: 14px;
    border-radius: 4px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    margin-bottom: 8px;
}

.skeleton-name {
    width: 120px;
    height: 16px;
}

.skeleton-content {
    width: 100%;
}

.skeleton-content:last-of-type {
    width: 80%;
}

.skeleton-meta {
    width: 150px;
    height: 12px;
}

.skeleton-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    margin: 10px 0;
    max-width: 280px;
}

.skeleton-image {
    aspect-ratio: 1;
    border-radius: 4px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 加载更多优化 */
.load-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.load-more .loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #e5e5e5;
    border-top-color: #4a90e2;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
