body {
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #FFF8E1 0%, #E1F5FE 100%);
  font-family: 'Comic Sans MS', 'Arial Rounded MT Bold', Arial, sans-serif;
}

.header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 8px 0 8px;
  background: transparent;
  margin-bottom: 6px;
}

.search-bar {
  display: flex;
  align-items: center;
  background: #fffbe6;
  border-radius: 30px;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.12);
  padding: 8px 18px;
  margin-bottom: 12px;
  width: 90vw;
  max-width: 400px;
}

.search-icon {
  font-size: 26px;
  margin-right: 8px;
}

#search {
  border: none;
  outline: none;
  background: transparent;
  font-size: 22px;
  width: 100%;
  padding: 6px 0;
  color: #333;
}

.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 10px;
  width: 100vw;
  max-width: 900px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.category-filter.collapsed {
  max-height: 0;
  overflow: hidden;
  padding: 0;
  margin: 0;
  transition: max-height 0.3s, padding 0.3s, margin 0.3s;
}
.category-filter.expanded {
  max-height: 500px;
  overflow: visible;
  padding-bottom: 6px;
  margin-bottom: 10px;
  transition: max-height 0.3s, padding 0.3s, margin 0.3s;
}

.category-btn {
  border: none;
  outline: none;
  border-radius: 16px;
  padding: 5px 12px;
  font-size: 15px;
  font-weight: bold;
  background: #f2f2f2; /* 更亮的灰色背景 */
  color: #fff; /* 白色文字 */
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, opacity 0.2s, filter 0.2s;
  box-shadow: 0 2px 8px rgba(180, 180, 180, 0.10);
  margin-bottom: 2px;
  user-select: none;
  opacity: 0.7;
  filter: grayscale(1);
}

.category-btn.selected {
  background: #ff69b4;
  color: #333;
  box-shadow: 0 4px 16px rgba(255, 105, 180, 0.18);
  opacity: 1;
  filter: none;
}

#main {
  width: 100vw;
  height: calc(100vh - 120px);
  min-height: 400px;
  margin: 0 auto;
  border-radius: 24px;
  box-shadow: 0 4px 32px rgba(0,0,0,0.08);
  background: transparent;
  max-width: 100vw;
  max-height: 100vh;
}

#category-toggle-bar {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
#category-toggle-bar button {
  border: none;
  font-size: 15px;
  padding: 6px 18px;
  border-radius: 16px;
  cursor: pointer;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s;
  margin: 0;
  outline: none;
}
#toggle-category-btn {
  background: linear-gradient(90deg, #ffd700 60%, #fffbe6 100%);
  color: #333;
}
#select-all-btn {
  background: linear-gradient(90deg, #90caf9 60%, #e3f2fd 100%);
  color: #1565c0;
}
#select-random-btn {
  background: linear-gradient(90deg, #a5d6a7 60%, #e8f5e9 100%);
  color: #1b5e20;
}
#category-toggle-bar button:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.16);
  transform: translateY(-2px) scale(1.04);
}

@media (max-width: 600px) {
  .header {
    padding: 10px 2px 0 2px;
  }
  .search-bar {
    max-width: 98vw;
    font-size: 18px;
    padding: 6px 10px;
  }
  #search {
    font-size: 18px;
  }
  .category-filter {
    gap: 6px;
    max-width: 98vw;
    font-size: 16px;
  }
  .category-btn {
    font-size: 16px;
    padding: 6px 12px;
    border-radius: 16px;
  }
  #main {
    min-height: 300px;
    height: calc(100vh - 140px);
    width: 100vw;
    max-width: 100vw;
    max-height: 100vh;
  }
  #category-toggle-bar {
    flex-direction: row;
    gap: 6px;
    margin-bottom: 22px;
  }
  #category-toggle-bar button {
    font-size: 13px;
    padding: 5px 10px;
    border-radius: 12px;
  }
} 