* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 50%, #dee2e6 100%);
  min-height: 100vh;
  padding: 20px;
  color: #333;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
      circle at 15% 50%,
      rgba(102, 126, 234, 0.08) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 85% 30%,
      rgba(118, 75, 162, 0.08) 0%,
      transparent 50%
    );
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
  z-index: 1;
}

.header {
  text-align: center;
  margin-bottom: 30px;
  padding: 25px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.header h1 {
  color: #2d3748;
  font-size: 2.2rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-weight: 700;
}

.header h1 i {
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header p {
  color: #718096;
  font-size: 0.95rem;
  margin-bottom: 18px;
}

.search-box {
  max-width: 550px;
  margin: 0 auto;
  position: relative;
}

.search-box::before {
  content: "\f002";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #a0aec0;
  font-size: 0.9rem;
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 12px 16px 12px 46px;
  border: 2px solid #e2e8f0;
  border-radius: 40px;
  font-size: 15px;
  background: #fff;
  color: #2d3748;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.search-box input::placeholder {
  color: #a0aec0;
}

.search-box input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15),
    0 2px 10px rgba(0, 0, 0, 0.05);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
  margin-top: 25px;
}

.card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.1);
  position: relative;
  cursor: pointer;
  border: 1px solid #edf2f7;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--card-color),
    var(--card-color-light)
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12), 0 8px 16px rgba(0, 0, 0, 0.08);
}

.card:hover::before {
  opacity: 1;
}

.card-icon {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--card-color);
  background: transparent;
  position: relative;
  border-bottom: 2px solid var(--card-color);
  border-radius: 18px 18px 0 0;
  transition: all 0.3s ease;
}

.card-icon i {
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
  transition: transform 0.3s ease;
}

.card:hover .card-icon i {
  transform: scale(1.1);
}



.card-content {
  padding: 0px 16px 12px 16px;
  position: relative;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  display: flex;
  align-items: center;
  flex-direction: row;
}

.category {
  display: inline-block;
  background: linear-gradient(
    135deg,
    var(--card-color),
    var(--card-color-light)
  );
  color: white;
  padding: 4px 12px;
  border-radius: 18px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 8px;
  margin-top: 1.5px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  align-self: flex-start;
  transition: transform 0.3s ease;
}

.category:hover {
  transform: scale(1.05);
}

.card-content h3 {
  margin-bottom: 8px;
  color: #2d3748;
  font-size: 1.25rem;
  font-weight: 600;
  transition: color 0.3s ease;
  display: flex;
  align-items: flex-start;
}

.card:hover .card-content h3 {
  color: var(--card-color);
}

.card-content p {
  color: #718096;
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 12px;
  flex-grow: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-url {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid #edf2f7;
  font-size: 0.8rem;
  color: #a0aec0;
  word-break: break-all;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.3s ease;
  font-weight: 500;
}

.card:hover .card-url {
  color: var(--card-color);
}

.card-url::before {
  content: "\f0c1";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 0.75rem;
}

.status {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #48bb78;
  border: 2px solid #fff;
  box-shadow: 0 0 8px rgba(72, 187, 120, 0.4);
  z-index: 10;
}

.status.offline {
  background: #fc8181;
  box-shadow: 0 0 8px rgba(252, 129, 129, 0.4);
}

.footer {
  text-align: center;
  margin-top: 50px;
  padding: 25px;
  color: #a0aec0;
  font-size: 0.9rem;
  position: relative;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
}

.footer span {
  color: #667eea;
  font-weight: 600;
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
  }
}

@media (max-width: 768px) {
  body {
    padding: 15px;
  }

  .header {
    padding: 30px 20px;
    margin-bottom: 30px;
    border-radius: 18px;
  }

  .header h1 {
    font-size: 2rem;
    flex-direction: column;
    gap: 10px;
  }

  .header p {
    font-size: 0.95rem;
  }

  .search-box input {
    padding: 14px 20px 14px 48px;
    font-size: 15px;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
    margin-top: 18px;
  }

  .card {
    height: 100%;
  }

  .card-icon {
    height: 80px;
    font-size: 2.2rem;
    border-bottom: 2px solid var(--card-color);
    border-radius: 16px 16px 0 0;
  }

  .card-content {
    padding: 16px;
  }

  .card-content h3 {
    font-size: 1.25rem;
  }

  .category {
    padding: 5px 14px;
    font-size: 0.75rem;
    margin-bottom: 12px;
  }

  .card-content p {
    font-size: 0.9rem;
    margin-bottom: 14px;
  }

  .card-url {
    font-size: 0.8rem;
    padding-top: 12px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 10px;
  }

  .header {
    padding: 22px 15px;
    margin-bottom: 20px;
  }

  .header h1 {
    font-size: 1.7rem;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .card {
    height: 100%;
  }

  .card-icon {
    height: 70px;
    font-size: 2rem;
    border-bottom: 2px solid var(--card-color);
    border-radius: 14px 14px 0 0;
  }

  .card-content {
    padding: 14px;
  }

  .card-content h3 {
    font-size: 1.15rem;
    margin-bottom: 8px;
  }

  .card-content p {
    font-size: 0.88rem;
    margin-bottom: 12px;
  }

  .category {
    padding: 4px 12px;
    font-size: 0.7rem;
    margin-bottom: 10px;
  }

  .card-url {
    font-size: 0.78rem;
    padding-top: 10px;
  }
}

/* 卡片入场动画 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(25px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  animation: fadeInUp 0.5s ease forwards;
  opacity: 0;
}

.card:nth-child(1) {
  animation-delay: 0.08s;
}
.card:nth-child(2) {
  animation-delay: 0.12s;
}
.card:nth-child(3) {
  animation-delay: 0.16s;
}
.card:nth-child(4) {
  animation-delay: 0.2s;
}
.card:nth-child(5) {
  animation-delay: 0.24s;
}
.card:nth-child(6) {
  animation-delay: 0.28s;
}
.card:nth-child(7) {
  animation-delay: 0.32s;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e0;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a0aec0;
}
