/* ===================== 搜索结果美化 CSS（可切换夜晚/白天模式） ===================== */

/* 默认白天模式 */
.sr-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: #fff;
  border: 2px solid #eee;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.sr-thumb {
  width: 15%;
  height: auto;
  max-height: 160px;
  object-fit: contain;
  border-radius: 8px;
  border: 2px solid #eee;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
  background: #f9f9f9;
}

.sr-thumb:hover {
  transform: scale(1.02);
}

.sr-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sr-title {
  margin: 0 0 6px 0;
  font-size: 16px;
  font-weight: 700;
}

.sr-title a {
  text-decoration: none;
  color: #222;
  background: linear-gradient(90deg, #ff4b4b, #d62828);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: all 0.3s ease;
}

.sr-title a:hover {
  text-decoration: underline;
  transform: translateY(-1px);
}

.sr-snippet {
  font-size: 14px;
  color: #555;
  margin: 0 0 8px 0;
  line-height: 1.6;
}

.sr-meta {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: #777;
  align-items: center;
}

.sr-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #FFA500;
}

.sr-meta span::before {
  content: "•";
  color: #ccc;
  margin-right: 4px;
}

.sr-badge {
  background: #f5f5f5;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  color: #555;
}

.sr-link {
  background: linear-gradient(135deg, #ff4b4b, #d62828);
  color: #fff;
  padding: 6px 12px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  display: inline-block;
  margin-top: 6px;
}

.sr-link:hover {
  background: linear-gradient(135deg, #b71c1c, #900000);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transform: translateY(-2px);
}

/* ===================== 夜晚模式 ===================== */
body.dark-mode .sr-item {
  background: #1e1e1e;
  border: 2px solid #333;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

body.dark-mode .sr-title a {
  color: #f0f0f0;
}

body.dark-mode .sr-snippet {
  color: #ccc;
}

body.dark-mode .sr-meta {
  color: #bbb;
}

body.dark-mode .sr-badge {
  background: #2c2c2c;
  color: #FFA500;
}

body.dark-mode .sr-link {
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* ===================== 响应式优化 ===================== */
@media (max-width: 768px) {
  .sr-item {
    flex-direction: column;
    gap: 12px;
    padding: 12px;
  }

  .sr-thumb {
    width: 100%;
    max-height: 200px;
    border-radius: 8px;
  }

  .sr-title {
    font-size: 15px;
  }

  .sr-snippet {
    font-size: 13px;
  }

  .sr-meta {
    font-size: 12px;
    gap: 8px;
    flex-wrap: wrap;
  }

  .sr-link {
    width: 100%;
    text-align: center;
    padding: 8px 0;
    font-size: 14px;
  }
}
