/* AI Content Optimizer — 热门科技新闻 Widget */

/* ── 外框容器 ──────────────────────────────────────────────── */
.aico-news-widget {
  font-size: 1rem;
  line-height: 1.6;
  color: #1a1a2e;
}

/* ── 日期范围标签 ────────────────────────────────────────── */
.aico-news-week-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 14px;
  padding: 4px 12px 4px 10px;
  background: linear-gradient(135deg, #eef0ff 0%, #e4e8ff 100%);
  color: #4a5ee3;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid #d4d9ff;
}

.aico-news-week-label::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #4a5ee3;
  border-radius: 50%;
  flex-shrink: 0;
  animation: aico-news-pulse 2.2s ease-in-out infinite;
}

@keyframes aico-news-pulse {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%       { opacity: 0.3; transform: scale(0.65); }
}

/* ── 新闻列表 ────────────────────────────────────────────── */
.aico-news-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.aico-news-item {
  padding: 10px 0;
  border-bottom: 1px dashed #eaebf8;
}

.aico-news-item:first-child {
  padding-top: 2px;
}

.aico-news-item:last-child {
  border-bottom: none;
  padding-bottom: 2px;
}

/* ── 链接行 ──────────────────────────────────────────────── */
.aico-news-link {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.aico-news-link:hover .aico-news-title {
  color: #4a5ee3;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.aico-news-link:hover .aico-news-num {
  transform: scale(1.08);
}

/* ── 序号徽章 ────────────────────────────────────────────── */
.aico-news-num {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 800;
  background: #eef0ff;
  color: #7b8ff5;
  line-height: 1;
  margin-top: 2px;
  transition: transform 0.15s ease;
}

/* 前三名渐变高亮 */
.aico-news-item[data-index="1"] .aico-news-num {
  background: linear-gradient(135deg, #ff4d4f, #ff7875);
  color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(255, 77, 79, 0.35);
}
.aico-news-item[data-index="2"] .aico-news-num {
  background: linear-gradient(135deg, #ff7a00, #ffaa40);
  color: #fff;
  border-radius: 7px;
  box-shadow: 0 2px 6px rgba(255, 122, 0, 0.3);
}
.aico-news-item[data-index="3"] .aico-news-num {
  background: linear-gradient(135deg, #faad14, #ffd666);
  color: #fff;
  box-shadow: 0 2px 6px rgba(250, 173, 20, 0.3);
}

/* ── 标题文字 ────────────────────────────────────────────── */
.aico-news-title {
  flex: 1;
  font-size: 1.05rem;
  line-height: 1.55;
  color: #252540;
  word-break: break-word;
  transition: color 0.15s;
}

/* ── 元信息行（来源、日期） ──────────────────────────────── */
.aico-news-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin: 5px 0 0 32px;
}

.aico-news-source {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  background: #f2f3ff;
  color: #6b7ef5;
  font-size: 0.71rem;
  font-weight: 600;
  border: 1px solid #dde1ff;
  letter-spacing: 0.01em;
}

.aico-news-date {
  color: #b8b8d0;
  font-size: 0.71rem;
}

/* ── 底部更新时间 ─────────────────────────────────────────── */
.aico-news-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid #eeeef8;
  font-size: 0.7rem;
  color: #c4c4dc;
}

.aico-news-footer::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #d8d8f0;
  flex-shrink: 0;
}

/* ── 空状态 ──────────────────────────────────────────────── */
.aico-news-empty {
  color: #a8a8c8;
  font-size: 0.88rem;
  padding: 16px 0;
  text-align: center;
}
