/* LoongProxy 风格套餐购买（嵌入 Vircs 镜像页） */
.lp-buy {
  --lp-blue: #3b82f6;
  --lp-blue-dark: #2563eb;
  --lp-blue-soft: #eff6ff;
  --lp-border: #e5e7eb;
  --lp-text: #1e293b;
  --lp-muted: #64748b;
  --lp-orange: #f97316;
  --lp-warn-bg: #fff7ed;
  --lp-warn-text: #c2410c;
  --lp-radius: 12px;
  color: var(--lp-text);
  background: #f8fafc;
  padding: 20px 16px 140px;
  font-family: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
.lp-buy * { box-sizing: border-box; }
.lp-buy-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 900px) {
  .lp-buy-inner { grid-template-columns: 1fr; }
  .lp-buy { padding-bottom: 200px; }
}

/* 大洲侧栏 */
.lp-side {
  background: #fff;
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius);
  padding: 10px;
  position: sticky;
  top: 72px;
}
.lp-side-btn {
  display: block;
  width: 100%;
  text-align: center;
  border: 0;
  background: transparent;
  color: var(--lp-muted);
  font-size: 14px;
  padding: 12px 8px;
  border-radius: 10px;
  cursor: pointer;
  margin-bottom: 4px;
  transition: .15s ease;
}
.lp-side-btn:hover { background: #f1f5f9; color: var(--lp-text); }
.lp-side-btn.is-active {
  background: var(--lp-blue);
  color: #fff;
  font-weight: 600;
}
.lp-side-btn[hidden] { display: none !important; }

/* 四步网格 */
.lp-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 14px;
  align-items: start;
}
@media (max-width: 900px) {
  .lp-grid { grid-template-columns: 1fr; }
}
.lp-card {
  background: #fff;
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius);
  padding: 16px 18px;
  min-height: 160px;
  min-width: 0;
}
.lp-card-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 14px;
  color: var(--lp-text);
}
.lp-card-title span {
  color: var(--lp-blue);
  margin-right: 4px;
}

.lp-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.lp-pill {
  border: 1px solid var(--lp-border);
  background: #fff;
  color: var(--lp-text);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
  transition: .15s ease;
}
.lp-pill:hover { border-color: var(--lp-blue); color: var(--lp-blue); }
.lp-pill.is-active {
  border-color: var(--lp-blue);
  color: var(--lp-blue);
  background: var(--lp-blue-soft);
  font-weight: 600;
}
.lp-pill .lp-i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin-left: 4px;
  border-radius: 50%;
  background: var(--lp-blue);
  color: #fff;
  font-size: 10px;
  font-style: normal;
  vertical-align: 1px;
}

/* 地区搜索 */
.lp-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.lp-search-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--lp-border);
  border-radius: 10px;
  padding: 0 12px;
  background: #fff;
  height: 40px;
}
.lp-search-box input {
  border: 0;
  outline: none;
  width: 100%;
  font-size: 13px;
  background: transparent;
}
.lp-search-btn {
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: var(--lp-blue);
  color: #fff;
  font-size: 13px;
  cursor: pointer;
}
.lp-search-btn:hover { background: var(--lp-blue-dark); }
.lp-more {
  font-size: 13px;
  color: var(--lp-blue);
  white-space: nowrap;
  text-decoration: none;
}
.lp-more:hover { text-decoration: underline; }

.lp-region-list {
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--lp-border);
  border-radius: 10px;
}
.lp-region-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
}
.lp-region-row:last-child { border-bottom: 0; }
.lp-region-row:hover { background: #f8fafc; }
.lp-flag {
  width: 28px;
  height: 20px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
  background: #e2e8f0;
}
.lp-region-name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  min-width: 0;
}
.lp-price {
  font-size: 13px;
  color: var(--lp-text);
  white-space: nowrap;
}
.lp-price .now { color: var(--lp-blue); font-weight: 700; }
.lp-price .old {
  color: #94a3b8;
  text-decoration: line-through;
  margin-left: 6px;
  font-size: 12px;
}
.lp-discount {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--lp-blue-soft);
  color: var(--lp-blue);
  font-size: 11px;
  font-weight: 600;
}
.lp-add, .lp-qty {
  flex-shrink: 0;
}
.lp-add {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: var(--lp-blue);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.lp-add:hover { background: var(--lp-blue-dark); }
.lp-qty {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--lp-border);
  border-radius: 8px;
  overflow: hidden;
  height: 28px;
}
.lp-qty button {
  width: 28px;
  height: 28px;
  border: 0;
  background: #f8fafc;
  cursor: pointer;
  color: var(--lp-text);
  font-size: 16px;
}
.lp-qty button:hover { background: #e2e8f0; }
.lp-qty span {
  min-width: 28px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
}
.lp-empty-list {
  padding: 40px 16px;
  text-align: center;
  color: var(--lp-muted);
  font-size: 13px;
}

/* Step4 */
.lp-cart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.lp-cart-head .lp-card-title { margin: 0; }
.lp-clear {
  border: 0;
  background: transparent;
  color: var(--lp-muted);
  font-size: 13px;
  cursor: pointer;
}
.lp-clear:hover { color: var(--lp-blue); }
.lp-cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  color: var(--lp-muted);
  font-size: 13px;
  gap: 10px;
}
.lp-cart-empty svg { opacity: .85; }
.lp-cart-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  min-width: 0;
}
.lp-cart-item .lp-region-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lp-cart-item .lp-price {
  flex-shrink: 0;
}
.lp-warn {
  margin-top: 14px;
  background: var(--lp-warn-bg);
  color: var(--lp-warn-text);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.5;
}
.lp-tip {
  margin-top: 8px;
  font-size: 12px;
  color: var(--lp-muted);
}

