
  * { margin: 0; padding: 0; box-sizing: border-box; }

  body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 40%, #16213e 70%, #0f3460 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    color: #fff;
    position: relative;
  }

  /* 背景图 + 暗色遮罩 */
  body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
      linear-gradient(rgba(0, 0, 0, 0.7), rgba(10, 10, 30, 0.75)) no-repeat center center fixed,
      url('bg.jpg') no-repeat center center fixed;
    background-size: cover, cover;
  }

  /* 确保所有内容在遮罩之上 */
  h1, .subtitle, .friend-grid, footer, .search-box, .section-title,
  .credit-top, .group-hint, .home-buttons, .back-btn, .placeholder-page {
    position: relative;
    z-index: 1;
  }

  .friend-card {
    z-index: 1;
  }

  /* 手机端：一行两个 */
  /* mobile styles now handled by default (2-col) + desktop (4-col) */

  .credit-top {
    font-size: 0.85rem;
    color: #8892b0;
    position: relative;
    z-index: 1;
    margin-bottom: 4px;
  }

  h1 {
    font-size: 2rem;
    margin-bottom: 8px;
    background: linear-gradient(90deg, #00d2ff, #3a7bd5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .subtitle {
    color: #8892b0;
    margin-bottom: 4px;
    font-size: 0.95rem;
  }

  .group-hint {
    color: #5a7aaa;
    font-size: 0.8rem;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
  }

  .friend-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    width: 100%;
    max-width: 600px;
  }

  @media (min-width: 600px) {
    .friend-grid {
      grid-template-columns: repeat(6, 1fr);
      gap: 14px;
      max-width: 1200px;
    }
  }

  .friend-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px 4px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    content-visibility: auto;
    contain-intrinsic-size: 80px;
  }

  .friend-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 210, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .friend-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 210, 255, 0.4);
    box-shadow: 0 8px 32px rgba(0, 210, 255, 0.15);
  }

  .friend-card:hover::before {
    opacity: 1;
  }

  .friend-card:active {
    transform: translateY(-1px);
  }

  .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00d2ff, #3a7bd5);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 6px;
    font-size: 1rem;
    position: relative;
    z-index: 1;
    overflow: hidden;
  }

  @media (min-width: 600px) {
    .avatar {
      width: 42px;
      height: 42px;
      margin-bottom: 8px;
      font-size: 1.2rem;
    }
    .friend-card {
      padding: 14px 8px;
      border-radius: 12px;
    }
  }

  .avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
  }

  .friend-name {
    font-size: 0.68rem;
    font-weight: 600;
    margin-bottom: 2px;
    position: relative;
    z-index: 1;
    word-break: break-all;
    line-height: 1.2;
  }

  @media (min-width: 600px) {
    .friend-name {
      font-size: 0.85rem;
      margin-bottom: 4px;
    }
  }

  .friend-qq {
    font-size: 0.55rem;
    color: #8892b0;
    position: relative;
    z-index: 1;
  }

  .friend-note {
    font-size: 0.5rem;
    color: #ff6b6b;
    position: relative;
    z-index: 1;
    margin-top: 2px;
    line-height: 1.3;
    word-break: break-all;
  }

  @media (min-width: 600px) {
    .friend-qq {
      font-size: 0.7rem;
    }
  }

  .tap-hint {
    font-size: 0.55rem;
    color: #5a6a8a;
    margin-top: 4px;
    opacity: 0;
    transform: translateY(5px);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
  }

  .friend-card:hover .tap-hint {
    opacity: 1;
    transform: translateY(0);
  }

  /* 点击涟漪效果 */
  .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(0, 210, 255, 0.3);
    transform: scale(0);
    animation: ripple-anim 0.6s ease-out;
    pointer-events: none;
  }

  @keyframes ripple-anim {
    to { transform: scale(4); opacity: 0; }
  }

  /* 搜索框 */
  .search-box {
    width: 100%;
    max-width: 500px;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
  }

  .search-box input {
    width: 100%;
    padding: 14px 20px 14px 44px;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
  }

  .search-box input::placeholder {
    color: rgba(255, 255, 255, 0.35);
  }

  .search-box input:focus {
    border-color: rgba(0, 210, 255, 0.5);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.1);
  }

  .search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    pointer-events: none;
  }

  .friend-card.hidden {
    display: none;
  }

  .section-title {
    font-size: 1.3rem;
    margin: 30px 0 16px;
    position: relative;
    z-index: 1;
    color: #ccd6f6;
    width: 100%;
    max-width: 1200px;
    text-align: left;
    padding-left: 4px;
  }

  footer {
    margin-top: 60px;
    color: #3a4a6a;
    font-size: 0.8rem;
    position: relative;
    z-index: 1;
    text-align: center;
  }

  .credit {
    color: #8892b0;
    font-size: 0.85rem;
  }

  /* 页面系统 */
  .page { display: none; }
  .page.active { display: flex; flex-direction: column; align-items: center; width: 100%; }

  .home-buttons {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    max-width: 400px;
    margin-top: 40px;
  }

  .home-btn {
    padding: 24px 32px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(10px);
    color: #fff;
    font-size: 1.3rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    z-index: 1;
  }

  .home-btn:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(0,210,255,0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0,210,255,0.12);
  }

  .home-btn .icon { font-size: 2.5rem; display: block; margin-bottom: 8px; }
  .home-btn .btn-note { display: block; font-size: 0.65rem; color: #8892b0; font-weight: 400; margin-top: 4px; }

  .back-btn {
    align-self: flex-start;
    padding: 8px 18px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.08);
    color: #8892b0;
    font-size: 0.9rem;
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.2s;
  }
  .back-btn:hover { color: #fff; border-color: rgba(0,210,255,0.4); }

  .placeholder-page {
    text-align: center;
    padding: 80px 20px;
    color: #8892b0;
    font-size: 1.1rem;
    line-height: 2;
  }

  .support-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 320px;
    margin-top: 20px;
    align-items: center;
  }

  .support-btn {
    width: 100%;
    padding: 20px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(10px);
    color: #fff;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    position: relative;
    z-index: 1;
  }

  .support-btn:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(0,210,255,0.5);
    transform: translateY(-2px);
  }

  .support-btn .icon { font-size: 2rem; }

  .support-btn .group-qq {
    font-size: 0.7rem;
    color: #8892b0;
    font-weight: 400;
  }

/* 材料链接按钮（去掉下划线） */
.home-btn--link { text-decoration: none; }

/* 加载更多按钮（默认隐藏，JS 控制显示） */
.more-btn {
  display: none;
  margin: 14px auto;
  padding: 10px 28px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 22px;
  background: rgba(255,255,255,0.08);
  color: #ccd6f6;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  z-index: 1;
}
.more-btn:hover {
  background: rgba(0,210,255,0.15);
  border-color: rgba(0,210,255,0.4);
}
