﻿/* ====================
   聚合搜索模块 - 最终优化版 (银发族 V3.1 - 修复完整版)
   ==================== */
/* 1. 外层容器：保持不变 */
.search-container {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    background: linear-gradient(to right,
        rgba(255, 255, 255, 0.05),
        rgba(255, 255, 255, 0)
    );
    border: 1px solid #A7C9E7;
    border-radius: 4px;
    box-sizing: border-box;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateZ(0);
}

/* 2. Logo 样式：保持不变 */
.search-container .big-logo {
    height: 36px;
    margin-right: 6px;
    opacity: 0.95;
    transition: transform 0.2s ease;
}

/* 3. 下拉菜单样式 (重点修复：透明背景 + 箭头) */
.search-container .engine-select {
    height: 36px;
    line-height: 36px;
    font-size: 14px;
    color: #333;
    /* 修复 1: 常态背景透明 */
    background-color: transparent;
    border: 1px solid #A7C9E7; /* 统一使用主色调边框 */
    border-radius: 4px;
    outline: none;
    padding: 0 12px;
    transition: all 0.3s ease;
    /* 修复 2: 自定义箭头 (深灰色，适应透明背景) */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
    padding-right: 30px !important; /* 留出箭头空间 */
}

/* 下拉菜单悬停效果 (科技蓝) */
.search-container .engine-select:hover,
.search-container .engine-select:focus {
    background-color: #14A06F; /* 鼠标划过变绿 */
    color: #fff; /* 文字变白 */
    border-color: #f00; /* 边框变红 */
    box-shadow: 0 0 8px rgba(20, 160, 111, 0.5);
}

/* 展开后的选项列表样式 (深蓝紫风格) */
.search-container .engine-select option {
    background-color: #283593; /* 方案二：深蓝紫 */
    color: #fff;
    padding: 10px;
}

/* 4. 输入框样式 (重点修复：拉长 + 边框 + 间距) */
.search-container .search-input {
    /* 修复 3: 核心属性，让输入框自动拉长填满剩余空间 */
    flex: 1;

    height: 36px;
    line-height: 36px;
    /* 修复 4: 统一字体大小，防止文字过大过粗 */
    font-size: 14px;
    color: #2c3e50;
    /* 修复 5: 恢复边框线条，背景透明 */
    background-color: transparent;
    border: 1px solid #A7C9E7;
    border-radius: 4px;
    outline: none;
    /* 修复 6: 左右间距调整，使其与右侧按钮间距视觉统一 */
    margin-left: 6px; /* 这个值可以根据实际视觉微调，建议8-12px */
    padding: 0 15px;
    transition: all 0.3s ease;
}

/* 输入框聚焦效果 */
.search-container .search-input:focus {
    border-color: #0ff; /* 聚焦荧光 */
    box-shadow: 0 0 8px rgba(167, 199, 231, 0.5);
}

/* 5. 提示文字样式 (Placeholder 动感字体) */
.search-container .search-input::placeholder {
    /* 修复 7: 尝试使用楷体/草书，为了兼容性写了多种字体 */
    font-family: "KaiTi", "STKaiti", "楷体", "FangSong", "仿宋", cursive;
    /* 修复 8: 调整提示文字颜色，避免太灰看不清，略带一点科技感 */
    color: #666;
    font-size: 14px;
    font-weight: 300;
}

/* 6. 搜索按钮：保持不变 */
.search-container .search-btn {
    width: 90px;
    height: 36px;
    margin-left: 6px; /* 确保这个间距和输入框的margin-left一致 */
    padding: 0;
    background-color: transparent;
    color: #000; /* 按钮初始颜色  */
    border: 1px solid #A7C9E7;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    letter-spacing: 1px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

/* 按钮悬停 */
.search-container .search-btn:hover {
    background-color: #f00; /* 鼠标划过按钮变红 */ 
    border-color: #000; /* 边框变黑 */
	color: #fff; /* 文字变白 */
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(20, 160, 111, 0.4);
}

.search-highlight {
    background-color: #ffeb3b; /* 找到对应关键词语高亮红色背景 */
    padding: 0 2px;
    border-radius: 3px;
    font-weight: bold;
}

.category-card:hover {
    transform: translateY(-5px); /* 当鼠标放上去时，整个卡片向上移动 5 个像素。*/
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); /* 卡片阴影效果，分为两层（一个深一点，一个浅一点）*/
}
.website-item:hover {
    background-color: #f9fafb; /* 鼠标移上去，背景变浅色高亮。*/
}


/* ====================
   银发族模块 - （返回顶部按钮样式）
   ==================== */

/* 优化后的返回顶部按钮 */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: linear-gradient(135deg, #ff00ff, #c400c4); /* 渐变背景 */
  color: white;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  opacity: 0;
  transition: 
    opacity 0.3s,
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.3s,
    background 0.3s;
  z-index: 1000;
}

/* 悬停效果 */
.scroll-top:hover {
  background: linear-gradient(135deg, #e500e5, #a800a8); /* 加深渐变 */
  transform: translateY(-5px) scale(1.02); /* 上浮+放大 */
  box-shadow: 0 8px 16px rgba(0,0,0,0.25); /* 增强阴影 */
}

/* 按下效果 */
.scroll-top:active {
  transform: translateY(2px) scale(0.98); /* 下沉+缩小 */
  box-shadow: 0 2px 4px rgba(0,0,0,0.15); /* 减弱阴影 */
}

/* 显示状态 */
.scroll-top.visible {
  opacity: 1;
}

/* 箭头动画 */
.scroll-top::after {
  content: "↑";
  color: white;
  font-size: 24px;
  font-weight: bold;
  transition: transform 0.2s ease;
}

/* 悬停时箭头微动 */
.scroll-top:hover::after {
  transform: translateY(-2px);
}
