/* ═══════════════════════════════════════════════
 * 组件：联系弹窗 + Toast (contact-modal)  v1.2.0
 * 说明：与原版 9.3 / 9.4 逐行一致。
 *       遮罩刻意不加 transition —— 毛玻璃父级做透明度动画
 *       会逐帧重算 backdrop-filter，导致卡顿。
 * ═══════════════════════════════════════════════ */

/* ┌────────────────────────────────────────────┐
 * │ 弹窗                                        │
 * └────────────────────────────────────────────┘ */

/* ── 弹窗遮罩层（无 transition，瞬间显隐） ── */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ── 弹窗主体（毛玻璃） ── */
.modal-content {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(10px);
  padding: 32px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  max-width: 400px;
  width: 90%;
  position: relative;
  transform: translateY(20px) scale(0.95);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  clip-path: inset(0 round 16px); /* 圆角裁剪（替代 overflow: hidden） */
  z-index: 2000;
}

.modal-overlay.active .modal-content {
  transform: translateY(0) scale(1);
}

/* ── 弹窗关闭按钮 ── */
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  font-size: 24px;
  color: #8f8f8f;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 0.5s ease,
    background 0.3s ease,
    color 0.3s ease;
}

.modal-close:hover {
  background: #f3f4f696;
  color: #4b5563;
  transform: rotate(90deg) scale(1.25);
}

/* ── 弹窗标题 ── */
.modal-content h3 {
  margin: 0 0 8px 0;
  font-size: 22px;
  color: #4d504f;
}

/* ── 弹窗描述 ── */
.modal-desc {
  margin: 0 0 24px 0;
  color: #707070;
  font-size: 14px;
}

/* ── 联系方式列表 ── */
.contact-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

/* ── 单个联系方式选项 ── */
.contact-option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  background: transparent;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.contact-option:hover {
  background: rgba(255, 255, 255, 0.35);
  border-color: #d1d5db;
  transform: translateX(4px);
}

/* ── 联系方式图标 ── */
.option-icon {
  font-size: 24px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
  margin-top: -18px;
  margin-left: 25px;
}

/* ── 联系方式文字 ── */
.option-text {
  display: flex;
  flex-direction: column;
  padding-top: 43px;
}

.option-text strong {
  font-size: 15px;
  color: #1f2937;
  padding-top: 3px;
  margin-top: -54px;
  margin-left: 4px;
}

.option-text small {
  font-size: 12px;
  color: #6b7280;
  margin-top: 0px;
  margin-left: 4px;
}

/* ┌────────────────────────────────────────────┐
 * │ Toast 提示                                  │
 * └────────────────────────────────────────────┘ */

/* ── Toast 基础样式（毛玻璃） ── */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  /* 毛玻璃 */
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 16px;
  /* 布局 */
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  /* 文字 */
  color: #1e293b;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  /* 阴影 & 层级 */
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  z-index: 10000;
  pointer-events: auto;
  /* 入场动画 */
  animation: toast-in 0.4s cubic-bezier(0.34, 1.4, 0.64, 1) forwards;
}

/* ── Toast 退场状态 ── */
.toast.toast-out {
  animation: toast-out 0.3s cubic-bezier(0.4, 0, 1, 1) forwards;
  pointer-events: none;
}

/* ── Toast 显示状态 ── */
.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ── Toast 图标 ── */
.toast-icon {
  font-size: 18px;
  flex-shrink: 0;
  line-height: 1;
}

/* ── Toast 文字 ── */
.toast-msg {
  line-height: 1.4;
}

/* ── 暗色模式 Toast ── */
.dark .toast {
  background: rgba(30, 30, 40, 0.55);
  border-color: rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* ── Toast 入场：从下方弹入 ── */
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

/* ── Toast 退场：向下滑出 ── */
@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateX(-50%) translateY(30px) scale(0.95);
  }
}
