/* ============================================================
   AI Canvas 官网 · 入群卡片 / 弹窗样式
   形态：右下角悬浮卡片（默认）、居中弹窗、悬浮按钮
   ============================================================ */

body.aicg-lock { overflow: hidden; }

/* ------------------------------ 公共 ------------------------------ */

.aicg-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #b7c3ff;
  background: rgba(65, 150, 255, 0.14);
  border: 1px solid rgba(65, 150, 255, 0.24);
}

.aicg-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  border: 1px solid rgba(150, 175, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: #9ba2bd;
  cursor: pointer;
  transition: color 0.18s, background 0.18s;
}

.aicg-close:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }

/* 群卡片（横向：二维码 + 文案 + 按钮） */
.aicg-g {
  display: flex;
  gap: 12px;
  padding: 11px;
  border-radius: 14px;
  border: 1px solid rgba(150, 175, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 0.18s, background 0.18s;
}

.aicg-g:hover { border-color: rgba(150, 175, 255, 0.3); background: rgba(255, 255, 255, 0.06); }

.aicg-qr {
  flex: 0 0 auto;
  width: 78px;
  height: 78px;
  border-radius: 10px;
  object-fit: cover;
  background: #fff;
  display: block;
}

.aicg-qr-ph {
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(150, 175, 255, 0.22);
  color: #6a7093;
  font-size: 10.5px;
  line-height: 1.35;
  text-align: center;
}

.aicg-g-body { min-width: 0; display: flex; flex-direction: column; gap: 4px; }

.aicg-g-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.aicg-tag {
  padding: 1px 7px;
  border-radius: 99px;
  font-size: 10px;
  color: #9ec1ff;
  background: rgba(65, 150, 255, 0.12);
  border: 1px solid rgba(65, 150, 255, 0.2);
}

.aicg-g-top b { font-size: 13px; font-weight: 600; color: #eef1fa; line-height: 1.4; }

.aicg-g-body p { margin: 0; font-size: 11.5px; line-height: 1.5; color: #8b94b3; }

.aicg-join {
  align-self: flex-start;
  margin-top: 2px;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 11px;
  text-decoration: none;
  color: #dce6ff;
  background: linear-gradient(120deg, rgba(65, 150, 255, 0.28), rgba(162, 89, 255, 0.24));
  border: 1px solid rgba(150, 175, 255, 0.28);
  transition: filter 0.18s;
}

.aicg-join:hover { filter: brightness(1.16); }

.aicg-join.is-off {
  color: #7c84a3;
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(150, 175, 255, 0.14);
}

.aicg-method {
  margin: 12px 0 0;
  padding: 9px 11px;
  border-radius: 11px;
  font-size: 11.5px;
  line-height: 1.6;
  color: #a9b3d2;
  background: rgba(65, 150, 255, 0.07);
  border: 1px dashed rgba(150, 175, 255, 0.18);
}

.aicg-note {
  margin: 10px 0 0;
  font-size: 11px;
  line-height: 1.6;
  color: #6a7093;
}

/* --------------------------- 悬浮卡片 --------------------------- */

.aicg-float {
  position: fixed;
  bottom: 22px;
  z-index: 300;
  width: 344px;
  max-width: calc(100vw - 32px);
  padding: 16px 16px 14px;
  border-radius: 18px;
  border: 1px solid rgba(150, 175, 255, 0.2);
  background:
    radial-gradient(280px 160px at 12% 0%, rgba(65, 150, 255, 0.2), transparent 70%),
    radial-gradient(240px 180px at 100% 100%, rgba(162, 89, 255, 0.16), transparent 70%),
    #0b0f20;
  box-shadow: 0 26px 70px -24px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  color: #eef1fa;
  transform: translateY(16px);
  opacity: 0;
  transition: transform 0.26s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.26s ease;
}

.aicg-float.is-right { right: 22px; }
.aicg-float.is-left { left: 22px; }

.aicg-float.is-open { transform: none; opacity: 1; }

.aicg-float-head {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-right: 32px;
}

.aicg-float-head h3 {
  margin: 8px 0 4px;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.aicg-float-head p {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.55;
  color: #9ba2bd;
}

.aicg-float-list {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

/* --------------------------- 悬浮按钮 --------------------------- */

.aicg-launcher {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 299;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px 0 14px;
  border-radius: 99px;
  border: 1px solid rgba(150, 175, 255, 0.26);
  background: linear-gradient(120deg, #2f6bff, #7a4dff);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 16px 40px -14px rgba(65, 100, 255, 0.8);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.24s ease, transform 0.24s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.aicg-launcher.is-left { left: 22px; right: auto; }
.aicg-launcher.is-show { opacity: 1; transform: none; pointer-events: auto; }
.aicg-launcher:hover { filter: brightness(1.08); }

/* --------------------------- 居中弹窗 --------------------------- */

.aicg-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(4, 6, 15, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.aicg-overlay.is-open { opacity: 1; }

.aicg-card {
  position: relative;
  width: 470px;
  max-width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 24px 22px 20px;
  border-radius: 22px;
  border: 1px solid rgba(150, 175, 255, 0.2);
  background:
    radial-gradient(320px 200px at 15% 0%, rgba(65, 150, 255, 0.22), transparent 70%),
    radial-gradient(300px 220px at 100% 100%, rgba(162, 89, 255, 0.18), transparent 70%),
    #0b0f20;
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.8);
  color: #eef1fa;
  transform: translateY(12px) scale(0.98);
  opacity: 0;
  transition: transform 0.24s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.24s ease;
}

.aicg-overlay.is-open .aicg-card { transform: none; opacity: 1; }

.aicg-head { padding-right: 30px; }

.aicg-head h3 {
  margin: 10px 0 6px;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.aicg-head p { margin: 0; font-size: 12.5px; line-height: 1.6; color: #9ba2bd; }

.aicg-groups { display: grid; gap: 10px; margin-top: 16px; }

/* --------------------------- 页脚入口 --------------------------- */

.aicg-footer-entry {
  cursor: pointer;
  transition: color 0.18s;
}

.aicg-footer-entry:hover { color: #8bb0ff; }

@media (max-width: 480px) {
  .aicg-float { bottom: 14px; right: 12px; left: 12px; width: auto; max-width: none; padding: 14px 14px 12px; }
  .aicg-float.is-left { left: 12px; right: 12px; }
  .aicg-card { padding: 20px 16px 16px; border-radius: 18px; }
  .aicg-head h3 { font-size: 16px; }
  .aicg-qr { width: 68px; height: 68px; }
  .aicg-launcher { bottom: 14px; right: 12px; }
  .aicg-launcher.is-left { left: 12px; right: auto; }
}

/* --------------------------- 点击快速进入 / 二维码大图 --------------------------- */

.aicg-g { cursor: pointer; }
.aicg-g:hover .aicg-qr { transform: scale(1.03); }
.aicg-qr-wrap { cursor: pointer; }
.aicg-qr-wrap:hover .aicg-qr { opacity: 0.92; }
.aicg-join { cursor: pointer; }

.aicg-zoom {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(8, 12, 20, 0.84);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: aicgFadeIn 0.18s ease;
}

.aicg-zoom-card {
  background: #fff;
  border-radius: 16px;
  padding: 22px 22px 18px;
  max-width: 330px;
  width: 100%;
  text-align: center;
  position: relative;
  animation: aicgZoomIn 0.22s ease;
}

.aicg-zoom-img {
  width: 100%;
  max-width: 230px;
  border-radius: 12px;
  margin-bottom: 12px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.aicg-zoom-card b { display: block; font-size: 15px; margin-bottom: 6px; color: #1a2233; }
.aicg-zoom-card p { font-size: 12.5px; color: #7a8499; line-height: 1.6; margin: 0 0 12px; }

.aicg-zoom-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.06);
  color: #7a8499;
  cursor: pointer;
  transition: background 0.15s;
}
.aicg-zoom-close:hover { background: rgba(0, 0, 0, 0.12); color: #1a2233; }

.aicg-zoom-scan {
  display: inline-block;
  border: 0;
  border-radius: 10px;
  padding: 10px 26px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #2d9cff, #1a6dff);
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
}
.aicg-zoom-scan:active { transform: scale(0.96); opacity: 0.9; }

@keyframes aicgZoomIn {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
@keyframes aicgFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
