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

:root {
  --bg: #05070f;
  --bg-2: #0a0e1c;
  --panel: rgba(255, 255, 255, 0.04);
  --panel-border: rgba(255, 255, 255, 0.09);
  --text: #eaf0ff;
  --text-dim: #9aa7c7;
  --cyan: #5ce1ff;
  --violet: #8b6bff;
  --pink: #ff6ec7;
  --green: #5cffa8;
  --danger: #ff6e6e;
  --radius: 18px;
  --shadow-glow: 0 0 40px rgba(92, 225, 255, 0.12);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Heebo', system-ui, sans-serif;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(1100px 700px at 85% -10%, rgba(139, 107, 255, 0.20), transparent 60%),
    radial-gradient(900px 600px at -10% 10%, rgba(92, 225, 255, 0.14), transparent 55%),
    var(--bg);
  position: relative;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, .brand-text, .headline { font-family: 'Orbitron', 'Heebo', sans-serif; }

::selection { background: var(--violet); color: #fff; }

.grad {
  background: linear-gradient(90deg, var(--cyan), var(--violet), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Navbar ---------- */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 28px;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(5, 7, 15, 0.65);
  border-bottom: 1px solid var(--panel-border);
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.5px;
}
.brand-mark {
  color: var(--cyan);
  text-shadow: 0 0 14px var(--cyan);
  font-size: 1.4rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--text-dim);
  font-weight: 500;
  padding: 8px 4px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.nav-link:hover, .nav-link.active { color: var(--text); border-color: var(--cyan); }

.nav-btn {
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  color: #05070f;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 0 20px rgba(139, 107, 255, 0.35);
}
.nav-btn:hover { transform: translateY(-1px); box-shadow: 0 0 28px rgba(139, 107, 255, 0.55); }
.nav-btn.ghost {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--panel-border);
  box-shadow: none;
  font-weight: 500;
}
.nav-btn.ghost:hover { color: var(--text); border-color: var(--cyan); }

.nav-user {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 0.92rem;
}
.nav-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 800; color: #05070f;
  flex-shrink: 0;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 90px 24px 70px;
  text-align: center;
  overflow: hidden;
}
#particle-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.55;
}
.hero-inner { position: relative; z-index: 1; max-width: 900px; margin: 0 auto; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--cyan);
  border: 1px solid rgba(92, 225, 255, 0.35);
  background: rgba(92, 225, 255, 0.07);
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 26px;
}
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.75); }
}

.headline {
  font-size: clamp(2.1rem, 5.4vw, 4rem);
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 22px;
}
.subhead {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-dim);
  max-width: 640px;
  margin: 0 auto 38px;
  line-height: 1.7;
}

.hero-ctas { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 56px; }
.btn-primary {
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  color: #05070f;
  font-weight: 800;
  padding: 15px 34px;
  border-radius: 999px;
  font-size: 1.02rem;
  box-shadow: 0 0 30px rgba(139, 107, 255, 0.45);
  transition: transform 0.15s;
  display: inline-block;
}
.btn-primary:hover { transform: translateY(-2px) scale(1.02); }
.btn-secondary {
  padding: 15px 30px;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  color: var(--text);
  font-weight: 600;
  transition: border-color 0.15s, background 0.15s;
  display: inline-block;
}
.btn-secondary:hover { border-color: var(--cyan); background: rgba(92, 225, 255, 0.06); }

.stats-row {
  display: flex;
  justify-content: center;
  gap: 46px;
  flex-wrap: wrap;
}
.stat { text-align: center; }
.stat-num {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(90deg, var(--cyan), var(--green));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-label { color: var(--text-dim); font-size: 0.85rem; margin-top: 4px; }

/* ---------- Sections ---------- */
.section { max-width: 1100px; margin: 0 auto; padding: 60px 24px; }
.section-head { text-align: center; margin-bottom: 42px; }
.section-title { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; margin: 0 0 12px; }
.section-sub { color: var(--text-dim); max-width: 560px; margin: 0 auto; line-height: 1.7; }

.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}
.how-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 26px 22px;
  backdrop-filter: blur(10px);
}
.how-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  background: linear-gradient(135deg, rgba(92,225,255,0.18), rgba(139,107,255,0.18));
  border: 1px solid var(--panel-border);
  margin-bottom: 16px;
}
.how-card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.how-card p { margin: 0; color: var(--text-dim); font-size: 0.92rem; line-height: 1.65; }

/* ---------- Feed ---------- */
.feed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}
.post-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 22px;
  backdrop-filter: blur(10px);
  transition: border-color 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.post-card:hover { border-color: rgba(92, 225, 255, 0.4); transform: translateY(-3px); }
.post-head { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 800; color: #05070f;
  flex-shrink: 0;
}
.post-author { display: flex; flex-direction: column; line-height: 1.3; }
.post-name { font-weight: 700; font-size: 0.94rem; }
.post-user { color: var(--text-dim); font-size: 0.78rem; }
.post-date {
  margin-inline-start: auto;
  color: var(--text-dim);
  font-size: 0.78rem;
  white-space: nowrap;
}
.post-text { font-size: 0.94rem; line-height: 1.75; color: var(--text); white-space: pre-wrap; }
.post-impact {
  font-size: 0.82rem;
  color: var(--pink);
  background: rgba(255, 110, 199, 0.08);
  border: 1px solid rgba(255, 110, 199, 0.25);
  padding: 6px 12px;
  border-radius: 10px;
  align-self: flex-start;
}
.empty-state {
  text-align: center;
  color: var(--text-dim);
  padding: 50px 20px;
  border: 1px dashed var(--panel-border);
  border-radius: var(--radius);
}
.load-more-wrap { text-align: center; margin-top: 30px; }

