 :root {
      --brand-green: #16a34a;
      --muted: #6b7280;
      --card: #f9fafb;
    }
    * { box-sizing: border-box; margin:0; padding:0; }
    body {
      font-family: Inter, system-ui, sans-serif;
      background: #fff;
      color: #111827;
      padding-bottom: 60px; /* space for nav */
    }
    .container {
      max-width: 700px;
      margin: 0 auto;
      padding: 12px;
    }
    .post, .news-card, .profile-suggest, .tools, .messages { 
      background: #fff; 
      border: 1px solid #e5e7eb; 
      border-radius: 10px; 
      padding: 12px; 
      margin-bottom: 16px; 
      box-shadow:0 2px 4px rgba(0,0,0,0.04);
    }
    .post-header {
      display: flex; gap: 10px; align-items: center; margin-bottom: 8px;
    }
    .post-header img {
      width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
    }
    .post-text { margin: 6px 0; font-size: 15px; }
    .post-image { width: 100%; border-radius: 8px; margin-top: 8px; }
    .actions { display:flex; gap:20px; margin-top:8px; }
    .actions button {
      border:none; background:none; cursor:pointer; font-size:18px; color: var(--muted);
    }
    .actions button.liked { color: var(--brand-green); }
    .news-card img { width:100%; border-radius:8px; margin-bottom:8px; }
    .profile-suggest-list { display:flex; gap:10px; overflow-x:auto; }
    .profile-card { min-width:140px; border:1px solid #eee; border-radius:8px; padding:10px; text-align:center; flex-shrink:0; }
    .profile-card img { width:60px; height:60px; border-radius:50%; object-fit:cover; margin-bottom:8px; }
    .profile-card button { background: var(--brand-green); border:none; color:white; padding:6px 10px; border-radius:6px; cursor:pointer; }
    .refresh-btn { display:block; margin:20px auto; padding:10px 16px; border:none; background: var(--brand-green); color:white; border-radius:8px; font-weight:600; cursor:pointer; }
    /* Tabs */
    .tab-content { display:none; }
    .tab-content.active { display:block; }
    /* Bottom nav */
    .bottom-nav {
      position:fixed; bottom:0; left:0; right:0; height:56px; background:#fff; border-top:1px solid #e5e7eb;
      display:flex; justify-content:space-around; align-items:center;
    }
    .bottom-nav button {
      background:none; border:none; font-size:22px; color: var(--muted); cursor:pointer;
    }
    .bottom-nav button.active { color: var(--brand-green); }
    .search-bar { display:none; padding:10px; background:#f3f4f6; }
    .search-bar input { width:100%; padding:8px; border:1px solid #ccc; border-radius:8px; }

    /* Slide bar */
    #slide-bar {
      display:flex; overflow-x:auto; gap:12px;
      padding:12px; background:#fff; border-bottom:1px solid #e5e7eb;
    }
    #slide-bar .user-icon {
      flex:0 0 auto;
      width:60px; height:60px;
      border-radius:50%; overflow:hidden;
      border:2px solid var(--brand-green);
    }
    #slide-bar .user-icon img {
      width:100%; height:100%; object-fit:cover;
    }

    /* Chat list */
    #chat-list {
      padding:12px;
    }
    .chat-item {
      display:flex; align-items:center; gap:12px;
      background:#fff; padding:12px; border-radius:12px;
      margin-bottom:12px; cursor:pointer;
      transition:background 0.2s;
    }
    .chat-item:hover { background:#f0fdf4; }
    .chat-item img {
      width:50px; height:50px; border-radius:50%; object-fit:cover;
      border:2px solid #e5e7eb;
    }
    .chat-info { flex:1; }
    .chat-info h4 { font-size:16px; font-weight:600; margin-bottom:4px; }
    .chat-info p { font-size:14px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
    .chat-time { font-size:12px; color:var(--muted); }

.tools-section {
  text-align: center;
  margin-top: 20px;
}
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.tool-card {
  background: #fff;
  border-radius: 15px;
  padding: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform .2s;
}
.tool-card:hover { transform: scale(1.03); }
.tool-card img {
  width: 100%; height: 120px; object-fit: cover; border-radius: 10px;
}
.tool-card h4 {
  margin: 10px 0; color: #16a34a;
}
.btn-view, .btn-edit, .btn-delete {
  display: inline-block; margin: 5px; padding: 6px 12px;
  border-radius: 6px; text-decoration: none; color: white;
}
.btn-view { background-color: #16a34a; }
.btn-edit { background-color: #15803d; }
.btn-delete { background-color: crimson; }
.add-tool-form {
  background: white;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-top: 30px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}
.add-tool-form input {
  width: 100%; margin: 10px 0; padding: 8px;
  border: 1px solid #ccc; border-radius: 8px;
}

.share-popup {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex; justify-content: center; align-items: center;
  z-index: 99999;
}
.share-card {
  background: #fff;
  padding: 20px;
  border-radius: 15px;
  text-align: center;
  width: 90%;
  max-width: 300px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}
.share-buttons {
  display: flex; justify-content: space-around; margin: 15px 0;
}
.share-buttons a, .share-buttons button {
  font-size: 22px; color: #16a34a; background: none; border: none;
  cursor: pointer;
}
.share-buttons a:hover, .share-buttons button:hover { color: #0e7a35; }
.close-share {
  background: #ccc; border: none; border-radius: 10px; padding: 5px 10px;
  cursor: pointer;
}

.view-referrals-btn {
  background: var(--brand-green);
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
  transition: background 0.2s, transform 0.1s;
}

.view-referrals-btn:hover {
  background: #15803d;
  transform: scale(1.02);
}

@media (max-width: 600px) {
  .view-referrals-btn {
    width: 90%;
    padding: 14px 0;
    font-size: 15px;
  }
}
.create-post {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
  cursor: pointer;
  transition: background 0.2s;
}

.create-post:hover {
  background: #f0fdf4; /* light green tint */
}

.create-post-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}

.create-post-inner img {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--brand-green);
}

.create-input {
  flex: 1;
  background: #f3f4f6;
  border-radius: 20px;
  padding: 10px 14px;
  color: var(--muted);
  font-size: 15px;
}

.create-input p {
  margin: 0;
  color: var(--muted);
}
.news-image {
  width: 100%;
  max-width: 500px;  /* Prevents it from becoming too wide on desktop */
  height: auto;
  max-height: 250px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  margin: 10px auto;
}
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background: #fff;
  margin: 8% auto;
  padding: 20px;
  border-radius: 10px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
}

.close-btn {
  float: right;
  font-size: 22px;
  cursor: pointer;
  color: #666;
}

.close-btn:hover {
  color: #000;
}

#searchResults {
  margin-top: 15px;
}

#searchResults h4 {
  margin: 15px 0 10px 0;
  color: #16a34a;
  border-bottom: 1px solid #eee;
  padding-bottom: 5px;
}