:root {
  --bg: #0d1117;
  --surface: #161b22;
  --surface-2: #1c2330;
  --border: #2a3140;
  --ink: #e6edf3;
  --muted: #8b949e;
  --accent: #3fb68b;
  --accent-dim: rgba(63,182,139,.12);
  --orange: #f0883e;
  --orange-dim: rgba(240,136,62,.12);
  --danger: #f85149;
  --radius: 16px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.bg-glow {
  position: fixed; z-index: 0; border-radius: 50%; filter: blur(100px); opacity: .18; pointer-events: none;
}
.bg-glow-1 { width: 400px; height: 400px; background: var(--accent); top: -120px; right: -100px; }
.bg-glow-2 { width: 350px; height: 350px; background: var(--orange); bottom: -150px; left: -80px; }

#app {
  position: relative; z-index: 1;
  max-width: 480px; margin: 0 auto; padding: 16px;
}

.screen {
  display: none;
  animation: slideIn .25s ease-out;
}
.screen.active { display: block; }

@keyframes slideIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.back-btn {
  background: none; border: none; color: var(--accent); font-size: 14px; font-weight: 600;
  cursor: pointer; padding: 8px 0; margin-bottom: 8px; font-family: inherit;
}
.back-btn:active { opacity: .7; }

.hero {
  text-align: center; padding: 24px 16px 20px;
}
.hero-logo {
  width: 80px; height: 80px; border-radius: 22px; margin-bottom: 12px;
  box-shadow: 0 8px 32px rgba(63,182,139,.25);
}
.hero-label {
  color: var(--accent); font-weight: 800; font-size: 11px;
  letter-spacing: .12em; text-transform: uppercase; margin-bottom: 6px;
}
h1 {
  font-size: 22px; font-weight: 800; line-height: 1.2; margin-bottom: 8px;
}
.hero-desc {
  color: var(--muted); font-size: 13px; line-height: 1.5;
}

.hint-bar {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 14px; font-size: 13px; color: var(--muted); margin: 12px 0;
  transition: all .2s;
}
.hint-bar.ok { color: var(--accent); border-color: rgba(63,182,139,.3); background: var(--accent-dim); }
.hint-bar.warn { color: var(--orange); border-color: rgba(240,136,62,.3); background: var(--orange-dim); }
.hint-bar.err { color: var(--danger); border-color: rgba(248,81,73,.3); }

.screen-header { margin-bottom: 16px; }
.step-label {
  display: inline-block; font-size: 11px; font-weight: 700; color: var(--orange);
  letter-spacing: .08em; text-transform: uppercase; margin-bottom: 4px;
}
.screen-header h2 { font-size: 20px; font-weight: 700; }
.screen-hint { color: var(--muted); font-size: 13px; margin-top: 4px; }

.card-list { display: flex; flex-direction: column; gap: 10px; }

.tool-card, .tariff-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; cursor: pointer; transition: border-color .15s, transform .1s;
}
.tool-card:active, .tariff-card:active { transform: scale(.98); }
.tool-card:hover, .tariff-card:hover { border-color: var(--accent); }

.tool-card .tc-top { display: flex; justify-content: space-between; align-items: flex-start; }
.tc-title { font-size: 16px; font-weight: 700; }
.tc-badge {
  font-size: 11px; font-weight: 700; color: var(--accent);
  background: var(--accent-dim); padding: 4px 10px; border-radius: 99px;
}
.tc-sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.tc-price-row { display: flex; align-items: baseline; gap: 6px; margin-top: 10px; }
.tc-price { font-size: 20px; font-weight: 800; }
.tc-per { font-size: 12px; color: var(--muted); }
.tc-arrow { color: var(--accent); font-size: 14px; font-weight: 600; margin-top: 10px; text-align: right; }

