/* share.css - 分享页独立样式 */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial,
    "PingFang SC", "Noto Sans CJK SC", sans-serif;
  background: #0b1220;
  color: #eaf0ff;
}

.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 18px;
}

.card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

h1 {
  font-size: 20px;
  margin: 0 0 8px;
}

.desc {
  color: rgba(234, 240, 255, 0.78);
  margin: 0 0 10px;
  line-height: 1.55;
}

.url {
  font-size: 12px;
  color: rgba(234, 240, 255, 0.85);
  word-break: break-all;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 10px;
  border-radius: 12px;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 16px;
  margin-top: 16px;
}

@media (max-width: 880px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #eaf0ff;
  text-decoration: none;
  cursor: pointer;
  font-size: 14px;
  min-width: 110px;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.qrbox {
  text-align: center;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.05);
}

.qr-title {
  font-weight: 700;
  margin-bottom: 10px;
}

.qrbox img {
  width: 260px;
  height: 260px;
  max-width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #fff;
}

.tip {
  color: rgba(234, 240, 255, 0.75);
  font-size: 13px;
  margin-top: 10px;
  line-height: 1.45;
}

.back {
  margin-top: 14px;
  font-size: 13px;
}

.back a {
  color: #9cc2ff;
  text-decoration: none;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  background: rgba(18, 24, 39, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #eaf0ff;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  display: none;
}

body.is-share-sheet-open {
  overflow: hidden;
}

.share-sheet[hidden] {
  display: none !important;
}

.share-sheet {
  position: fixed;
  inset: 0;
  z-index: 1200;
}

.share-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(2px);
}

.share-sheet__panel {
  position: absolute;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom, 16px));
  transform: translateX(-50%);
  width: min(92vw, 560px);
  border-radius: 24px;
  background: #ffffff;
  color: #172033;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.3);
  padding: 22px;
}

.share-sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.share-sheet__head h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
}

.share-sheet__close {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: #eef2f7;
  color: #172033;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.share-sheet__desc,
.share-sheet__tip {
  margin: 12px 0 0;
  color: #5b6475;
  line-height: 1.7;
}

.share-sheet__tip.is-error {
  color: #b42318;
}

.share-sheet__url {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #d9e1ee;
  font-size: 13px;
  line-height: 1.65;
  word-break: break-all;
}

.share-sheet__actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.share-sheet__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid #d9e1ee;
  background: #fff;
  color: #172033;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}

.share-sheet__btn:hover,
.share-sheet__close:hover {
  background: #f6f8fb;
}

.share-sheet__btn--primary {
  border-color: #c81d25;
  background: #c81d25;
  color: #fff;
}

.share-sheet__btn--primary:hover {
  background: #ad1820;
}

.share-sheet__btn:focus-visible,
.share-sheet__close:focus-visible {
  outline: 2px solid rgba(200, 29, 37, 0.55);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .share-sheet__panel {
    left: max(10px, env(safe-area-inset-left, 10px));
    right: max(10px, env(safe-area-inset-right, 10px));
    width: auto;
    transform: none;
    padding: 18px;
    border-radius: 22px 22px 18px 18px;
  }

  .share-sheet__actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .share-sheet__btn {
    min-height: 42px;
    font-size: 14px;
  }
}

@media (max-width: 380px) {
  .share-sheet__panel {
    padding: 16px;
  }

  .share-sheet__actions {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .share-sheet__btn {
    min-height: 40px;
  }

  .share-sheet__head h2 {
    font-size: 18px;
  }

  .share-sheet__close {
    width: 36px;
    height: 36px;
    font-size: 24px;
  }
}
