/* ============================================================
   LocalWire — style.css
   Color scheme: true black + electric blue
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #f5f5f5;
  --surface:   #ffffff;
  --border:    rgba(0,0,0,0.08);
  --border-md: rgba(0,0,0,0.13);
  --text:      #111111;
  --text-2:    #444444;
  --text-3:    #888888;
  --accent:    #1d9bf0;
  --accent-bg: #e8f4fd;
  --accent-2:  #1a8fd1;
  --danger:    #e0245e;
  --radius:    10px;
  --radius-sm: 6px;
}

html { font-size: 15px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ── Navbar ───────────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: #000000;
  border-bottom: none;
  display: flex; align-items: center; gap: 24px;
  padding: 0 20px; height: 52px;
}

.nav-logo { display: flex; align-items: baseline; gap: 0; text-decoration: none; }
.logo-local { font-size: 17px; font-weight: 700; color: #ffffff; letter-spacing: -0.3px; }
.logo-wire  { font-size: 17px; font-weight: 700; color: var(--accent); letter-spacing: -0.3px; }
.logo-tld   { font-size: 13px; font-weight: 400; color: rgba(255,255,255,0.3); }

.nav-links { display: flex; align-items: center; gap: 4px; flex: 1; }

.nav-link {
  font-size: 13px; color: rgba(255,255,255,0.6);
  padding: 6px 10px; border-radius: var(--radius-sm);
  transition: background 0.1s, color 0.1s;
}
.nav-link:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav-link.active { color: var(--accent); font-weight: 500; }

.nav-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.nav-icon-btn {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.6); position: relative; cursor: pointer;
  border: 0.5px solid transparent; transition: background 0.1s, border-color 0.1s;
  text-decoration: none;
}
.nav-icon-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
.nav-icon-btn.active { color: var(--accent); }

.nav-profile { position: relative; }

.nav-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; cursor: pointer;
  border: 0.5px solid rgba(255,255,255,0.15);
  font-family: inherit; transition: opacity 0.1s;
}
.nav-avatar:hover { opacity: 0.85; }
.nav-avatar img { width: 100%; height: 100%; object-fit: cover; }

.nav-dropdown {
  display: none;
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--surface); border: 0.5px solid var(--border-md);
  border-radius: var(--radius); min-width: 180px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  z-index: 200; overflow: hidden;
}
.nav-dropdown.open { display: block; }

.dropdown-header { padding: 12px 14px 10px; border-bottom: 0.5px solid var(--border); }
.dropdown-name { font-size: 13px; font-weight: 500; color: var(--text); }
.dropdown-username { font-size: 12px; color: var(--text-3); margin-top: 1px; }

.dropdown-item {
  display: block !important; padding: 8px 14px;
  font-size: 13px; color: var(--text-2);
  text-decoration: none; transition: background 0.1s; width: 100%;
}
.dropdown-item:hover { background: var(--bg); color: var(--text); }
.dropdown-signout { color: var(--danger); }
.dropdown-signout:hover { background: #fff0f3; }
.dropdown-divider { border-top: 0.5px solid var(--border); margin: 4px 0; }

.badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 600;
  min-width: 16px; height: 16px; border-radius: 8px;
  padding: 0 4px; margin-left: 4px; vertical-align: middle;
}

.nav-logout { font-size: 12px; color: rgba(255,255,255,0.4); }

/* ── Page layout ──────────────────────────────────────────── */
.page-wrap {
  max-width: 980px; margin: 0 auto; padding: 20px 16px;
  display: grid; grid-template-columns: 200px 1fr 200px;
  gap: 16px; align-items: start;
}

/* ── Left column ──────────────────────────────────────────── */
.left-col { display: flex; flex-direction: column; gap: 12px; }

.profile-snapshot {
  background: var(--surface); border: 0.5px solid var(--border);
  border-radius: var(--radius); padding: 16px; text-align: center;
}
.snapshot-av {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent-bg); color: var(--accent);
  font-size: 18px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 10px; overflow: hidden; border: 0.5px solid var(--border-md);
}
.snapshot-av img { width: 100%; height: 100%; object-fit: cover; }
.snapshot-name { font-size: 14px; font-weight: 500; }
.snapshot-loc  { font-size: 12px; color: var(--text-3); margin-top: 2px; margin-bottom: 12px; }
.snapshot-stats {
  display: flex; justify-content: center; gap: 20px;
  padding-top: 12px; border-top: 0.5px solid var(--border);
}
.snapshot-stat-val   { font-size: 15px; font-weight: 600; }
.snapshot-stat-label { font-size: 11px; color: var(--text-3); }