.tariff-card { display: flex; justify-content: space-between; align-items: center; }
.tf-left h3 { font-size: 15px; font-weight: 700; }
.tf-left p { font-size: 12px; color: var(--muted); margin-top: 2px; }
.tf-right { text-align: right; }
.tf-price { font-size: 18px; font-weight: 800; }
.tf-perm { font-size: 11px; color: var(--muted); }

.pay-buttons { display: flex; flex-direction: column; gap: 10px; }

.btn {
  border: none; border-radius: var(--radius); padding: 16px 18px; cursor: pointer;
  font-family: inherit; font-weight: 700; font-size: 15px;
  display: flex; align-items: center; gap: 12px; transition: transform .1s;
  text-align: left; position: relative;
}
.btn:active { transform: scale(.98); }
.btn-icon { font-size: 22px; width: 36px; text-align: center; flex-shrink: 0; }
.btn-sub { position: absolute; right: 16px; font-size: 11px; font-weight: 500; opacity: .6; }
.btn-crypto { background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(63,182,139,.25); }
.btn-card { background: var(--orange-dim); color: var(--orange); border: 1px solid rgba(240,136,62,.25); }

.btn-primary {
  background: linear-gradient(135deg, #3fb68b, #2d9a74); color: #fff; border: none;
  justify-content: center; font-size: 15px; padding: 14px 18px; width: 100%;
}
.btn-secondary {
  background: var(--surface); color: var(--accent); border: 1px solid var(--border);
  justify-content: center; font-size: 14px; padding: 12px 18px; width: 100%;
}
.btn-sm {
  padding: 10px 14px; font-size: 13px; border-radius: var(--radius-sm);
  background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(63,182,139,.2);
  cursor: pointer; font-family: inherit; font-weight: 600;
}

.order-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px;
}
.order-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.order-row {
  display: flex; justify-content: space-between; padding: 8px 0;
  border-bottom: 1px solid var(--border); font-size: 13px;
}
.order-row:last-of-type { border: none; }
.order-label { color: var(--muted); }
.order-value { font-weight: 600; }

.code-box {
  background: #0d1117; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px; font-family: "SF Mono", "Consolas", monospace; font-size: 12px;
  word-break: break-all; color: var(--accent); margin: 8px 0; line-height: 1.5;
  white-space: pre-wrap;
}

.input {
  width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: 14px; color: var(--ink); font-family: inherit;
  margin: 8px 0; outline: none; transition: border-color .15s;
}
.input:focus { border-color: var(--accent); }
.input::placeholder { color: #484f58; }

.btn-row { display: flex; gap: 8px; margin-top: 12px; }
.btn-row > * { flex: 1; }

.setup-box {
  background: var(--surface-2); border-radius: var(--radius-sm);
  padding: 14px; margin-top: 12px;
}
.setup-box h4 { font-size: 13px; font-weight: 700; color: var(--orange); margin-bottom: 8px; }
.setup-box ol { padding-left: 18px; font-size: 13px; color: var(--muted); line-height: 1.7; }
.setup-box li { margin-bottom: 2px; }

.success-icon {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 12px;
  background: var(--accent-dim); display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}

.ref-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; margin-top: 16px;
}
.ref-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.ref-desc { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.ref-progress { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ref-bar { flex: 1; height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.ref-fill { height: 100%; background: linear-gradient(90deg, var(--accent), #2dd4a0); border-radius: 4px; transition: width .3s; }
.ref-count { font-size: 13px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.ref-reward { background: var(--accent-dim); border: 1px solid rgba(63,182,139,.25); border-radius: 10px; padding: 8px 12px; font-size: 13px; color: var(--accent); margin-bottom: 8px; }

.btn-stars {
  background: linear-gradient(135deg, rgba(250,200,50,.15), rgba(240,170,30,.15));
  border: 1px solid rgba(250,200,50,.3); color: #f0c832;
}

.btn-referral {
  background: linear-gradient(135deg, rgba(63,182,139,.15), rgba(45,154,116,.15));
  border: 1px solid rgba(63,182,139,.3); color: var(--accent);
}

.hidden { display: none !important; }
