/* ===== 用户中心「我的分享 / 发布作品」 站酷风格 ===== */

.ohc-share-page {
    --ohc-accent: #2163e8;
    --ohc-accent-d: #1a52c4;
    --ohc-accent-soft: #eef3fe;
    --ohc-accent-line: #c9dbff;
    --ohc-line: #e8e8ee;
    --ohc-text: #333;
    --ohc-muted: #9a9aa6;
    padding-bottom: 30px;
}

.ohc-share-head {
    margin-bottom: 18px;
}
.ohc-share-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 6px;
}
.ohc-share-tip {
    font-size: 13px;
    color: var(--ohc-muted);
    margin: 0;
    line-height: 1.6;
}

/* ---- 布局：左编辑 右属性 ---- */
.ohc-editor-layout {
    display: flex;
    gap: 22px;
    align-items: flex-start;
}
.ohc-editor-main {
    flex: 1;
    min-width: 0;
}
.ohc-editor-side {
    width: 300px;
    flex: none;
}

/* ---- 标题 ---- */
.ohc-title-wrap {
    position: relative;
    margin-bottom: 14px;
}
.ohc-title-input {
    width: 100%;
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    font-size: 26px;
    font-weight: 600;
    color: #1a1a1a;
    padding: 8px 60px 10px 2px;
    outline: none;
    transition: border-color .2s;
}
.ohc-title-input::placeholder {
    color: #c6c6d0;
    font-weight: 500;
}
.ohc-title-input:focus {
    border-bottom-color: var(--ohc-accent);
}
.ohc-title-count {
    position: absolute;
    right: 4px;
    top: 16px;
    font-size: 13px;
    color: #c0c0cc;
}

/* ---- 正文编辑框 ---- */
.ohc-editor-box {
    display: flex;
    border: 1px solid var(--ohc-line);
    border-radius: 10px;
    background: #fff;
    min-height: 440px;
    overflow: hidden;
    transition: border-color .2s;
}
.ohc-editor-box:focus-within {
    border-color: #d5d5e0;
}
.ohc-side-tools {
    width: 62px;
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border-right: 1px solid #f3f3f7;
    background: #fafafc;
}
.ohc-tool {
    width: 46px;
    height: 52px;
    border: none;
    border-radius: 10px;
    background: #f2f3f7;
    color: #6b6b78;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 12px;
    transition: .18s;
}
.ohc-tool i { font-size: 17px; }
.ohc-tool:hover {
    background: var(--ohc-accent-soft);
    color: var(--ohc-accent);
}
.ohc-editor-body {
    flex: 1;
    padding: 22px 26px;
    outline: none;
    font-size: 15px;
    line-height: 1.85;
    color: var(--ohc-text);
    overflow-y: auto;
    max-height: 660px;
}
.ohc-editor-body:empty::before {
    content: attr(data-placeholder);
    color: #b9b9c6;
    white-space: pre-line;
    pointer-events: none;
}
.ohc-editor-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    margin: 10px 0;
}
.ohc-editor-body.ohc-dragover {
    background: var(--ohc-accent-soft);
    outline: 2px dashed var(--ohc-accent);
    outline-offset: -6px;
}

/* ---- 底部工具条 ---- */
.ohc-editor-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
}
.ohc-bottom-left {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--ohc-muted);
}
.ohc-uploading { color: var(--ohc-accent); display: inline-flex; align-items: center; gap: 6px; }
.ohc-spin {
    width: 12px;
    height: 12px;
    border: 2px solid var(--ohc-accent-line);
    border-top-color: var(--ohc-accent);
    border-radius: 50%;
    display: inline-block;
    animation: ohc-spin .7s linear infinite;
}
@keyframes ohc-spin { to { transform: rotate(360deg); } }
.ohc-bottom-right { display: flex; gap: 10px; }

