/* 渐变按钮样式 - 改编自 Uiverse.io by kirzin */
.gradient-btn {
  text-decoration: none;
  position: relative;
  border: none;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  color: #fff;
  width: 9em;
  height: 3em;
  line-height: 2em;
  text-align: center;
  background: linear-gradient(90deg, #03a9f4, #f441a5, #ffeb3b, #03a9f4);
  background-size: 300%;
  border-radius: 30px;
  z-index: 1;
  font-weight: bold;
}

.gradient-btn:hover {
  animation: ani 8s linear infinite;
  border: none;
}

@keyframes ani {
  0% {
    background-position: 0%;
  }

  100% {
    background-position: 400%;
  }
}

.gradient-btn:before {
  content: "";
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  z-index: -1;
  background: linear-gradient(90deg, #03a9f4, #f441a5, #ffeb3b, #03a9f4);
  background-size: 400%;
  border-radius: 35px;
  transition: 1s;
}

.gradient-btn:hover::before {
  filter: blur(20px);
}

.gradient-btn:active {
  background: linear-gradient(32deg, #03a9f4, #f441a5, #ffeb3b, #03a9f4);
}

/* 特定调整搜索区域的样式 */
.word-search-container {
  margin-top: 20px;
}

.word-search-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  position: relative;
  max-width: 400px;
  margin: 0 auto;
}

#word-search-input {
  border: 2px solid transparent;
  border-radius: 25px;
  padding: 12px 20px;
  flex: 1;
  min-width: 0;
  font-size: 15px;
  outline: none;
  transition: all 0.3s ease;
  background: #f9f9f9;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

#word-search-input:focus {
  border-image: linear-gradient(90deg, #03a9f4, #f441a5, #ffeb3b, #03a9f4) 1;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05), 0 0 8px rgba(3, 169, 244, 0.1);
  background: #fff;
}

#word-search-input::placeholder {
  color: #999;
  transition: color 0.3s ease;
}

#word-search-input:focus::placeholder {
  color: #bbb;
}

/* 适配按钮尺寸 */
#word-search-btn.gradient-btn {
  width: 3.2em;
  min-width: 3.2em;
  line-height: 3em;
  height: 3em;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 16px;
  transition: transform 0.3s ease;
}

#word-search-btn.gradient-btn:hover {
  transform: scale(1.05);
}

/* 搜索结果区域样式 */
.search-results {
  margin-top: 15px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  max-height: 400px;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.search-results.hidden {
  display: none;
}

.search-results:not(.hidden) {
  opacity: 1;
  transform: translateY(0);
}

.search-results:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, #03a9f4, #f441a5, #ffeb3b, #03a9f4);
  background-size: 300%;
  border-radius: 12px 12px 0 0;
  animation: ani 8s linear infinite;
}

/* 响应式调整 */
@media screen and (max-width: 480px) {
  .word-search-input-group {
    max-width: 100%;
  }
  
  #word-search-input {
    padding: 10px 15px;
    font-size: 14px;
  }
  
  #word-search-btn.gradient-btn {
    width: 2.8em;
    min-width: 2.8em;
    height: 2.8em;
  }
  
  .search-results {
    max-height: 300px;
  }
}
