/* ============================================
   弹窗整体
   ============================================ */
.post-modal-overlay {
    display: none; /* 默认隐藏，JS 控制显示 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    z-index: 99999;
    display: flex; /* 打开时会变为 flex */
    align-items: center;
    justify-content: center;
}

/* 卡片主体：宽度1024px，左右flex布局 */
.post-modal-card {
    display: flex;
    width: 1024px;
    max-width: 95vw;
    max-height: 85vh;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalFadeIn 0.25s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== 左侧大图区域 ========== */
.modal-left {
    flex: 0 0 45%;
    background: #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.modal-left img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 保证图片不变形裁切 */
}

/* ========== 右侧信息区 ========== */
.modal-right {
    flex: 1;
    padding: 30px 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
}

/* 顶部操作栏 */
.modal-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}

.modal-action-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: #888;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
}

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

.modal-close-btn {
    background: none;
    border: none;
    font-size: 22px;
    color: #666;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
}

.modal-close-btn:hover {
    background: #f5f5f5;
    color: #000;
}

/* 标题 */
.modal-article-title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    color: #1a1a1a;
    margin: 0;
    word-break: break-word;
}

/* 统计数据 */
.modal-stats {
    display: flex;
    gap: 28px;
    padding: 10px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.stat-icon {
    font-size: 18px;
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #111;
}

.stat-label {
    font-size: 12px;
    color: #888;
}

/* 用户信息 */
.modal-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.author-avatar {
    border-radius: 50%;
    width: 32px;
    height: 32px;
}

.author-name {
    font-size: 15px;
    font-weight: 500;
    color: #444;
}

/* 标签 */
.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.modal-tag {
    background: #eef2ff;
    color: #4f46e5;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

/* 复制按钮 */
.modal-copy-btn {
    background: #1e1e1e;
    border: none;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    padding: 14px 0;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s, transform 0.1s;
    margin-top: auto; /* 始终保持在底部 */
    width: 100%;
}

.modal-copy-btn:hover {
    background: #333;
    transform: scale(1.01);
}

.modal-copy-btn.copied {
    background: #16a34a;
}

/* 加载 / 错误状态 */
.modal-loading, .modal-error {
    text-align: center;
    padding: 40px 20px;
    font-size: 16px;
    color: #888;
}
.modal-error {
    color: #dc2626;
}