:root {
  --bg: #07070d;
  --card: #101018;
  --border: rgba(255,255,255,0.08);
  --fg: #f2f1ea;
  --muted: rgba(255,255,255,0.55);
  --muted-2: rgba(255,255,255,0.35);
  --brand: #b4f055;
  --brand-ink: #0a1500;
  --amber: #f5c842;
  --weapon: #ff7a30;
  --history: #f5c842;
  --firstaid: #ff4f4f;
  --comms: #38bdf8;
  --topo: #34d399;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, "Segoe UI", Arial, sans-serif;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wrap {
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
  padding: 28px 20px 60px;
  flex: 1;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  font-size: 15px;
  color: var(--fg);
  text-decoration: none;
}

.brand-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--brand);
  box-shadow: 0 0 10px rgba(180,240,85,0.6);
}

.nav-links {
  display: flex;
  gap: 16px;
}

.nav-links a {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--brand);
}

h1 {
  font-size: 24px;
  font-weight: 900;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}

.updated {
  font-size: 11.5px;
  color: var(--muted-2);
  margin: 0 0 26px;
}

section {
  margin-bottom: 20px;
}

h2 {
  font-size: 14.5px;
  font-weight: 800;
  margin: 0 0 6px;
  color: var(--fg);
}

p, li {
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
}

ul {
  margin: 6px 0 0;
  padding-inline-start: 20px;
}

li { margin-bottom: 4px; }

.hero {
  text-align: center;
  padding: 40px 0 30px;
}

.hero h1 {
  font-size: 28px;
  margin-bottom: 10px;
}

.hero p {
  font-size: 14.5px;
  max-width: 40ch;
  margin: 0 auto;
}

.contact-box {
  margin-top: 30px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  text-align: center;
}

.contact-box a {
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
}

footer {
  text-align: center;
  padding: 18px 20px 26px;
  font-size: 11px;
  color: var(--muted-2);
  border-top: 1px solid var(--border);
}

.btn-store {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 12px 22px;
  border-radius: 14px;
  background: linear-gradient(100deg, #f5c842, var(--brand) 65%);
  color: #0a1500;
  font-weight: 900;
  font-size: 14px;
  text-decoration: none;
}

.btn-store.secondary {
  margin-top: 6px;
  background: var(--card);
  color: var(--fg);
  border: 1px solid var(--border);
}

.topic-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.topic-list li {
  margin: 0;
  padding: 10px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 13.5px;
}

.topic-list b {
  color: var(--fg);
}

.faq-item {
  margin-bottom: 18px;
}

.faq-item h3 {
  font-size: 14px;
  font-weight: 800;
  color: var(--fg);
  margin: 0 0 4px;
}

.faq-item p {
  margin: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(180,240,85,0.25);
  background: rgba(180,240,85,0.08);
  color: var(--brand);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.invite-card {
  margin-top: 20px;
  padding: 22px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: linear-gradient(160deg, rgba(255,255,255,.06), rgba(255,255,255,.015));
}

.invite-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  border: 1px solid rgba(180,240,85,0.25);
  background: rgba(180,240,85,0.1);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  flex-shrink: 0;
  object-fit: cover;
}

.invite-eyebrow {
  font-size: 11px;
  color: var(--muted-2);
}

.invite-name {
  font-size: 18px;
  font-weight: 800;
}

.invite-msg {
  margin-top: 12px;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.7;
}

.invite-error {
  margin-top: 20px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid rgba(255,79,79,0.25);
  background: rgba(255,79,79,0.06);
  color: #ff8a8a;
  font-size: 14px;
  text-align: center;
}

.skeleton {
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.perks {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 12px;
  color: var(--muted-2);
  justify-content: center;
}

/* ============ Animated backgrounds ============ */
body.mesh-bg.home {
  background:
    radial-gradient(60% 40% at 20% 0%, rgba(255,122,48,0.16), transparent 60%),
    radial-gradient(55% 35% at 85% 8%, rgba(56,189,248,0.14), transparent 60%),
    radial-gradient(70% 50% at 50% 100%, rgba(180,240,85,0.14), transparent 60%),
    var(--bg);
  background-size: 200% 200%;
  animation: meshShift 18s ease-in-out infinite;
}

body.mesh-bg.invite {
  background:
    radial-gradient(70% 45% at 50% -5%, rgba(180,240,85,0.22), transparent 55%),
    radial-gradient(50% 35% at 90% 30%, rgba(245,200,66,0.14), transparent 60%),
    var(--bg);
}

@keyframes meshShift {
  0%, 100% { background-position: 0% 0%, 100% 0%, 50% 100%; }
  50% { background-position: 20% 20%, 80% 20%, 50% 80%; }
}

@media (prefers-reduced-motion: reduce) {
  body.mesh-bg.home { animation: none; }
}

/* ============ Motion + hero ============ */
.floaty {
  animation: floaty 4.5s ease-in-out infinite;
}
@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-14px) rotate(2deg); }
}

