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

:root {
  --bg-color: #e6f7ff;
  --card-bg: #ffffff;
  --text-color: #0056b3;
  --card-border: #d1e9ff;
  --hover-shadow: rgba(0, 86, 179, 0.2);
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  display: flex;
  flex-direction: column; /* 改为纵向布局 */
  justify-content: center;
  align-items: center;
  min-height: 100dvh; /* 👈 关键：最小高度占满屏幕，但允许更高 */
  text-align: center;
  padding: 16px;
  transition: background-color 0.4s ease;
  position: relative;
  /* overflow: hidden; 👈 删除或注释掉这一行 */
}

#particlesCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
}

.container {
  max-width: 900px;
  width: 100%;
  background: var(--card-bg);
  padding: 40px 24px;
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
  border: 2px solid var(--card-border);
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
}

.avatar-link {
  display: inline-block;
  margin-bottom: 20px;
}

.avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--card-border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.avatar:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 16px var(--hover-shadow);
}

h1 {
  font-size: 32px;
  margin-bottom: 28px;
  color: var(--text-color);
  position: relative;
}

h1::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background: var(--text-color);
  margin: 10px auto 0;
  border-radius: 2px;
}

.links {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.link-item {
  position: relative;
  padding: 18px;
  background-color: #f8fcff;
  border-radius: 14px;
  text-decoration: none;
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  z-index: 1;
}

.link-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px var(--hover-shadow);
}

.link-item img {
  width: 50px;
  height: 50px;
  margin-bottom: 10px;
  transition: transform 0.3s ease;
}

.link-item:hover img {
  transform: scale(1.1);
}

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(0, 86, 179, 0.2);
  transform: scale(0);
  animation: ripple 0.6s linear;
  pointer-events: none;
}

@keyframes ripple {
  to {
    transform: scale(2.5);
    opacity: 0;
  }
}

.link-item {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 480px) {
  .container {
    padding: 32px 16px;
  }
  h1 {
    font-size: 26px;
  }
  h1::after {
    width: 40px;
  }
  .avatar {
    width: 75px;
    height: 75px;
  }
  .links {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
  }
  .link-item {
    padding: 16px;
  }
  .link-item img {
    width: 44px;
    height: 44px;
  }
}

.footer {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: #999;
  text-align: center;
  z-index: 10;
}

.footer a {
  color: #666;
  text-decoration: none;
}