:root {
  --bg: #0B1120;
  --surface: #131B2E;
  --surface-2: #1B2540;
  --text: #E5E9F0;
  --text-muted: #8A93A8;
  --accent: #4CC9F0;
  --accent-2: #F4A261;
  --border: #253048;
  --radius: 14px;
  --font-display: "Space Grotesk", "Vazirmatn", sans-serif;
  --font-body: "Vazirmatn", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
}

h1, h2, h3, .brand-name {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}

/* ---------- Header ---------- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 32px;
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 20px; }
.brand-mark { color: var(--accent); font-size: 22px; }
.brand-name-en { font-size: 11px; letter-spacing: 0.2em; color: var(--text-muted); display: block; font-family: var(--font-mono); }
.auth-area { display: flex; gap: 10px; }

.btn {
  font-family: var(--font-body);
  font-weight: 500;
  border: none;
  border-radius: 999px;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 14px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-solid { background: var(--accent); color: #06121C; }
.btn-outline { background: transparent; border: 1px solid var(--accent); color: var(--accent); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-full { width: 100%; margin-top: 10px; }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 70px 32px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}
.eyebrow {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.hero h1 { font-size: 42px; margin: 0 0 16px; line-height: 1.25; }
.hero-sub { color: var(--text-muted); font-size: 16px; margin-bottom: 28px; max-width: 480px; }

.hero-map { position: relative; }
.map-svg { width: 100%; height: auto; }
.route { fill: none; stroke: var(--border); stroke-width: 1.5; stroke-dasharray: 4 6; }
.route-2 { stroke: var(--border); opacity: 0.6; }
.node { fill: var(--accent-2); }
.pulse {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  transform-origin: center;
  animation: pulse 2.4s ease-out infinite;
}
.pulse-delay { animation-delay: 1.2s; }
@keyframes pulse {
  0% { r: 4; opacity: 0.9; }
  100% { r: 26; opacity: 0; }
}
.status-chip {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: #6EE7A0; box-shadow: 0 0 8px #6EE7A0; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding: 40px 20px; }
  .hero h1 { font-size: 30px; }
}

/* ---------- Plans ---------- */
main { max-width: 1200px; margin: 0 auto; padding: 0 32px 60px; }
.section-head { margin-bottom: 24px; }
.section-head h2 { font-size: 26px; margin: 0 0 6px; }
.section-head p { color: var(--text-muted); margin: 0; font-size: 14px; }

.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.plan-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s ease;
}
.plan-card:hover { border-color: var(--accent); }
.plan-top { display: flex; justify-content: space-between; align-items: flex-start; }
.plan-protocol {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 2px 8px;
  text-transform: uppercase;
}
.plan-title { font-size: 17px; font-weight: 700; margin: 0; }
.plan-meta { color: var(--text-muted); font-size: 13px; font-family: var(--font-mono); display: flex; gap: 14px; }
.plan-price { font-size: 22px; font-weight: 700; font-family: var(--font-mono); color: var(--accent-2); margin-top: auto; }
.plan-price small { font-size: 12px; color: var(--text-muted); font-weight: 400; }
.loading { color: var(--text-muted); }

/* ---------- Orders ---------- */
.orders-list { display: flex; flex-direction: column; gap: 12px; }
.order-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.order-status { font-family: var(--font-mono); font-size: 12px; padding: 4px 10px; border-radius: 999px; }
.status-pending { background: #3A2E1A; color: var(--accent-2); }
.status-delivered { background: #123324; color: #6EE7A0; }
.status-failed { background: #3A1A1A; color: #F16A6A; }
.config-link { font-family: var(--font-mono); font-size: 12px; color: var(--accent); word-break: break-all; }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(6,10,20,0.7);
  display: flex; align-items: center; justify-content: center; z-index: 50;
}
.modal {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; width: 320px; position: relative;
}
.modal h3 { margin-top: 0; }
.modal input {
  width: 100%; padding: 12px; margin-bottom: 10px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-family: var(--font-body);
}
.modal-close { position: absolute; top: 14px; left: 14px; background: none; border: none; color: var(--text-muted); font-size: 20px; cursor: pointer; }
.modal-error { color: #F16A6A; font-size: 13px; min-height: 18px; }
.pay-plan-title { color: var(--text-muted); font-size: 13px; margin-top: -6px; }

.footer { text-align: center; color: var(--text-muted); font-size: 12px; padding: 30px; border-top: 1px solid var(--border); }
