/* ================================================================
 * DS Realtime v6.2.0 — 实时通知 / 铃铛
 * ================================================================ */

:root {
    --ds-rt-primary: #6366f1;
    --ds-rt-bg: #f8fafc;
    --ds-rt-card: #ffffff;
    --ds-rt-text: #0f172a;
    --ds-rt-text-2: #64748b;
    --ds-rt-border: #e2e8f0;
    --ds-rt-error: #ef4444;
    --ds-rt-success: #10b981;
}

.ds-rt-bell {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99990;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
.ds-rt-bell-btn {
    position: relative;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--ds-rt-card);
    border: 1px solid var(--ds-rt-border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    font-size: 22px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ds-rt-bell-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}
.ds-rt-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--ds-rt-error);
    color: #fff;
    border-radius: 999px;
    padding: 0 5px;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}
.ds-rt-panel {
    display: none;
    position: absolute;
    bottom: 60px;
    right: 0;
    width: 360px;
    max-width: calc(100vw - 48px);
    max-height: 520px;
    background: var(--ds-rt-card);
    border: 1px solid var(--ds-rt-border);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}
.ds-rt-panel-head {
    padding: 12px 14px;
    border-bottom: 1px solid var(--ds-rt-border);
    background: var(--ds-rt-bg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.ds-rt-panel-head h4 {
    margin: 0;
    font-size: 14px;
    flex: 1;
}
.ds-rt-bell-push {
    padding: 4px 10px;
    background: var(--ds-rt-primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
}
.ds-rt-panel-list {
    max-height: 380px;
    overflow-y: auto;
}
.ds-rt-loading,
.ds-rt-empty {
    padding: 40px 16px;
    text-align: center;
    color: var(--ds-rt-text-2);
    font-size: 13px;
}
.ds-rt-item {
    display: block;
    padding: 10px 14px;
    border-bottom: 1px solid var(--ds-rt-border);
    text-decoration: none !important;
    color: var(--ds-rt-text);
    transition: background 0.15s;
}
.ds-rt-item:hover { background: var(--ds-rt-bg); }
.ds-rt-item.is-unread { background: linear-gradient(90deg, #eef2ff, transparent); }
.ds-rt-item-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
    color: var(--ds-rt-text);
}
.ds-rt-item-body {
    font-size: 12px;
    color: var(--ds-rt-text-2);
    line-height: 1.4;
    margin-bottom: 4px;
}
.ds-rt-item-time {
    font-size: 11px;
    color: var(--ds-rt-text-2);
}
.ds-rt-panel-foot {
    padding: 10px 14px;
    border-top: 1px solid var(--ds-rt-border);
    background: var(--ds-rt-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ds-rt-panel-foot a {
    font-size: 12px;
    color: var(--ds-rt-primary);
    text-decoration: none;
}
.ds-rt-read-all {
    padding: 4px 10px;
    background: transparent;
    color: var(--ds-rt-text-2);
    border: 1px solid var(--ds-rt-border);
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
}
.ds-rt-read-all:hover {
    color: var(--ds-rt-primary);
    border-color: var(--ds-rt-primary);
}

/* 暗黑 */
@media (prefers-color-scheme: dark) {
    :root {
        --ds-rt-bg: #0f172a;
        --ds-rt-card: #1e293b;
        --ds-rt-text: #f1f5f9;
        --ds-rt-text-2: #94a3b8;
        --ds-rt-border: #334155;
    }
    .ds-rt-item.is-unread { background: linear-gradient(90deg, #312e81, transparent); }
}