/* ---- 按钮 ---- */
.ohc-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #dcdce4;
    background: #fff;
    color: #333;
    padding: 9px 22px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    transition: .18s;
    text-decoration: none;
}
.ohc-btn:hover { background: #f7f7fa; }
.ohc-btn-primary {
    background: var(--ohc-accent);
    border-color: var(--ohc-accent);
    color: #fff;
}
.ohc-btn-primary:hover { background: var(--ohc-accent-d); border-color: var(--ohc-accent-d); }
.ohc-btn-primary:disabled { opacity: .6; cursor: default; }
.ohc-btn-ghost { color: #555; }
.ohc-btn-cancel { color: #999; border-color: transparent; background: transparent; }
.ohc-btn-sm { padding: 6px 14px; font-size: 13px; }
.ohc-editor-msg { font-size: 13px; margin-top: 10px; min-height: 18px; }
.ohc-msg-success { color: #2ba471; }
.ohc-msg-error { color: #e2534b; }

/* ---- 右侧属性栏 ---- */
.ohc-field { margin-bottom: 20px; }
.ohc-field-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #222;
    margin-bottom: 8px;
}
.ohc-field-label em { color: #ff4d4f; font-style: normal; margin-left: 2px; }
.ohc-field-side { font-size: 12px; color: #b0b0ba; }
.ohc-field-side b { color: var(--ohc-accent); font-weight: 600; }
.ohc-field-hint { font-size: 12px; color: #b3b3bf; margin: 7px 0 0; line-height: 1.5; }

.ohc-cover {
    width: 100%;
    aspect-ratio: 16 / 10;
    border: 1px dashed #d8d8e2;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    background: #fafafc;
    transition: border-color .2s;
}
.ohc-cover:hover { border-color: var(--ohc-accent); }
.ohc-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ohc-cover-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: #b0b0ba;
    font-size: 13px;
}
.ohc-cover-empty i { font-size: 22px; }

.ohc-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dcdce4;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    color: #333;
    outline: none;
    cursor: pointer;
}
.ohc-select:focus { border-color: var(--ohc-accent); }

.ohc-tag-box {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 10px;
    border: 1px solid #dcdce4;
    border-radius: 8px;
    min-height: 44px;
    background: #fff;
    cursor: text;
    transition: border-color .2s;
}
.ohc-tag-box:focus-within { border-color: var(--ohc-accent); }
.ohc-tag-box .ohc-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--ohc-accent-soft);
    color: var(--ohc-accent);
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 13px;
    line-height: 1.4;
}
.ohc-chip .ohc-chip-x {
    cursor: pointer;
    color: #aaa;
    font-size: 15px;
    line-height: 1;
}
.ohc-chip .ohc-chip-x:hover { color: #ff4d4f; }
.ohc-tag-input {
    border: none;
    outline: none;
    flex: 1;
    min-width: 100px;
    font-size: 14px;
    padding: 3px 0;
    background: transparent;
}

/* ---- 我的作品列表 ---- */
.ohc-share-sub {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 34px 0 14px;
    padding-top: 20px;
    border-top: 1px solid #f2f2f6;
}
.ohc-share-list { }
.ohc-share-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--ohc-line);
    border-radius: 10px;
    margin-bottom: 12px;
    background: #fff;
    transition: box-shadow .2s;
}
.ohc-share-row:hover { box-shadow: 0 4px 16px rgba(0,0,0,.05); }
.ohc-share-thumb {
    width: 88px;
    height: 88px;
    flex: none;
    border-radius: 8px;
    overflow: hidden;
    background: #f4f4f8;
}
.ohc-share-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ohc-share-info { flex: 1; min-width: 0; }
.ohc-share-row-title {
    font-size: 15px;
    font-weight: 600;
    color: #222;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ohc-share-row-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: var(--ohc-muted);
}
.ohc-share-row-tags { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.ohc-share-row-tags .ohc-chip {
    background: #f5f5f9;
    color: #777;
    border-radius: 5px;
    padding: 2px 7px;
    font-size: 12px;
}
.ohc-chip-cat {
    background: var(--ohc-accent-soft);
    color: var(--ohc-accent);
    border-radius: 5px;
    padding: 2px 8px;
    font-size: 12px;
}
.ohc-share-reason { font-size: 12px; color: #e2534b; margin-top: 8px; }
.ohc-share-row-actions {
    flex: none;
    display: flex;
    gap: 8px;
    align-items: center;
}
.ohc-share-del {
    border: none;
    background: transparent;
    color: #b0b0ba;
    cursor: pointer;
    font-size: 13px;
    padding: 6px 8px;
}
.ohc-share-del:hover { color: #ff4d4f; }
.ohc-share-empty { color: var(--ohc-muted); font-size: 14px; padding: 20px 0; }

/* ---- 状态徽章 ---- */
.ohc-badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 12px;
    line-height: 1.6;
}
.ohc-badge-pending { background: #fff4e5; color: #e8890c; }
.ohc-badge-approved, .ohc-badge-publish { background: #e7f7ef; color: #1f9d55; }
.ohc-badge-rejected, .ohc-badge-draft { background: #fdecec; color: #e2534b; }

/* ---- 预览弹层 ---- */
.ohc-preview-mask {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}
.ohc-preview-modal {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 760px;
    max-height: 86vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.ohc-preview-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 22px;
    border-bottom: 1px solid #f0f0f4;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}
.ohc-preview-close {
    border: none;
    background: transparent;
    font-size: 24px;
    line-height: 1;
    color: #999;
    cursor: pointer;
}
.ohc-preview-body { padding: 24px 28px; overflow-y: auto; }
.ohc-preview-title { font-size: 22px; font-weight: 700; color: #1a1a1a; margin: 0 0 18px; }
.ohc-preview-content { font-size: 15px; line-height: 1.85; color: #333; }
.ohc-preview-content img { max-width: 100%; border-radius: 8px; margin: 12px 0; }
.ohc-preview-content:empty::before { content: '（暂无正文）'; color: #bbb; }

/* ---- 响应式 ---- */
@media (max-width: 900px) {
    .ohc-editor-layout { flex-direction: column; }
    .ohc-editor-side { width: 100%; }
    .ohc-title-input { font-size: 21px; }
}

/* ===== 首页多图卡片堆叠效果（套图视觉） ===== */

/* 堆叠容器：让 entry-media 成为定位参考（首页 item-grid + 归档 ohc-masonry 均需） */
.ohc-masonry .post-item.ohc-has-stack .entry-media,
.post-item.ohc-has-stack .entry-media {
    position: relative;
    overflow: visible;
}

/* 堆叠虚影层：半透明、错开、圆角跟随卡片 */
.ohc-stack-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    pointer-events: none; /* 不阻挡点击 */
    z-index: 0;
    /* 向左上角偏移，越底层偏移越大 */
    transform: translate(calc(-1 * var(--ohc-s-offset, 5px)), calc(-1 * var(--ohc-s-offset, 5px)));
    opacity: var(--ohc-s-opacity, 0.3);
    transition: transform 0.35s ease, opacity 0.35s ease;
}

/* hover 时堆叠层收拢，增强聚焦感 */
.ohc-masonry .post-item.ohc-has-stack:hover .ohc-stack-layer,
.post-item.ohc-has-stack:hover .ohc-stack-layer {
    transform: translate(0, 0) !important;
    opacity: 0 !important;
}

/* 确保主图（media-img / lazy bg）在堆叠层之上 */
.ohc-masonry .post-item.ohc-has-stack .entry-media > a.media-img,
.ohc-masonry .post-item.ohc-has-stack .entry-media > a.media-img > *,
.post-item.ohc-has-stack .entry-media > a.media-img,
.post-item.ohc-has-stack .entry-media > a.media-img > * {
    position: relative;
    z-index: 1;
}

/* 暗色模式：堆叠层略暗一点避免过亮 */
html[data-bs-theme="dark"] .ohc-stack-layer {
    filter: brightness(0.7);
}