.profile-card {
  background: var(--surface); border: 0.5px solid var(--border);
  border-radius: var(--radius); padding: 16px; text-align: center;
}
.profile-card .av-lg {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent-bg); color: var(--accent);
  font-size: 18px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 10px; overflow: hidden; border: 0.5px solid var(--border-md);
}
.profile-card .av-lg img { width: 100%; height: 100%; object-fit: cover; }
.profile-card .pc-name { font-size: 14px; font-weight: 500; }
.profile-card .pc-loc  { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.profile-card .pc-stats {
  display: flex; justify-content: center; gap: 20px;
  margin-top: 12px; padding-top: 12px; border-top: 0.5px solid var(--border);
}
.profile-card .pc-stat-val   { font-size: 15px; font-weight: 600; }
.profile-card .pc-stat-label { font-size: 11px; color: var(--text-3); }

.nav-card {
  background: var(--surface); border: 0.5px solid var(--border);
  border-radius: var(--radius); padding: 8px;
}
.nav-card a {
  display: block; padding: 7px 10px; border-radius: var(--radius-sm);
  font-size: 13px; color: var(--text-2); transition: background 0.1s;
}
.nav-card a:hover { background: var(--bg); color: var(--text); }
.nav-card a.active { background: var(--accent-bg); color: var(--accent); font-weight: 500; }
.nav-card hr { border: none; border-top: 0.5px solid var(--border); margin: 6px 0; }

/* ── Feed ─────────────────────────────────────────────────── */
.feed { display: flex; flex-direction: column; gap: 12px; }

.compose-card {
  background: var(--surface); border: 0.5px solid var(--border);
  border-radius: var(--radius); padding: 14px;
}
.compose-row { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.compose-av {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent-bg); color: var(--accent);
  font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
}
.compose-av img { width: 100%; height: 100%; object-fit: cover; }

.compose-card textarea {
  flex: 1; border: 0.5px solid var(--border-md);
  border-radius: 18px; padding: 8px 14px;
  font-size: 13px; font-family: inherit; color: var(--text);
  background: var(--bg); resize: none; min-height: 38px;
  max-height: 120px; outline: none; transition: border-color 0.15s; width: 100%;
}
.compose-card textarea:focus { border-color: var(--accent); }

.compose-actions { display: flex; justify-content: space-between; align-items: center; }
.compose-pills { display: flex; gap: 6px; }
.pill {
  font-size: 12px; font-weight: 500; padding: 4px 10px;
  border-radius: 20px; border: 0.5px solid var(--border-md);
  background: var(--surface); color: var(--text-2);
  cursor: pointer; transition: background 0.1s;
}
.pill:hover { background: var(--bg); }

/* ── Post card ────────────────────────────────────────────── */
.post-card {
  background: var(--surface); border: 0.5px solid var(--border);
  border-radius: var(--radius); padding: 14px;
}
.post-header { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.post-av {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent-bg); color: var(--accent);
  font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
}
.post-av img { width: 100%; height: 100%; object-fit: cover; }
.post-name { font-size: 13px; font-weight: 500; }
.post-meta { font-size: 11px; color: var(--text-3); margin-top: 1px; }
.post-body { font-size: 14px; line-height: 1.55; margin-bottom: 10px; word-break: break-word; }
.post-image { border-radius: var(--radius-sm); margin-bottom: 10px; }

.post-actions {
  display: flex; gap: 16px; padding-top: 8px;
  border-top: 0.5px solid var(--border);
}
.post-action {
  font-size: 12px; color: var(--text-3); cursor: pointer;
  background: none; border: none; font-family: inherit; padding: 0;
  transition: color 0.1s;
}
.post-action:hover { color: var(--accent); }
.post-action.liked { color: var(--accent); font-weight: 500; }

/* ── Comments ─────────────────────────────────────────────── */
.comments { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.comment { display: flex; gap: 8px; align-items: flex-start; }
.comment-av {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg); color: var(--text-2);
  font-size: 10px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden; border: 0.5px solid var(--border);
}
.comment-av img { width: 100%; height: 100%; object-fit: cover; }
.comment-bubble {
  background: var(--bg); border-radius: 12px;
  padding: 7px 11px; font-size: 13px; flex: 1;
}
.comment-bubble strong { font-weight: 500; }
.comment-time { font-size: 11px; color: var(--text-3); margin-top: 3px; }

.comment-form { display: flex; gap: 8px; margin-top: 8px; align-items: center; }
.comment-form input {
  flex: 1; border: 0.5px solid var(--border-md);
  border-radius: 18px; padding: 6px 12px;
  font-size: 13px; font-family: inherit;
  background: var(--bg); outline: none; transition: border-color 0.15s;
}
.comment-form input:focus { border-color: var(--accent); }
.comment-form button {
  font-size: 12px; font-weight: 500; color: var(--accent);
  background: none; border: none; cursor: pointer;
  padding: 0 4px; font-family: inherit;
}

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar { display: flex; flex-direction: column; gap: 12px; }
.sidebar-card {
  background: var(--surface); border: 0.5px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px;
}
.sidebar-head {
  font-size: 11px; font-weight: 600; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px;
  display: flex; align-items: center; justify-content: space-between;
}
.online-count {
  background: var(--accent-bg); color: var(--accent);
  font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 10px;
}
.sidebar-empty { font-size: 12px; color: var(--text-3); }

.online-list { display: flex; flex-direction: column; gap: 8px; }
.online-item { display: flex; align-items: center; gap: 8px; }
.online-av {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent-bg); color: var(--accent);
  font-size: 10px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; position: relative; overflow: hidden;
  border: 0.5px solid var(--border);
}
.online-av img { width: 100%; height: 100%; object-fit: cover; }
.presence-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22c55e; border: 1.5px solid var(--surface);
  position: absolute; bottom: 0; right: 0;
}
.online-name { font-size: 12px; font-weight: 500; display: block; }
.online-loc  { font-size: 11px; color: var(--text-3); }