/* 底部支付条 */
.lp-paybar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  background: #fff;
  border-top: 1px solid var(--lp-border);
  box-shadow: 0 -8px 24px rgba(15, 23, 42, .06);
  transform: translateY(110%);
  transition: transform .25s ease;
  max-height: min(48vh, 360px);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.lp-paybar.is-show { transform: translateY(0); }
.lp-paybar-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 16px 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  gap: 12px 24px;
  align-items: end;
}
.lp-pay-info {
  min-width: 0;
  max-width: 100%;
}
.lp-meta {
  font-size: 12px;
  color: var(--lp-muted);
  line-height: 1.55;
  min-width: 0;
}
.lp-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}
.lp-meta-regions {
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.lp-meta b { color: var(--lp-text); font-weight: 600; }
.lp-total {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 6px;
}
.lp-total .sum {
  color: var(--lp-orange);
  font-size: 26px;
  font-weight: 800;
}
.lp-total .was {
  color: #94a3b8;
  text-decoration: line-through;
  font-size: 13px;
}
.lp-pay-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  min-width: 0;
  width: 100%;
}
.lp-pay-tabs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.lp-pay-tab {
  border: 1px solid var(--lp-border);
  background: #fff;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.lp-pay-tab img { width: 16px; height: 16px; object-fit: contain; }
.lp-pay-tab.is-active {
  border-color: var(--lp-blue);
  color: var(--lp-blue);
  background: var(--lp-blue-soft);
}
.lp-pay-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.lp-contact {
  height: 40px;
  border: 1px solid var(--lp-border);
  border-radius: 8px;
  padding: 0 10px;
  font-size: 13px;
  width: 160px;
}
.lp-captcha-wrap {
  display: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.lp-captcha-wrap.is-show { display: flex; }
.lp-captcha-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.lp-captcha-input {
  height: 40px;
  width: 110px;
  border: 1px solid var(--lp-border);
  border-radius: 8px;
  padding: 0 10px;
  font-size: 13px;
}
.lp-captcha-input.is-error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .12);
}
.lp-captcha-img {
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid var(--lp-border);
  background: #f8fafc;
}
.lp-field-tip {
  display: none;
  font-size: 12px;
  color: #ef4444;
  line-height: 1.3;
  white-space: nowrap;
}
.lp-field-tip.is-show { display: block; }
.lp-login-hint {
  font-size: 12px;
  color: var(--lp-muted);
  width: 100%;
  text-align: right;
}
.lp-login-hint a { color: var(--lp-blue); text-decoration: none; }
.lp-login-hint a:hover { text-decoration: underline; }
.lp-pay-now {
  height: 42px;
  padding: 0 28px;
  border: 0;
  border-radius: 10px;
  background: var(--lp-blue);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.lp-pay-now:hover { background: var(--lp-blue-dark); }
.lp-pay-now:disabled { opacity: .55; cursor: not-allowed; }
.lp-agree {
  font-size: 12px;
  color: var(--lp-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.lp-agree a { color: var(--lp-blue); text-decoration: none; }
.lp-agree a:hover { text-decoration: underline; }
.lp-pay-note {
  width: 100%;
  text-align: right;
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.5;
}
@media (max-width: 900px) {
  .lp-paybar-inner {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .lp-pay-actions, .lp-pay-row { width: 100%; align-items: stretch; }
  .lp-pay-tabs { justify-content: flex-start; }
  .lp-pay-row { align-items: stretch; }
  .lp-contact { flex: 1; width: auto; min-width: 120px; }
  .lp-captcha-wrap { width: 100%; align-items: stretch; }
  .lp-captcha-row { width: 100%; }
  .lp-captcha-input { flex: 1; width: auto; }
  .lp-pay-now { flex: 1; min-width: 120px; }
  .lp-pay-note, .lp-agree, .lp-login-hint, .lp-field-tip { text-align: left; }
  .lp-captcha-wrap { align-items: flex-start; }
  .lp-meta-regions { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}

.lp-loading {
  padding: 48px;
  text-align: center;
  color: var(--lp-muted);
}
.lp-toast {
  position: fixed;
  left: 50%;
  bottom: 120px;
  transform: translateX(-50%) translateY(8px);
  background: #0f172a;
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: .2s ease;
  max-width: min(90vw, 420px);
  text-align: center;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .18);
}
.lp-toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (max-width: 900px) {
  .lp-toast { bottom: 180px; }
}

.lp-region-row.is-in-cart { background: #f8fbff; }
.lp-cart-list {
  max-height: 220px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.lp-line-sum {
  font-size: 13px;
  font-weight: 700;
  color: var(--lp-blue);
  min-width: 56px;
  text-align: right;
}
