/* ════════════════════════════════════════════════════════════════
   HAON LIVE — dark glass + glow neon community
   Fonts: Space Grotesk (UI), JetBrains Mono (labels), Fraunces (display)
   ════════════════════════════════════════════════════════════════ */

:root {
  --bg:        #07090e;
  --bg-2:      #0a0f17;
  --panel:     #0f1521;
  --panel-2:   #131a28;
  --line:      rgba(255,255,255,0.08);
  --line-2:    rgba(255,255,255,0.14);
  --text:      #eef2f7;
  --text-2:    #b6bfcd;
  --dim:       #6b7385;
  --green:     #22d3ee;        /* cyan-electric — primary glow */
  --green-2:   #06b6d4;
  --violet:    #a855f7;
  --violet-2:  #8b5cf6;
  --orange:    #fb923c;
  --orange-2:  #f97316;
  --rose:      #f472b6;
  --gold:      #facc15;
  --red:       #f87171;
  --green-glow:  0 0 24px rgba(34,211,238,0.45);
  --violet-glow: 0 0 24px rgba(168,85,247,0.45);
  --orange-glow: 0 0 24px rgba(251,146,60,0.45);
  --ui:        'Space Grotesk', system-ui, -apple-system, sans-serif;
  --mono:      'JetBrains Mono', ui-monospace, monospace;
  --display:   'Fraunces', 'Space Grotesk', serif;
}

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

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--ui);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Background mesh + grid ───────────────────────────────────── */
.bg-mesh {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(60vw 60vw at 12% 8%, rgba(34,211,238,0.10), transparent 70%),
    radial-gradient(50vw 50vw at 88% 92%, rgba(168,85,247,0.08), transparent 65%),
    radial-gradient(40vw 40vw at 80% 18%, rgba(251,146,60,0.06), transparent 70%),
    var(--bg);
}
.bg-grid {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.04) 1px, transparent 0);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 90%);
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }
input, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }

/* ── HEX avatars (clip-path) ──────────────────────────────────── */
.hex {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--green), var(--violet));
  clip-path: polygon(50% 0%, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  position: relative;
  flex-shrink: 0;
}
.hex--sm { width: 32px; height: 32px; font-size: 11px; }
.hex--xs { width: 24px; height: 24px; font-size: 10px; }
.hex--lg { width: 64px; height: 64px; font-size: 20px; }
.hex--xl { width: 96px; height: 96px; font-size: 28px; }
.hex--logo {
  background: linear-gradient(135deg, var(--green), var(--violet));
  box-shadow: var(--green-glow);
}
.hex-inner {
  position: relative; z-index: 1;
  letter-spacing: -0.04em;
  font-family: var(--display);
  font-weight: 700;
}

/* ── Brand ─────────────────────────────────────────────────────── */
.brand {
  display: flex; align-items: center; gap: 14px;
}
.brand--small { gap: 10px; }
.brand-title, .brand-name {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 22px;
  background: linear-gradient(90deg, var(--green), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-name { font-size: 17px; }
.brand-sub {
  color: var(--text-2);
  font-size: 13px;
  margin-top: 2px;
}

/* ── Auth screen ───────────────────────────────────────────────── */
.screen-auth {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px 16px;
}
.auth-card {
  width: 100%;
  max-width: 440px;
  background: rgba(15,21,33,0.72);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 32px 28px;
  box-shadow:
    0 8px 32px rgba(0,0,0,0.5),
    0 0 0 1px rgba(34,211,238,0.05);
}
.tabs {
  display: flex; gap: 4px;
  margin: 24px 0 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 4px;
}
.tab {
  flex: 1;
  padding: 8px 12px;
  border-radius: 7px;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-2);
  transition: all .15s ease;
}
.tab.is-active {
  background: linear-gradient(180deg, rgba(34,211,238,0.18), rgba(168,85,247,0.10));
  color: var(--text);
  box-shadow: 0 0 0 1px rgba(34,211,238,0.30);
}

.auth-form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.lbl {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dim);
}
input[type="text"], input[type="email"], input[type="password"], textarea {
  background: rgba(0,0,0,0.30);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 14px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
  width: 100%;
}
input:focus, textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(34,211,238,0.18);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
  transition: all .15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--green), var(--violet));
  color: #06121a;
  box-shadow: 0 8px 24px rgba(34,211,238,0.20);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 32px rgba(34,211,238,0.32); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  color: var(--text-2);
}
.btn-ghost:hover { background: rgba(255,255,255,0.08); color: var(--text); border-color: var(--line-2); }
.btn-glow {
  background: rgba(34,211,238,0.10);
  border: 1px solid rgba(34,211,238,0.32);
  color: var(--green);
}
.btn-glow:hover {
  background: rgba(34,211,238,0.18);
  box-shadow: var(--green-glow);
  border-color: rgba(34,211,238,0.60);
}
.btn-danger {
  background: rgba(248,113,113,0.10);
  border: 1px solid rgba(248,113,113,0.32);
  color: var(--red);
}
.btn-danger:hover { background: rgba(248,113,113,0.18); }

