/* ==========================================================================
   联系我们区块（从 contact.php 内联，样式全部限定在 #contact 内）
   ========================================================================== */
#contact {
  --card: rgba(255, 255, 255, 0.035);
  --line: rgba(255, 255, 255, 0.08);
  --text: #f2f3f7;
  --muted: #9ba0b5;
  --purple: #b06bff;
  --pink: #ff3d8f;
  --blue: #5227ff;
  --green: #07c160;
  position: relative;
  overflow: hidden;
  background: #000000;
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
#contact * { box-sizing: border-box; }
#contact a { color: inherit; text-decoration: none; }

#contact .c-main {
  position: relative; z-index: 1;
  width: min(1320px, calc(100% - 48px));
  margin: 0 auto; padding: 96px 0;
  display: flex; flex-direction: column;
}

#contact .c-hero { margin: 0 0 40px; }
#contact .tag { margin: 0 0 18px; font-size: 12px; letter-spacing: .35em; color: var(--muted); text-transform: uppercase; }
#contact h1 {
  margin: 0; font-size: clamp(38px, 6vw, 68px); line-height: 1.08; font-weight: 800; letter-spacing: -1.5px;
}
#contact h1 .grad { color: inherit; }
#contact .sub { margin: 22px 0 0; color: var(--muted); font-size: 16px; line-height: 1.8; }

#contact .cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; align-content: start; }
@keyframes bg-gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
#contact .contact-card {
  position: relative; border-radius: 22px; padding: 38px 34px;
  border: 1px solid var(--line);
  background-color: var(--card);
  background-image: linear-gradient(-45deg,
    rgba(255, 61, 143, .52),
    rgba(176, 107, 255, .52),
    rgba(82, 39, 255, .52),
    rgba(255, 61, 143, .52));
  background-size: 300% 300%;
  animation: bg-gradient-shift 8s ease infinite;
  backdrop-filter: blur(8px);
  display: flex; flex-direction: column; min-width: 0;
  transform-style: preserve-3d; will-change: transform;
  transition: transform .18s ease, border-color .3s, box-shadow .3s;
}
#contact .card-visual {
  flex: 1 1 auto;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 18px 0;
}
#contact .contact-card::after {
  content: ''; position: absolute; inset: -1px; border-radius: 22px; padding: 1px;
  background: linear-gradient(140deg, var(--accent, #333), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .35s; pointer-events: none;
}
#contact .contact-card:hover { border-color: transparent; }
#contact .contact-card:hover::after { opacity: 1; }

#contact .icon {
  width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center;
  margin-bottom: 22px; color: #fff;
}
#contact .icon svg { width: 30px; height: 30px; }
#contact .contact-card h2 { margin: 0 0 8px; font-size: 21px; font-weight: 700; }
#contact .contact-card .desc { margin: 0; color: var(--muted); font-size: 14px; }

#contact .wechat .icon { background: linear-gradient(135deg, #07c160, #06a04f); box-shadow: 0 10px 30px rgba(7,193,96,.35); }
#contact .wechat { --accent: #07c160; }
#contact .email { --accent: #ff3d8f; }
#contact .email .icon { background: linear-gradient(135deg, #ff3d8f, #b06bff); box-shadow: 0 10px 30px rgba(255,61,143,.35); }

#contact .qr-box {
  margin: 0 auto; width: 168px; height: 168px; border-radius: 16px;
  background: #fff; padding: 10px; display: grid; place-items: center;
  box-shadow: 0 18px 50px rgba(0,0,0,.45);
  transform: translateZ(30px);
}
#contact .qr-box canvas { width: 100%; height: 100%; image-rendering: pixelated; }
#contact .mail-box {
  margin: 0 auto; width: 168px; height: 168px; border-radius: 16px;
  display: grid; place-items: center;
  background: linear-gradient(140deg, rgba(255,61,143,.18), rgba(176,107,255,.10));
  border: 1px solid rgba(255,61,143,.28);
  box-shadow: 0 18px 50px rgba(0,0,0,.45);
  transform: translateZ(30px);
}
#contact .mail-box svg { width: 70px; height: 70px; color: var(--pink); }
#contact .follow-chip {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: 18px auto 0; padding: 13px 16px; width: 100%; max-width: 320px;
  border: 1px solid rgba(255,255,255,.28); border-radius: 14px;
  background: rgba(255,255,255,.14);
  backdrop-filter: blur(4px);
  color: #fff; font-size: 13.5px; font-weight: 600; letter-spacing: .02em;
}
#contact .follow-chip svg { flex: none; width: 19px; height: 19px; color: #fff; }
#contact .copy-chip {
  display: flex; align-items: center; gap: 12px;
  margin: 18px auto 0; padding: 13px 16px; width: 100%; max-width: 320px;
  border: 1px solid rgba(255,255,255,.28); border-radius: 14px;
  background: rgba(255,255,255,.14);
  backdrop-filter: blur(4px);
  cursor: pointer; user-select: none;
  transition: border-color .25s, box-shadow .25s, transform .2s;
}
#contact .copy-chip:hover, #contact .copy-chip:focus-visible {
  border-color: rgba(255,255,255,.28); box-shadow: 0 8px 28px rgba(0,0,0,.4); transform: translateY(-1px);
  outline: none;
}
#contact .chip-label { font-size: 12px; color: rgba(255,255,255,.72); letter-spacing: .05em; }
#contact .chip-value {
  flex: 1; min-width: 0; text-align: left; font-size: 18px; font-weight: 800; letter-spacing: .3px;
  color: #fff;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#contact .chip-icon { flex: none; width: 18px; height: 18px; color: var(--muted); transition: color .25s; }
#contact .copy-chip:hover .chip-icon { color: var(--text); }
#contact .copy-chip.copied { border-color: var(--accent); }
#contact .copy-chip.copied .chip-icon { color: var(--accent); }
#contact .toast {
  position: fixed; left: 50%; bottom: 40px; transform: translate(-50%, 20px);
  background: rgba(20,20,30,.9); border: 1px solid var(--line); color: var(--text);
  padding: 12px 20px; border-radius: 12px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: .3s; z-index: 10; backdrop-filter: blur(8px);
}
#contact .toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 720px) {
  #contact .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  #contact .c-hero { margin: 0 0 30px; }
  #contact .c-main { width: calc(100% - 40px); padding: 72px 0; }
  #contact .contact-card { padding: 20px 12px; }
  #contact .icon { width: 44px; height: 44px; border-radius: 12px; margin-bottom: 14px; }
  #contact .icon svg { width: 23px; height: 23px; }
  #contact .contact-card h2 { font-size: 17px; }
  #contact .contact-card .desc { font-size: 12px; line-height: 1.6; }
  #contact .card-visual { padding: 12px 0; }
  #contact .qr-box { width: 104px; height: 104px; padding: 7px; border-radius: 12px; }
  #contact .mail-box { width: 104px; height: 104px; border-radius: 12px; }
  #contact .mail-box svg { width: 44px; height: 44px; }
  #contact .follow-chip { margin-top: 12px; padding: 10px 8px; gap: 6px; font-size: 11px; border-radius: 10px; }
  #contact .follow-chip svg { width: 15px; height: 15px; }
  #contact .copy-chip { margin-top: 12px; padding: 10px 8px; gap: 6px; border-radius: 10px; }
  #contact .chip-label { font-size: 11px; }
  #contact .chip-value { font-size: 13px; }
  #contact .chip-icon { width: 14px; height: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  #contact .contact-card { transition: none; transform: none !important; animation: none !important; }
}
