* { margin: 0; padding: 0; box-sizing: border-box; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
html, body { width: 100%; height: 100%; background: #f5f7fa; }
body { opacity: 0; animation: fadeIn 0.5s ease-in forwards; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.app { max-width: 480px; margin: 0 auto; min-height: 100vh; padding: 16px 16px 100px; }

.posts-header { margin-bottom: 16px; }
.posts-header h1 { font-size: 24px; font-weight: 800; color: #111; }

.posts-search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f1f5f9;
  border-radius: 30px;
  padding: 12px 18px;
  margin-bottom: 16px;
}
.posts-search-icon { font-size: 14px; opacity: 0.6; }
.posts-search-bar input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13.5px;
  color: #333;
  font-family: inherit;
}
.posts-search-bar input::placeholder { color: #999; }

.tabs-row { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 20px; padding-bottom: 4px; }
.tabs-row::-webkit-scrollbar { display: none; }
.tab-btn { flex-shrink: 0; padding: 9px 18px; border-radius: 20px; font-size: 13px; font-weight: 600; background: white; color: #666; border: 1.5px solid #e5e5e5; cursor: pointer; white-space: nowrap; }
.tab-btn.active { background: #22c55e; color: white; border-color: #22c55e; }

.post-section { margin-bottom: 24px; }
.section-heading { font-size: 15px; font-weight: 700; color: #111; margin-bottom: 12px; padding-left: 2px; }

.posts-list { display: flex; flex-direction: column; gap: 14px; }
.post-card { background: white; border-radius: 14px; padding: 16px; box-shadow: 0 1px 6px rgba(0,0,0,0.05); }
.post-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; gap: 8px; }
.post-title { font-size: 16px; font-weight: 700; color: #111; }
.post-badge { display: inline-block; font-size: 10px; padding: 4px 10px; border-radius: 20px; font-weight: 600; white-space: nowrap; flex-shrink: 0; }
.badge-freelancer { background: #dcfce7; color: #16a34a; }
.badge-employer { background: #fef3c7; color: #d97706; }
.badge-employee { background: #dbeafe; color: #0284c7; }
.badge-student { background: #f3e8ff; color: #9333ea; }
.badge-user { background: #f1f5f9; color: #475569; }
.post-meta { font-size: 12px; color: #888; margin-bottom: 10px; }
.post-description { font-size: 13px; color: #555; line-height: 1.5; margin-bottom: 12px; }

.post-extra { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tag { font-size: 11px; background: #f1f5f9; color: #475569; padding: 4px 10px; border-radius: 8px; font-weight: 500; }
.tag-rate { font-size: 11px; background: #dcfce7; color: #16a34a; padding: 4px 10px; border-radius: 8px; font-weight: 700; }

.post-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 10px; border-top: 1px solid #f0f0f0; }
.expiry-timer { font-size: 11px; color: #f87171; font-weight: 600; }
.post-btn { padding: 9px 18px; border: none; border-radius: 10px; font-size: 12.5px; font-weight: 700; cursor: pointer; background: #22c55e; color: white; }
.post-btn:active { transform: scale(0.95); }
.post-btn.applied { background: #dcfce7; color: #16a34a; cursor: default; }
.post-btn.my-post { background: #f1f5f9; color: #94a3b8; cursor: default; }

.empty-state { text-align: center; padding: 60px 20px; }
.empty-state p { font-size: 14px; color: #999; }

.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; background: white; display: flex; justify-content: space-around; padding: 10px 0 18px; border-top: 1px solid #eee; max-width: 480px; margin: 0 auto; }
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 4px; color: #aaa; cursor: pointer; }
.nav-item svg { pointer-events: none; }
.nav-item span { font-size: 11px; }
.nav-item.active { color: #22c55e; }
.apply-modal {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: flex-end;
  justify-content: center;
}

.apply-modal.active {
  display: flex;
}

.apply-modal-content {
  background: white;
  width: 100%;
  max-width: 480px;
  border-radius: 20px 20px 0 0;
  padding: 24px;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.apply-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.apply-modal-header h3 {
  font-size: 16px;
  color: #111;
  line-height: 1.4;
}

.modal-close {
  font-size: 20px;
  color: #999;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: 12px;
}

.apply-modal .form-group {
  margin-bottom: 16px;
}

.apply-modal .form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #333;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.apply-modal .form-group input,
.apply-modal .form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #e5e5e5;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}

.apply-modal .form-group input:focus,
.apply-modal .form-group textarea:focus {
  border-color: #22c55e;
}

.apply-modal .form-group textarea {
  resize: none;
}

.submit-apply-btn {
  width: 100%;
  padding: 14px;
  background: #22c55e;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
}
.post-footer-btns { display: flex; gap: 8px; align-items: center; }

.post-btn.details-trigger {
  background: white;
  color: #16a34a;
  border: 1.5px solid #16a34a;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f2f2f2;
  font-size: 13px;
}
.detail-row span { color: #999; }
.detail-row b { color: #111; font-weight: 600; text-align: right; }

.detail-desc { padding: 14px 0 4px; }
.detail-desc span { display: block; font-size: 12px; color: #999; margin-bottom: 6px; }
.detail-desc p { font-size: 13.5px; color: #444; line-height: 1.6; }

#detailsActionBtn:disabled,
#detailsActionBtn.my-post,
#detailsActionBtn.applied {
  background: #f1f5f9;
  color: #94a3b8;
  cursor: default;
}

.details-contact-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.details-call-btn, .details-msg-btn {
  flex: 1;
  display: block;
  text-align: center;
  padding: 13px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 12px;
  text-decoration: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
}

.details-call-btn {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
}

.details-msg-btn {
  background: #25D366;
  color: white;
}

.verified-badge {
  display: inline-block;
  color: #2563eb;
  font-size: 10.5px;
  font-weight: 700;
  margin-left: 4px;
}

.featured-card {
  border: 1.5px solid #fbbf24;
  position: relative;
}

.featured-tag {
  position: absolute;
  top: -10px;
  right: 14px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #78350f;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
}
.details-edit-delete-row { display: flex; gap: 10px; margin-top: 14px; }
.details-edit-delete-row .post-btn { flex: 1; padding: 12px; border-radius: 12px; font-size: 13px; font-weight: 700; border: 1.5px solid #ddd; background: white; cursor: pointer; font-family: inherit; }
.details-edit-delete-row .delete-trigger { border-color: #dc2626; color: #dc2626; }
.details-edit-delete-row .edit-trigger { border-color: #16a34a; color: #16a34a; }
.post-footer-btns .edit-trigger, .post-footer-btns .delete-trigger { padding: 8px 12px; font-size: 11.5px; }
.post-footer-btns .delete-trigger { border-color: #dc2626; color: #dc2626; background: white; }

.load-more-wrap{display:flex;flex-direction:column;align-items:center;gap:7px;padding:8px 0 18px}
.load-more-posts-btn{border:1.5px solid #16a34a;background:white;color:#16a34a;border-radius:14px;padding:12px 20px;font:700 13px inherit;cursor:pointer;box-shadow:0 5px 16px rgba(22,163,74,.08)}
.load-more-posts-btn:active{transform:scale(.97)}
.load-more-wrap p{margin:0;font-size:11px;color:#8a978e}