.event-list { display: flex; flex-direction: column; gap: 8px; }
.event-item { padding-bottom: 8px; border-bottom: 0.5px solid var(--border); }
.event-item:last-child { border-bottom: none; padding-bottom: 0; }
.event-date  { font-size: 10px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: 0.4px; }
.event-title { font-size: 12px; font-weight: 500; display: block; margin-top: 1px; }
.event-loc   { font-size: 11px; color: var(--text-3); display: block; margin-top: 1px; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn-primary {
  display: inline-block; background: var(--accent); color: #fff;
  font-size: 14px; font-weight: 500; font-family: inherit;
  padding: 9px 20px; border: none; border-radius: var(--radius-sm);
  cursor: pointer; transition: opacity 0.15s; width: 100%; text-align: center;
}
.btn-primary:hover { opacity: 0.88; }

.btn-sm {
  font-size: 12px; font-weight: 500; font-family: inherit;
  padding: 5px 12px; border-radius: var(--radius-sm);
  border: 0.5px solid var(--border-md);
  background: var(--surface); color: var(--text-2);
  cursor: pointer; transition: background 0.1s;
}
.btn-sm:hover { background: var(--bg); }

/* ── Auth page ────────────────────────────────────────────── */
body.auth-page {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; background: #000000;
}
.auth-wrap {
  background: var(--surface); border: 0.5px solid var(--border);
  border-radius: var(--radius); padding: 32px 28px;
  width: 100%; max-width: 380px;
}
.auth-logo {
  font-size: 22px; font-weight: 700; letter-spacing: -0.5px; margin-bottom: 4px;
}
.auth-logo-local { color: var(--text); }
.auth-logo-wire  { color: var(--accent); }
.auth-tagline { font-size: 13px; color: var(--text-3); margin-bottom: 20px; }
.auth-tabs {
  display: flex; border-bottom: 0.5px solid var(--border); margin-bottom: 18px;
}
.auth-tab {
  font-size: 13px; font-weight: 500; color: var(--text-3);
  padding: 8px 14px; border-bottom: 2px solid transparent;
  margin-bottom: -0.5px; transition: color 0.1s;
}
.auth-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.auth-tab:hover  { color: var(--text); }

.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form label {
  display: flex; flex-direction: column; gap: 5px;
  font-size: 13px; font-weight: 500; color: var(--text-2);
}
.auth-form input {
  border: 0.5px solid var(--border-md); border-radius: var(--radius-sm);
  padding: 8px 11px; font-size: 14px; font-family: inherit;
  outline: none; background: var(--surface); color: var(--text);
  transition: border-color 0.15s;
}
.auth-form input:focus { border-color: var(--accent); }
.hint { font-size: 11px; font-weight: 400; color: var(--text-3); }
.auth-error {
  background: #fff0f3; border: 0.5px solid #fcc;
  color: var(--danger); font-size: 13px; padding: 9px 12px;
  border-radius: var(--radius-sm); margin-bottom: 14px;
}

/* ── Utility ──────────────────────────────────────────────── */
.text-muted { color: var(--text-3); font-size: 13px; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 780px) {
  .page-wrap { grid-template-columns: 1fr; }
  .left-col  { display: none; }
  .sidebar   { display: none; }
}
@media (max-width: 480px) {
  .navbar { gap: 12px; padding: 0 12px; }
  .nav-links .nav-link { padding: 6px 7px; font-size: 12px; }
}