/* 站内信通知 - 弹窗 + 铃铛样式 */

/* ===== 浮动铃铛 ===== */
#snBell {
    position: fixed;
    right: 24px;
    bottom: 80px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #0052d9;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 82, 217, 0.35);
    z-index: 99999;
    transition: transform .2s, box-shadow .2s;
    user-select: none;
}
#snBell:hover { transform: scale(1.08); box-shadow: 0 6px 20px rgba(0, 82, 217, 0.45); }
#snBell:active { transform: scale(0.95); }
#snBellBadge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    line-height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: #e34d59;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 2px 6px rgba(227, 77, 89, 0.4);
}
/* 深色模式 */
html[data-theme="dark"] #snBell { background: #2b6dd9; }
/* 移动端 */
@media (max-width: 640px) {
    #snBell { right: 16px; bottom: 100px; width: 44px; height: 44px; }
}

/* ===== 弹窗 ===== */
.sn-modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s, visibility .2s;
}
.sn-modal-mask.sn-show { opacity: 1; visibility: visible; }

.sn-modal-box {
    width: 440px;
    max-width: 92vw;
    max-height: 70vh;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.9) translateY(20px);
    transition: transform .2s;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}
.sn-modal-mask.sn-show .sn-modal-box { transform: scale(1) translateY(0); }

/* 深色模式 */
html[data-theme="dark"] .sn-modal-box { background: #1a1a1a; color: rgba(255,255,255,0.92); }
html[data-theme="dark"] .sn-modal-item-t { color: rgba(255,255,255,0.92); }
html[data-theme="dark"] .sn-modal-item-time { color: rgba(255,255,255,0.45); }
html[data-theme="dark"] .sn-modal-item-body { color: rgba(255,255,255,0.7); }
html[data-theme="dark"] .sn-modal-item { border-bottom-color: rgba(255,255,255,0.08); }

/* 玻璃模式 */
html[data-theme="glass"] .sn-modal-box {
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.3);
}

/* 头部 */
.sn-modal-hd {
    background: linear-gradient(135deg, #0052d9 0%, #2b6dd9 100%);
    color: #fff;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.sn-modal-title { font-size: 15px; font-weight: 600; }
.sn-modal-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}
.sn-modal-close:hover { background: rgba(255,255,255,0.35); }

/* 列表 */
.sn-modal-list {
    flex: 1;
    overflow-y: auto;
}
.sn-modal-item {
    padding: 14px 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background .15s;
}
.sn-modal-item:last-child { border-bottom: none; }
.sn-modal-item:hover { background: #fafafa; }
.sn-modal-item.sn-read { opacity: 0.6; }

.sn-modal-item-t {
    font-size: 14px;
    color: #1d2129;
    font-weight: 500;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sn-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e34d59;
    flex-shrink: 0;
}
.sn-modal-item-time {
    font-size: 12px;
    color: #999;
    margin-top: 6px;
}
.sn-modal-item-body {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #eee;
    font-size: 13px;
    color: #4a5568;
    line-height: 1.7;
    word-break: break-all;
}

/* 底部按钮 */
.sn-modal-foot {
    padding: 12px 20px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    background: #fafafa;
}
html[data-theme="dark"] .sn-modal-foot { background: #111; border-top-color: rgba(255,255,255,0.1); }
html[data-theme="dark"] .sn-modal-item { border-bottom-color: rgba(255,255,255,0.08); }

.sn-foot-btn {
    flex: 1;
    height: 36px;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    background: #fff;
    color: #555;
    font-size: 13px;
    cursor: pointer;
    transition: all .15s;
}
.sn-foot-btn:hover { border-color: #0052d9; color: #0052d9; }
.sn-foot-primary {
    background: #0052d9;
    border-color: #0052d9;
    color: #fff;
}
.sn-foot-primary:hover { background: #0042b0; border-color: #0042b0; color: #fff; }
.sn-foot-readall {
    background: #43b02a;
    border-color: #43b02a;
    color: #fff;
}
.sn-foot-readall:hover { background: #3a9a25; border-color: #3a9a25; color: #fff; }

/* 移动端弹窗 */
@media (max-width: 640px) {
    .sn-modal-box { width: 96vw; max-height: 85vh; border-radius: 10px; }
    .sn-modal-hd { padding: 12px 16px; }
    .sn-modal-list { max-height: 50vh; }
    .sn-modal-item { padding: 12px 16px; }
    .sn-modal-foot { padding: 10px 16px; gap: 8px; }
    .sn-foot-btn { font-size: 12px; height: 34px; padding: 0 8px; }
}
