body {
    margin: 0;
    padding: 0;
    height: 100%;
    background-color: #ffffff !important;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
        "Segoe UI Symbol", "Noto Color Emoji";
    min-height: 92vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 基础色可沿用全站变量；若未定义，可保底： */
:root {
    --accent: #8deb51;
    /* 主题绿 */
    --ink: #0f3d00;
    /* 深色字 */
    --text: #111;
    --muted: #6b7280;
    --border: #e5e7eb;
    --radius: 16px;
    --shadow: 0 6px 18px rgba(17, 17, 17, .06);
    --bg: #fff;
}

/* 页面容器 */
/* 手机端：自适应全宽；桌面：居中，最大 375px */
.cashier {
    width: 100%;
    margin: 0 auto;
    /* 居中 */
    /* 手机左右留白 */
    min-height: 100vh;
    background: #fff;
    box-shadow: none;
}


/* 桌面端：才限制最大宽度为 375，居中并加灰底与阴影 */
@media (min-width: 768px) {
    body {
        background: var(--bg-gray, #f2f2f2);
    }

    .cashier {
        max-width: 375px;
        /* 关键：只在桌面端限制最大宽度 */
        padding: 0;
        /* 贴边，像“手机画布” */
        border-radius: 16px;
        box-shadow: 0 0 20px rgba(0, 0, 0, .08);
    }
    .resultBanner {
         max-width: 375px;
        /* 关键：只在桌面端限制最大宽度 */
        padding: 0;
            margin: 0 auto;
        /* 贴边，像“手机画布” */
        box-shadow: 0 0 20px rgba(0, 0, 0, .08);
    }
    
    
}

/* 顶部绿色区域 + 居中 logo */
.cashier-header {
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center; /* 让 logo 居中 */
  padding: 12px;
  position: relative;      /* 给绝对定位的返回按钮一个参照 */
  box-shadow: inset 0 -1px 0 rgba(0,0,0,.06);
}

/* Logo 保持中间 */
.cashier-logo {
  width: 240px;
  height: 40px;
  object-fit: contain;
}

/* 返回按钮：左上角 */
.back-btn {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  cursor: pointer;
}

/* 用纯 CSS 画一个箭头 */
.back-btn::before {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  border-left: 3px solid #fff;
  border-bottom: 3px solid #fff;
  transform: rotate(45deg);
  margin: auto;
}

/* 标题 */
.cashier-main {
    padding: 16px 14px 12px;
}

.cashier-title {
    margin: 6px 0 8px;
    font-size: 20px;
    font-weight: 900;
    text-align: center;
    letter-spacing: .2px;
}

/* 倒计时 */
.cashier-timer {
    text-align: center;
    margin: 6px 0 14px;
}

.countdown {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    font-size: 28px;
    font-weight: 900;
    line-height: 1;
    color: var(--accent);
}

.timer-note {
    margin: 8px auto 0;
    max-width: 22em;
    font-size: 12px;
    color: var(--muted);
}

/* 信息卡片 */
.cashier-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 10px 12px;
    margin: 12px 0 16px;
}

.cashier-card .row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 10px 2px;
    border-bottom: 1px dashed #eee;
}

.cashier-card .row:last-child {
    border-bottom: none;
}

.cashier-card .label {
    color: var(--muted);
    font-weight: 700;
    font-size: 13px;
}

.cashier-card .value {
    font-weight: 900;
    font-size: 15px;
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    letter-spacing: .3px;
}

.btnmenu {
    display: flex;
    justify-content: center;
    /* 居中 */
    align-items: center;
    gap: 6px;
    /* 两按钮之间的间距 */
    margin: 14px 0;
}

.btnmenu .btn {
    flex: 1;
}

/* Cancel 宽度比 Confirm 少 15% */
.btnmenu .cancel-btn {
    flex: 0 0 42.5%;
    /* 100% - 15% = 85%，两按钮加起来=42.5% + 57.5% */
    color: #ef4444;
    /* border-color: #ef4444; */
}

.btnmenu #confirmBtn {
    flex: 0 0 57.5%;
}

/* 避免 hover/active 的缩放覆盖缩小比例 */
.cancel-btn:hover,
.cancel-btn:focus-visible,
.cancel-btn:active {
    transform: scale(0.85);
    /* 固定缩放 */
}

/* 底部按钮区（吸底） */
.cashier-actions {
  position: sticky;
  bottom: 0;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(6px);
  border-top: 1px solid var(--border);
  padding: 10px 14px 12px;

  display: flex;              /* 用 flex 代替 grid */
  justify-content: center;    /* 水平居中 */
  align-items: center;        /* 垂直居中 */
  gap: 10px;                  /* 按钮间距 */
}


/* 按钮 */
.btn {
    appearance: none;
    cursor: pointer;
    height: 48px;
    border-radius: 14px;
    font-weight: 900;
    letter-spacing: .2px;
    border: 1px solid var(--border);
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
}