.form-msg {
  font-size: 13px;
  color: var(--red);
  min-height: 18px;
  text-align: center;
}
.form-msg.is-success { color: var(--green); }

/* ── Topbar ────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 14px 24px;
  background: rgba(7,9,14,0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.nav-desktop { display: flex; gap: 4px; flex: 1; }
.nav-link {
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-2);
  transition: all .15s ease;
}
.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.nav-link.is-active {
  color: var(--green);
  background: rgba(34,211,238,0.08);
  box-shadow: inset 0 0 0 1px rgba(34,211,238,0.24);
}
.topbar-right { display: flex; gap: 8px; align-items: center; margin-left: auto; }

/* ── Main + screens ────────────────────────────────────────────── */
.main {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 100px;
}
.screen { display: block; }

/* ── Composer (modal) ──────────────────────────────────────────── */
.modal {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 16px;
}
.modal-card {
  width: 100%; max-width: 560px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(34,211,238,0.08);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.modal-head h3 { font-size: 16px; font-weight: 600; }
.modal-close {
  width: 30px; height: 30px;
  border-radius: 8px;
  font-size: 22px;
  color: var(--text-2);
  transition: all .15s ease;
}
.modal-close:hover { background: rgba(255,255,255,0.08); color: var(--text); }
.composer-body { padding: 16px 20px 20px; }
#composer-text {
  width: 100%;
  min-height: 140px;
  resize: vertical;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
}
.composer-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 12px;
}
.char-count {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
}

/* ── Post card ─────────────────────────────────────────────────── */
.post-card {
  background: rgba(15,21,33,0.60);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px 14px;
  margin-bottom: 14px;
  transition: border-color .15s ease, transform .15s ease;
  position: relative;
}
.post-card:hover { border-color: var(--line-2); }

