/* ===== 搜索框区域样式 ===== */

.con .sou {
  max-width: 680px;
  position: relative;
  width: calc(100% - 60px);
  min-width: 320px;
  margin: 0 auto;
}

/* 搜索表单基础样式 */
.con .sou form {
  width: 100%;
  height: 50px;
  display: flex;
  align-items: center;
  position: relative;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: 25px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  padding: 0 10px;
  box-sizing: border-box;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* 白天模式悬停效果 */
[data-theme="light"] .con .sou form:hover {
  border-color: #ff9f4b !important;
  box-shadow: 0 0 0 4px rgba(255, 159, 75, 0.1), 0 0 20px rgba(255, 159, 75, 0.3) !important;
  background: linear-gradient(145deg, var(--bg-card), #fff9f0) !important;
}

/* 白天模式聚焦效果（保留，但不影响悬停） */
[data-theme="light"] .con .sou form:focus-within {
  border-color: #ff9f4b;
  box-shadow: 0 0 0 4px rgba(255, 159, 75, 0.15), 0 0 25px rgba(255, 159, 75, 0.4);
  background: linear-gradient(145deg, var(--bg-card), #fff9f0);
}

/* 夜间模式悬停效果 */
[data-theme="dark"] .con .sou form:hover {
  border-color: #7aa2f7 !important;
  box-shadow: 0 0 0 4px rgba(122, 162, 247, 0.15), 0 0 25px rgba(122, 162, 247, 0.4) !important;
  background: linear-gradient(145deg, var(--bg-card), #2a3040) !important;
}

/* 夜间模式聚焦效果 */
[data-theme="dark"] .con .sou form:focus-within {
  border-color: #7aa2f7;
  box-shadow: 0 0 0 4px rgba(122, 162, 247, 0.2), 0 0 30px rgba(122, 162, 247, 0.5);
  background: linear-gradient(145deg, var(--bg-card), #2a3040);
}

/* 输入框光标颜色 */
[data-theme="light"] .wd {
  caret-color: #ff9f4b;
}
[data-theme="dark"] .wd {
  caret-color: #7aa2f7;
}

/* 引擎选择器图标按钮 */
.search-select {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  color: var(--text-muted);
  margin-right: 5px;
  transition: background 0.2s ease, color 0.2s ease;
}

/* 白天模式引擎选择器悬停 */
[data-theme="light"] .search-select:hover {
  background: rgba(255, 159, 75, 0.1);
  color: #ff9f4b;
}

/* 夜间模式引擎选择器悬停 */
[data-theme="dark"] .search-select:hover {
  background: rgba(122, 162, 247, 0.15);
  color: #7aa2f7;
}

/* 输入框 */
.wd {
  flex: 1;
  height: 100%;
  border: none;
  background: transparent;
  font-size: 16px;
  color: var(--text-normal);
  outline: none;
  padding: 0 5px;
  min-width: 0;
}

.wd::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
  font-size: 15px;
}

/* 夜间模式 placeholder 效果 */
[data-theme="dark"] .wd::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

/* 搜索操作区域 */
.search-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: 5px;
}

.search-action-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 18px;
  transition: background 0.2s ease, color 0.2s ease;
}

/* 白天模式图标悬停 */
[data-theme="light"] .search-action-icon:hover {
  background: rgba(255, 159, 75, 0.1);
  color: #ff9f4b;
}

/* 夜间模式图标悬停 */
[data-theme="dark"] .search-action-icon:hover {
  background: rgba(122, 162, 247, 0.15);
  color: #7aa2f7;
}

/* 搜索按钮 */
.con .sou form button {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-left: 0;
  transition: background 0.2s ease, color 0.2s ease;
}

/* 白天模式搜索按钮悬停 */
[data-theme="light"] .con .sou form button:hover {
  background: rgba(255, 159, 75, 0.1);
  color: #ff9f4b;
}

/* 夜间模式搜索按钮悬停 */
[data-theme="dark"] .con .sou form button:hover {
  background: rgba(122, 162, 247, 0.15);
  color: #7aa2f7;
}

/* ===== 下方 AI 模式按钮 ===== */
.con .sou ul {
  height: 50px;
  margin: 25px auto 0;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.con .sou ul li {
  width: 140px;
  height: 50px;
  border-radius: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  box-sizing: border-box;
  border: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

#ai-mode-btn {
  background: linear-gradient(145deg, #6366f1, #8b5cf6);
  transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

#ai-mode-btn.ai-active {
  background: linear-gradient(145deg, #10b981, #3b82f6);
}

#ai-mode-btn i {
  width: 24px;
  height: 24px;
  font-size: 20px;
  color: #ffffff;
}

#ai-mode-btn .btn-text {
  color: #ffffff;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 1px;
}

#ai-mode-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
}

/* ===== 下拉菜单 ===== */
.search-selector {
  position: absolute;
  top: 55px;
  left: 10px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 8px 0;
  min-width: 160px;
  display: none;
  z-index: 1000;
  box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.search-selector.active {
  display: block;
}

.search-selector .item {
  padding: 10px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-normal);
  transition: background 0.2s ease;
}

.search-selector .item:hover {
  background: var(--hover-bg);
}

/* ===== 移动端适配 ===== */
@media (max-width: 640px) {
  .con .shlogo {
    width: 320px;
    height: 100px;
  }
  .con .sou {
    width: calc(100% - 30px);
  }
  .con .sou ul {
    gap: 10px;
  }
  .con .sou ul li {
    width: 120px;
    height: 45px;
    padding: 0 15px;
  }
  #ai-mode-btn i {
    width: 20px;
    height: 20px;
    font-size: 18px;
  }
  #ai-mode-btn .btn-text {
    font-size: 14px;
  }
  .search-actions {
    gap: 3px;
  }
  .search-action-icon {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }
  .search-selector {
    min-width: 140px;
    left: 5px;
  }
}