/* ═══════════════════════════════════════════════════════
   Like Widget — 整站唯一点赞控件样式 (SSOT)
   ═══════════════════════════════════════════════════════ */

.like-widget {
    display: inline-flex;
    align-items: center;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.75);
    border: 1.5px dashed rgba(0, 0, 0, 0.2);
    padding: 4px 6px;
    gap: 0;
    transition: box-shadow 0.25s, transform 0.2s, border-style 0.3s;
    transform: scale(var(--lw-scale, 1));
    transform-origin: center;
    user-select: none;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.like-widget.liked {
    border-style: solid;
}

/* ── Hover 火焰光晕 ── */
.like-widget:hover {
    box-shadow: 0 0 8px 2px rgba(239, 68, 68, 0.4), inset 0 0 4px rgba(239, 68, 68, 0.15);
    transform: scale(calc(var(--lw-scale, 1) * 1.03));
}

/* ── 点赞按钮区（红星 + 计数） ── */
.lw-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: none;
    background: none;
    cursor: pointer;
    padding: 4px 8px;
    margin: 0;
    font: inherit;
    line-height: 1;
    color: inherit;
    border-radius: 12px;
    transition: opacity 0.2s;
}

.lw-btn:focus-visible {
    outline: 2px solid rgba(239, 68, 68, 0.5);
    outline-offset: 2px;
}

/* 图标 drop-shadow 保证在任何背景色上可见 */
.lw-btn .swimg img,
.lw-rank .swimg img {
    filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.5));
}

.lw-count {
    font-size: 14px;
    font-weight: 700;
    color: #ef4444;
    min-width: 1ch;
}

/* ── 分隔竖线 ── */
.lw-sep {
    width: 1px;
    height: 16px;
    background: rgba(0, 0, 0, 0.12);
    margin: 0 2px;
    flex-shrink: 0;
}

/* ── 排行榜按钮（小人图标） ── */
.lw-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    cursor: pointer;
    padding: 4px 6px;
    margin: 0;
    border-radius: 12px;
    transition: opacity 0.2s;
}

.lw-rank:hover {
    opacity: 0.7;
}

.lw-rank:focus-visible {
    outline: 2px solid rgba(239, 68, 68, 0.5);
    outline-offset: 2px;
}

/* ═══════════════════════════════════════════════════════
   Top 100 Modal
   ═══════════════════════════════════════════════════════ */
.lw-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.lw-modal.show {
    display: flex;
}

.lw-modal-content {
    background: #fff;
    color: #222;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    width: 90%;
    max-width: 480px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.lw-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lw-modal-title {
    font-size: 16px;
    font-weight: 600;
    color: #222;
}

.lw-modal-close {
    width: 28px;
    height: 28px;
    border: none;
    background: #f4f4f4;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    color: #666 !important;
}

.lw-modal-close:hover {
    background: #eee;
}

.lw-modal-body {
    padding: 12px 20px;
    overflow-y: auto;
    flex: 1;
}

.lw-top-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f4f4f4;
}

.lw-top-item:last-child {
    border-bottom: none;
}

.lw-top-rank {
    width: 24px;
    height: 24px;
    background: #f4f4f4;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: #666;
}

.lw-top-rank.gold {
    background: #ffd700;
    color: #fff;
}

.lw-top-rank.silver {
    background: #c0c0c0;
    color: #fff;
}

.lw-top-rank.bronze {
    background: #cd7f32;
    color: #fff;
}

.lw-top-doer {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #333;
}

.lw-top-count {
    font-size: 14px;
    font-weight: 600;
    color: #ef4444;
}

.lw-empty {
    text-align: center;
    padding: 24px;
    color: #999;
}