:root {
  --bg: #0a0c18;
  --card: #12142a;
  --text: #eef0ff;
  --muted: #9aa0c3;
  --accent: #7b2ff7;
  --ok: #3dd68c;
  --err: #ff6b6b;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, "Segoe UI", Roboto, "PingFang SC", sans-serif;
  background: radial-gradient(1200px 600px at 10% 0%, rgba(123,47,247,.12), transparent),
    radial-gradient(900px 500px at 90% 20%, rgba(199,36,177,.1), transparent),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}
a { color: #c9b6ff; }
.wrap { max-width: 960px; margin: 0 auto; padding: 24px 16px 48px; }
.wrap.narrow { max-width: 480px; }
.topnav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(10,12,24,.85); backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.topnav-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.badge { font-size: 13px; color: var(--muted); }
.card {
  background: var(--card);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  padding: 22px 20px;
  margin-top: 18px;
}
h1 { font-size: 26px; margin: 0 0 8px; }
h2 { font-size: 18px; margin: 18px 0 10px; }
.lead { color: var(--muted); margin: 0 0 16px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field input {
  width: 100%; padding: 10px 12px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.14); background: rgba(0,0,0,.25); color: var(--text);
}
.btn {
  display: inline-block; padding: 10px 18px; border-radius: 12px; border: none;
  background: linear-gradient(135deg, #7b2ff7, #c724b1); color: #fff; font-weight: 700;
  text-decoration: none; cursor: pointer; font-size: 15px;
}
.btn.ghost { background: transparent; border: 1px solid rgba(255,255,255,.2); color: var(--text); }
.btn.sm { padding: 8px 14px; font-size: 14px; }
.btn.block { display: block; text-align: center; width: 100%; }
.help { color: var(--muted); font-size: 14px; line-height: 1.55; margin: 0; }
.flash { padding: 12px 14px; border-radius: 10px; margin: 12px 0; }
.flash.ok { background: rgba(61,214,140,.12); border: 1px solid rgba(61,214,140,.35); color: #bff3d8; }
.flash.err { background: rgba(255,107,107,.12); border: 1px solid rgba(255,107,107,.35); color: #ffd0d0; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 8px 10px; border-bottom: 1px solid rgba(255,255,255,.08); text-align: left; }
.buy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.buy-card {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: linear-gradient(165deg, rgba(123,47,247,.2), rgba(16,18,42,.75));
}
.buy-grid--plans {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 22px;
  padding: 20px 6px 8px;
  align-items: stretch;
}
.buy-plan {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
  min-height: 0;
  padding: 26px 18px 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, #23232e 0%, #17171f 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  overflow: visible;
}
.buy-plan.is-selected {
  border-color: #2dd4bf;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.34), 0 0 0 1px #2dd4bf;
  transform: translateY(-6px);
}
.buy-plan-head {
  display: flex;
  justify-content: center;
  width: 100%;
}
.buy-plan-badge {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 20px);
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 138, 76, 0.94);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.32), 0 2px 8px rgba(255, 122, 60, 0.4);
  z-index: 2;
}
.buy-plan--main .buy-plan-badge {
  background: linear-gradient(180deg, #ff9d4d, #ff6416);
}
.buy-plan--biz .buy-plan-badge {
  background: linear-gradient(180deg, #ff8f7c, #ff5648);
}
.buy-plan-check {
  display: none;
  position: absolute;
  top: 14px;
  right: 14px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background: #2dd4bf;
  color: #04231e;
}
.buy-plan.is-selected .buy-plan-check {
  display: flex;
}
.buy-plan-name {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
  letter-spacing: 0.02em;
}
.buy-plan .buy-price {
  margin: 8px 0 16px;
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #fff;
}
.buy-plan .buy-price small {
  font-size: 22px;
  margin-right: 2px;
  font-weight: 700;
  opacity: 1;
}
.buy-plan-meta {
  width: 100%;
  padding: 14px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.buy-plan.is-selected .buy-plan-meta {
  background: rgba(45, 212, 191, 0.1);
  border-color: rgba(45, 212, 191, 0.28);
}
.buy-plan-meta-row {
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.58);
}
.buy-plan-meta-row--main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}
.buy-plan-coin {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: radial-gradient(circle at 35% 32%, #ffe7a8, #f5b942 58%, #c4841a);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.45);
}
.buy-plan-btn {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.86);
  font-weight: 700;
  box-shadow: none;
}
.buy-plan.is-selected .buy-plan-btn {
  background: linear-gradient(90deg, #14b8a6, #3b82f6);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 18px rgba(20, 184, 166, 0.28);
}
@media (max-width: 800px) {
  .buy-grid--plans {
    grid-template-columns: 1fr;
  }
  .buy-plan.is-selected {
    transform: none;
  }
}
.buy-price { font-size: 24px; font-weight: 800; margin-top: 8px; }
.buy-price small { font-size: 14px; opacity: .85; }
.pay-mask {
  position: fixed; inset: 0; background: rgba(4,6,18,.75);
  display: none; align-items: center; justify-content: center; z-index: 50; padding: 16px;
}
.pay-mask.show { display: flex; }
.pay-box {
  background: #14162c; border: 1px solid rgba(255,255,255,.14);
  border-radius: 16px; padding: 22px; width: min(100%, 360px); text-align: center;
}
.pay-box img { width: 220px; height: 220px; object-fit: contain; background: #fff; border-radius: 10px; margin: 12px auto; display: block; }
.install .card h2 { margin-top: 0; }
