@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css");

/* =========================================================
   00. 弹窗堆叠容器
   - 电脑端：display:contents，完全不干扰各弹窗原有定位
   - 手机端：所有弹窗完全居中叠放（不偏移）
   ========================================================= */
.popup-stack { display: contents; }

@media (hover: none), (pointer: coarse) {
  .popup-stack {
    position: fixed;
    inset: 0;
    z-index: 999;
    pointer-events: none; /* 容器本身不挡点击 */
  }
  /* 统一：完全居中，取消原有 fixed/absolute 定位 */
  .popup-stack > * {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) !important;
    width: 82vw;
    max-width: 360px;
    margin: 0;
    pointer-events: auto;
  }

  /* 关闭后从布局中移除，露出下一层 */
  .popup-stack > .sma-announcement.hidden { display: none; }
}

/* =========================================================
   1. 弹窗A：温馨提示（电脑端漂浮 / 手机端居中叠放）
   ========================================================= */
.npa-popup {
  position: fixed;
  top: 20px;
  left: 20px;
  width: 260px;
  max-width: 82vw;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 20px 40px -12px rgba(0, 40, 80, 0.3);
  overflow: hidden;
  cursor: pointer;
  z-index: 1000;
}

.npa-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: linear-gradient(135deg, #1f5fcf, #2d7ee9);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.npa-close {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  user-select: none;
  transition: background-color .2s;
}
.npa-close:hover { background: rgba(255, 255, 255, 0.38); }

.npa-body {
  padding: 14px 16px 16px;
  font-size: 13px;
  color: #1e2f47;
  line-height: 1.7;
  max-height: 60vh;
  overflow-y: auto;
}
.npa-body p { margin-bottom: 8px; text-align: justify; }
.npa-body p:last-child { margin-bottom: 0; }

/* =========================================================
   2. 弹窗B：通知通告（电脑端右下角固定 / 手机端居中叠放）
   ========================================================= */
.npb-popup {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 320px;
  max-width: 82vw;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 20px 40px -12px rgba(0, 40, 80, 0.3);
  overflow: hidden;
  cursor: pointer;
  z-index: 1000;
}

.npb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: linear-gradient(135deg, #1f5fcf, #2d7ee9);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.npb-close {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  user-select: none;
  transition: background-color .2s;
}
.npb-close:hover { background: rgba(255, 255, 255, 0.38); }

.npb-body {
  padding: 14px 16px 16px;
  font-size: 13px;
  color: #1e2f47;
  line-height: 1.7;
  max-height: 60vh;
  overflow-y: auto;
}
.npb-body h4 {
  font-size: 14px;
  color: #1f5fcf;
  margin-bottom: 10px;
  text-align: center;
}
.npb-body p { margin-bottom: 8px; text-align: justify; }
.npb-body p:last-child { margin-bottom: 0; }
.npb-body .npb-highlight { color: #1f5fcf; font-weight: 600; }
.npb-body .npb-sign {
  text-align: right;
  color: #4a6180;
  font-size: 12.5px;
}

/* =========================================================
   3. 弹窗C：严正声明（带倒计时）
   ========================================================= */
.sma-announcement {
  position: fixed;
  bottom: 40%;
  right: 35%;
  width: 450px;
  max-width: 90vw;
  background: linear-gradient(135deg, #fff9e6 0%, #fff1cc 100%);
  border: 6px solid #e74c3c;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(231, 76, 60, 0.2);
  padding: 20px;
  z-index: 1000;
  transition: transform .4s ease, opacity .4s ease;
  transform: translateY(0);
  opacity: 1;
}
.sma-announcement.hidden {
  transform: translateY(100px);
  opacity: 0;
  pointer-events: none;
}

.sma-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sma-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sma-title i { color: #e74c3c; font-size: 22px; }
.sma-title h3 { color: #c0392b; font-size: 20px; }

.sma-close {
  border: none;
  font-size: 20px;
  cursor: pointer;
  transition: background-color .3s;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e74c3c;
  background-color: rgba(231, 76, 60, 0.1);
}
.sma-close:hover { background-color: rgba(231, 76, 60, 0.22); }

.sma-content {
  color: #8B4513;
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 20px;
}
.sma-content p { text-indent: 2rem; }
.sma-content p + p { margin-top: 6px; }

.sma-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
}

.sma-read-btn {
  background-color: #e74c3c;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  font-family: inherit;
  transition: background-color .3s;
}
.sma-read-btn:hover { background-color: #c0392b; }

.sma-timer { font-size: 14px; color: #7f8c8d; }
.sma-timer span { font-weight: bold; color: #e74c3c; }

/* 窄屏桌面：贴边显示 */
@media (hover: hover) and (pointer: fine) and (max-width: 768px) {
  .sma-announcement {
    left: 20px;
    right: 20px;
    bottom: 20px;
    width: auto;
  }
}
/* 小屏字号微调 */
@media (max-width: 480px) {
  .sma-title h3 { font-size: 18px; }
  .sma-content { font-size: 15px; }
}

/* =========================================================
   4. 弹窗D：温馨提示（电脑端右上角 20% 处 / 手机端居中叠放）
   ========================================================= */
.npd-popup {
  position: fixed;
  top: 30%;
  left: 20px;
  width: 260px;
  max-width: 82vw;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 20px 40px -12px rgba(0, 40, 80, 0.3);
  overflow: hidden;
  cursor: pointer;
  z-index: 1000;
}

.npd-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: linear-gradient(135deg, #1f5fcf, #2d7ee9);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.npd-close {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  user-select: none;
  transition: background-color .2s;
}
.npd-close:hover { background: rgba(255, 255, 255, 0.38); }

.npd-body {
  padding: 14px 16px 16px;
  font-size: 13px;
  color: #1e2f47;
  line-height: 1.7;
  max-height: 60vh;
  overflow-y: auto;
}
.npd-body p {
  margin-bottom: 8px;
  text-align: justify;
  text-indent: 2em;
}
.npd-body p:last-child { margin-bottom: 0; }