/* ================================================================
 * DS 资源更新通知 v7.9.0
 * 全部 ds- 前缀 / box-sizing 全 reset
 * ================================================================ */

.ds-un-btn-wrap,
.ds-un-btn-wrap *,
.ds-version-history,
.ds-version-history *,
.ds-un-my-list,
.ds-un-my-list * {
  box-sizing: border-box;
}

/* ================================================================
 * 1. 通知开关(单资源)
 * ================================================================ */
.ds-un-btn-wrap {
  display: inline-block;
  margin: 8px 0;
}

.ds-un-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 13px;
  color: #555;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.18s;
  user-select: none;
}

.ds-un-toggle:hover {
  border-color: #3a8ee6;
  color: #3a8ee6;
}

.ds-un-toggle-input {
  margin: 0;
  cursor: pointer;
  accent-color: #3a8ee6;
  width: 14px;
  height: 14px;
}

.ds-un-toggle-input:not(:checked) + .ds-un-toggle-text::before {
  content: '🔕 ';
}

.ds-un-toggle-input:checked + .ds-un-toggle-text::before {
  content: '🔔 ';
}

/* ================================================================
 * 2. 更新历史
 * ================================================================ */
.ds-version-history {
  margin: 20px 0;
  padding: 16px 18px;
  background: #fafbfc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.ds-version-history h3 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
  color: #222;
}

.ds-version-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ds-version-item {
  padding: 12px 14px;
  margin-bottom: 8px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  border-left: 3px solid #3a8ee6;
}

.ds-version-item.is-beta {
  border-left-color: #f59e0b;
  background: #fffaf3;
}

.ds-version-item:last-child {
  margin-bottom: 0;
}

.ds-version-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.ds-version-tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: #3a8ee6;
  border-radius: 4px;
}

.ds-version-item.is-beta .ds-version-tag {
  background: #f59e0b;
}

.ds-version-badge {
  display: inline-block;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 500;
  color: #fff;
  background: #10b981;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ds-version-beta {
  background: #f59e0b;
}

.ds-version-date {
  font-size: 12px;
  color: #888;
  margin-left: auto;
}

.ds-version-changelog {
  font-size: 13px;
  line-height: 1.6;
  color: #444;
  margin: 6px 0;
  padding: 6px 10px;
  background: #f9fafb;
  border-radius: 4px;
  word-break: break-word;
}

.ds-version-meta {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: #6b7280;
}

/* ================================================================
 * 3. 我的订阅表格
 * ================================================================ */
.ds-un-my-list {
  margin: 12px 0;
}

.ds-un-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.ds-un-table th,
.ds-un-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.ds-un-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #475569;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ds-un-table tbody tr:hover {
  background: #f9fafb;
}

.ds-un-act {
  display: inline-block;
  padding: 3px 10px;
  font-size: 12px;
  color: #3a8ee6;
  background: #fff;
  border: 1px solid #3a8ee6;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
  margin-right: 4px;
  font-family: inherit;
}

.ds-un-act:hover {
  color: #fff;
  background: #3a8ee6;
}

.ds-un-empty {
  text-align: center;
  padding: 40px 20px;
  background: #f9fafb;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #64748b;
}

.ds-un-empty p {
  margin: 6px 0;
}

.ds-un-empty .description {
  font-size: 13px;
  color: #94a3b8;
}

/* ================================================================
 * 4. 暗色模式
 * ================================================================ */
@media (prefers-color-scheme: dark) {
  .ds-un-toggle {
    color: #d1d5db;
    background: #1f2937;
    border-color: #374151;
  }
  .ds-un-toggle:hover {
    color: #60a5fa;
    border-color: #60a5fa;
  }
  .ds-version-history {
    background: #1f2937;
    border-color: #374151;
  }
  .ds-version-history h3 { color: #f3f4f6; }
  .ds-version-item {
    background: #111827;
    border-color: #374151;
  }
  .ds-version-item.is-beta {
    background: #1f1611;
  }
  .ds-version-changelog {
    background: #1f2937;
    color: #d1d5db;
  }
  .ds-version-date { color: #9ca3af; }
  .ds-version-meta { color: #9ca3af; }
  .ds-un-table th {
    background: #1f2937;
    color: #d1d5db;
  }
  .ds-un-table th, .ds-un-table td {
    border-bottom-color: #374151;
  }
  .ds-un-table tbody tr:hover { background: #1f2937; }
  .ds-un-act {
    color: #60a5fa;
    border-color: #60a5fa;
  }
  .ds-un-act:hover {
    color: #fff;
    background: #60a5fa;
  }
  .ds-un-empty {
    background: #1f2937;
    border-color: #374151;
    color: #9ca3af;
  }
}

/* ================================================================
 * 5. 响应式
 * ================================================================ */
@media (max-width: 600px) {
  .ds-version-head { gap: 4px; }
  .ds-version-tag { font-size: 12px; padding: 2px 6px; }
  .ds-version-date { width: 100%; margin-left: 0; }
  .ds-un-table th, .ds-un-table td { padding: 6px 8px; font-size: 12px; }
}
