/* ══════════════════════════════════════════════════════════════
   TOKENS
   ══════════════════════════════════════════════════════════════ */
:root {
  --bg:        #0b0912;
  --bg-2:      #131020;
  --card:      #181328;
  --card-hi:   #1e1830;
  --border:    #292140;
  --border-hi: #3c3157;

  --text:      #ece8f7;
  --text-dim:  #a79fc2;
  --muted:     #6f6689;

  --accent:    #8b5cf6;
  --accent-hi: #a78bfa;
  --signal:    #7ee0c3;
  --signal-dim: #4a9c85;
  --danger:    #ff6b6b;
  --danger-bg: rgba(255,107,107,.1);
  --success:   #7ee0c3;
  --success-bg: rgba(126,224,195,.1);

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  --radius: 14px;
  --radius-sm: 9px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(139,92,246,.16), transparent),
    radial-gradient(ellipse 700px 500px at 100% 10%, rgba(126,224,195,.06), transparent);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; margin: 0; }
p { margin: 0; color: var(--text-dim); }
a { color: inherit; text-decoration: none; }
code, .mono { font-family: var(--font-mono); }

:focus-visible {
  outline: 2px solid var(--accent-hi);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ══════════════════════════════════════════════════════════════
   HEADER
   ══════════════════════════════════════════════════════════════ */
.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(11,9,18,.75);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 40;
}
.header-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
}
.brand-mark { color: var(--signal); display: inline-flex; }
.brand-accent { color: var(--accent-hi); }
.main-nav { display: flex; align-items: center; gap: 22px; font-size: .92rem; }
.main-nav a { color: var(--text-dim); transition: color .15s; }
.main-nav a:hover { color: var(--text); }
.nav-muted { color: var(--muted) !important; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: #08090c;
  font-weight: 600;
  font-size: .92rem;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: background .15s, transform .1s;
  font-family: var(--font-body);
}
.btn:hover { background: var(--accent-hi); }
.btn:active { transform: scale(.98); }
.btn-small { padding: 7px 14px; font-size: .85rem; }
.btn-block { width: 100%; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-hi);
}
.btn-ghost:hover { background: var(--card-hi); }
.btn-signal { background: var(--signal); color: #08120e; }
.btn-signal:hover { background: #93e8cf; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ══════════════════════════════════════════════════════════════
   FLASH MESSAGES
   ══════════════════════════════════════════════════════════════ */
.flash-stack { padding-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.flash {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  border: 1px solid transparent;
}
.flash-error   { background: var(--danger-bg); color: var(--danger); border-color: rgba(255,107,107,.25); }
.flash-success { background: var(--success-bg); color: var(--signal); border-color: rgba(126,224,195,.25); }

/* ══════════════════════════════════════════════════════════════
   HERO + SIGNATURE ANIMATION (obfuscation motif)
   ══════════════════════════════════════════════════════════════ */
.hero {
  padding: 88px 0 64px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--signal);
  background: rgba(126,224,195,.08);
  border: 1px solid rgba(126,224,195,.2);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 8px var(--signal); }

.hero h1 {
  font-size: clamp(2.1rem, 4vw, 3.1rem);
  line-height: 1.08;
  color: var(--text);
}
.hero h1 .hl { color: var(--accent-hi); }
.hero-sub { margin-top: 20px; font-size: 1.08rem; max-width: 46ch; }
.hero-cta { margin-top: 32px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.hero-meta { margin-top: 28px; display: flex; gap: 28px; flex-wrap: wrap; }
.hero-meta-item { font-size: .85rem; color: var(--muted); }
.hero-meta-item b { color: var(--text); font-family: var(--font-mono); font-weight: 500; }

/* Signature: obfuscation lane */
.obfuscator {
  position: relative;
  height: 320px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
  overflow: hidden;
  padding: 28px;
}
.obfuscator-label {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  display: flex;
  justify-content: space-between;
}
.obfuscator-lane {
  position: relative;
  margin-top: 26px;
  height: 180px;
  border-radius: 10px;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.025) 0 1px, transparent 1px 28px);
  border: 1px solid var(--border);
  overflow: hidden;
}
.obfuscator-lane::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 38%, rgba(139,92,246,.09) 50%, transparent 62%);
}
.packet {
  position: absolute;
  top: 50%;
  width: 14px; height: 14px;
  transform: translateY(-50%);
  border-radius: 4px;
  animation: travel 3.6s linear infinite;
}
.packet.noisy {
  background: repeating-linear-gradient(45deg, var(--muted), var(--muted) 2px, transparent 2px, transparent 4px);
  opacity: .8;
}
.packet.clean { background: var(--signal); box-shadow: 0 0 10px rgba(126,224,195,.6); }
.packet:nth-child(1) { animation-delay: 0s; top: 30%; }
.packet:nth-child(2) { animation-delay: 1.2s; top: 55%; }
.packet:nth-child(3) { animation-delay: 2.4s; top: 75%; }
@keyframes travel {
  0%   { left: -20px; opacity: 0; }
  8%   { opacity: 1; }
  46%  { opacity: 1; }
  50%  { opacity: 0; }
  54%  { opacity: 0; }
  58%  { opacity: 1; }
  92%  { opacity: 1; }
  100% { left: calc(100% + 20px); opacity: 0; }
}
.obfuscator-gate {
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(var(--border-hi), var(--accent), var(--border-hi));
  transform: translateX(-50%);
}
.obfuscator-gate::after {
  content: "Jc / Jmin / Jmax";
  position: absolute;
  top: -22px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: .62rem;
  color: var(--muted);
  white-space: nowrap;
}
.obfuscator-foot {
  margin-top: 16px;
  font-size: .82rem;
  color: var(--text-dim);
}

