/* ==========================================================================
   工具页 · 分享卡片
   SHARE / 分享 · 分享这个工具 · 二维码在右
   由 share.js 自动插入，深色 / 浅色页面自适应
   ========================================================================== */

.share-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  max-width: 560px;
  margin: 24px auto 0;
  padding: 18px 20px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(34, 197, 94, .07), rgba(10, 20, 30, .55));
  border: 1px solid rgba(34, 197, 94, .24);
  box-sizing: border-box;
}

.share-text {
  flex: 1 1 auto;
  min-width: 0;
}

.share-eyebrow {
  margin: 0 0 8px;
  font-size: .64rem;
  letter-spacing: .22em;
  font-weight: 700;
  color: #22c55e;
  text-transform: uppercase;
}

.share-h {
  margin: 0 0 6px;
  font-size: 1.02rem;
  font-weight: 700;
  color: #eaf7ef;
  letter-spacing: .01em;
}

.share-desc {
  margin: 0 0 14px;
  font-size: .78rem;
  line-height: 1.65;
  color: #8fa396;
}

.share-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.share-link {
  flex: 1 1 160px;
  min-width: 0;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(34, 197, 94, .22);
  background: #0a1218;
  color: #d7f7e4;
  font-size: .76rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: normal;
  word-break: break-all;
  overflow-wrap: anywhere;
  line-height: 1.45;
  font-size: .72rem;
}

.share-copy {
  display: block;
  width: 100%;
  margin-top: 2px;
  padding: 14px 22px;
  font-size: .88rem;
  text-align: center;
  border: 0;
  border-radius: 12px;
  background: #22c55e;
  color: #04170b;
  font-size: .78rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  transition: background .2s, transform .14s ease-out;
}

.share-copy:active {
  background: #4ade80;
  transform: scale(.97);
}

.share-logo {
  flex: 0 0 auto;
  align-self: center;
  width: 168px;
  height: auto;
  margin: 0 14px;
  opacity: .92;
  display: block;
}

.share-qrwrap {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.share-qr {
  padding: 9px;
  border-radius: 14px;
  background: #fff;
  line-height: 0;
  box-shadow: 0 10px 26px -16px rgba(0, 0, 0, .9);
}

.share-qr img,
.share-qr canvas {
  display: block;
  width: 104px !important;
  height: 104px !important;
  border-radius: 6px;
}

.share-qrcap {
  font-size: .7rem;
  color: #6d8273;
  letter-spacing: .04em;
}

/* ---------- 复制成功提示 ---------- */
.share-toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translate(-50%, 14px);
  padding: 11px 22px;
  border-radius: 999px;
  background: rgba(16, 26, 20, .96);
  color: #eaf7ef;
  border: 1px solid rgba(34, 197, 94, .42);
  font-size: .82rem;
  font-weight: 600;
  box-shadow: 0 14px 34px -18px rgba(0, 0, 0, .9);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
  z-index: 9999;
  max-width: calc(100vw - 40px);
  box-sizing: border-box;
}

.share-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- 浅色页面 ---------- */
.share-card--light {
  background: #fff;
  border-color: rgba(0, 0, 0, .09);
  box-shadow: 0 14px 40px -30px rgba(0, 0, 0, .6);
}

.share-card--light .share-h { color: #1c1c16; }
.share-card--light .share-desc { color: #6b6b60; }
.share-card--light .share-qrcap { color: #8a8a7c; }
.share-card--light .share-link {
  background: #f6f5f0;
  border-color: rgba(0, 0, 0, .1);
  color: #33332a;
}

.share-card--light .share-copy {
  background: #1c1c16;
  color: #fff;
}

.share-card--light .share-copy:active {
  background: #33332a;
}

.share-card--light .share-eyebrow { color: #2f7d4f; }

.share-card--light + .share-toast,
.share-toast.share-toast--light {
  background: #fff;
  color: #1c1c16;
  border-color: rgba(0, 0, 0, .12);
}

/* ---------- 手机 ---------- */
@media (max-width: 560px) {
  .share-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 10px 11px;
    border-radius: 14px;
    margin-top: 14px;
  }

  .share-text { flex: 1 1 auto; min-width: 0; }

  .share-eyebrow {
    font-size: .55rem;
    letter-spacing: .14em;
    margin: 0 0 3px !important;
  }

  .share-h {
    font-size: .82rem !important;
    margin: 0 0 2px !important;
    line-height: 1.3 !important;
  }

  .share-desc {
    font-size: .64rem !important;
    line-height: 1.45 !important;
    margin: 0 0 7px !important;
  }

  .share-row {
    flex-wrap: nowrap;
    gap: 5px;
    align-items: stretch;
  }

  .share-link {
    flex: 1 1 auto;
    min-width: 0;
    padding: 6px 8px !important;
    font-size: .56rem !important;
    line-height: 1.3 !important;
    border-radius: 8px !important;
    max-height: 3.1em;
    overflow: hidden;
  }

  .share-copy {
    width: 100% !important;
    padding: 9px 14px !important;
    font-size: .72rem !important;
    border-radius: 9px !important;
    margin-top: 0 !important;
  }

  .share-qrwrap {
    flex: 0 0 auto;
    gap: 2px;
    align-self: center;
  }

  .share-qr {
    padding: 3px !important;
    border-radius: 8px !important;
    box-shadow: none !important;
  }

  .share-qr img,
  .share-qr canvas {
    width: 56px !important;
    height: 56px !important;
  }

  .share-logo {
    width: 84px;
    margin: 0 4px;
    align-self: center;
  }

  .share-qrcap { font-size: .52rem !important; }
}
