:root {
  --bg: #050a18;
  --bg-2: #0a1020;
  --card: #0d1526;
  --card-2: #111c32;
  --line: rgba(255,255,255,.08);
  --text: #f7f4ee;
  --muted: rgba(247,244,238,.62);
  --gold: #f5c518;
  --gold-2: #d4a017;
  --gold-soft: rgba(245,197,24,.14);
  --blue: #3b82f6;
  --purple: #8b5cf6;
  --teal: #14b8a6;
  --green: #22c55e;
  --orange: #f59e0b;
  --red: #ef4444;
  --radius: 16px;
  --nav: 68px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--gold); text-decoration: none; }
img { max-width: 100%; }
.hidden { display: none !important; }

.app-shell { min-height: 100vh; padding-bottom: calc(var(--nav) + 20px); }

/* Auth */
.auth-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(900px 400px at 10% -10%, rgba(59,130,246,.25), transparent 50%),
    radial-gradient(700px 360px at 100% 0%, rgba(139,92,246,.2), transparent 45%),
    var(--bg);
}
.auth-card {
  width: min(920px, 100%); display: grid; grid-template-columns: 1fr 1fr;
  background: #fff; color: #111; border-radius: 28px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.35);
}
.auth-art {
  min-height: 520px; padding: 32px;
  background:
    radial-gradient(circle at 30% 40%, #6d28d9, transparent 40%),
    radial-gradient(circle at 70% 70%, #db2777, transparent 42%),
    linear-gradient(160deg, #0b1224, #1e1b4b 70%);
  display: flex; flex-direction: column; justify-content: flex-end; color: #fff;
}
.auth-art h2 { margin: 0 0 8px; font-size: 28px; }
.auth-art p { margin: 0; opacity: .75; }
.robot {
  width: 180px; height: 180px; margin: auto auto 24px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #f9a8d4, transparent 28%),
    radial-gradient(circle at 70% 40%, #60a5fa, transparent 30%),
    conic-gradient(from 210deg, #312e81, #7c3aed, #db2777, #1e3a8a);
  box-shadow: 0 0 60px rgba(168,85,247,.55);
  position: relative;
}
.robot::after {
  content: ''; position: absolute; inset: 18%; border-radius: 46%;
  border: 2px solid rgba(255,255,255,.25);
}
.auth-form { padding: 40px 36px; background: #fff; }
.brand-grad {
  font-size: 28px; font-weight: 800; margin: 0;
  background: linear-gradient(90deg, #7c3aed, #db2777); -webkit-background-clip: text;
  background-clip: text; color: transparent;
}
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: #444; margin: 4px 0 28px; }
.auth-form h3 { margin: 0 0 16px; font-size: 22px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 12px; color: #667; font-weight: 600; }
.field input, .field select, .field textarea {
  border: 1px solid #e5e7eb; border-radius: 12px; padding: 12px 14px; background: #fff; color: #111;
}
.field input:focus { outline: 2px solid #c4b5fd; }
.btn {
  border: 0; border-radius: 12px; padding: 13px 18px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-grad { width: 100%; color: #fff; background: linear-gradient(90deg, #7c3aed, #db2777); }
.btn-gold { background: linear-gradient(90deg, #f5c518, #d4a017); color: #1a1400; }
.btn-blue { background: linear-gradient(90deg, #2563eb, #7c3aed); color: #fff; }
.btn-purple { background: linear-gradient(90deg, #7c3aed, #6d28d9); color: #fff; }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.auth-links { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; font-size: 13px; }
.auth-links a { color: #2563eb; }
.auth-foot { margin-top: 28px; font-size: 11px; color: #99a; }
.err { color: #b91c1c; font-size: 13px; min-height: 18px; }
.captcha-row { display: flex; gap: 8px; align-items: center; }
.captcha-row input[name="captcha"] { width: 110px; }
.captcha-box {
  width: 130px; height: 44px; padding: 0; border: 1px solid #e5e7eb; border-radius: 8px;
  background: #0b1220; overflow: hidden; flex: 0 0 130px;
}
.captcha-box svg { display: block; }
.modal.locked { pointer-events: auto; }
.modal-bg.force { background: rgba(0,0,0,.78); }
.auth-toggle { background: none; border: 0; color: #2563eb; padding: 0; text-align: left; }

/* Member chrome */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 20px; background: rgba(5,10,24,.88); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .02em; }
.mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: conic-gradient(from 200deg, #f5c518, #fff, #f5c518);
  color: #1a1400; display: grid; place-items: center; font-weight: 900;
}
.nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.nav-links a, .nav-links button {
  background: none; border: 1px solid transparent; color: var(--muted);
  padding: 8px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .04em;
}
.nav-links .on { color: var(--gold); border-color: var(--gold); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn, .avatar {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--card); display: grid; place-items: center; position: relative;
}
.avatar { background: linear-gradient(135deg, #f5c518, #8b5cf6); color: #111; font-weight: 800; font-size: 12px; }
.badge-dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; background: var(--red); border-radius: 50%; }
.lang-switch { display: flex; background: var(--card); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang-switch button { border: 0; background: none; color: var(--muted); padding: 6px 10px; font-size: 11px; font-weight: 700; }
.lang-switch .on { background: var(--gold); color: #1a1400; }

.page { max-width: 1180px; margin: 0 auto; padding: 22px 18px 40px; }
.hero { text-align: center; padding: 12px 0 8px; }
.hero h1 { margin: 0 0 8px; font-size: clamp(32px, 6vw, 52px); letter-spacing: -.03em; }
.hero p { margin: 0 auto; max-width: 640px; color: var(--muted); }
.hero-art {
  width: min(420px, 90%); height: 220px; margin: 22px auto;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 45%, rgba(245,197,24,.35), transparent 42%),
    radial-gradient(circle at 50% 50%, rgba(59,130,246,.35), #050a18 70%);
  display: grid; place-items: center; position: relative;
  box-shadow: inset 0 0 0 10px rgba(245,197,24,.12), 0 0 80px rgba(59,130,246,.25);
}
.hero-art .coin {
  width: 92px; height: 92px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6c2, #f5c518 45%, #a16207);
  color: #1a1400; display: grid; place-items: center; font-size: 42px; font-weight: 900;
  box-shadow: 0 10px 30px rgba(245,197,24,.35);
}
.feats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 8px 0 22px; }
.feat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; text-align: center; }
.feat i { display: grid; place-items: center; width: 40px; height: 40px; margin: 0 auto 8px; border-radius: 50%; background: var(--gold-soft); color: var(--gold); }
.feat b { display: block; font-size: 13px; }
.feat span { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }

.bar {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 10px 16px; margin: 16px 0;
  font-size: 12px; color: var(--muted);
}
.pill { background: #132033; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; color: var(--text); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
}
.card.glow-blue { box-shadow: 0 0 0 1px rgba(59,130,246,.35), 0 16px 40px rgba(37,99,235,.12); }
.card.glow-purple { box-shadow: 0 0 0 1px rgba(139,92,246,.35), 0 16px 40px rgba(124,58,237,.12); }
.card h2, .card h3 { margin: 0 0 10px; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; color: var(--muted); }
.row { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.list-check { margin: 0; padding: 0; list-style: none; }
.list-check li { padding: 6px 0 6px 22px; position: relative; color: var(--muted); font-size: 13px; }
.list-check li::before { content: '✓'; position: absolute; left: 0; color: var(--gold); font-weight: 800; }

.pool-row, .pool-card, .plan-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px;
}
.pool-row { display: grid; grid-template-columns: 56px 1.2fr .9fr .9fr auto; gap: 14px; align-items: center; margin-bottom: 12px; }
.picon {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 20px;
}
.status-on { background: rgba(34,197,94,.15); color: #4ade80; border-radius: 999px; padding: 3px 8px; font-size: 11px; font-weight: 800; }
.progress { height: 8px; background: #1a2438; border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 99px; }
.qa { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.qa button {
  background: var(--card-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px 8px;
  color: var(--text); font-weight: 700; font-size: 12px;
}
.wallet-num { font-size: 28px; font-weight: 800; letter-spacing: -.03em; }
.wallet-sub { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 8px; }

.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; height: var(--nav);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(8,12,24,.94); border-top: 1px solid var(--line); backdrop-filter: blur(12px); z-index: 30;
}
.bottom-nav button {
  background: none; border: 0; color: var(--muted); font-size: 11px; font-weight: 700;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.bottom-nav .on { color: var(--gold); }

.float-chat {
  position: fixed; right: 16px; bottom: calc(var(--nav) + 16px); z-index: 40;
  width: 56px; height: 56px; border-radius: 50%; border: 0;
  background: linear-gradient(135deg, #25d366, #128c7e); color: #fff; font-size: 22px;
  box-shadow: 0 10px 24px rgba(18,140,126,.4);
}
.modal-bg {
  position: fixed; inset: 0; background: rgba(0,0,0,.62); z-index: 50;
  display: grid; place-items: center; padding: 18px;
}
.modal {
  width: min(520px, 100%); background: #0f1730; border: 1px solid var(--line);
  border-radius: 20px; padding: 22px; max-height: 90vh; overflow: auto;
}
.modal h3 { margin-top: 0; }
.chat-box { position: fixed; right: 16px; bottom: calc(var(--nav) + 80px); width: min(360px, calc(100% - 24px));
  background: #0f1730; border: 1px solid var(--line); border-radius: 16px; z-index: 45;
  display: flex; flex-direction: column; max-height: 420px; }
.chat-head { padding: 12px 14px; border-bottom: 1px solid var(--line); font-weight: 700; }
.chat-msgs { padding: 12px; overflow: auto; flex: 1; display: flex; flex-direction: column; gap: 8px; min-height: 180px; }
.bubble { max-width: 85%; padding: 8px 10px; border-radius: 12px; font-size: 13px; }
.bubble.me { align-self: flex-end; background: #2563eb; }
.bubble.them { align-self: flex-start; background: #1a2438; }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; background: #111c32; border: 1px solid var(--line); border-radius: 10px; padding: 10px; }

.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.table th { color: var(--muted); font-size: 11px; letter-spacing: .04em; }
.toast {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  background: #111c32; border: 1px solid var(--gold); color: var(--text);
  padding: 10px 16px; border-radius: 999px; z-index: 80; font-size: 13px;
}

@media (max-width: 900px) {
  .auth-card { grid-template-columns: 1fr; }
  .auth-art { min-height: 180px; }
  .nav-links { display: none; }
  .grid-2, .grid-4, .feats, .qa { grid-template-columns: 1fr 1fr; }
  .pool-row { grid-template-columns: 48px 1fr; }
  .pool-row .hide-sm { display: none; }
}
@media (max-width: 560px) {
  .grid-4, .feats { grid-template-columns: 1fr 1fr; }
  .qa { grid-template-columns: 1fr 1fr; }
}
