/* ===========================================================================
   Lumina Blog v1.2.0 · components.css
   组件（侧边栏小工具）样式 + 点击回弹动画 + 音乐播放器 + 帖子板
   规范：纯色、无渐变、淡色系；所有交互元素点击时都有「回弹/缩放」反馈。
   =========================================================================== */

/* ---------------- 点击回弹动画 ---------------- */
@keyframes lb-bounce {
    0%   { transform: scale(1); }
    35%  { transform: scale(.93); }
    65%  { transform: scale(1.03); }
    100% { transform: scale(1); }
}
@keyframes lb-pop {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.18); }
    100% { transform: scale(1); }
}
[data-bounce] { transition: transform .12s ease; }
[data-bounce]:active { transform: scale(.95); }
.is-bounce { animation: lb-bounce .34s ease both; }
.is-pop { animation: lb-pop .32s ease both; }

/* ---------------- 组件容器 ---------------- */
.comp, .widget {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 18px; margin-bottom: 16px;
}
.col-side > .widget:last-child, .col-side > .comp:last-child { margin-bottom: 0; }
.widget-title, .comp-title {
    font-size: .98rem; font-weight: 700; margin: 0 0 12px;
    display: flex; align-items: center; gap: 8px;
}
.widget-title::before, .comp-title::before {
    content: ""; width: 4px; height: 16px; border-radius: 3px; background: var(--primary); display: inline-block;
}
.comp-desc { color: var(--muted); font-size: .86rem; margin: -6px 0 10px; }
.widget-empty { color: var(--muted); font-size: .88rem; padding: 10px 0; }

/* ---------------- 顶部滚动条 ---------------- */
.ticker-box {
    display: flex; align-items: center; gap: 10px; background: var(--card);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 9px 14px; margin-bottom: 18px; overflow: hidden;
}
.ticker-icon { color: var(--primary-strong, var(--primary)); font-size: .85rem; font-weight: 700; flex: 0 0 auto; }
.ticker-track { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); font-size: .9rem; }
.ticker-gap { width: 26px; display: inline-block; }
.ticker-view { color: var(--muted); font-size: .78rem; flex: 0 0 auto; }

/* ---------------- 搜索组件 ---------------- */
.widget-search .search-form { margin: 0; }

/* ---------------- 个人资料 ---------------- */
.widget-profile .profile-avatar { margin: 0 auto; border: 1px solid var(--border); }
.widget-profile .profile-body { text-align: center; }

/* ---------------- 公告 ---------------- */
.notice-body { display: flex; gap: 10px; align-items: flex-start; color: var(--text); font-size: .92rem; }
.notice-icon { color: var(--primary-strong, var(--primary)); font-weight: 700; flex: 0 0 auto; }

/* ---------------- 文章列表 ---------------- */
.widget-post-list, .widget-links, .widget-link-list { list-style: none; margin: 0; padding: 0; }
.widget-post-list li, .widget-link-list li, .widget-links li { padding: 7px 0; border-bottom: 1px dashed var(--border); }
.widget-post-list li:last-child, .widget-link-list li:last-child, .widget-links li:last-child { border-bottom: 0; }
.widget-post-list a, .widget-link-list a, .widget-links a { color: var(--text); font-size: .92rem; }
.widget-post-list a:hover, .widget-link-list a:hover, .widget-links a:hover { color: var(--primary); }
.widget-post-list .pl-meta { color: var(--muted); font-size: .76rem; margin-left: 6px; }

/* ---------------- 统计 ---------------- */
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stats-item { background: var(--bg-soft); border-radius: var(--radius-sm); padding: 12px; text-align: center; }
.stats-item .num { display: block; font-size: 1.3rem; font-weight: 700; color: var(--primary-strong); }
.stats-item .label { display: block; color: var(--muted); font-size: .78rem; margin-top: 2px; }

/* ---------------- 在线访客 ---------------- */
.online-grid { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.online-item { display: flex; flex-direction: column; font-size: .82rem; color: var(--muted); }
.online-item b { font-size: 1.1rem; color: var(--text); }
.online-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--primary); display: inline-block; margin-right: 5px; }

/* ---------------- 倒计时 ---------------- */
.cd-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cd-cell { background: var(--bg-soft); border-radius: var(--radius-sm); padding: 10px 4px; text-align: center; }
.cd-cell b { display: block; font-size: 1.15rem; color: var(--primary-strong); }
.cd-cell span { font-size: .74rem; color: var(--muted); }

