/* ==========================
   Root Variables
========================== */
:root {
  --nav-bg: rgba(255,255,255,0.85);
  --nav-text: #0b1220;
  --nav-accent: #00d4ff;
  --nav-radius: 14px;
  --nav-transition: 0.22s ease;

  --card-bg: #ffffff;
  --card-elev: 0 6px 24px rgba(8,12,20,0.06);
  --card-radius: 14px;
  --card-padding: 16px;

  --surface: #fafafa;
  --text-color: #0b1220;
  --muted-color: #6b7280;
  --accent-color: #00bcd4;

  --btn-radius: 12px;
  --btn-padding: 10px 16px;

  --glass: rgba(255,255,255,0.6);
}

/* ==========================
   Reset & Base
========================== */
* { box-sizing: border-box; }
html,body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  background: var(--surface);
  color: var(--text-color);
  line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
}

/* links */
a { color: var(--accent-color); text-decoration: none; }
a:hover { text-decoration: underline; }

/* small helpers */
.muted, .small-muted { color: var(--muted-color); }
.small { font-size: 0.86rem; }

/* ==========================
   Page container & layout
========================== */
.page-root {
  padding: 18px;
  max-width: 760px;
  margin: 0 auto;
}

/* center main content on small screens */
@media (max-width: 520px){
  .page-root { padding: 14px; margin-top: 14px; }
}

/* ==========================
   Navbar (mobile-first, centered)
========================== */
#navbar-root nav {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;           /* center nav items on mobile */
  gap: 10px;
  padding: 10px 14px;
  position: sticky;
  top: 8px;
  z-index: 60;
  background: linear-gradient(180deg, var(--nav-bg), rgba(255,255,255,0.82));
  backdrop-filter: blur(8px) saturate(1.02);
  border-radius: var(--nav-radius);
  box-shadow: var(--card-elev);
  margin: 8px;
}

/* container inside nav to hold logo+links for larger screens */
#navbar-root nav .nav-container {
  width: 100%;
  max-width: 980px;
  display: flex;
  align-items: center;
  justify-content: center; /* center content */
  gap: 12px;
  position: relative;
}

/* Logo - keep but visually subtle */
#navbar-root nav .logo {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--nav-text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

/* nav links - icon-first layout, centered */
#navbar-root nav ul.nav-links {
  display: flex;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: center;
  align-items: center;
}

/* make each link an icon-like pill */
#navbar-root nav ul.nav-links li {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* anchor appearance */
#navbar-root nav ul.nav-links li a {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--nav-text);
  font-weight: 600;
  font-size: 0.98rem;
  transition: background var(--nav-transition), transform var(--nav-transition);
}

/* hover / active */
#navbar-root nav ul.nav-links li a:hover,
#navbar-root nav ul.nav-links li a:focus {
  background: rgba(0,0,0,0.04);
  transform: translateY(-1px);
  outline: none;
}

/* nav toggle (hamburger) */
.nav-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  font-size: 20px;
  padding: 8px;
  border-radius: 8px;
  color: var(--nav-text);
  display: none; /* default hidden, shown on small screens below */
}

/* notification bell container & badge */
#notif-bell-wrapper { display:flex; align-items:center; justify-content:center; position:relative; }
#notif-bell {
  width: 22px;
  height: 22px;
  display:block;
  filter: none;
  transition: transform 0.18s ease;
}
#notif-bell:hover { transform: translateY(-2px); }

/* badge */
#notif-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  display: none;
  align-items:center;
  justify-content:center;
  background: #e11d48; /* red when unread */
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 0 5px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(17,24,39,0.15);
}

/* .bell-unread class can be toggled by JS for visual emphasis */
#notif-bell.bell-unread { filter: drop-shadow(0 6px 12px rgba(225,29,72,0.12)); }

/* ==========================
   Cards & surfaces
========================== */
.card {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  padding: var(--card-padding);
  margin-bottom: 18px;
  box-shadow: var(--card-elev);
  border: 1px solid rgba(11, 22, 33, 0.02);
}

/* subtle section titles */
h1,h2,h3 { color: var(--text-color); margin-bottom: 8px; }

/* profile card specifics */
.profile-card { display:flex; flex-direction:column; gap:12px; }
.profile-header { display:flex; align-items:center; gap:14px; }
.profile-avatar { width:96px; height:96px; border-radius:14px; object-fit:cover; box-shadow: 0 6px 20px rgba(8,12,20,0.06); }

