* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #eef1f5;
  color: #222;
  font-family: "Microsoft YaHei UI", "PingFang SC", "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
}

/* 彩色模糊背景 */
.bg-blobs {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  filter: blur(60px);
  opacity: 0.55;
}
.blob { position: absolute; border-radius: 50%; }
.b1 { width: 420px; height: 420px; left: -80px; top: 40px; background: #ff8a8a; }
.b2 { width: 520px; height: 520px; right: -120px; top: -60px; background: #8ab6ff; }
.b3 { width: 360px; height: 360px; left: 30%; bottom: -140px; background: #ffd166; }
.b4 { width: 300px; height: 300px; right: 10%; bottom: 10%; background: #9be7c4; }

.page {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto 48px;
  padding: 0 16px;
}

/* 顶部蓝色横幅 */
.banner {
  height: 120px;
  margin: 0 -16px;
  background: linear-gradient(180deg, #33b5f0, #29a9e0);
  border-bottom: 1px solid #1f96c9;
}

/* 站点信息卡（压在横幅上） */
.site-card {
  margin-top: -58px;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 6px 24px rgba(17, 38, 70, 0.12);
  padding: 22px 26px 18px;
  text-align: center;
}

.site-title {
  margin: 0;
  font-size: 34px;
  letter-spacing: 2px;
  color: #d0021b;
  font-weight: 800;
  text-shadow: 0 1px 0 #fff;
}

.site-sub {
  margin-top: 8px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.badge {
  font-size: 12px;
  color: #2f7d32;
  background: #eef9ef;
  border: 1px solid #c8e6c9;
  border-radius: 3px;
  padding: 2px 8px;
}

.nav-row {
  margin-top: 18px;
  display: flex;
  justify-content: center;
  border-top: 1px solid #eceff3;
  border-bottom: 1px solid #eceff3;
  background: #fafbfc;
}
.nav-row a {
  padding: 12px 48px;
  text-align: center;
  color: #333;
  text-decoration: none;
  font-size: 13px;
  border-right: 1px solid #eceff3;
}
.nav-row a:last-child { border-right: 0; }
.nav-row a:hover { background: #f1f5ff; color: #2f6bff; }

.service-bar {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #3f9c46;
  background: #f4fbf4;
  color: #2f7d32;
  border-radius: 3px;
  padding: 6px 14px;
  font-size: 13px;
}
.service-tip { color: #2f7d32; font-weight: 700; }

/* 主卡片 */
.main-card {
  margin-top: 16px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(17, 38, 70, 0.1);
  overflow: hidden;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid #edf0f4;
}
.tab {
  border: 0;
  background: #fff;
  padding: 16px 6px;
  font-size: 15px;
  color: #333;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.tab.active {
  color: #6b3fd8;
  border-bottom-color: #6b3fd8;
  font-weight: 700;
}

.panel { display: none; padding: 22px 26px 28px; }
.panel.active { display: block; }

.slogan {
  margin: 0 0 18px;
  font-size: 17px;
  color: #2f6bff;
  font-weight: 700;
}

.form-row {
  display: flex;
  align-items: stretch;
  border: 1px solid #e3e6ea;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
  background: #fff;
}
.form-row > label {
  flex: 0 0 96px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: #f6f7f9;
  color: #666;
  font-size: 13px;
  border-right: 1px solid #e3e6ea;
}
.form-row select,
.form-row input,
.text-input {
  flex: 1;
  border: 0;
  outline: none;
  padding: 11px 12px;
  font-size: 14px;
  color: #222;
  background: #fff;
  min-width: 0;
}
.form-row select { cursor: pointer; }

.search-box { flex: 1; display: flex; }
.search-box input { flex: 1; border: 0; outline: none; padding: 11px 12px; font-size: 14px; }
.search-btn {
  border: 0;
  background: #fff;
  width: 46px;
  cursor: pointer;
  font-size: 15px;
  color: #888;
  border-left: 1px solid #eef0f3;
}
.search-btn:hover { color: #2f6bff; }

.product-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 4px 0 14px;
  padding: 10px 12px;
  background: #fafbfc;
  border: 1px dashed #e3e6ea;
  border-radius: 6px;
  font-size: 13px;
}
.price { color: #d0021b; font-size: 20px; font-weight: 800; }
.stock { color: #2f7d32; }
.desc { color: #888; flex: 1; min-width: 180px; }

.buy-btn {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 13px 16px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(90deg, #f7b2b7 0%, #e05263 45%, #b3122b 100%);
  box-shadow: 0 6px 16px rgba(179, 18, 43, 0.25);
  transition: filter 0.15s, transform 0.1s;
}
.buy-btn:hover { filter: brightness(1.05); }
.buy-btn:active { transform: translateY(1px); }
.buy-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.ghost-btn {
  border: 1px solid #d8dce3;
  background: #fff;
  border-radius: 999px;
  padding: 11px 18px;
  font-size: 14px;
  cursor: pointer;
}

.notice-yellow {
  margin: 14px 0 0;
  text-align: center;
  font-size: 13px;
  color: #a56a00;
  background: #fff7cc;
  border-radius: 4px;
  padding: 8px;
}

.sub-tip { color: #888; font-size: 13px; margin: 0 0 16px; }

.result-box {
  margin-top: 16px;
  background: #f7f9fc;
  border: 1px solid #e3e8ef;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-all;
}
.result-box.hidden { display: none; }
.result-box .ok { color: #2f7d32; font-weight: 700; }
.result-box .warn { color: #c77700; font-weight: 700; }
.result-box .card-key {
  display: inline-block;
  font-family: Consolas, monospace;
  background: #eef4ff;
  border: 1px solid #d5e2ff;
  border-radius: 4px;
  padding: 2px 8px;
  margin: 3px 4px 3px 0;
}

.footer {
  margin-top: 20px;
  text-align: center;
  color: #666;
  font-size: 12px;
  line-height: 1.8;
}
.footer .muted { color: #9aa3af; }

/* 弹窗 */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 20px;
}
.modal-mask.hidden { display: none; }
.modal {
  width: 100%;
  max-width: 460px;
  background: #fff;
  border-radius: 12px;
  padding: 22px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.modal h3 { margin: 0 0 12px; font-size: 18px; color: #2f6bff; }
.modal-body { font-size: 14px; line-height: 1.9; word-break: break-all; }
.modal-actions { margin-top: 18px; display: flex; gap: 10px; }
.modal-actions .buy-btn { flex: 1; }

@media (max-width: 640px) {
  .site-title { font-size: 26px; }
  .panel { padding: 18px 16px 22px; }
  .form-row > label { flex-basis: 78px; font-size: 12px; }
  .tabs { grid-template-columns: repeat(2, 1fr); }
}

/* 轻提示 */
.toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  background: rgba(20, 26, 36, 0.92);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  z-index: 80;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.toast.hidden { display: none; }

.mini-btn {
  border: 1px solid #d5e2ff;
  background: #eef4ff;
  color: #2f6bff;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
  margin-top: 10px;
}
.mini-btn:hover { background: #e2ecff; }

.result-box .card-key { cursor: pointer; }
.result-box .card-key:hover { background: #dbe8ff; }

/* 私信客服按钮 */
.service-btn {
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
}
.service-btn:hover { background: #eaf5ea; }

/* 顶部滚动公告（红字，从右往左） */
.notice-bar {
  margin-top: 14px;
  overflow: hidden;
  white-space: nowrap;
  border-top: 1px solid #f3dede;
  border-bottom: 1px solid #f3dede;
  background: #fff8f8;
  padding: 8px 0;
  text-align: left;
}
.notice-track {
  display: inline-block;
  padding-left: 100%;
  color: #d0021b;
  font-size: 14px;
  font-weight: 600;
  animation: notice-scroll 18s linear infinite;
}
.notice-bar:hover .notice-track { animation-play-state: paused; }

@keyframes notice-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

/* 后台商品行内编辑 */
.inline-input {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid #dfe4eb;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
}
.inline-input:focus {
  outline: none;
  border-color: #2f6bff;
  box-shadow: 0 0 0 2px rgba(47, 107, 255, 0.12);
}
.stock-input { max-width: 90px; }

/* 通用隐藏 */
.hidden { display: none !important; }
