/* ========================================
   消息通知铃铛 & 下拉面板
   ======================================== */

/* 铃铛容器 */
.notification-bell {
    position: relative;
    margin-right: 12px;
}

.notification-bell-icon {
    position: relative;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.notification-bell-icon:hover {
    background: rgba(255, 255, 255, 0.08);
}

.notification-bell-icon svg {
    width: 20px;
    height: 20px;
    color: #a1a1a1;
    transition: color 0.2s;
}

.notification-bell-icon:hover svg {
    color: #e0e0e0;
}

/* 未读角标 */
.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: #ff4444;
    border-radius: 8px;
    font-size: 10px;
    color: #fff;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    pointer-events: none;
}

/* 下拉面板 */
.notification-dropdown {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    right: 0 !important;
    width: 320px !important;
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 16px !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15) !important;
    z-index: 10000 !important;
    display: none !important;
    flex-direction: column !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.notification-dropdown.open {
    display: flex !important;
}

/* 面板头部 */
.notification-dropdown-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 20px 20px 12px !important;
    border-bottom: none !important;
}

.notification-dropdown-title {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
}

/* ========================================
   通知分类入口列表
   ======================================== */
.notification-category-list {
    padding: 4px 12px 16px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.notification-category-item {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    padding: 14px 12px !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    transition: background 0.15s !important;
    text-decoration: none !important;
    position: relative !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.notification-category-item:hover {
    background: rgba(0, 0, 0, 0.04) !important;
}

.notification-category-item:active {
    background: rgba(0, 0, 0, 0.07) !important;
}

/* 分类图标 */
.notification-category-icon {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

.notification-category-icon svg,
.notification-category-icon img {
    width: 20px !important;
    height: 20px !important;
}

.notification-category-icon.system {
    background: #f0fae4 !important;
    color: #2d6a0f !important;
}

.notification-category-icon.reply {
    background: #f0fae4 !important;
    color: #2d6a0f !important;
}

.notification-category-icon.like {
    background: #ffe0e6 !important;
    color: #ff4d6a !important;
}

.notification-category-icon.follow {
    background: #dde8ff !important;
    color: #4d7cff !important;
}

/* 分类名称 */
.notification-category-name {
    flex: 1 !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    color: #1a1a1a !important;
    display: block !important;
    white-space: nowrap !important;
}

/* 分类未读角标 */
.notification-category-badge {
    min-width: 20px !important;
    height: 20px !important;
    padding: 0 6px !important;
    background: #ff4d6a !important;
    border-radius: 10px !important;
    font-size: 11px !important;
    color: #fff !important;
    font-weight: 600 !important;
    display: none;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    flex-shrink: 0 !important;
}

/* ========================================
   旧版通知列表样式（消息中心页面仍使用）
   ======================================== */

/* 通知列表 */
.notification-dropdown-list {
    flex: 1;
    overflow-y: auto;
    max-height: 380px;
}

.notification-dropdown-list::-webkit-scrollbar {
    width: 4px;
}

.notification-dropdown-list::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 2px;
}

/* 单条通知 */
.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.15s;
    position: relative;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.notification-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.notification-item.unread {
    background: rgba(201, 255, 133, 0.03);
}

.notification-item-avatar {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: cover;
    background: #2a2a2a;
    flex-shrink: 0;
}

.notification-item-body {
    flex: 1;
    min-width: 0;
}

.notification-item-text {
    font-size: 13px;
    color: #ccc;
    line-height: 1.4;
}

.notification-item-name {
    color: #f0f0f5;
    font-weight: 500;
}

.notification-item-content {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notification-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.notification-item-article {
    font-size: 11px;
    color: rgba(201, 255, 133, 0.6);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 160px;
}

.notification-item-time {
    font-size: 11px;
    color: rgba(255,255,255,0.3);
    flex-shrink: 0;
}

/* 未读小圆点 */
.notification-item-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #c9ff85;
    flex-shrink: 0;
    margin-top: 4px;
}

/* 空状态 & 加载 */
.notification-empty,
.notification-loading {
    padding: 32px 16px;
    text-align: center;
    color: rgba(255,255,255,0.3);
    font-size: 13px;
}

/* 底部 */
.notification-dropdown-footer {
    padding: 10px 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
    text-align: center;
}

.notification-view-all {
    font-size: 13px;
    color: #c9ff85;
    text-decoration: none;
    transition: opacity 0.2s;
}

.notification-view-all:hover {
    opacity: 0.8;
}

/* ========================================
   关注按钮
   ======================================== */
.follow-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    white-space: nowrap;
}

.follow-btn svg {
    width: 14px;
    height: 14px;
}

.follow-btn.not-following {
    background: #c9ff85;
    color: #1a1a1a;
    border-color: #c9ff85;
}

.follow-btn.not-following:hover {
    background: #b8f070;
    border-color: #b8f070;
}

.follow-btn.is-following {
    background: transparent;
    color: #999;
    border-color: #444;
}

.follow-btn.is-following:hover {
    color: #ff4d6a;
    border-color: #ff4d6a;
}

.follow-btn.is-mutual {
    background: transparent;
    color: #c9ff85;
    border-color: rgba(201, 255, 133, 0.3);
}

.follow-btn.is-mutual:hover {
    color: #ff4d6a;
    border-color: #ff4d6a;
}

/* ========================================
   响应式
   ======================================== */
@media (max-width: 768px) {
    .notification-dropdown {
        width: 280px !important;
        right: -40px !important;
    }

    .notification-category-item {
        padding: 12px 10px !important;
        gap: 12px !important;
    }

    .notification-category-icon {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
    }

    .notification-category-icon svg,
    .notification-category-icon img {
        width: 18px !important;
        height: 18px !important;
    }

    .notification-category-name {
        font-size: 14px !important;
    }
}

/* ============================================
   亮色模式覆盖
   ============================================ */
[data-theme="light"] .notification-item-time {
    color: #94a3b8;
}

[data-theme="light"] .notification-item-content {
    color: #334155;
}

[data-theme="light"] .notification-empty-text {
    color: #94a3b8;
}
