* { box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(20px, 4vh, 40px) clamp(12px, 4vw, 24px) clamp(32px, 6vh, 56px);
  background:
    radial-gradient(circle at 15% 0%, rgba(120, 90, 255, 0.18), transparent 45%),
    radial-gradient(circle at 85% 15%, rgba(255, 90, 160, 0.14), transparent 45%),
    #0b0b0d;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #fff;
}

.page-header {
  max-width: 1200px;
  margin: 0 auto clamp(16px, 3vh, 28px);
  text-align: center;
}

.page-header h1 {
  margin: 0 0 6px;
  font-size: clamp(20px, 2.4vw + 12px, 28px);
  font-weight: 700;
  letter-spacing: 0.3px;
}

.page-header p {
  margin: 0;
  color: #9a9aa2;
  font-size: 14px;
}

.page-body {
  max-width: 1200px;
  margin: 0 auto;
}

.category-section {
  margin-bottom: clamp(20px, 3vh, 32px);
}

.category-section:last-child {
  margin-bottom: 0;
}

.category-title {
  margin: 0 0 12px;
  padding-left: 2px;
  font-size: 15px;
  font-weight: 700;
  color: #e8e8ea;
  border-left: 3px solid rgba(150, 120, 255, 0.8);
  padding-left: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(150, 120, 255, 0.18);
  color: #b9a8ff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(96px, 12vw + 60px, 160px), 1fr));
  gap: clamp(8px, 1.2vw, 14px);
}

.link-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  aspect-ratio: 1 / 1;
  padding: 14px 10px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  text-decoration: none;
  text-align: center;
  backdrop-filter: blur(6px);
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.link-card:hover {
  transform: translateY(-3px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.link-card:active {
  transform: scale(0.96);
}

.link-avatar {
  width: clamp(32px, 4vh, 44px);
  height: clamp(32px, 4vh, 44px);
  min-height: 32px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(14px, 2vh, 18px);
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, hsl(var(--hue), 75%, 60%), hsl(calc(var(--hue) + 40), 75%, 45%));
  box-shadow: 0 4px 12px hsla(var(--hue), 75%, 50%, 0.35);
}

.link-title {
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.35;
  color: #e8e8ea;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-height: 700px) {
  .link-title {
    -webkit-line-clamp: 2;
  }
  .link-card {
    gap: 6px;
    padding: 10px 8px;
  }
}
