/* ==========================================================================
   云语VIP中心 - 浏览过本文的用户
   配色规范：主 #1e6fff / 深 #0b4fd6 / 亮青 #00b4ff / 浅底 #f0f6ff / 边 #d6e4ff
   Author: 饺子 | https://www.yykbk.com
   ========================================================================== */

.yunvip-viewers {
    margin: 22px 0;
    padding: 16px 20px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #d6e4ff;
    box-shadow: 0 6px 20px rgba(30, 111, 255, .18);
}

.yunvip-viewers-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.yunvip-viewers-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
    color: #1f2d4d;
}

.yunvip-viewers-count {
    font-size: 12.5px;
    color: #1e6fff;
    background: #f0f6ff;
    border: 1px solid #d6e4ff;
    padding: 1px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.yunvip-viewers-all {
    margin-left: auto;
    border: none;
    background: transparent;
    color: #1e6fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 4px;
    transition: color .2s ease;
}

.yunvip-viewers-all:hover {
    color: #0b4fd6;
}

.yunvip-viewers-avatars {
    display: flex;
    align-items: center;
    margin-top: 12px;
}

.yunvip-viewers-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(30, 111, 255, .18);
    margin-left: -10px;
    background: #f0f6ff;
    flex-shrink: 0;
    transition: transform .2s ease;
}

.yunvip-viewers-avatar:first-child {
    margin-left: 0;
}

.yunvip-viewers-avatar:hover {
    transform: translateY(-3px);
    z-index: 2;
}

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

.yunvip-viewers-extra {
    margin-left: 8px;
    font-size: 12.5px;
    color: #1e6fff;
    background: #f0f6ff;
    border: 1px solid #d6e4ff;
    padding: 2px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

/* 弹窗 */
.yunvip-viewers-mask {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99998;
    background: rgba(15, 23, 42, .5);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.yunvip-viewers-mask.is-open {
    display: flex;
}

.yunvip-viewers-modal {
    width: 420px;
    max-width: 100%;
    max-height: 76vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
    overflow: hidden;
    animation: yunvipViewersIn .22s ease;
}

@keyframes yunvipViewersIn {
    from { opacity: 0; transform: translateY(14px) scale(.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.yunvip-viewers-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #d6e4ff;
    background: linear-gradient(135deg, rgba(30, 111, 255, .08), rgba(0, 180, 255, .06));
}

.yunvip-viewers-modal-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e6fff;
}

.yunvip-viewers-close {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: rgba(30, 111, 255, .08);
    color: #1e6fff;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    transition: background .2s ease;
}

.yunvip-viewers-close:hover {
    background: rgba(30, 111, 255, .16);
}

.yunvip-viewers-modal-body {
    flex: 1;
    padding: 12px 18px;
    overflow-y: auto;
}

.yunvip-viewers-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px dashed #d6e4ff;
}

.yunvip-viewers-row:last-child {
    border-bottom: none;
}

.yunvip-viewers-row-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #d6e4ff;
    background: #f0f6ff;
    flex-shrink: 0;
}

.yunvip-viewers-row-info {
    min-width: 0;
}

.yunvip-viewers-row-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1f2d4d;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.yunvip-viewers-row-time {
    display: block;
    font-size: 12px;
    color: #94a3b8;
    margin-top: 2px;
}

.yunvip-viewers-empty {
    padding: 34px 0;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
}

.yunvip-viewers-modal-foot {
    padding: 12px 18px;
    border-top: 1px solid #d6e4ff;
    text-align: center;
}

.yunvip-viewers-morebtn {
    display: none;
    padding: 8px 28px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #1e6fff, #00b4ff);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(30, 111, 255, .18);
    transition: transform .2s ease, box-shadow .2s ease;
}

.yunvip-viewers-morebtn.is-show {
    display: inline-block;
}

.yunvip-viewers-morebtn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(30, 111, 255, .28);
}

.yunvip-viewers-morebtn.is-busy {
    opacity: .7;
    pointer-events: none;
}

/* 深色模式（跟随 Juzi 主题 html[data-night]） */
html[data-night] .yunvip-viewers {
    background: #1f2937;
    border-color: #374151;
}

html[data-night] .yunvip-viewers-title,
html[data-night] .yunvip-viewers-row-name {
    color: #f3f4f6;
}

html[data-night] .yunvip-viewers-count,
html[data-night] .yunvip-viewers-extra {
    background: #111827;
    border-color: #374151;
    color: #00b4ff;
}

html[data-night] .yunvip-viewers-all {
    color: #00b4ff;
}

html[data-night] .yunvip-viewers-all:hover {
    color: #7ddcff;
}

html[data-night] .yunvip-viewers-avatar {
    background: #111827;
    border-color: #1f2937;
}

html[data-night] .yunvip-viewers-modal {
    background: #1f2937;
}

html[data-night] .yunvip-viewers-modal-head {
    border-color: #374151;
    background: rgba(30, 111, 255, .12);
}

html[data-night] .yunvip-viewers-modal-title,
html[data-night] .yunvip-viewers-close {
    color: #00b4ff;
}

html[data-night] .yunvip-viewers-close {
    background: rgba(0, 180, 255, .12);
}

html[data-night] .yunvip-viewers-modal-body {
    scrollbar-color: #374151 transparent;
}

html[data-night] .yunvip-viewers-row {
    border-color: #374151;
}

html[data-night] .yunvip-viewers-row-avatar {
    background: #111827;
    border-color: #374151;
}

html[data-night] .yunvip-viewers-row-time,
html[data-night] .yunvip-viewers-empty {
    color: #9ca3af;
}

html[data-night] .yunvip-viewers-modal-foot {
    border-color: #374151;
}
