
.lylib-bell-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.lylib-bell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1.5px solid rgba(99, 102, 241, 0.5);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(236, 72, 153, 0.1) 100%);
  border-radius: 10px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.lylib-bell:hover {
  border-color: rgba(99, 102, 241, 0.9);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(236, 72, 153, 0.2) 100%);
}

.lylib-bell.has-unread .lylib-bell-icon {
  animation: lylibBellRing 1.6s ease-in-out 2;
}

@keyframes lylibBellRing {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(14deg); }
  40% { transform: rotate(-12deg); }
  60% { transform: rotate(8deg); }
  80% { transform: rotate(-6deg); }
}

.lylib-bell-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #f43f5e;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 0 0 2px rgba(10, 12, 24, 0.9);
}

.lylib-notif-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(340px, calc(100vw - 24px));
  max-height: min(60vh, 460px);
  overflow-y: auto;
  z-index: 2200;
  border-radius: 14px;
  border: 1px solid rgba(99, 102, 241, 0.35);
  background: linear-gradient(160deg, #171b3a 0%, #12152f 100%);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  color: #e5e7eb;
  font-size: 0.84rem;
}

.lylib-notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-weight: 700;
  position: sticky;
  top: 0;
  background: inherit;
}

.lylib-notif-readall {
  border: none;
  background: none;
  color: #a5b4fc;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.lylib-notif-readall:hover {
  color: #c7d2fe;
}

.lylib-notif-item {
  display: flex;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: inherit;
  text-decoration: none;
}

a.lylib-notif-item:hover {
  background: rgba(99, 102, 241, 0.12);
}

.lylib-notif-item.unread {
  border-left: 3px solid #6366f1;
  padding-left: 11px;
  background: rgba(99, 102, 241, 0.07);
}

.lylib-notif-icon {
  flex-shrink: 0;
  font-size: 1rem;
  line-height: 1.4;
}

.lylib-notif-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.lylib-notif-text {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.4;
}

.lylib-notif-time {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.45);
}

.lylib-notif-empty {
  padding: 22px 14px;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 760px) {
  .lylib-notif-panel {
    position: fixed;
    top: 64px;
    right: 10px;
    left: auto;
    width: min(340px, calc(100vw - 20px));
  }
}

@media (max-width: 340px) {
  .lylib-bell {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
  }
}