/* ---------------- 音乐播放器 ---------------- */
.widget-music .music-audio { width: 100%; margin-top: 8px; }
.music-head { display: flex; align-items: center; gap: 10px; }
.music-cover {
    width: 46px; height: 46px; border-radius: 10px; object-fit: cover;
    background: var(--primary-soft); flex: 0 0 auto;
}
.music-info { min-width: 0; flex: 1; }
.music-name { font-weight: 600; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-artist { color: var(--muted); font-size: .78rem; }
.music-controls { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.music-btn {
    width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border);
    background: var(--bg-soft); color: var(--text); font-size: .95rem; cursor: pointer; font-family: inherit;
}
.music-btn.music-main { width: 46px; height: 46px; background: var(--primary-bg, var(--primary)); border-color: var(--primary-bg, var(--primary)); color: var(--on-primary, #fff); font-size: 1.05rem; }
.music-progress { flex: 1; height: 5px; border-radius: 3px; background: var(--bg-soft); overflow: hidden; }
.music-progress > i { display: block; height: 100%; width: 0; background: var(--primary); }
.music-desc { color: var(--muted); font-size: .78rem; margin-top: 8px; }
.music-frame { width: 100%; height: 86px; border: 0; border-radius: 10px; margin-top: 8px; }

/* ---------------- 点赞 / 分享 ---------------- */
.widget-like, .widget-share { text-align: center; }
.like-btn, .share-btn {
    display: inline-flex; align-items: center; gap: 7px; padding: 9px 18px; border-radius: 999px;
    border: 1px solid var(--border); background: var(--bg-soft); color: var(--text);
    font: inherit; font-weight: 600; cursor: pointer; transition: transform .12s ease, background-color .2s ease;
}
.like-btn:hover, .share-btn:hover { border-color: var(--primary); color: var(--primary-strong); }
.like-btn:active, .share-btn:active { transform: scale(.93); }
.like-btn.is-liked { background: var(--primary-bg, var(--primary)); border-color: var(--primary-bg, var(--primary)); color: var(--on-primary, #fff); }
/* v1.5.1：点赞请求进行中 / 失败 的可见反馈（旧版点了没反应，用户以为坏了） */
.like-btn.is-loading { opacity: .65; cursor: progress; }
.like-btn.is-error { border-color: #ef4444; color: #ef4444; animation: lb-shake .3s ease; }
.like-btn[disabled] { cursor: default; }
@keyframes lb-shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.like-icon { font-size: .95rem; }
.like-count-inline, .like-unit { color: var(--muted); font-size: .82rem; }
.share-btns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.share-copy, .share-qq, .share-weibo { font-size: .84rem; padding: 8px 14px; }

/* ---------------- 随机文章 ---------------- */
.random-desc { color: var(--muted); font-size: .84rem; margin-bottom: 10px; }

/* ---------------- 快捷留言 ---------------- */
.qm-form textarea { min-height: 74px; }
.qm-form .form-control { margin-bottom: 8px; }

/* ---------------- 帖子板（前台） ---------------- */
.board-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.board-sub { color: var(--muted); font-size: .88rem; margin: 0 0 16px; }
.board-notice { background: var(--primary-soft); border-radius: var(--radius-sm); padding: 10px 14px; color: var(--primary-strong); font-size: .88rem; margin-bottom: 16px; }
.board-topic { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.board-topic-title { font-size: 1.1rem; margin: 0 0 6px; }
.board-topic-title a { color: var(--text); }
.board-topic-title a:hover { color: var(--primary); }
.board-topic-meta { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: .8rem; margin-bottom: 8px; }
.board-topic-excerpt { color: var(--muted); }
.board-pin { font-size: .72rem; background: var(--primary-bg, var(--primary)); color: var(--on-primary, #fff); padding: 2px 8px; border-radius: 999px; }
.board-replies { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.board-reply { background: var(--bg-soft); border-radius: var(--radius-sm); padding: 11px 14px; }
.board-reply-head { display: flex; gap: 10px; align-items: center; font-size: .82rem; color: var(--muted); margin-bottom: 4px; }
.board-reply-head b { color: var(--text); }
.board-reply-body { font-size: .92rem; }
.board-form { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-top: 16px; }
.board-form .form-row { margin-bottom: 12px; }
.board-actions { display: flex; gap: 8px; margin-top: 10px; }
.board-crumb { color: var(--muted); font-size: .84rem; margin-bottom: 12px; }
.board-topic-article { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.board-topic-article .article-body { color: var(--text); }

/* ---------------- 代码块 / 表格 ---------------- */
.card table, .article-body table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.card th, .card td, .article-body th, .article-body td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; }

@media (max-width: 520px) {
    .comp, .widget { padding: 15px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}


/* ===========================================================
   v1.5.3：赞助支持（收款码）· 纯色 · 无渐变 · 深浅自适应
   =========================================================== */
.widget-sponsor .sponsor-note { color: var(--muted); font-size: .84rem; margin: -4px 0 12px; line-height: 1.6; }
.widget-sponsor .sponsor-list { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.widget-sponsor .sponsor-item { flex: 1 1 140px; max-width: 190px; margin: 0; text-align: center; }
.widget-sponsor .sponsor-item img {
    display: block; width: 100%; max-width: 180px; height: auto; margin: 0 auto;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm);
    cursor: zoom-in;
}
.widget-sponsor .sponsor-name { font-size: .9rem; font-weight: 600; color: var(--text); margin-top: 8px; }
.widget-sponsor .sponsor-desc { font-size: .78rem; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.widget-sponsor .sponsor-hint { font-size: .76rem; color: var(--muted); margin: 12px 0 0; text-align: center; }
.widget-sponsor .sponsor-empty { color: var(--muted); font-size: .88rem; }
@media (max-width: 480px) {
    .widget-sponsor .sponsor-item { flex: 1 1 44%; max-width: none; }
    .widget-sponsor .sponsor-item img { max-width: 100%; }
}

/* ===========================================================
   v1.5.5：站点公告 / 友情链接 / 最新评论 / 热门文章 / 随机一言
   纯色 · 无渐变 · 深浅自适应
   =========================================================== */
.widget-notice .notice-list { list-style: none; margin: 0; padding: 0; }
.widget-notice .notice-list li { position: relative; padding-left: 14px; margin: 4px 0; line-height: 1.7; }
.widget-notice .notice-list li::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.widget-links .widget-note { color: var(--muted); font-size: .8rem; line-height: 1.7; margin: 12px 0 0; padding-top: 10px; border-top: 1px dashed var(--border); }
.widget-comments .cm-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.widget-comments .cm-list li { display: flex; gap: 10px; align-items: flex-start; }
.widget-comments .cm-avatar { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; background: var(--primary-soft, var(--border)); color: var(--primary-strong, var(--primary)); display: flex; align-items: center; justify-content: center; font-size: .82rem; font-weight: 600; }
.widget-comments .cm-body { min-width: 0; flex: 1 1 auto; }
.widget-comments .cm-head { display: flex; align-items: center; gap: 8px; }
.widget-comments .cm-name { font-weight: 600; font-size: .88rem; }
.widget-comments .cm-time { color: var(--muted); font-size: .74rem; margin-left: auto; }
.widget-comments .cm-content { display: block; color: var(--text); font-size: .88rem; margin-top: 3px; line-height: 1.6; }
.widget-comments .cm-content:hover { color: var(--primary); }
.widget-comments .cm-post { display: block; color: var(--muted); font-size: .74rem; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.widget-hot-posts .hot-list { list-style: none; margin: 0; padding: 0; }
.widget-hot-posts .hot-list li { display: flex; align-items: baseline; gap: 8px; padding: 7px 0; border-bottom: 1px dashed var(--border); }
.widget-hot-posts .hot-list li:last-child { border-bottom: 0; }
.widget-hot-posts .hot-rank { flex: 0 0 auto; width: 18px; height: 18px; border-radius: var(--radius-sm, 8px); background: var(--border); color: var(--muted); font-size: .72rem; font-weight: 700; text-align: center; line-height: 18px; transform: translateY(2px); }
.widget-hot-posts .hot-list li:nth-child(1) .hot-rank { background: var(--primary-bg, var(--primary)); color: var(--on-primary, #fff); }
.widget-hot-posts .hot-list li:nth-child(2) .hot-rank, .widget-hot-posts .hot-list li:nth-child(3) .hot-rank { background: var(--primary-soft, var(--border)); color: var(--primary-strong, var(--primary)); }
.widget-hot-posts .hot-title { color: var(--text); font-size: .92rem; flex: 1 1 auto; min-width: 0; }
.widget-hot-posts .hot-title:hover { color: var(--primary); }
.widget-hot-posts .hot-meta { flex: 0 0 auto; color: var(--muted); font-size: .74rem; }
.widget-quote .quote-text { font-size: 1rem; line-height: 1.8; color: var(--text); margin: 0; }
.widget-quote .quote-author { color: var(--muted); font-size: .8rem; text-align: right; margin: 6px 0 0; }