/* ══════════════════════════════════════════════════════════════
   SECTIONS / CARDS
   ══════════════════════════════════════════════════════════════ */
section { padding: 56px 0; }
.section-head { max-width: 56ch; margin-bottom: 36px; }
.section-head .eyebrow { margin-bottom: 14px; }
.section-head h2 { font-size: 1.8rem; }
.section-head p { margin-top: 12px; font-size: 1rem; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.card-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: rgba(139,92,246,.14);
  color: var(--accent-hi);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.card p { font-size: .92rem; }

.pricing-card {
  background: var(--card);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  max-width: 420px;
  margin: 0 auto;
}
.price-num { font-family: var(--font-display); font-size: 3rem; font-weight: 700; color: var(--text); }
.price-num sub { font-family: var(--font-body); font-size: 1rem; color: var(--muted); font-weight: 500; }
.price-list { list-style: none; padding: 0; margin: 24px 0; text-align: left; display: flex; flex-direction: column; gap: 10px; }
.price-list li { display: flex; gap: 10px; font-size: .92rem; color: var(--text-dim); }
.price-list li svg { color: var(--signal); flex-shrink: 0; margin-top: 2px; }

/* ══════════════════════════════════════════════════════════════
   AUTH FORMS
   ══════════════════════════════════════════════════════════════ */
.auth-shell {
  min-height: calc(100vh - 64px - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
}
.auth-card h1 { font-size: 1.5rem; margin-bottom: 6px; }
.auth-card .auth-sub { margin-bottom: 26px; font-size: .9rem; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .82rem; color: var(--text-dim); margin-bottom: 6px; }
.field input {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  color: var(--text);
  font-size: .95rem;
  font-family: var(--font-body);
}
.field input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(139,92,246,.18); }
.auth-foot { margin-top: 20px; text-align: center; font-size: .88rem; color: var(--text-dim); }
.auth-foot a { color: var(--accent-hi); font-weight: 500; }

/* ══════════════════════════════════════════════════════════════
   DASHBOARD
   ══════════════════════════════════════════════════════════════ */
.dash-wrap { padding: 40px 0 80px; }
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 28px; flex-wrap: wrap; gap: 16px; }
.dash-head h1 { font-size: 1.6rem; }
.dash-head .sub { margin-top: 6px; font-size: .9rem; }

