/* OmniPress 侧边栏小工具样式 */
.op-widget-list { list-style: none; margin: 0; padding: 0; }

/* ===== 热门文章：首条大图卡片 ===== */
.op-widget-featured { padding: 0 0 12px; border-bottom: 1px solid var(--op-border, #eef0f3); margin-bottom: 4px; }
.op-widget-featured-thumb { position: relative; display: block; border-radius: 10px; overflow: hidden; }
.op-widget-featured-thumb img { width: 100%; height: 150px; object-fit: cover; display: block; transition: transform .4s ease; }
.op-widget-featured:hover .op-widget-featured-thumb img { transform: scale(1.05); }
.op-widget-featured-rank { position: absolute; top: 10px; left: 10px; background: linear-gradient(135deg, #f56c6c, #ff8a6c); color: #fff; font-size: 12px; font-weight: 700; line-height: 1; padding: 6px 10px; border-radius: 6px; box-shadow: 0 3px 10px rgba(245,108,108,.4); letter-spacing: .05em; }
.op-widget-featured-new { position: absolute; top: 10px; right: 10px; background: #f56c6c; color: #fff; font-size: 10px; font-weight: 700; line-height: 1; padding: 5px 8px; border-radius: 5px; }
.op-widget-featured-mask { position: absolute; left: 0; right: 0; bottom: 0; height: 70%; background: linear-gradient(180deg, rgba(15,23,42,0) 0%, rgba(15,23,42,.65) 100%); pointer-events: none; }
.op-widget-featured-title { position: absolute; left: 12px; right: 12px; bottom: 10px; margin: 0; color: #fff; font-size: 15px; font-weight: 600; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-shadow: 0 1px 4px rgba(0,0,0,.35); }
.op-widget-featured-meta { display: flex; align-items: center; gap: 12px; padding: 10px 2px 0; }
.op-widget-featured-meta .op-widget-views, .op-widget-featured-meta .op-widget-date { font-size: 12px; color: var(--op-text-3, #98a2b3); }

/* ===== 热门文章：其余条左缩略图 + 右标题/摘要，彩色排序号 ===== */
.op-widget-rank-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--op-border, #eef0f3); }
.op-widget-rank-item:last-child { border-bottom: none; }
.op-widget-rank-thumb { position: relative; flex-shrink: 0; width: 96px; height: 72px; border-radius: 8px; overflow: hidden; display: block; background: #eef1f5; }
.op-widget-rank-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.op-widget-rank-item:hover .op-widget-rank-thumb img { transform: scale(1.06); }
.op-widget-rank-num { position: absolute; top: 4px; left: 4px; min-width: 22px; height: 22px; line-height: 22px; text-align: center; border-radius: 6px; color: #fff !important; font-size: 13px; font-weight: 800; box-shadow: 0 2px 8px rgba(0,0,0,.35); border: 1.5px solid #fff; z-index: 3; background-color: #f59e0b; }
.op-widget-rank-num.rank-2 { background-color: #f59e0b !important; }
.op-widget-rank-num.rank-3 { background-color: #3b82f6 !important; }
.op-widget-rank-num.rank-4 { background-color: #10b981 !important; }
.op-widget-rank-num.rank-5 { background-color: #8b5cf6 !important; }
.op-widget-rank-num.rank-6 { background-color: #ec4899 !important; }
.op-widget-rank-num.rank-7 { background-color: #f97316 !important; }
.op-widget-rank-num.rank-8 { background-color: #06b6d4 !important; }
.op-widget-rank-num.rank-9 { background-color: #6366f1 !important; }
.op-widget-rank-num.rank-10 { background-color: #ef4444 !important; }
.op-widget-rank-new { position: absolute; top: 4px; right: 4px; font-size: 10px; line-height: 1; padding: 2px 5px; border-radius: 4px; background: #f56c6c; color: #fff; font-weight: 600; z-index: 3; }
.op-widget-rank-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.op-widget-rank-title { display: block; font-size: 14px; font-weight: 600; line-height: 1.5; color: var(--op-text, #1a202c); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.op-widget-rank-title:hover { color: var(--op-primary, #409EFF); }
.op-widget-rank-excerpt { margin: 2px 0 4px; font-size: 12px; line-height: 1.5; color: var(--op-text-3, #98a2b3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.op-widget-rank-sub { margin-top: auto; display: flex; align-items: center; gap: 10px; }
.op-widget-rank-sub .op-widget-views { font-size: 12px; color: var(--op-text-3, #98a2b3); }
.op-widget-cat-link { font-size: 11px; line-height: 1; padding: 3px 7px; border-radius: 4px; background: rgba(64,158,255,.1); color: var(--op-primary, #409EFF); }
.op-widget-cat-link:hover { background: var(--op-primary, #409EFF); color: #fff; }
.op-widget-cat-link:first-child { margin-left: auto; }

.op-widget-list-item { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--op-border, #eef0f3); font-size: 14px; }
.op-widget-list-item:last-child { border-bottom: none; }
.op-widget-rank { flex-shrink: 0; width: 20px; height: 20px; line-height: 20px; text-align: center; border-radius: 6px; background: #f1f3f5; color: #98a2b3; font-size: 12px; font-weight: 600; }
.op-widget-rank.is-top { background: var(--op-primary, #409EFF); color: #fff; }
.op-widget-link { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--op-text-2, #4b5563); }
.op-widget-link:hover { color: var(--op-primary, #409EFF); }
.op-widget-views, .op-widget-date { flex-shrink: 0; font-size: 12px; color: #98a2b3; }
.op-widget-badge-new { flex-shrink: 0; font-size: 11px; line-height: 1; padding: 3px 6px; border-radius: 4px; background: #f56c6c; color: #fff; font-weight: 600; }
.op-widget-dot { flex-shrink: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--op-primary, #409EFF); }
.op-widget-quote { position: relative; padding: 10px 14px; background: linear-gradient(135deg, rgba(64,158,255,.05), rgba(139,92,246,.05)); border-radius: 12px; }
.op-widget-quote-mark { position: absolute; top: -6px; left: 12px; font-size: 48px; font-family: Georgia, serif; color: rgba(64,158,255,.25); line-height: 1; }
.op-widget-quote-text { margin: 0; font-size: 14px; line-height: 1.8; color: #374151; font-style: italic; padding-left: 8px; position: relative; }
.op-widget-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.op-widget-tag { font-size: 13px; padding: 4px 12px; border-radius: 999px; background: #f1f3f5; color: #4b5563; transition: all .2s; }
.op-widget-tag:hover { background: var(--op-primary, #409EFF); color: #fff; }
.op-widget-links { display: flex; flex-wrap: wrap; gap: 10px; }
.op-widget-link-item { font-size: 13px; padding: 5px 12px; border: 1px solid var(--op-border, #eef0f3); border-radius: 8px; color: #4b5563; transition: all .2s; }
.op-widget-link-item:hover { border-color: var(--op-primary, #409EFF); color: var(--op-primary, #409EFF); }
.op-widget-sub { list-style: none; margin: 6px 0 4px; padding: 4px 0 4px 16px !important; border-left: 2px solid var(--op-border, #eef0f3); }
.op-widget-sub li { padding: 4px 0; font-size: 13px; display: flex; align-items: center; gap: 6px; border-bottom: none !important; }
.op-widget-sub li a { color: var(--op-text-2, #4b5563); }
.op-widget-sub li a:hover { color: var(--op-primary, #409EFF); }
.op-widget-count { color: #98a2b3; }
.op-widget-donate-text { font-size: 13px; color: #6b7280; line-height: 1.7; margin: 0 0 12px; }
.op-widget-donate-qrs { display: flex; gap: 8px; flex-wrap: nowrap; }
.op-widget-qr { flex: 1; text-align: center; }
.op-widget-qr img { width: 100%; max-width: 120px; border-radius: 10px; border: 1px solid var(--op-border, #eef0f3); }
.op-widget-qr span { display: block; margin-top: 6px; font-size: 12px; color: #98a2b3; }
.op-widget-tabs-nav { display: flex; gap: 4px; margin-bottom: 10px; border-bottom: 1px solid var(--op-border, #eef0f3); }
.op-widget-tab-btn { border: none; background: none; padding: 8px 12px; font-size: 14px; color: #6b7280; cursor: pointer; position: relative; }
.op-widget-tab-btn.is-active { color: var(--op-primary, #409EFF); font-weight: 600; }
.op-widget-tab-btn.is-active::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; background: var(--op-primary, #409EFF); border-radius: 2px; }
.op-widget-tab-pane { display: none; }
.op-widget-tab-pane:first-child { display: block; }

/* ===== 站长信息板 ===== */
.op-widget-admin { text-align: center; }
.op-widget-admin-head { margin-bottom: 14px; }
.op-widget-admin-avatar {
    display: inline-block; width: 88px; height: 88px;
    border-radius: 50%; overflow: hidden;
    border: 3px solid var(--op-primary, #409EFF);
    box-shadow: 0 6px 20px rgba(64,158,255,.28);
    margin-bottom: 12px;
    transition: transform .3s ease;
}
.op-widget-admin-avatar:hover { transform: scale(1.05); }
.op-widget-admin-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.op-widget-admin-name { font-size: 17px; font-weight: 700; color: var(--op-text, #1a202c); line-height: 1.4; }
.op-widget-admin-desc { margin: 6px auto 0; font-size: 12px; color: var(--op-text-3, #98a2b3); line-height: 1.6; max-width: 92%; }

/* 站点数据统计 */
.op-widget-admin-stats {
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px;
    padding: 12px 0; margin-bottom: 12px;
    border-top: 1px dashed var(--op-border, #eef0f3);
    border-bottom: 1px dashed var(--op-border, #eef0f3);
}
.op-widget-admin-stat { padding: 2px 0; }
.op-widget-admin-stat-num { display: block; font-size: 16px; font-weight: 700; color: var(--op-primary, #409EFF); line-height: 1.3; }
.op-widget-admin-stat-label { display: block; font-size: 11px; color: var(--op-text-3, #98a2b3); margin-top: 2px; }

/* 联系方式 */
.op-widget-admin-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.op-widget-admin-link {
    display: inline-flex; align-items: center; justify-content: center; gap: 5px;
    font-size: 12px; font-weight: 600; line-height: 1; padding: 7px 14px;
    border-radius: 999px; color: #fff !important; text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease;
}
.op-widget-admin-link-icon { flex-shrink: 0; display: inline-block; }
.op-widget-admin-link:hover { transform: translateY(-2px); color: #fff !important; }
.op-widget-admin-link--tencent-qq { background: linear-gradient(135deg, #12b7f5, #1e9fff); box-shadow: 0 4px 12px rgba(30,159,255,.3); }
.op-widget-admin-link--wechat { background: linear-gradient(135deg, #07c160, #10c96e); box-shadow: 0 4px 12px rgba(7,193,96,.3); }
.op-widget-admin-link--mail { background: linear-gradient(135deg, #ff6b6b, #ee5a24); box-shadow: 0 4px 12px rgba(238,90,36,.3); }
.op-widget-admin-link--weibo { background: linear-gradient(135deg, #ff9402, #f70b0b); box-shadow: 0 4px 12px rgba(247,11,11,.3); }

/* 进入本站按钮 */
.op-widget-admin-btn {
    display: block; width: 100%; box-sizing: border-box;
    padding: 10px 0; font-size: 14px; font-weight: 600;
    border-radius: 10px; color: #fff; text-align: center;
    background: linear-gradient(135deg, var(--op-primary, #409EFF), var(--op-accent, #8b5cf6));
    box-shadow: 0 5px 16px color-mix(in srgb, var(--op-primary, #409EFF) 35%, transparent);
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
    text-decoration: none;
}
.op-widget-admin-btn:hover { transform: translateY(-2px); filter: brightness(1.06); color: #fff; }

/* 微信二维码浮层 */
.op-widget-admin-link--qr { cursor: pointer; border: none; font-family: inherit; }
.op-widget-qr-mask {
    position: fixed; inset: 0; z-index: 99999;
    background: rgba(15, 23, 42, .55);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.op-widget-qr-mask[hidden] { display: none; }
.op-widget-qr-box {
    position: relative; width: 260px; max-width: 90vw;
    background: #fff; border-radius: 16px; padding: 24px 20px 20px;
    text-align: center; box-shadow: 0 24px 60px rgba(0,0,0,.25);
    animation: op-qr-in .28s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes op-qr-in {
    from { opacity: 0; transform: translateY(16px) scale(.94); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.op-widget-qr-close {
    position: absolute; top: 10px; right: 12px;
    border: none; background: none; font-size: 22px; line-height: 1;
    color: #9ca3af; cursor: pointer; padding: 4px;
    transition: color .2s ease, transform .2s ease;
}
.op-widget-qr-close:hover { color: #ef4444; transform: rotate(90deg); }
.op-widget-qr-title { font-size: 15px; font-weight: 600; color: #1f2937; margin-bottom: 14px; }
.op-widget-qr-img {
    width: 180px; height: 180px; object-fit: contain;
    border: 1px solid #eef0f3; border-radius: 10px; padding: 6px;
    background: #fff;
}
.op-widget-qr-id { margin-top: 12px; font-size: 12px; color: #6b7280; word-break: break-all; }


/* ========== 暗黑模式适配（小工具） ========== */
html[data-theme="dark"] .op-widget-rank-thumb { background: #111827; }
html[data-theme="dark"] .op-widget-rank { background: #374151; color: #9ca3af; }
html[data-theme="dark"] .op-widget-rank.is-top { background: var(--op-primary); color: #fff; }
html[data-theme="dark"] .op-widget-tag { background: #374151; color: #9ca3af; }
html[data-theme="dark"] .op-widget-tag:hover { background: var(--op-primary); color: #fff; }
html[data-theme="dark"] .op-widget-link-item { border-color: #374151; color: #9ca3af; }
html[data-theme="dark"] .op-widget-quote { background: linear-gradient(135deg, rgba(37,99,235,.12), rgba(139,92,246,.12)); }
html[data-theme="dark"] .op-widget-quote-mark { color: rgba(96,165,250,.3); }
html[data-theme="dark"] .op-widget-quote-text { color: #d1d5db; }
html[data-theme="dark"] .op-widget-donate-text { color: #9ca3af; }
html[data-theme="dark"] .op-widget-qr img { border-color: #374151; }
html[data-theme="dark"] .op-widget-qr-box { background: #1f2937; box-shadow: 0 24px 60px rgba(0,0,0,.6); }
html[data-theme="dark"] .op-widget-qr-title { color: #e5e7eb; }
html[data-theme="dark"] .op-widget-qr-img { background: #fff; border-color: #374151; }
html[data-theme="dark"] .op-widget-qr-id { color: #9ca3af; }
html[data-theme="dark"] .op-widget-tab-btn { color: #9ca3af; }
html[data-theme="dark"] .op-widget-tab-btn.is-active { color: var(--op-primary); }
html[data-theme="dark"] .op-widget-admin-name { color: #e5e7eb; }
html[data-theme="dark"] .op-widget-admin-link { color: #fff !important; }