.rise {
  animation: rise 0.7s cubic-bezier(.22,1,.36,1) both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .floaty, .rise { animation: none; }
}

.hero-illo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 0 6px;
}

.hero-illo-wrap img {
  width: 220px;
  max-width: 70%;
  filter: drop-shadow(0 20px 30px rgba(0,0,0,0.5));
}

/* ============ Glowing store button ============ */
.btn-store.glow {
  box-shadow: 0 16px 32px -14px rgba(180,240,85,0.55);
  animation: pulseGlow 2.8s ease-in-out infinite;
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 16px 32px -14px rgba(180,240,85,0.55); }
  50% { box-shadow: 0 16px 40px -10px rgba(180,240,85,0.85); }
}
@media (prefers-reduced-motion: reduce) {
  .btn-store.glow { animation: none; }
}

/* ============ Colorful topic rows ============ */
.topic-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--border);
}
.topic-row img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,0.4));
}
.topic-row .t-name { font-size: 14px; font-weight: 800; color: var(--fg); }
.topic-row .t-desc { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

.t-weapon { background: linear-gradient(120deg, rgba(255,122,48,0.16), rgba(255,122,48,0.02)); border-color: rgba(255,122,48,0.3); }
.t-history { background: linear-gradient(120deg, rgba(245,200,66,0.16), rgba(245,200,66,0.02)); border-color: rgba(245,200,66,0.3); }
.t-firstaid { background: linear-gradient(120deg, rgba(255,79,79,0.16), rgba(255,79,79,0.02)); border-color: rgba(255,79,79,0.3); }
.t-comms { background: linear-gradient(120deg, rgba(56,189,248,0.16), rgba(56,189,248,0.02)); border-color: rgba(56,189,248,0.3); }
.t-topo { background: linear-gradient(120deg, rgba(52,211,153,0.16), rgba(52,211,153,0.02)); border-color: rgba(52,211,153,0.3); }

/* ============ Invite page ============ */
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.confetti span {
  position: absolute;
  top: -20px;
  border-radius: 3px;
  opacity: 0.85;
  animation: fall linear infinite;
}
@keyframes fall {
  to { transform: translateY(100vh) rotate(360deg); opacity: 0.2; }
}
@media (prefers-reduced-motion: reduce) {
  .confetti { display: none; }
}

.avatar-big {
  width: 78px;
  height: 78px;
  border-radius: 999px;
  margin: 0 auto;
  background: linear-gradient(135deg, var(--brand), var(--amber));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 900;
  color: var(--brand-ink);
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px rgba(180,240,85,0.4), 0 20px 40px -10px rgba(180,240,85,0.5);
  object-fit: cover;
}

.feat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  padding: 14px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--border);
  position: relative;
  z-index: 1;
}
.feat-card img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,0.4));
}
.feat-card b { display: block; font-size: 13.5px; font-weight: 800; color: var(--fg); margin-bottom: 2px; }
.feat-card span { font-size: 11.5px; color: var(--muted); line-height: 1.6; }