/* think list */
.think-list { margin-top: 6px; }
.think-card {
  display:flex;
  gap:12px;
  align-items:center;
  padding:10px;
  border-radius:12px;
  background: linear-gradient(180deg,#fff,#fbfdff);
  border:1px solid rgba(10,20,30,0.03);
}

/* avatar inside think card */
.think-card img { width:56px; height:56px; border-radius:10px; object-fit:cover; }

/* think name */
.think-name { font-weight:600; color:var(--text-color); text-decoration:none; }

/* small label under name */
.think-card .small.muted { font-size:0.82rem; color:var(--muted-color); margin-top:4px; }

/* ==========================
   Buttons
========================== */
.btn, button {
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: var(--btn-padding);
  border-radius: var(--btn-radius);
  cursor:pointer;
  font-weight:700;
  border: none;
  background: var(--accent-color);
  color: white;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
  box-shadow: 0 6px 18px rgba(11,40,60,0.06);
}

.btn.ghost, button.ghost {
  background: transparent;
  border: 1px solid rgba(11,40,60,0.06);
  color: var(--text-color);
  box-shadow: none;
}

/* primary gradient variant */
.btn.primary {
  background: linear-gradient(90deg, #00c6ff, #4bd6ff);
  color: #03161a;
}

/* small */
.btn.small { padding: 6px 10px; font-weight:600; border-radius:10px; }

/* disabled look */
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }

/* ==========================
   Forms & Inputs
========================== */
input, textarea, select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(11,22,33,0.06);
  background: white;
  font-size: 0.96rem;
  color: var(--text-color);
  transition: box-shadow 0.14s ease, border-color 0.14s ease;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: rgba(0,188,212,0.9);
  box-shadow: 0 6px 20px rgba(0,188,212,0.10);
}

/* ==========================
   Feed / Vault / Posts
========================== */
.feed-list, .vault-list { display:flex; flex-direction:column; gap:12px; }

.post-card {
  display:flex;
  flex-direction:column;
  gap:12px;
  padding: 12px;
  border-radius: 12px;
  background: linear-gradient(180deg,#fff,#fbfdff);
  border: 1px solid rgba(6,12,20,0.03);
  box-shadow: 0 4px 16px rgba(8,12,20,0.04);
}

/* header row inside card */
.post-head { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.post-avatar { width:44px; height:44px; border-radius:10px; object-fit:cover; box-shadow:0 6px 14px rgba(8,12,20,0.05); }
.post-meta-left { display:flex; gap:10px; align-items:center; }
.post-name { font-weight:700; }
.post-handle { color:var(--muted-color); font-size:0.88rem; }

/* content */
.post-content { color: var(--text-color); font-size: 0.98rem; white-space:pre-wrap; }
.post-link { display:block; margin-top:8px; color:var(--accent-color); font-weight:600; }

/* images inside posts: auto-fit and crop nicely */
.post-image-wrapper { width:100%; border-radius:12px; overflow:hidden; display:flex; justify-content:center; align-items:center; background:#f6fbfd; }
.post-image { width:100%; height: auto; max-height: 520px; object-fit:cover; display:block; }

/* footer row */
.post-footer { display:flex; align-items:center; gap:12px; }

/* repost count pill */
.repost-count {
  font-weight:700;
  color:var(--muted-color);
  font-size:0.95rem;
}

/* file badge */
.file-badge { font-weight:600; color:var(--muted-color); background: #f3f6f8; padding:6px 10px; border-radius:10px; }

/* ==========================
   Small utilities
========================== */
.empty { text-align:center; color:var(--muted-color); padding:22px 8px; }
.error { color:#b91c1c; padding:12px; background: rgba(185,28,28,0.04); border-radius:10px; }

/* ==========================
   Responsive behaviour (larger screens)
========================== */
@media (min-width: 900px) {
  #navbar-root nav { top: 14px; margin: 14px auto; padding: 12px 20px; }
  #navbar-root nav .logo { left: 24px; font-size: 1.12rem; }
  .page-root { max-width: 920px; padding: 22px; }
  .profile-header { align-items: center; }
  .post-image { max-height: 420px; object-fit: cover; }
  .nav-toggle { display: none; }
}

/* mobile-specific tweaks */
@media (max-width: 520px) {
  /* show hamburger on tiny screens and hide long text labels if desired */
  .nav-toggle { display: block; position: absolute; right: 8px; top: 12px; }
  #navbar-root nav .logo { left: 12px; font-size: 1rem; }
  #navbar-root nav ul.nav-links { gap: 8px; }
  #navbar-root nav ul.nav-links li a { padding: 8px; font-size: 0.95rem; border-radius: 10px; }

  /* centralize nav links visually */
  #navbar-root nav .nav-container { justify-content:center; }

  /* make navbar slightly taller for finger comfort */
  #navbar-root nav { padding: 12px 12px; }
}
