:root {
    --animation-duration: 0.3s;
    --primary-color: #00a1d6;
}
/* 其他原有样式保持不变 */

.service-card, .search-btn {
  transition: all var(--animation-duration);
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Microsoft YaHei', sans-serif;
}
body {
  min-height: 100vh;
  position: relative;
  background: #1a1a1a;
  color: white;
}
#wallpaper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background-size: cover;
  background-position: center;
  opacity: 0.9;
}
.header-container {
  padding: 40px 20px 20px;
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
}
.title-group {
  display: flex;
  align-items: center;
  margin-bottom: 30px;
  padding: 15px 30px;
  border-radius: 12px;
  width: fit-content;
  margin: 0 auto 30px;
  gap: 40px;
  position: relative;
}
.title-group::after {
  content: '';
  position: absolute;
  left: 66%;
  height: 30%;
  width: 1.5px;
  background: rgba(255,255,255,1);
  transform: translateX(-50%);
}
.main-title {
  font-size: 3rem;
  font-weight: bold;
}
.time-container {
  text-align: left;
}
#current-time {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 5px;
}
#current-date {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* 调整搜索框结构 */
.search-input {
  border-radius: 0;
  border-left: 1px solid #ddd;
}
.search-btn {
  padding: 12px 25px;
  border: none;
  border-radius: 25px;
  background: rgba(0, 0, 0, 0.7);
  color: rgba(255,255,255,0.95);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(255,255,255,0.1);
}
.search-btn:hover {
  background: rgba(0, 0, 0, 0.8);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}
.search-group {
  position: relative;
  max-width: 800px;
  margin: 0 auto 30px;
  display: flex;
  gap: 5px;
  align-items: center;
  background: rgba(255,255,255,0.9);
  border-radius: 25px;
  padding: 5px;
}
.engine-select {
  padding: 12px 25px 12px 15px;
  width: 100%;
  border: none;
  border-radius: 25px;
  background: rgba(255,255,255,0.5);
  appearance: none;
  -webkit-appearance: none;
}
/* 新增图标样式 */
.engine-select-wrapper {
  position: relative;
  width: 10%;
}
.engine-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  width: 20px;
  height: 20px;
}
.search-input {
  flex: 1;
  padding: 12px 15px;
  border: none;
  border-radius: 25px;
  background: transparent;
  font-size: 1rem;
}

/* 新增搜索区域容器 */
.search-area {
  display: flex;
  gap: 10px;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}
/* 调整原有搜索框组 */
.search-group {
  flex: 1;
  display: flex;
}
/* 优化切换按钮样式 */
.network-switch {
  margin-bottom: 30px;
  flex: 0 0 60px;
  padding: 12px;
  border: none;
  background: rgba(40, 167, 69, 0.9);
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 18px;
  position: relative;
  align-self: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.network-switch:hover {
  background: rgba(40, 167, 69, 1);
  transform: scale(1.05);
}
.network-switch.active {
  background: rgba(220, 53, 69, 0.9);
}

/* 新增服务内容容器样式 */
.service-content-container {
    position: relative;
}
 
/* 服务行添加动画效果 */
.service-row {
    transition: opacity 0.5s ease, transform 0.5s ease;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateY(4px);
    pointer-events: none; /* 隐藏时不可点击 */
}
 
/* 激活的服务行 */
.service-row.active {
    opacity: 1;
    transform: translateY(0);
    position: relative;
    pointer-events: auto; /* 显示时可点击 */
}
 
/* 外网按钮样式（绿色） */
.section-network-switch {
    background: rgba(40, 167, 69, 0.9) !important; /* 绿色 */
    color: white;
}
 
/* 内网按钮样式（红色） */
.section-network-switch.active {
    background: rgba(220, 53, 69, 0.9) !important; /* 红色 */
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 20px;
}

.service-grid {
  padding: 20px;
}
.service-category{
  margin-bottom: 30px;
}
.category-title {
  color: rgba(255,255,255,0.9);
  font-size: 1.2rem;
  margin: 0 0 15px 15px;
  padding-left: 10px;
  border-left: 3px solid rgba(255,255,255,0.6);
}
.service-row{
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 15px;
  padding: 0 15px;
}

.service-card {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all var(--animation-duration);
  text-decoration: none;
  min-height: 70px;
  margin-bottom: 5px;
}

.service-card:hover {
  background: rgba(0, 0, 0, 0.6);
  transform: translateY(-3px);
}

.service-card img {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  border-radius: 12px;
}

.service-container {
  padding-bottom: 80px; /* 为页脚留出空间 */
}

.text-container {
  flex: 1;
  color: white;
  overflow-wrap: break-word;  /* 新版标准 */
  word-break: break-word;  /* 中文环境优化 */
}

.title {
  font-size: 14px;
  font-weight: bold;
  line-height: 1.2;
  margin-bottom: 4px;
}

.subtitle {
  font-size: 12px;
  opacity: 0.8;
  line-height: 1.2;
}

.control-bar {
  position: absolute;
  top: 20px;
  right: 5px;
  display: flex;
  gap: 10px;
}

.control-btn {
  padding: 10px 18px;
  border: none;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.3);
  color: rgba(255,255,255,0.95);
  cursor: pointer;
  transition: all 0.3s ease;
}
.control-btn:hover {
  background: rgba(0, 0, 0, 0.6);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}