/* ---------- Forms (auth pages) ---------- */
.auth-wrap {
  min-height: calc(100vh - 74px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  position: relative;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 22px;
  padding: 40px 32px;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-glow);
  position: relative;
  z-index: 1;
}
.auth-title { font-size: 1.6rem; font-weight: 800; margin: 0 0 6px; text-align: center; }
.auth-sub { color: var(--text-dim); text-align: center; margin: 0 0 30px; font-size: 0.9rem; }

.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.85rem; color: var(--text-dim); margin-bottom: 7px; }
.field input, .field textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(92, 225, 255, 0.15);
}
.field textarea { resize: vertical; min-height: 110px; line-height: 1.6; }
.field-row { display: flex; gap: 12px; }
.field-row .field { flex: 1; }

.form-error {
  background: rgba(255, 110, 110, 0.1);
  border: 1px solid rgba(255, 110, 110, 0.35);
  color: #ffb3b3;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  margin-bottom: 18px;
  display: none;
}
.form-error.show { display: block; }
.form-success {
  background: rgba(92, 255, 168, 0.1);
  border: 1px solid rgba(92, 255, 168, 0.35);
  color: #a9ffce;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  margin-bottom: 18px;
  display: none;
}
.form-success.show { display: block; }

.btn-block {
  width: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  color: #05070f;
  font-weight: 800;
  padding: 13px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 0 24px rgba(139, 107, 255, 0.35);
}
.btn-block:hover { transform: translateY(-1px); box-shadow: 0 0 30px rgba(139, 107, 255, 0.5); }

.auth-switch { text-align: center; margin-top: 22px; font-size: 0.88rem; color: var(--text-dim); }
.auth-switch a { color: var(--cyan); font-weight: 600; }

/* ---------- Profile page ---------- */
.profile-header {
  max-width: 900px;
  margin: 0 auto;
  padding: 50px 24px 20px;
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}
.avatar-lg {
  width: 84px; height: 84px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem; font-weight: 800; color: #05070f;
  flex-shrink: 0;
  box-shadow: 0 0 30px rgba(139, 107, 255, 0.35);
}
.profile-name { font-size: 1.6rem; font-weight: 800; margin: 0; }
.profile-username { color: var(--text-dim); font-size: 0.95rem; margin: 2px 0 8px; }
.profile-bio { color: var(--text-dim); font-size: 0.9rem; max-width: 480px; line-height: 1.6; }
.profile-meta { display: flex; gap: 22px; margin-top: 12px; flex-wrap: wrap; }
.profile-meta .stat-num { font-size: 1.3rem; }

.share-box {
  margin-inline-start: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}
.copy-link-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--panel-border);
  color: var(--text);
  padding: 9px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: border-color 0.2s;
}
.copy-link-btn:hover { border-color: var(--cyan); }

.composer {
  max-width: 900px;
  margin: 10px auto 40px;
  padding: 0 24px;
}
.composer-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 24px;
  backdrop-filter: blur(10px);
}
.composer-title { font-weight: 700; margin: 0 0 4px; font-size: 1.05rem; }
.composer-sub { color: var(--text-dim); font-size: 0.85rem; margin: 0 0 18px; }
.composer-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.btn-post {
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  color: #05070f;
  font-weight: 800;
  padding: 11px 26px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.95rem;
}
.today-badge {
  font-size: 0.78rem;
  color: var(--green);
  background: rgba(92, 255, 168, 0.08);
  border: 1px solid rgba(92, 255, 168, 0.3);
  padding: 5px 12px;
  border-radius: 999px;
}

.entries-wrap { max-width: 900px; margin: 0 auto; padding: 0 24px 60px; }
.entries-title { font-size: 1.1rem; font-weight: 700; margin: 0 0 18px; color: var(--text-dim); }
.entry-item {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 14px;
}
.entry-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.entry-date { font-weight: 700; font-size: 0.88rem; color: var(--cyan); }
.entry-delete {
  background: transparent;
  border: 1px solid rgba(255, 110, 110, 0.3);
  color: #ff9d9d;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 0.75rem;
  cursor: pointer;
}
.entry-delete:hover { background: rgba(255, 110, 110, 0.1); }
.entry-text { line-height: 1.7; font-size: 0.93rem; white-space: pre-wrap; }

/* ---------- Footer ---------- */
footer {
  text-align: center;
  padding: 34px 20px;
  color: var(--text-dim);
  font-size: 0.82rem;
  border-top: 1px solid var(--panel-border);
  margin-top: 40px;
}

@media (max-width: 640px) {
  .navbar { padding: 14px 16px; }
  .share-box { margin-inline-start: 0; align-items: flex-start; width: 100%; }
  .profile-header { padding: 40px 18px 10px; }
}
