* {
  margin: 0;
  padding: 0;
}

body {
  background-color: #f1f2f3;
}

.container {
  box-sizing: border-box;
  width: 100%;
  max-width: 1640px;
  min-width: 1240px;
  margin: 25px auto;
  color: #333;
}

.container *{
  box-sizing: border-box;
}

header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 25px;
}

h1 {
  font-size: 2.2rem;
  margin-bottom: 10px;
}

.subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
}

.search-container {
  width: 800px;
  margin: 0 auto;
  margin-top: 10px;
  position: relative;
}

#search-input {
  min-width: 100%;
  padding: 15px 20px;
  font-size: 1.1rem;
  border: 2px solid #D1D5DB;
  border-radius: 50px;
  outline: none;
  transition: all 0.3s ease;
  background: white;
}

#search-input:focus {
  border-color: #4F46E5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

#search-input::placeholder {
  color: #9CA3AF;
}

.search-icon {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: #9CA3AF;
}

.categories {
  margin-bottom: 25px;
  column-count: 2; /* 默认显示2列 */
  column-gap: 20px;
  margin-bottom: 25px;
  break-inside: avoid; /* 防止元素被分割到不同列 */
}

.category {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: inline-block; /* 瀑布流布局关键 */
  width: 100%; /* 确保宽度填充列 */
  margin-bottom: 20px; /* 列间距 */
}


.category-header {
  padding: 15px;
  display: flex;
  align-items: center;
  font-size: 1.1rem;
  font-weight: 600;
  border-bottom: 1px solid #eee;
  line-height: 1;
  background-color: #d2dbe8;
}

.category-icon {
  margin-right: 10px;
}

.functions-list {
/*  max-height: 400px;
  overflow-y: auto;*/
}

.function-item {
  padding: 12px 15px;
  border-bottom: 1px solid #F3F4F6;
  display: flex;
  align-items: center;
  transition: background-color 0.2s;
  font-size: 0.9rem;
  line-height: 1.5;
}

.function-item:last-child {
  border-bottom: none;
}

.function-item:hover {
  background-color: #F9FAFB;
}

.function-name {
  width: 190px;
  font-weight: 600;
  color: #1F2937;
  flex-shrink: 0;
}

.function-desc {
  color: #6a6b6c;

}

.no-results {
  padding: 20px;
  text-align: center;
  color: #6B7280;
  font-style: italic;
}

.footer {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.footer h2 {
  margin-bottom: 20px;
  font-size: 1.4rem;
}

.footer-content {
  display: flex;
  gap: 20px;
}

.footer-section {
  flex: 1;
}

.footer-section h3 {
  margin-bottom: 15px;
  color: #1F2937;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
}

.footer-section h3 span {
  margin-right: 10px;
  font-size: 1.1rem;
}

.footer-section p {
  line-height: 1.7;
  color: #4B5563;
  margin-top: 10px;
  opacity: 0.85;
  font-size: 0.95rem;
}

.highlight {
  background-color: rgba(255, 235, 59, 0.4);
  padding: 0 2px;
  border-radius: 3px;
}

@media (max-width: 1400px) {
  .categories {
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  }
}
