/* ============================================================
 * NowPills - 右下角动态药丸带（常驻 · 缓慢向上无缝滚动）
 * 独立定制文件，不接管/不屏蔽系统任何通知
 * v1.2.0 柔和配色 · 逐条入场 · 减速滚动
 * ============================================================ */

/* 可视窗口：固定右下角，超出隐藏（轨道在内部持续上移） */
.now-pill-feed {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 99999;
    width: 270px;
    height: 232px; /* 5 条药丸(40px) + 4 个间距(8px) */
    overflow: hidden;
    pointer-events: none; /* 窗口不拦截页面点击，药丸自身可点 */
}

/* 滚动轨道：由 JS 以 requestAnimationFrame 持续平移 */
.now-pill-track {
    display: flex;
    flex-direction: column;
    gap: 8px;
    will-change: transform;
}

/* 药丸本体 */
.now-pill {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    flex: 0 0 auto;
    width: 100%;
    max-width: 270px;
    height: 40px;
    padding: 4px 14px 4px 4px;
    border-radius: 999px;
    color: #fff;
    text-decoration: none;
    font-size: 12.5px;
    line-height: 1.4;
    box-shadow: 0 4px 14px rgba(74, 94, 120, 0.16);
}

/* 逐条入场：从底部滑上来 */
.now-pill-enter {
    animation: nowPillIn 0.5s cubic-bezier(0.22, 1.2, 0.36, 1) both;
}

@keyframes nowPillIn {
    from {
        transform: translateY(120%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 柔和配色（图2风格） */
.now-pill.tone-blue {
    background: linear-gradient(135deg, #6aa8f7, #4a8ae0);
}

.now-pill.tone-gray {
    background: linear-gradient(135deg, #b9c1cd, #98a3b3);
}

.now-pill.tone-coral {
    background: linear-gradient(135deg, #f2938c, #e66f6f);
}

.now-pill.tone-violet {
    background: linear-gradient(135deg, #a48ef2, #8a72e3);
}

.now-pill.tone-green {
    background: linear-gradient(135deg, #52cfae, #35b393);
}

.now-pill.tone-orange {
    background: linear-gradient(135deg, #ffb75e, #ff9843);
}

/* 左侧圆头像 */
.now-pill-avatar {
    flex: 0 0 auto;
    width: 31px;
    height: 31px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.92);
    overflow: hidden;
    margin-right: 8px;
    background: rgba(255, 255, 255, 0.25);
}

.now-pill-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 文本：昵称加粗，一行省略 */
.now-pill-text {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: #fff;
}

.now-pill-text .now-pill-name {
    font-weight: 700;
    margin-right: 4px;
}

.now-pill-text n {
    font-weight: 700;
}

/* 悬停时轻微提亮，提示可点 */
.now-pill:hover {
    filter: brightness(1.06);
}

/* 窄屏适配 */
@media (max-width: 768px) {
    .now-pill-feed {
        right: 12px;
        bottom: 12px;
        width: 220px;
        height: 194px; /* 4 条(40px) + 3 个间距(8px) + 余量 */
    }

    .now-pill {
        max-width: 220px;
        font-size: 12px;
    }
}
