:root {
  --bg: #0b0d12;
  --card: #141820;
  --card2: #1a2030;
  --text: #f2f4f8;
  --muted: #8b93a7;
  --accent: #4c8dff;
  --accent2: #7b5cff;
  --ok: #3dd68c;
  --warn: #ffb020;
  --danger: #ff5c7a;
  --radius: 16px;
  --shadow: 0 10px 40px rgba(0,0,0,.35);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.boot {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--bg);
  color: var(--text);
}
.boot-logo {
  width: 72px; height: 72px; border-radius: 20px;
  display: grid; place-items: center; font-size: 28px; font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: var(--shadow);
}
.boot-title { font-size: 22px; font-weight: 800; }
.boot-sub { color: var(--muted); font-size: 13px; }
.logo-img { border-radius: 12px; display: block; }

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100%;
}
body {
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(76,141,255,.18), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(123,92,255,.16), transparent 50%),
    var(--bg);
}

#app {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px 14px 40px;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.logo { display: flex; gap: 10px; align-items: center; }
.logo-mark {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  font-weight: 800; box-shadow: var(--shadow);
}
.logo-title { font-weight: 800; letter-spacing: .2px; }
.logo-sub { color: var(--muted); font-size: 12px; }

.balance-chip {
  display: flex; align-items: center; gap: 6px;
  background: var(--card);
  border: 1px solid rgba(255,255,255,.06);
  padding: 8px 12px; border-radius: 999px;
  font-weight: 700; font-size: 13px;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.tabs.tabs-4 {
  grid-template-columns: 1fr 1fr 1fr 1fr;
}
.tabs-4 .tab {
  font-size: 12px;
  padding: 10px 4px;
}
.tab {
  border: 0; cursor: pointer;
  background: var(--card);
  color: var(--muted);
  padding: 10px 8px;
  border-radius: 12px;
  font-weight: 700;
  border: 1px solid transparent;
}
.tab.active {
  color: var(--text);
  border-color: rgba(76,141,255,.45);
  background: linear-gradient(180deg, rgba(76,141,255,.16), var(--card));
}

.panel { display: none; }
.panel.active { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px);} to { opacity: 1; transform: none;} }

.card {
  background: linear-gradient(180deg, var(--card2), var(--card));
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.card.hero h1 { margin: 0 0 6px; font-size: 22px; }
.card.hero p { margin: 0; color: var(--muted); line-height: 1.4; }

.field-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 600;
}
input[type="url"], input[type="text"] {
  width: 100%;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.25);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 12px;
  font-size: 15px;
  outline: none;
}
input:focus { border-color: rgba(76,141,255,.55); }

.hint { color: var(--muted); font-size: 12px; margin: 8px 0 0; }
.hint.center { text-align: center; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.seg-btn {
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.2);
  color: var(--muted);
  border-radius: 12px;
  padding: 10px 8px;
  font-weight: 700;
  cursor: pointer;
}
.seg-btn.active {
  color: var(--text);
  border-color: rgba(123,92,255,.5);
  background: rgba(123,92,255,.18);
}

.check-row {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: var(--text);
}
.check-row input { width: 18px; height: 18px; }

.btn {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}
.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: white;
  box-shadow: 0 10px 28px rgba(76,141,255,.35);
}
.btn.primary:disabled { opacity: .55; cursor: not-allowed; }
.btn.pay {
  background: linear-gradient(135deg, #2dd4a8, #3b82f6);
  color: #041018;
  margin-top: 10px;
}
.btn.secondary {
  background: rgba(255,255,255,.08);
  color: var(--text);
  border: 1px solid rgba(255,255,255,.1);
  margin-top: 10px;
}
.btn.secondary:active { opacity: .85; }

.invite-banner-title {
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 6px;
}
.invite-banner-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 10px;
}
.ref-bonus .ref-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
  font-size: 15px;
}
.ref-bonus .ref-row:last-of-type { border-bottom: 0; }
.ref-bonus strong {
  color: var(--ok);
  font-size: 18px;
}
.plan h3 { margin: 0 0 6px; font-size: 17px; }
.plan .price {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 4px;
}
.plan .meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
.plans .plan { margin-bottom: 10px; }
#inviteLink {
  font-size: 12px;
  word-break: break-all;
}
.custom-pay-grid {
  margin-top: 10px;
}
.custom-pay-grid input[type="number"] {
  width: 100%;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.25);
  color: var(--text);
  border-radius: 12px;
  padding: 12px;
  font-size: 16px;
  font-weight: 700;
  outline: none;
}
.custom-pay-grid input:focus {
  border-color: rgba(76,141,255,.55);
}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
}

.status {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(61,214,140,.1);
  border: 1px solid rgba(61,214,140,.25);
  color: var(--ok);
  font-size: 14px;
  line-height: 1.4;
}
.status.err {
  background: rgba(255,92,122,.1);
  border-color: rgba(255,92,122,.3);
  color: var(--danger);
}

.plans { display: grid; gap: 12px; }
.plan {
  background: linear-gradient(180deg, var(--card2), var(--card));
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.plan h3 { margin: 0 0 4px; font-size: 18px; }
.plan .price {
  font-size: 28px; font-weight: 900;
  background: linear-gradient(90deg, #fff, #9ec1ff);
  -webkit-background-clip: text; color: transparent;
}
.plan .meta { color: var(--muted); font-size: 13px; margin: 6px 0 0; }

.steps { margin: 0; padding-left: 18px; color: var(--muted); line-height: 1.55; }
.steps b { color: var(--text); }
.card h2 { margin: 0 0 10px; font-size: 17px; }
.card a { color: #8eb6ff; }

.toast {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%);
  background: #1c2433; color: var(--text);
  border: 1px solid rgba(255,255,255,.1);
  padding: 10px 14px; border-radius: 12px;
  max-width: 90%; font-size: 13px; z-index: 50;
  box-shadow: var(--shadow);
}