.banner {
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: .9rem;
  margin-bottom: 20px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.banner-warn { background: rgba(255,184,92,.08); border: 1px solid rgba(255,184,92,.25); color: #ffb85c; }
.banner-info { background: rgba(139,92,246,.1); border: 1px solid rgba(139,92,246,.28); color: var(--accent-hi); }
.banner-danger { background: var(--danger-bg); border: 1px solid rgba(255,107,107,.3); color: var(--danger); }
.banner p, .banner span { color: inherit; }
.banner a { text-decoration: underline; font-weight: 600; }

.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .78rem; font-weight: 600;
  padding: 4px 10px; border-radius: 999px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.status-active  { background: rgba(126,224,195,.12); color: var(--signal); }
.status-grace   { background: rgba(255,184,92,.12); color: #ffb85c; }
.status-none    { background: var(--card-hi); color: var(--muted); }

.sub-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  margin-bottom: 20px;
}
.sub-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.sub-card-top h3 { font-size: 1.1rem; }
.sub-meta { display: flex; gap: 32px; margin-bottom: 4px; flex-wrap: wrap; }
.sub-meta-item .k { font-size: .76rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.sub-meta-item .v { font-family: var(--font-mono); font-size: .95rem; margin-top: 3px; color: var(--text); }

.config-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 18px; }
.config-item {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.config-item .name { font-size: .9rem; font-weight: 500; }
.config-item .name .num { color: var(--muted); font-family: var(--font-mono); font-size: .78rem; display: block; margin-top: 2px;}

.empty-state {
  text-align: center;
  padding: 48px 24px;
  background: var(--card);
  border: 1px dashed var(--border-hi);
  border-radius: var(--radius);
}
.empty-state h3 { font-size: 1.2rem; margin-bottom: 8px; }
.empty-state p { max-width: 40ch; margin: 0 auto 22px; }
.empty-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.quick-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 14px; margin-top: 24px; }
.quick-action {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px;
  transition: border-color .15s, transform .1s;
  display: block;
}
.quick-action:hover { border-color: var(--border-hi); transform: translateY(-2px); }
.quick-action .qa-icon { color: var(--accent-hi); margin-bottom: 10px; }
.quick-action .qa-title { font-weight: 600; font-size: .92rem; }
.quick-action .qa-sub { font-size: .8rem; margin-top: 3px; color: var(--muted); }

/* ══════════════════════════════════════════════════════════════
   LINK TELEGRAM PAGE
   ══════════════════════════════════════════════════════════════ */
.link-steps { list-style: none; padding: 0; margin: 24px 0; display: flex; flex-direction: column; gap: 18px; }
.link-steps li { display: flex; gap: 14px; }
.step-num {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--card-hi);
  border: 1px solid var(--border-hi);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: .82rem; color: var(--text-dim);
}
.code-box {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  letter-spacing: .12em;
  background: var(--bg-2);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  text-align: center;
  color: var(--signal);
  margin: 6px 0;
}
.copy-cmd {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: .9rem;
  color: var(--signal);
}
.waiting-pulse {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .85rem; color: var(--muted); margin-top: 18px;
}
.waiting-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: .3; } 50% { opacity: 1; } }

/* ══════════════════════════════════════════════════════════════
   BUY PAGE
   ══════════════════════════════════════════════════════════════ */
.buy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.buy-summary { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.buy-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: .92rem; }
.buy-row:last-child { border-bottom: none; }
.buy-row .strike { text-decoration: line-through; color: var(--muted); margin-right: 8px; }
.buy-total { font-family: var(--font-display); font-size: 1.3rem; color: var(--text); font-weight: 600; }
.promo-form { display: flex; gap: 8px; margin-top: 16px; }
.promo-field {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}
.promo-field svg {
  position: absolute;
  left: 13px;
  color: var(--muted);
  pointer-events: none;
}
.promo-form input {
  flex: 1;
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px 10px 38px;
  color: var(--text);
  font-size: .9rem;
  font-family: var(--font-body);
  transition: border-color .15s, box-shadow .15s;
}
.promo-form input::placeholder { color: var(--muted); }
.promo-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139,92,246,.18);
}
.promo-form .btn-ghost { border-color: var(--border-hi); }
.qr-box { text-align: center; margin: 20px 0; }
.qr-box img { max-width: 200px; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.upload-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  border: 1.5px solid var(--border-hi);
  border-radius: var(--radius);
  background: var(--bg-2);
  padding: 32px 20px;
  text-align: center;
  margin-top: 16px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.upload-drop:hover { border-color: var(--accent); background: var(--card-hi); }
.upload-drop:hover .upload-icon { color: var(--accent-hi); border-color: var(--accent); }
.upload-drop input[type=file] { display: none; }
.upload-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-hi);
  color: var(--text-dim);
  transition: color .15s, border-color .15s;
}
.upload-text { font-size: .92rem; color: var(--text); font-weight: 500; }
.upload-hint { font-size: .78rem; color: var(--muted); }
.upload-filename { margin-top: 2px; font-size: .85rem; color: var(--signal); font-family: var(--font-mono); }

/* ══════════════════════════════════════════════════════════════
   INSTRUCTIONS
   ══════════════════════════════════════════════════════════════ */
.instr-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(160px,1fr)); gap: 14px; }
.instr-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
  text-align: center;
  transition: border-color .15s, transform .1s;
}
.instr-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.instr-body { max-width: 68ch; line-height: 1.7; }
.instr-body h2 { font-size: 1.3rem; margin: 24px 0 10px; }
.instr-body code { background: var(--card-hi); padding: 2px 6px; border-radius: 4px; font-size: .88em; }
.instr-body a { color: var(--accent-hi); text-decoration: underline; }

/* ══════════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════════ */
.site-footer { border-top: 1px solid var(--border); margin-top: 40px; }
.footer-inner { height: 60px; display: flex; align-items: center; justify-content: space-between; font-size: .82rem; color: var(--muted); }
.footer-muted { color: var(--muted); }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 48px; }
  .grid-3, .grid-2, .buy-grid { grid-template-columns: 1fr; }
  .main-nav { gap: 14px; }
  .dash-head { flex-direction: column; align-items: flex-start; }
}
