/* 频道通知系统样式 - 环节7 */
:root {
  --update-badge-bg: #2196f3;
  --unread-dot-bg: #f44336;
  --notification-panel-bg: #ffffff;
  --notification-panel-shadow: 0 4px 12px rgba(0,0,0,0.15);
  --notification-hover-bg: #f5f5f5;
}

/* 更新标签（蓝色） */
.update-badge {
  display: inline-block;
  background-color: var(--update-badge-bg);
  color: white;
  font-size: 12px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 12px;
  margin-top: 8px;
  align-self: flex-start;
}

/* 未读小红点（带数字） */
.unread-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 18px;
  height: 18px;
  background-color: var(--unread-dot-bg);
  color: white;
  font-size: 12px;
  font-weight: bold;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  z-index: 10;
}

/* 铃铛图标容器 */
.bell-container {
  position: relative;
  display: inline-block;
  margin-right: 16px;
  cursor: pointer;
}

.bell-icon {
  font-size: 24px;
  color: #555;
  transition: color 0.2s;
}

.bell-icon:hover {
  color: #000;
}

/* 铃铛上的数字气泡 */
.bell-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  background-color: var(--unread-dot-bg);
  color: white;
  font-size: 12px;
  font-weight: bold;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  z-index: 20;
}

/* 侧滑通知面板 */
.notification-panel {
  position: fixed;
  top: 0;
  right: -400px;
  width: 360px;
  height: 100vh;
  background: var(--notification-panel-bg);
  box-shadow: var(--notification-panel-shadow);
  transition: right 0.3s ease;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  border-left: 1px solid #e0e0e0;
}

.notification-panel.open {
  right: 0;
}

.panel-header {
  padding: 20px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}

.panel-header button {
  background: none;
  border: none;
  color: #2196f3;
  cursor: pointer;
  font-size: 14px;
}

.panel-header button:hover {
  text-decoration: underline;
}

.notification-list {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  margin: 0;
  list-style: none;
}

.notification-item {
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background 0.2s;
}

.notification-item:hover {
  background: var(--notification-hover-bg);
}

.notification-item.read {
  opacity: 0.6;
}

.notification-time {
  font-size: 12px;
  color: #999;
  margin-bottom: 4px;
}

.notification-module {
  font-weight: 600;
  margin-bottom: 4px;
}

.notification-summary {
  font-size: 14px;
  color: #333;
}

.empty-state {
  padding: 40px 20px;
  text-align: center;
  color: #999;
  font-size: 14px;
}

/* 遮罩层 */
.panel-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.3);
  z-index: 999;
  display: none;
}

.panel-overlay.show {
  display: block;
}

/* 让模块卡片成为相对定位容器（用于小红点定位） */
.module-card {
  position: relative !important;
}

/* 强制修复高亮点击问题 */
.search-highlight, 
.highlight,
[class*="highlight"] {
  pointer-events: none !important;
}

/* 确保卡片本身可点击 */
.module-card,
[class*="module-card"] {
  cursor: pointer;
  pointer-events: auto !important;
}
