@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700;900&family=Inter:wght@300;400;500;600&display=swap');

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

body {
  font-family: 'Inter', sans-serif;
  color: #f2f2f2;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background-color: #0a0a0a;
  background-image: url('./skyline.png');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 12, 0.72);
  z-index: 0;
}

/* ── Screens ─────────────────────────────────────────────────────────── */
.screen { display: none; width: 100%; position: relative; z-index: 1; }
.screen.active { display: flex; justify-content: center; }

.container {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 8px 0 48px;
  text-align: center;
}

/* ── Logo / tagline ──────────────────────────────────────────────────── */
.logo {
  font-family: 'Playfair Display', serif;
  font-size: 88px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #fff;
  line-height: 1;
  margin-bottom: -4px;
}

.tagline {
  font-size: 15px;
  color: #bbb;
  text-align: center;
  line-height: 1.6;
  font-style: italic;
  font-weight: 300;
  letter-spacing: 0.02em;
}

/* ── Referrer badge ──────────────────────────────────────────────────── */
.referrer-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(212,175,55,0.10);
  border: 1px solid rgba(212,175,55,0.35);
  border-radius: 100px;
  padding: 8px 16px 8px 8px;
  font-size: 13px;
  color: #D4AF37;
}

.ref-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(212,175,55,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

/* ── Headline ────────────────────────────────────────────────────────── */
.headline {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  line-height: 1.3;
  letter-spacing: 0.02em;
  color: #fff;
  max-width: 400px;
}

.subline {
  font-size: 15px;
  color: #aaa;
  text-align: center;
  line-height: 1.7;
  max-width: 380px;
  font-weight: 300;
}

/* ── Count bar ───────────────────────────────────────────────────────── */
.count-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #D4AF37;
  font-weight: 400;
  letter-spacing: 0.03em;
}

.count-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #D4AF37;
  animation: pulse 2s infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.75); }
}

/* ── CTA button ──────────────────────────────────────────────────────── */
.cta-btn {
  display: inline-block;
  padding: 14px 40px;
  border: 1.5px solid #D4AF37;
  border-radius: 3px;
  background: transparent;
  color: #D4AF37;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.cta-btn:hover {
  background: rgba(212,175,55,0.12);
}

/* ── Form ────────────────────────────────────────────────────────────── */
form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-inline {
  display: flex;
  gap: 0;
  width: 100%;
}

form input,
.form-inline input {
  flex: 1;
  width: 100%;
  padding: 13px 16px;
  border: 1px solid rgba(212,175,55,0.35);
  border-right: none;
  border-radius: 3px 0 0 3px;
  background: rgba(255,255,255,0.05);
  color: #f2f2f2;
  font-size: 14px;
  font-family: inherit;
  font-weight: 300;
  outline: none;
  transition: border-color 0.2s;
}

form input:focus,
.form-inline input:focus {
  border-color: rgba(212,175,55,0.7);
}

form input::placeholder,
.form-inline input::placeholder {
  color: #666;
}

.form-inline .submit-btn {
  flex-shrink: 0;
  padding: 13px 22px;
  border: 1px solid #D4AF37;
  border-radius: 0 3px 3px 0;
  background: #D4AF37;
  color: #0a0a0a;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.form-inline .submit-btn:hover:not(:disabled) {
  background: #c9a42e;
  border-color: #c9a42e;
}

.form-inline .submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(10,10,10,0.3);
  border-top-color: #0a0a0a;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.error-msg {
  color: #f87171;
  font-size: 13px;
  text-align: center;
}

.disclaimer {
  font-size: 11px;
  color: #444;
  text-align: center;
  letter-spacing: 0.04em;
}

/* ── Position card ───────────────────────────────────────────────────── */
.position-card {
  width: 100%;
  background: rgba(212,175,55,0.07);
  border: 1px solid rgba(212,175,55,0.3);
  border-radius: 4px;
  padding: 32px 20px;
  text-align: center;
}

.position-label { font-size: 13px; color: #888; margin-bottom: 4px; letter-spacing: 0.05em; }

.position-number {
  font-family: 'Playfair Display', serif;
  font-size: 72px;
  font-weight: 900;
  line-height: 1;
  color: #D4AF37;
  letter-spacing: -1px;
  margin-bottom: 8px;
}

.position-sub { font-size: 13px; color: #666; }

/* ── Boost banner ────────────────────────────────────────────────────── */
.boost-banner {
  width: 100%;
  background: rgba(212,175,55,0.07);
  border: 1px solid rgba(212,175,55,0.2);
  border-radius: 4px;
  padding: 12px 16px;
  font-size: 13px;
  color: #D4AF37;
  text-align: center;
  letter-spacing: 0.02em;
}

.bolt { margin-right: 4px; }

/* ── Referrals row ───────────────────────────────────────────────────── */
.referrals-row {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.referrals-stat {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px;
  padding: 16px;
  text-align: center;
}

.referrals-num {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 36px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  margin-bottom: 4px;
}

.referrals-lbl { font-size: 11px; color: #555; letter-spacing: 0.06em; text-transform: uppercase; }

/* ── Share link ──────────────────────────────────────────────────────── */
.share-link-box {
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px;
  padding: 14px 16px;
}

.share-link-label { font-size: 10px; color: #555; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px; }

.share-link-row { display: flex; align-items: center; gap: 8px; }

.share-link-text {
  flex: 1;
  font-size: 12px;
  color: #888;
  font-family: 'Courier New', monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.copy-btn {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 3px;
  border: 1px solid #D4AF37;
  background: transparent;
  color: #D4AF37;
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
}

.copy-btn:hover { background: rgba(212,175,55,0.12); }
.copy-btn.copied { background: rgba(212,175,55,0.15); color: #D4AF37; }

/* ── Share buttons ───────────────────────────────────────────────────── */
.share-buttons {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 11px 6px;
  border-radius: 3px;
  border: 1px solid;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s;
  text-align: center;
  letter-spacing: 0.04em;
}

.share-btn:hover { opacity: 0.75; }
.share-btn.sms       { color: #93c5fd; border-color: rgba(147,197,253,0.3); background: rgba(147,197,253,0.05); }
.share-btn.whatsapp  { color: #86efac; border-color: rgba(134,239,172,0.3); background: rgba(134,239,172,0.05); }
.share-btn.email     { color: #D4AF37; border-color: rgba(212,175,55,0.3);  background: rgba(212,175,55,0.05);  }
.share-btn.twitter   { color: #e2e8f0; border-color: rgba(226,232,240,0.2); background: rgba(226,232,240,0.03); }

/* ── Back button ─────────────────────────────────────────────────────── */
.back-btn {
  background: none;
  border: none;
  color: #555;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
  letter-spacing: 0.05em;
}

.back-btn:hover { color: #888; }

/* ── Utility ─────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

@media (max-width: 400px) {
  .logo { font-size: 64px; }
  .headline { font-size: 22px; }
  .position-number { font-size: 56px; }
  .share-buttons { grid-template-columns: repeat(2, 1fr); }
  .form-inline { flex-direction: column; }
  .form-inline input { border-right: 1px solid rgba(212,175,55,0.35); border-bottom: none; border-radius: 3px 3px 0 0; }
  .form-inline .submit-btn { border-radius: 0 0 3px 3px; justify-content: center; }
}