/* 在my.css中添加以下新样式 */
.category-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 15px 15px;
}
 
.category-title {
  margin: 0; /* 移除原有标题的外边距 */
  display: inline-block; /* 让标题和按钮在同一行 */
  vertical-align: middle;
}
 
.section-network-switch {
  margin-top: 2px;
  padding: 4px 10px 5px;
  font-size: 0.85rem;
  border: none;
  background: rgba(40, 167, 69, 0.7);
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 12px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  display: inline-block;
  vertical-align: middle;
}
 
.section-network-switch:hover {
  background: rgba(40, 167, 69, 0.9);
  transform: scale(1.05);
}
 
.section-network-switch.active {
  background: rgba(220, 53, 69, 0.7);
}
    
/* 移除所有输入框的默认聚焦边框 */
.engine-select:focus,
.search-input:focus,
.search-btn:focus {
  outline: none;
  box-shadow: none;
  border-color: transparent;
}
/* 可选：添加自定义聚焦效果 */
.search-input:focus {
  background: rgba(255,255,255,1);
  box-shadow: 0 0 5px rgba(0,161,214,0.3);
}
.engine-select:focus {
  background: rgba(255,255,255,1);
}
/* 修复移动端默认样式 */
input,
select,
button {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
 
.footer {
  text-align: center;
  padding: 25px 20px;
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-top: 50px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.footer p {
  margin: 3px 0;
}
 
@media (max-width: 1200px) {
  .service-row {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (max-width: 992px) {
  .service-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .header-container{
    padding:20px 5px 10px;
  }
  .container {
  padding: 0;
  }
  .service-grid {
    padding: 10px;
  }

  .control-bar {
    top: 10px;
    right: 10px;
  }

  .service-card {
    padding: 12px;
    min-height: 70px;
  }

  .service-card img {
    width: 35px;
    height: 35px;
  }
  .service-category {
    margin-bottom: 20px;
  }
  
  .category-title {
    font-size: 1.1rem;
    margin-left: 10px;
  }
  
  .service-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 0;
  }
  .title-group {
    flex-direction: column;
    gap: 20px;
    padding: 15px;
  }
  .title-group::after {
    display: none;
  }
  .main-title {
    padding: 0;
    text-align: center;
    font-size: 2rem;
  }
  .time-container {
    padding: 0;
    text-align: center;
  }
  .search-group {
    max-width: 100%;
    border-radius: 25px;
  }
  .search-btn {
    flex-basis: 70px;
    padding: 12px 15px;
  }
  .search-input {
    font-size: 14px;
    padding: 12px 5px;
  }
  
  .engine-select-wrapper {
    width: 100%;
  }
  
  .engine-select {
    border-radius: 25px;
  }
  
  .engine-icon {
    right: 15px;
  }
  .footer {
    font-size: 0.8rem;
    padding: 15px 10px;
  }
  .engine-select {
    /* 隐藏文字保留功能 */
    color: transparent;
    /* 缩小选择框宽度 */
    width: 24px;
    /* 隐藏下拉箭头 */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
  }
  .engine-icon {
    /* 放大图标尺寸 */
    width: 24px;
    height: 24px;
    /* 定位覆盖选择框 */
    position: absolute;
    left: 8px;
    pointer-events: none; /* 允许点击穿透到select */
  }
  .engine-select-wrapper {
    position: relative;
    /* 缩小容器宽度 */
    width: 40px;
  }
  .search-group {
    /* 紧凑布局 */
    gap: 1px;
  }
  
  /* 隐藏PC端文字 */
  .engine-select option {
    color: #000; /* 恢复下拉列表文字颜色 */
  }
}

@media (max-width: 500px) {
  .header-container{
    padding:20px 5px 10px;
  }
  .container {
  padding: 0;
  }
  .service-grid {
    padding: 10px;
  }

  .control-bar {
    top: 10px;
    right: 10px;
  }

  .service-card {
    padding: 12px;
    min-height: 70px;
  }

  .service-card img {
    width: 35px;
    height: 35px;
  }
  .service-category {
    margin-bottom: 20px;
  }
  
  .category-title {
    font-size: 1.1rem;
    margin-left: 10px;
  }
  
  .service-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 0;
  }
  .title-group {
    flex-direction: column;
    gap: 20px;
    padding: 15px;
  }
  .title-group::after {
    display: none;
  }
  .main-title {
    padding: 0;
    text-align: center;
    font-size: 2rem;
  }
  .time-container {
    padding: 0;
    text-align: center;
  }
  .search-group {
    max-width: 100%;
    border-radius: 25px;
  }
  
  .search-btn {
    flex-basis: 70px;
    padding: 12px 15px;
  }
  .search-input {
    font-size: 14px;
    padding: 12px 5px;
  }
  .search-group {
    gap: 1px;
  }
  
  .engine-select {
    border-radius: 25px;
  }
  
  .engine-icon {
    right: 15px;
  }
  .footer {
    font-size: 0.8rem;
    padding: 15px 10px;
  }
}
