/* ===== Reset & Base ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: #0f0f1a;
  color: #e4e4ed;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* ===== Background effects ===== */
.bg-glow {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12), transparent 70%);
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 0;
}

.bg-dots {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(circle, rgba(99, 102, 241, 0.15) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.6;
}

/* ===== Container ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 24px 40px;
  position: relative;
  z-index: 1;
}

/* ===== Header ===== */
.header {
  text-align: center;
  margin-bottom: 64px;
}

.logo {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  margin-bottom: 28px;
  box-shadow: 0 0 60px rgba(99, 102, 241, 0.25), 0 8px 32px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease;
}

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

.header h1 {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #e0e7ff 0%, #a5b4fc 50%, #c4b5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
}

.subtitle {
  font-size: 16px;
  color: #6b7280;
  font-weight: 400;
  letter-spacing: 0.3em;
}

/* ===== Grid ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

/* ===== Card ===== */
.card {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  padding: 28px;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
}

.card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.06), rgba(139, 92, 246, 0.03));
  opacity: 0;
  transition: opacity 0.35s;
}

.card:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(99, 102, 241, 0.25);
  box-shadow: 0 0 40px rgba(99, 102, 241, 0.08), 0 8px 32px rgba(0, 0, 0, 0.3);
}

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

.card > :not(.card-arrow) {
  position: relative;
  z-index: 1;
}

/* ===== Card icon ===== */
.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  flex-shrink: 0;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.04);
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.card-icon-fallback {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  flex-shrink: 0;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* ===== Card body ===== */
.card-body {
  min-width: 0;
  flex: 1;
}

.card-name {
  font-size: 16px;
  font-weight: 600;
  color: #e4e4ed;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

.card-desc {
  font-size: 13px;
  color: #6b7280;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
  line-height: 1.5;
}

.card-url {
  font-size: 12px;
  color: #4b5563;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-arrow {
  position: absolute;
  top: 28px;
  right: 28px;
  width: 18px;
  height: 18px;
  color: #374151;
  transition: all 0.3s;
  z-index: 1;
}

.card:hover .card-arrow {
  color: #818cf8;
  transform: translate(2px, -2px);
}

/* ===== Skeleton loading ===== */
.skeleton-card {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  padding: 28px;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  animation: shimmer 2s infinite;
}

.skeleton-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
}

.skeleton-body {
  flex: 1;
}

.skeleton-line {
  height: 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
}

.skeleton-line--name {
  width: 55%;
  margin-bottom: 10px;
}

.skeleton-line--desc {
  width: 80%;
}

@keyframes shimmer {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.7; }
}

/* ===== Empty state ===== */
.empty {
  text-align: center;
  color: #6b7280;
  padding: 80px 0;
  font-size: 15px;
  grid-column: 1 / -1;
}

.empty-icon {
  display: block;
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 50%;
  font-size: 34px;
  line-height: 80px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.empty p + p {
  margin-top: 6px;
  font-size: 14px;
  color: #4b5563;
}

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 32px 24px 40px;
  font-size: 13px;
  color: #374151;
  position: relative;
  z-index: 1;
}

.footer code {
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  color: #818cf8;
  border: 1px solid rgba(255, 255, 255, 0.08);
}


/* ===== Responsive ===== */
@media (max-width: 640px) {
  .container {
    padding: 36px 16px 24px;
  }

  .header {
    margin-bottom: 42px;
  }

  .logo {
    width: 68px;
    height: 68px;
    border-radius: 18px;
    margin-bottom: 22px;
  }

  .header h1 {
    font-size: 32px;
  }

  .subtitle {
    font-size: 14px;
    letter-spacing: 0.2em;
  }

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

  .card {
    padding: 22px 20px;
  }
}
