/* morenice 知墨设计 - 公共样式 */
body { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif; background: #f8fafc; color: #0f172a; margin: 0; padding: 0; }
.font-title { font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; font-weight: 600; }

/* 搜索弹窗 */
#search-overlay { position: fixed; inset: 0; background: rgba(248, 250, 252, 0.97); z-index: 200; display: none; align-items: center; justify-content: center; }
#search-overlay.open { display: flex; }
#search-overlay input { width: 480px; max-width: 85vw; border: none; border-bottom: 2px solid #3388ff; outline: none; font-size: 22px; padding: 10px 0; background: transparent; color: #0f172a; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif; font-weight: 300; }
#search-overlay input::placeholder { color: #94a3b8; }

/* 移动菜单 */
#mobile-menu { position: fixed; top: 56px; left: 0; right: 0; bottom: 0; background: rgba(248, 250, 252, 0.98); z-index: 150; display: none; overflow-y: auto; }
#mobile-menu.open { display: block; }

/* 文章卡片 */
.article-card { height: 152px; transition: all 0.25s ease; }
.article-card:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(51, 136, 255, 0.08); }
@media (max-width: 767px) { .article-card { height: auto; transition: all 0.2s ease; } .article-card:hover { transform: none; box-shadow: none; } .article-card:active { transform: scale(0.98); } }

/* 幻灯片 */
.slide-gradient { background: linear-gradient(90deg, rgba(248, 250, 252, 0.7) 0%, rgba(248, 250, 252, 0) 60%); }
.slide-text-bg { background: linear-gradient(transparent, rgba(0, 0, 0, 0.06)); }
.thumb-active { box-shadow: inset 0 0 0 2px #3388ff; }

/* 边框与卡片 */
.header-border { border-bottom: 1px solid #e2e8f0; }
.card-border { border: 1px solid #e2e8f0; }
.content-card { background: #ffffff; border: 1px solid #e2e8f0; border-radius: 2px; }
.aside-card-bg { background: #ffffff; }
.aside-sticky { position: sticky; top: 88px; }

/* 标签 */
.tag-item { background: #f8fafc; border-radius: 3px; transition: all 0.2s; }
.tag-item:hover { background: #3388ff; color: white; border-color: #3388ff; }
.tag-item:active { background: #3388ff; color: white; border-color: #3388ff; }

/* 页脚 */
.footer-bg { background: #0f172a; }
.footer-icon-bg { background: rgba(255, 255, 255, 0.1); border-radius: 1px; }

/* 分页 */
.pagination-item { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border: 1px solid #e2e8f0; background: #fff; border-radius: 2px; font-size: 13px; transition: all 0.2s; }
.pagination-active { background: #3388ff; color: white; border-color: #3388ff; }
.pagination-item:hover:not(.pagination-active):not(.cursor-not-allowed) { border-color: #3388ff; }

/* Logo */
.logo-box { background: #3388ff; border-radius: 2px; }

/* 回到顶部 */
#back-to-top.visible { opacity: 1; visibility: visible; }

/* 导航链接 */
.nav-link { transition: all 0.2s; display: block; }
.nav-link:hover { background: #3388ff; color: white; }
.category-link { transition: color 0.2s; }
.category-link:hover { color: #3388ff; }

/* 文本裁剪 */
.line-clamp-1 { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; }
.line-clamp-2 { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }

/* 海报弹窗 */
.poster-modal { position: fixed !important; left: 0; right: 0; top: 0; bottom: 0; z-index: 99999; background: rgba(15,23,42,0.5); display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px); visibility: hidden; opacity: 0; pointer-events: none; transition: opacity .2s,visibility .2s; }
.poster-modal.show { visibility: visible; opacity: 1; pointer-events: auto; }
.poster-content { position: relative; z-index: 100000; background: #fff; border-radius: 4px; padding: 24px; max-width: 420px; width: 92%; border: 1px solid #e2e8f0; }
.poster-preview { background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.08); width: 380px; max-width: 100%; height: 500px; border-radius: 4px; border: 1px solid #e2e8f0; margin-bottom: 16px; overflow: hidden; position: relative; }
.poster-thumb-wrap { width: 100%; height: 200px; overflow: hidden; border-radius: 4px 4px 0 0; }
.poster-thumb-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.poster-info { padding: 16px 18px 12px; height: 300px; box-sizing: border-box; display: flex; flex-direction: column; }
.poster-info-title { font-weight: 700; font-size: 17px; line-height: 1.35; color: #0f172a; margin-bottom: 4px; }
.poster-info-desc { font-size: 12px; line-height: 1.6; color: #334155; margin-bottom: 8px; max-height: 58px; overflow: hidden; }
.poster-info-meta { font-size: 11px; color: #64748b; padding-bottom: 8px; border-bottom: 1px solid #e2e8f0; }
.poster-qrcode-wrap { padding-top: 0; display: flex; flex-direction: column; align-items: center; margin-top: auto; }
.poster-qrcode-text { font-size: 10px; color: #64748b; margin: 4px 0 6px; }
.poster-footer-logo { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 6px; padding-top: 6px; border-top: 1px solid #e2e8f0; width: 100%; }
.poster-logo-img { height: 24px; width: auto; }
.poster-btn-row { display: flex; gap: 8px; flex-direction: row-reverse; }
.poster-download-btn { flex: 1; padding: 9px 0; background: #3388ff; color: #fff; border: none; border-radius: 2px; font-size: 13px; cursor: pointer; font-weight: 500; }
.poster-download-btn:hover { opacity: 0.85; }
.poster-close-btn { flex: 1; padding: 9px 0; background: #e2e8f0; color: #334155; border: none; border-radius: 2px; font-size: 13px; cursor: pointer; font-weight: 500; }

/* 评论 */
.cancel-reply { display: none; font-size: 12px; color: #3388ff; margin-left: 8px; }

/* 文章内引用框 */
.article-intro-box { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 2px; padding: 16px; }

/* 缩略图占位 */
.thumb-placeholder { background: #f1f5f9; }

/* 分隔线 */
.share-divider { width: 1px; height: 20px; background: #e2e8f0; margin: 0 2px; }

/* 海报LOGO */
.poster-footer-logo { display: flex; justify-content: center; margin-top: 8px; }
.poster-logo-img { height: 28px; width: auto; }

/* 友链 */
.flinks{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;}
@media(min-width:640px){.flinks{grid-template-columns:repeat(6,1fr);}}
@media(min-width:1024px){.flinks{grid-template-columns:repeat(8,1fr);}}
.flink-item{display:flex;align-items:center;gap:6px;padding:6px 10px;border-radius:2px;border:1px solid #e2e8f0;background:#fff;text-decoration:none;transition:all .2s;}
.flink-item:hover{border-color:#3388ff;box-shadow:0 2px 8px rgba(51,136,255,.06);}
.flink-item .flink-avatar{width:22px;height:22px;border-radius:2px;flex-shrink:0;display:flex;align-items:center;justify-content:center;overflow:hidden;background:#f8fafc;}
.flink-item .flink-avatar img{width:16px;height:16px;object-fit:contain;}
.flink-item .flink-avatar.flink-empty{background:#f8fafc;}
.flink-item .flink-name{font-size:12px;color:#334155;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;}
.flink-item:hover .flink-name{color:#3388ff;}

/* 复制确认 */
.copy-btn[data-ok]::after{content:'✓';position:absolute;top:-2px;right:-2px;width:16px;height:16px;border-radius:2px;background:#10b981;color:#fff;font-size:10px;font-weight:700;display:flex;align-items:center;justify-content:center;line-height:1;}