/* ========================================
   公开信列表 - public.php 专用样式（PC端）
   设计系统 v4.0 - 卡片式重构
   ======================================== */

/* 页面标题 */
.public-page-header {
    text-align: center;
    padding: 40px 20px 24px;
}
.public-page-header h2 {
    font-family: var(--font-family-display);
    font-size: 28px;
    font-weight: 600;
    color: var(--color-text-primary);
    line-height: 1.4;
    margin: 0;
    letter-spacing: 2px;
}
.public-page-subtitle {
    font-size: 15px;
    color: var(--color-text-muted);
    margin-top: 10px;
    font-family: var(--font-family-body);
}

/* 排序按钮 */
.sort-buttons-container {
    text-align: center;
    margin-bottom: 32px;
}
.sort-buttons {
    display: inline-flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0 12px;
}
.sort-btn {
    padding: 8px 20px;
    border: 1.5px solid var(--color-border);
    background: var(--color-bg-card);
    cursor: pointer;
    transition: all 0.25s ease;
    border-radius: 24px;
    font-size: 14px;
    color: var(--color-text-secondary);
    font-family: var(--font-family-ui);
    line-height: 1.4;
}
.sort-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}
.sort-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

/* 信件列表 */
.letters-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0 12px;
}

/* 卡片 */
.pub-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--color-border-light);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    overflow: hidden;
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.pub-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}
.pub-card.card-pending {
    cursor: default;
}
.pub-card.card-pending:hover {
    background: var(--color-bg-card);
    box-shadow: var(--shadow-card);
    transform: none;
}

/* 元信息分隔点 */
.pub-meta-dot { opacity: 0.4; margin: 0 2px; }
.pub-meta-inline { font-family: var(--font-family-numeric); }

/* 中间：标题 + 摘要 */
.pub-card-body { display: flex; flex-direction: column; gap: 10px; }

/* 标题行：日期+点赞 与 标题 同一行，标题自动截断 */
.pub-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.pub-meta-inline {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 13px;
    color: var(--color-text-muted);
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: 10px;
}

.pub-title {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    flex: 1;
}

.pub-title-text {
    font-size: 18px; font-weight: 600;
    color: var(--color-text-primary); line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.pub-title .tag-featured {
    flex-shrink: 0;
    background: none;
    padding: 0;
    font-size: 16px;
    color: #b8860b;
    display: inline-flex;
    align-items: center;
}
.pub-excerpt {
    font-size: 14px; color: var(--color-text-secondary); line-height: 1.8;
    display: -webkit-box; -webkit-line-clamp: 3;
    -webkit-box-orient: vertical; overflow: hidden;
}

/* 底部：作者 + 箭头 */
.pub-card-footer {
    display: flex; align-items: center;
    justify-content: space-between; padding-top: 6px;
}
.pub-author { display: flex; align-items: center; gap: 10px; }
.pub-avatar {
    width: 30px; height: 30px; border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #fff; display: flex; align-items: center;
    justify-content: center; font-size: 13px; font-weight: 600;
    flex-shrink: 0;
    object-fit: cover;
}
.pub-name { font-size: 13px; color: var(--color-text-secondary); }
.pub-stat { font-size: 13px; color: var(--color-text-muted); display: inline-flex; align-items: center; gap: 3px; }
.pub-card-footer .pub-author .pub-meta-dot { margin: 0 4px; }
.pub-arrow {
    font-size: 14px; color: var(--color-text-muted);
    transition: transform 0.3s ease, color 0.3s ease;
    font-family: var(--font-family-ui);
}
.pub-card:hover .pub-arrow {
    transform: translateX(4px);
    color: var(--color-primary);
}

/* 待审核提示 */
.pending-notice {
    text-align: center;
    padding: 20px;
    color: #999;
}
.pending-notice i {
    font-size: 32px;
    margin-bottom: 10px;
    opacity: 0.5;
}

/* 分页 */
.pagination-wrap {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 30px;
    flex-wrap: wrap;
}
.pagination-wrap a,
.pagination-wrap span {
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s;
}
.pagination-wrap a {
    background: #fff;
    border: 1px solid #e0e0e0;
    color: #666;
}
.pagination-wrap a:hover {
    background: #f5f5f5;
    border-color: #ccc;
}
.pagination-wrap span.current {
    background: var(--color-primary);
    color: #fff;
    border: 1px solid var(--color-primary);
}
