* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: #0f1117;
  color: #e0e0e0;
  min-height: 100vh;
}

/* ── 演示面板 ── */
.demo-panel {
  max-width: 600px;
  margin: 80px auto 40px;
  text-align: center;
}

.demo-panel h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 32px;
  color: #fff;
  letter-spacing: -0.5px;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.btn-group button {
  padding: 10px 20px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  color: #fff;
}

.btn-group button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.btn-group button:active {
  transform: translateY(0);
}

.btn-group button:nth-child(1)  { background: #2d8a4e; }
.btn-group button:nth-child(2)  { background: #c0392b; }
.btn-group button:nth-child(3)  { background: #e74c3c; }
.btn-group button:nth-child(4)  { background: #2980b9; }
.btn-group button:nth-child(5)  { background: #e67e22; }
.btn-group button:nth-child(6)  { background: #6c7a89; }
.btn-group button:nth-child(7)  { background: #8e44ad; }
.btn-group button:nth-child(8)  { background: #555; }

.hint {
  margin-top: 24px;
  font-size: 13px;
  color: #888;
}

/* ── 通知容器 ── */
#notify-container {
  position: fixed;
  top: 20px;
  right: 20px;
  bottom: 20px;
  width: 380px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

/* ── 通知卡片 ── */
.notify-item {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 12px;
  background: #1a1d27;
  border-left: 4px solid #555;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  min-height: 72px;
  position: relative;
  overflow: hidden;

  /* 入场动画 */
  animation: notifySlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* 进场前状态 — 从右侧滑入 */
@keyframes notifySlideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* 退场动画 */
.notify-item.closing {
  animation: notifySlideOut 0.35s cubic-bezier(0.55, 0, 1, 0.45) forwards;
}

@keyframes notifySlideOut {
  from {
    opacity: 1;
    transform: translateX(0);
    max-height: 200px;
    margin-bottom: 12px;
    padding: 16px 18px;
  }
  to {
    opacity: 0;
    transform: translateX(110%);
    max-height: 0;
    margin-bottom: 0;
    padding: 0 18px;
  }
}

/* ── 优先级指示器 ── */
.notify-priority-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  border-radius: 0 0 0 12px;
  animation: priorityShrink linear forwards;
}

@keyframes priorityShrink {
  from { width: 100%; }
  to   { width: 0%; }
}

/* ── 类型样式 ── */
.notify-item.success { border-left-color: #27ae60; }
.notify-item.error   { border-left-color: #e74c3c; }
.notify-item.info    { border-left-color: #2980b9; }
.notify-item.warning { border-left-color: #f39c12; }

.notify-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.success .notify-icon { background: rgba(39, 174, 96, 0.25); color: #2ecc71; }
.error   .notify-icon { background: rgba(231, 76, 60, 0.25); color: #e74c3c; }
.info    .notify-icon { background: rgba(41, 128, 185, 0.25); color: #3498db; }
.warning .notify-icon { background: rgba(243, 156, 18, 0.25); color: #f1c40f; }

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

.notify-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
  text-transform: capitalize;
}

.success .notify-title { color: #2ecc71; }
.error   .notify-title { color: #e74c3c; }
.info    .notify-title { color: #3498db; }
.warning .notify-title { color: #f1c40f; }

.notify-message {
  font-size: 13px;
  color: #aaa;
  line-height: 1.45;
  word-wrap: break-word;
}

.notify-close {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  color: #666;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  padding: 0;
  line-height: 1;
}

.notify-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ccc;
}

/* ── 悬停暂停 ＆ 呼吸效果 ── */
.notify-item:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.4);
}

.notify-item:hover .notify-priority-bar {
  animation-play-state: paused;
}
