/* ============================================
   全站统一 UI 组件 CSS
   2026-08-14 00:30+ by 广州云
   ============================================ */

/* ---------- Toast ---------- */
._global-toast{
  position: fixed;
  left: 50%;
  top: 35%;
  transform: translate(-50%, -50%) scale(0.92);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  min-width: 120px;
  max-width: 78%;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.86);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  backdrop-filter: blur(10px);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
  word-break: break-word;
  text-align: center;
  justify-content: center;
}
._global-toast.show{
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
._toast-ic{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}
._toast-success{ background:#28c76f; color:#fff; }
._toast-error{   background:#ff4d6d; color:#fff; }
._toast-warn{    background:#ffb02e; color:#fff; }
._toast-info{    background:#4d96ff; color:#fff; }

/* ---------- Modal (alert / confirm) ---------- */
._global-modal{
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
}
._global-modal.show{ display: flex; }

._modal-mask{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  animation: _modalFade .2s ease;
}
@keyframes _modalFade { from { opacity: 0; } to { opacity: 1; } }

._modal-box{
  position: relative;
  width: 78%;
  max-width: 320px;
  background: #fff;
  border-radius: 18px;
  padding: 22px 22px 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  animation: _modalPop .22s cubic-bezier(0.34, 1.56, 0.64, 1);
  color: #1a1a2e;
}
@keyframes _modalPop {
  from { transform: scale(0.85); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

._modal-title{
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
  color: #1a1a2e;
}
._modal-body{
  font-size: 14px;
  color: #555;
  line-height: 1.55;
  text-align: center;
  margin-bottom: 18px;
  word-break: break-word;
}
._modal-btns{
  display: flex;
  gap: 10px;
}
._modal-btn{
  flex: 1;
  height: 42px;
  border-radius: 12px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
}
._modal-btn:active{ transform: scale(0.97); }
._modal-cancel{
  background: #f0f0f5;
  color: #666;
}
._modal-ok{
  background: linear-gradient(135deg, #FF4D6D 0%, #FF8C42 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(255,77,109,0.3);
}

/* 暗色主题适配：如果 body 用了 dark 主题，调整 modal 背景 */
body.dark ._modal-box{ background:#1A1A2E; color:#fff; }
body.dark ._modal-title{ color:#fff; }
body.dark ._modal-body{ color:rgba(255,255,255,0.7); }
body.dark ._modal-cancel{ background:rgba(255,255,255,0.1); color:rgba(255,255,255,0.7); }

/* 屏幕小一点时调整 */
@media (max-width: 360px) {
  ._global-toast{ font-size: 13px; padding: 10px 14px; }
  ._modal-box{ width: 84%; padding: 18px 16px 14px; }
}
/* ============================================
   农场系列专属 美化弹窗样式 (PDD 风)
   2026-08-14 17:12 by 广州云
   拼多多风格：彩色渐变 + 圆角阴影 + 醒目图标
   ============================================ */

/* ---------- Toast 顶部弹出 ---------- */
.farm-toast{
  position: fixed;
  left: 50%;
  top: 80px;
  transform: translate(-50%, -30px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  min-width: 200px;
  max-width: 86%;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.88);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  box-shadow: 0 12px 32px rgba(0,0,0,0.35);
  backdrop-filter: blur(12px);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s cubic-bezier(0.34, 1.56, 0.64, 1), transform .25s cubic-bezier(0.34, 1.56, 0.64, 1);
  word-break: break-word;
}
.farm-toast.show{
  opacity: 1;
  transform: translate(-50%, 0);
}
.farm-toast .ft-ic{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.farm-toast.success{
  background: linear-gradient(135deg, #06D6A0 0%, #00B881 100%);
  box-shadow: 0 12px 32px rgba(6, 214, 160, 0.45);
}
.farm-toast.success .ft-ic{ background: rgba(255,255,255,0.25); color: #fff; }
.farm-toast.error{
  background: linear-gradient(135deg, #FF4D6D 0%, #FF1F4D 100%);
  box-shadow: 0 12px 32px rgba(255, 77, 109, 0.45);
}
.farm-toast.error .ft-ic{ background: rgba(255,255,255,0.25); color: #fff; }
.farm-toast.warn{
  background: linear-gradient(135deg, #FFB02E 0%, #FF8C00 100%);
  box-shadow: 0 12px 32px rgba(255, 176, 46, 0.45);
}
.farm-toast.warn .ft-ic{ background: rgba(255,255,255,0.25); color: #fff; }
.farm-toast.info{
  background: linear-gradient(135deg, #4D96FF 0%, #2563EB 100%);
  box-shadow: 0 12px 32px rgba(77, 150, 255, 0.45);
}
.farm-toast.info .ft-ic{ background: rgba(255,255,255,0.25); color: #fff; }

/* ---------- Confirm 弹窗 ---------- */
.farm-confirm-mask{
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.farm-confirm-mask.show{
  opacity: 1;
  pointer-events: auto;
}
.farm-confirm-box{
  position: relative;
  width: 100%;
  max-width: 320px;
  background: linear-gradient(180deg, #FFFFFF 0%, #FFF8F5 100%);
  border-radius: 24px;
  padding: 32px 24px 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  text-align: center;
  transform: scale(0.85);
  transition: transform .35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.farm-confirm-mask.show .farm-confirm-box{
  transform: scale(1);
}
.farm-confirm-icon{
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFD93D 0%, #FF8C42 50%, #FF4D6D 100%);
  margin: -64px auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  color: #fff;
  box-shadow: 0 8px 24px rgba(255, 140, 66, 0.45);
  animation: fc-pulse 2s ease-in-out infinite;
}
@keyframes fc-pulse{
  0%, 100%{ transform: scale(1); }
  50%{ transform: scale(1.06); }
}
.farm-confirm-title{
  font-size: 18px;
  font-weight: 800;
  color: #1A1A2E;
  margin-bottom: 10px;
  line-height: 1.3;
}
.farm-confirm-msg{
  font-size: 14px;
  color: #5A5A6E;
  line-height: 1.6;
  margin-bottom: 22px;
  word-break: break-word;
}
.farm-confirm-btns{
  display: flex;
  gap: 12px;
}
.farm-confirm-btn{
  flex: 1;
  height: 46px;
  border-radius: 14px;
  border: none;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .12s ease, opacity .15s ease;
}
.farm-confirm-btn:active{ transform: scale(0.96); }
.farm-confirm-cancel{
  background: #F0F0F5;
  color: #6A6A7A;
}
.farm-confirm-cancel:hover{ background: #E5E5EC; }
.farm-confirm-ok{
  background: linear-gradient(135deg, #FF4D6D 0%, #FF8C42 100%);
  color: #fff;
  box-shadow: 0 6px 16px rgba(255, 77, 109, 0.4);
}
.farm-confirm-ok:hover{ opacity: 0.95; }

/* ---------- Modal 通用模态框 ---------- */
.farm-modal-mask{
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.farm-modal-mask.show{
  opacity: 1;
  pointer-events: auto;
}
.farm-modal-box{
  position: relative;
  width: 100%;
  max-width: 340px;
  background: #fff;
  border-radius: 20px;
  padding: 24px 22px 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  transform: scale(0.85);
  transition: transform .35s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-height: 86vh;
  overflow-y: auto;
}
.farm-modal-mask.show .farm-modal-box{ transform: scale(1); }
.farm-modal-title{
  font-size: 17px;
  font-weight: 800;
  text-align: center;
  color: #1A1A2E;
  margin-bottom: 12px;
}
.farm-modal-body{
  font-size: 14px;
  color: #555;
  line-height: 1.6;
  margin-bottom: 16px;
  word-break: break-word;
}
.farm-modal-btns{
  display: flex;
  gap: 10px;
  margin-top: 8px;
}
.farm-modal-btn{
  flex: 1;
  height: 44px;
  border-radius: 12px;
  border: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .12s ease;
}
.farm-modal-btn:active{ transform: scale(0.96); }
.farm-modal-cancel{
  background: #F0F0F5;
  color: #6A6A7A;
}
.farm-modal-ok{
  background: linear-gradient(135deg, #FF4D6D 0%, #FF8C42 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 77,109, 0.35);
}

/* 屏幕小一点时 */
@media (max-width: 360px) {
  .farm-toast{ font-size: 13px; padding: 12px 16px; min-width: 180px; }
  .farm-confirm-box{ max-width: 88%; padding: 28px 20px 18px; }
  .farm-confirm-icon{ width: 64px; height: 64px; font-size: 32px; }
  .farm-modal-box{ max-width: 88%; padding: 20px 18px 16px; }
}
