/* 基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background-color: #f5f5f7;
  color: #333;
  line-height: 1.6;
}

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

/* 页头样式 */
header {
  margin-bottom: 30px;
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  font-weight: 700;
}

.featured {
  color: #007aff;
}

/* 分类导航样式 */
.category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

.category-btn {
  padding: 8px 15px;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 20px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

.category-btn:hover {
  background-color: #f0f0f0;
}

.category-btn.active {
  background-color: #007aff;
  color: white;
  border-color: #007aff;
}

.category-btn img {
  width: 18px;
  height: 18px;
}

/* 网站列表样式 */
.site-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.site-card {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.site-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.site-header {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.site-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  margin-right: 15px;
  object-fit: contain;
  background-color: #f5f5f7;
}

.site-name {
  font-size: 1.2rem;
  font-weight: 600;
}

.site-desc {
  font-size: 0.9rem;
  color: #666;
  flex-grow: 1;
}

/* 加载和错误信息样式 */
.loading, .error-message, .empty-message {
  grid-column: 1 / -1;
  text-align: center;
  padding: 30px;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.loading {
  color: #007aff;
  font-weight: 500;
}

.error-message {
  color: #ff3b30;
  font-weight: 500;
}

.empty-message {
  color: #8e8e93;
  font-weight: 500;
}

/* 页脚样式 */
footer {
  margin-top: 50px;
  text-align: center;
  font-size: 0.9rem;
  color: #888;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .site-list {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
  
  header h1 {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .site-list {
    grid-template-columns: 1fr;
  }
  
  .category-nav {
    overflow-x: auto;
    padding-bottom: 10px;
    flex-wrap: nowrap;
  }
  
  .category-btn {
    white-space: nowrap;
  }
} 