.btn:active {
    transform: scale(.98);
}

.btn-primary {
    background: var(--accent);
    color: var(--ink);
    border-color: var(--accent);
    box-shadow: 0 6px 16px rgba(141, 235, 81, .25);
}

.btn-outline {
    background: #fff;
    color: #111;
}

/* 小屏适配 */
@media (min-width: 768px) {
    /* .cashier-main {
        padding: 20px 18px 16px;
    }

    .cashier-card {
        padding: 12px 14px;
    } */
}

/* 充能效果*/
.logo-charge {
    width: 100%;
    height: auto;
    /* margin: 20px auto; */
    padding: 20px 20px;

    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* 用 PNG 作为遮罩 */
    -webkit-mask: url('../assets/BgCash.png') center / contain no-repeat;
    mask: url('../assets/BgCash.png') center / contain no-repeat;

    /* 两层背景：充能层 + 流光层 */
    background:
        linear-gradient(to right, #8deb51 0 0) 0 0 / 0% 100% no-repeat,
        repeating-linear-gradient(45deg, rgba(255, 255, 255, .4) 0 8px, transparent 8px 16px) 0 0 / 200% 200% no-repeat;

    filter: drop-shadow(0 0 12px rgba(118, 118, 118, 0.25)) drop-shadow(0 0 24px rgba(118, 118, 118, 0.25));

    animation: charge-fill-x 2.5s ease-in-out infinite,
        charge-shimmer-x 1s linear infinite;
}

/* 横向充能：宽度 0%→100%→0% */
@keyframes charge-fill-x {
    0% {
        background-size: 0% 100%, 200% 200%;
    }

    40% {
        background-size: 100% 100%, 200% 200%;
    }

    70% {
        background-size: 100% 100%, 200% 200%;
    }

    100% {
        background-size: 0% 100%, 200% 200%;
    }
}

/* 流光横向移动 */
@keyframes charge-shimmer-x {
    0% {
        background-position: 0 0, 0% 0%;
    }

    100% {
        background-position: 0 0, 100% 100%;
    }
}

/* pin */
.pin {
    margin: 12px 0 10px;
}

.pin__label {
    display: block;
    margin: 0 0 8px;
    font-weight: 800;
    font-size: 13px;
    color: #222;
    cursor: pointer;
}

/* 6 等分自适应：每格 1fr，随容器宽度自适应 */
.pin__boxes {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    /* 阶距更紧凑 */
    align-items: center;
}

/* 自适应尺寸：宽度满格，高度/字号随屏宽变化 */
.pin__box {
    width: 100%;
    height: clamp(40px, 12vw, 52px);
    font-size: clamp(18px, 6vw, 22px);
    font-weight: 900;
    text-align: center;
    box-sizing: border-box;

    border: 1px solid var(--border);
    border-radius: 12px;
    outline: none;
    background: #fff;
    caret-color: #111;

    -webkit-text-security: disc;
    text-security: disc;

    transition: border-color .15s ease, box-shadow .15s ease;
}

.pin__box:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(141, 235, 81, .15);
}

.pin__hint {
    margin: 8px 2px 0;
    font-size: 12px;
    color: var(--muted);
}

/* 极窄屏时减小间距，避免挤爆 */
@media (max-width: 340px) {
    .pin__boxes {
        gap: 6px;
    }

    .pin__box {
        border-radius: 10px;
    }
}

/* 简单的客服按钮，无继承 .btn 样式 */
.support-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: #111; /* 文字颜色 */
  padding: 6px 10px;
}

/* 图标部分：用 mask 填充颜色 */
.support-icon {
  display: inline-block;
  width: 28px;              /* 控制图标宽度 */
  height: 28px;             /* 高度只做容器，实际会按比例自适应 */
  background-color: var(--accent);   /* 主体色填充 */

  -webkit-mask: url("../assets/support.png") no-repeat center / contain;
          mask: url("../assets/support.png") no-repeat center / contain;
}

/* 文字 hover 高亮 */
.support-btn:hover .support-text {
  color: var(--accent);
}

/* 支付结果 */
/* 支付结果提示框 */
/* 结果框固定在页面顶部 */
.resultBanner {


  width: 100%;
  height: 240px;
  background: #fff;

  /* display: flex; */
  flex-direction: column;   /* 垂直排列 */
  align-items: center;      /* 水平居中 */
  text-align: center;       /* 文字居中 */

}

/* 标题/描述居中 */
.resultTitle {
    
    padding: 24px 24px;
    /* margin-top: 24px; */
  font-size: 24px;
  font-weight: 600;
}
.resultDesc {
  opacity: 0.8;
}

/* 按钮居中 */
.actions {


  margin-top: 34px;
  display: flex;
  justify-content: center;
  gap: 8px;
}


.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
.modal-content {
  background: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  max-width: 280px;
  text-align: center;
}
.modal-content p {
  margin-bottom: 8px;
  font-size: 15px;
  color: #991b1b;
  font-weight: 500;
}
