/* 基础 */
html, body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  transition: background 0.5s, color 0.5s;
}

/* 背景渐变动画 */
body.light {
  background: linear-gradient(-45deg, white, lightpink, pink, #d35793, #642141);
  color: black;
  background-size: 400% 400%;
  animation: gradientMove 8s ease infinite;
}

body.dark {
  background: linear-gradient(-45deg, #1a1a1a, #330033, #660066, #990099, #cc33cc);
  color: white;
  background-size: 400% 400%;
  animation: gradientMove 8s ease infinite;
}

@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* 主内容 */
.main-content {
  flex: 1;
  position: relative;
  padding-top: 80px; /* 避免 navbar 遮挡 */
  text-align: center;
}

/* 导航栏 */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.2);
  z-index: 100;
}

.navbar a {
  text-decoration: none;
  color: inherit;
  font-weight: bold;
  padding: 10px 15px;
  border-radius: 8px;
  transition: 0.3s;
}

.navbar a:hover {
  background: rgba(255,255,255,0.15);
  box-shadow: 0 0 15px rgba(255,255,255,0.8);
}

/* 卡片 */
.card {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 18px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(25px);
  border: 1px solid rgba(255,255,255,0.3);
  font-weight: bold;
  color: inherit;
  margin: 20px auto;
}

/* 切换按钮 */
.toggle-btn {
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  background: rgba(255,255,255,0.2);
  color: inherit;
  transition: 0.3s;
}

.toggle-btn:hover {
  box-shadow: 0 0 15px rgba(255,255,255,0.9);
}

/* 底部 */
footer {
  text-align: center;
  padding: 20px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255,255,255,0.2);
  color: inherit;
  font-weight: bold;
}

/* 响应式头像格子 */
.avatar-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

.avatar-item {
  text-align: center;
  background: rgba(255,255,255,0.1);
  padding: 10px;
  border-radius: 10px;
  width: 150px;
  color: inherit;
}

.avatar-item img {
  width: 120px;
  border-radius: 50%;
  margin-bottom: 10px;
}

.avatar-item button {
  padding: 5px 10px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  background: rgba(255,255,255,0.2);
  color: inherit;
  transition: 0.3s;
}

.avatar-item button:hover {
  background: rgba(255,255,255,0.35);
}

/* 手机响应式 */
@media (max-width: 768px) {
  .avatar-grid {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  .avatar-item {
    width: 80%;
  }

  .navbar {
    flex-direction: column;
    gap: 10px;
    height: auto;
    padding: 10px 0;
  }
}