.post-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 12px;
}
.post-author {
  flex: 1; min-width: 0;
}
.post-author-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}
.post-author-handle {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
}
.post-time {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
}
.post-content {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
}
.post-actions {
  display: flex; gap: 4px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.post-action {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  transition: all .15s ease;
}
.post-action:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.post-action.is-liked { color: var(--rose); }
.post-action.is-liked svg { fill: var(--rose); stroke: var(--rose); }
.post-action svg { stroke-width: 2; }
.post-action--delete { margin-left: auto; color: var(--dim); }
.post-action--delete:hover { color: var(--red); }

/* ── Comments ──────────────────────────────────────────────────── */
.comments-list {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 10px;
}
.comment {
  display: flex; gap: 10px;
  padding: 8px 0;
}
.comment-body {
  flex: 1;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
}
.comment-head {
  display: flex; gap: 8px; align-items: baseline;
  font-size: 12px;
  margin-bottom: 2px;
}
.comment-author { font-weight: 600; color: var(--text); }
.comment-time { font-family: var(--mono); font-size: 10px; color: var(--dim); }
.comment-text { font-size: 13px; color: var(--text-2); white-space: pre-wrap; word-break: break-word; }
.comment-form {
  display: flex; gap: 8px;
  margin-top: 12px;
}
.comment-form input { flex: 1; padding: 8px 12px; font-size: 13px; }
.comment-form button {
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(34,211,238,0.10);
  border: 1px solid rgba(34,211,238,0.32);
  color: var(--green);
  font-weight: 600;
  font-size: 13px;
}

/* ── Profile ───────────────────────────────────────────────────── */
.profile-cover {
  position: relative;
  height: 160px;
  background: linear-gradient(135deg, rgba(34,211,238,0.15), rgba(168,85,247,0.15), rgba(251,146,60,0.10));
  border-radius: 14px;
  margin-bottom: 60px;
  overflow: hidden;
}
.profile-cover::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(34,211,238,0.30), transparent 60%);
}
.profile-avatar-wrap {
  position: absolute;
  bottom: -50px; left: 24px;
  padding: 4px;
  background: var(--bg);
  border-radius: 16px;
}
.profile-info {
  display: flex; align-items: flex-start; gap: 16px;
  margin-bottom: 20px;
}
.profile-name {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 2px;
}
.profile-handle {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--dim);
}
.profile-bio {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-2);
}
.profile-stats {
  display: flex; gap: 24px;
  padding: 16px 0;
  margin-bottom: 8px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.profile-stat {
  display: flex; align-items: baseline; gap: 6px;
}
.profile-stat-num {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--green);
}
.profile-stat-lbl {
  font-size: 12px;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Discover ──────────────────────────────────────────────────── */
.discover-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.discover-card {
  background: rgba(15,21,33,0.60);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  display: flex; flex-direction: column; gap: 10px;
  transition: all .15s ease;
}
.discover-card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.discover-head { display: flex; align-items: center; gap: 12px; }
.discover-name { font-weight: 600; }
.discover-handle { font-family: var(--mono); font-size: 11px; color: var(--dim); }
.discover-bio { font-size: 13px; color: var(--text-2); min-height: 40px; }
.discover-meta {
  display: flex; gap: 12px;
  font-family: var(--mono); font-size: 11px; color: var(--dim);
}

/* ── Empty state ──────────────────────────────────────────────── */
.empty {
  text-align: center;
  padding: 64px 20px;
  color: var(--text-2);
}
.empty-title {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}
.empty-sub { font-size: 14px; color: var(--dim); }

/* ── Loading ──────────────────────────────────────────────────── */
.loading {
  text-align: center;
  padding: 40px 20px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 12px;
}

/* ── Toast ────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 12px 20px;
  background: rgba(15,21,33,0.95);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  z-index: 200;
  opacity: 0;
  transition: all .25s ease;
  pointer-events: none;
  max-width: 90vw;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.error { border-color: rgba(248,113,113,0.40); color: var(--red); }
.toast.success { border-color: rgba(34,211,238,0.40); color: var(--green); }

/* ── Bottom nav (mobile) ──────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 50;
  display: none;
  align-items: center; justify-content: space-around;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  background: rgba(7,9,14,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--line);
}
.bn-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 14px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-2);
  transition: color .15s ease;
}
.bn-item.is-active { color: var(--green); }
.bn-item svg { width: 22px; height: 22px; }
.bn-fab {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--violet));
  color: #06121a;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 24px rgba(34,211,238,0.50), 0 4px 12px rgba(0,0,0,0.4);
  transform: translateY(-12px);
}
.bn-fab svg { width: 22px; height: 22px; stroke-width: 2.6; }

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .topbar { padding: 12px 16px; gap: 12px; }
  .nav-desktop { display: none; }
  .topbar-right .btn-glow span { display: none; }
  .topbar-right .btn-glow { padding: 8px 10px; }
  .bottom-nav { display: flex; }
  .main { padding: 16px 12px 100px; }
  .auth-card { padding: 24px 18px; }
  .brand-title { font-size: 19px; }
  .profile-cover { margin-bottom: 64px; }
  .profile-avatar-wrap { left: 16px; bottom: -40px; }
  .profile-stats { gap: 14px; flex-wrap: wrap; }
  .post-card { padding: 14px 16px 12px; }
  .modal { padding: 0; align-items: flex-end; }
  .modal-card { max-width: 100%; border-radius: 16px 16px 0 0; }
}
