* { box-sizing: border-box; }
body {
  margin: 0;
  background: #f0f2f5;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #050505;
}
a { text-decoration: none; color: inherit; }

.topbar {
  background: #fff;
  border-bottom: 1px solid #e4e6eb;
  padding: 14px 20px;
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
}
.brand { display: flex; align-items: center; gap: 10px; }
.logo {
  width: 34px; height: 34px;
  background: #ee4d2d;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 18px;
}
.brand-name { font-weight: 700; font-size: 18px; }
.brand-sub { font-size: 12px; color: #888; }

.container { max-width: 640px; margin: 20px auto; padding: 0 12px; }

/* ---- Composer ---- */
.composer {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  padding: 14px 16px;
  margin-bottom: 16px;
}
.composer textarea {
  width: 100%;
  min-height: 90px;
  border: none;
  outline: none;
  resize: vertical;
  font-size: 15px;
  font-family: inherit;
  line-height: 1.5;
  padding: 8px 0;
}
.composer .actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #eee;
  padding-top: 10px;
  margin-top: 6px;
}
.composer button {
  background: #ee4d2d;
  color: #fff;
  border: none;
  padding: 8px 20px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.composer button:hover { background: #d8431f; }

/* Nut "Them anh" trong composer */
.attach-image-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #444;
  background: #f0f2f5;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  user-select: none;
}
.attach-image-btn:hover { background: #e4e6eb; }

/* Khung xem truoc anh truoc khi dang */
.image-preview-wrap {
  position: relative;
  margin: 8px 0;
  display: inline-block;
  max-width: 100%;
}
.image-preview-wrap img {
  max-width: 100%;
  max-height: 260px;
  border-radius: 8px;
  display: block;
  object-fit: contain;
}
.remove-image-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
}
.remove-image-btn:hover { background: rgba(0,0,0,0.8); }

.post-created-note {
  background: #eaf7ea;
  border: 1px solid #b7e4b7;
  color: #2a7a2a;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
  word-break: break-all;
}
.post-created-note a { color: #0068ff; font-weight: 600; }

/* ---- Post card ---- */
.post {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  margin-bottom: 14px;
  overflow: hidden;
}
.post-body { padding: 16px; }
.post-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}
.avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg,#ffb199,#ff0844);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700;
  flex-shrink: 0;
}
.avatar-photo {
  object-fit: cover;
  background: #f0f2f5;
}
.post-name { font-weight: 600; font-size: 15px; }
.post-time { font-size: 12px; color: #888; }

/* Icon chia se o goc phai tren cua bai viet (chi hien trang chu), bam vao -> sang trang chi tiet bai viet */
.share-icon-btn {
  color: #65676b;
  padding: 4px 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.share-icon-btn:hover { color: #ee4d2d; }
.post-content {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 15px;
  line-height: 1.6;
}
.post-content a { color: #0866ff; }
.post-content a:hover { text-decoration: underline; }

/* Anh dinh kem bai viet - hien full chieu rong ngay duoi noi dung chu */
.post-image {
  width: 100%;
  background: #f0f2f5;
}
.post-image img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  display: block;
}

/* Nut chia se link rieng cua bai */
.post-footer {
  display: flex;
  gap: 8px;
  padding: 0 16px 16px;
}
.share-link-btn {
  font-size: 12px;
  color: #65676b;
  background: #f0f2f5;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  border: none;
}
.share-link-btn:hover { background: #e4e6eb; }

/* ---- Deal action bar (giong anh mau: Xem them Deals / San ngay) ---- */
.deal-actions {
  display: flex;
  border-top: 1px solid #eee;
}
.deal-actions a {
  flex: 1;
  text-align: center;
  padding: 14px 0;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
}
.deal-actions .btn-more {
  background: #2962ff;
}
.deal-actions .btn-more:hover { background: #1e4fd6; }
.deal-actions .btn-buy {
  background: #ee4d2d;
}
.deal-actions .btn-buy:hover { background: #d8431f; }

.empty {
  text-align: center;
  color: #999;
  padding: 40px 0;
  font-size: 14px;
}

/* ---- Trang chi tiet 1 bai ---- */
.back-link {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 14px;
  color: #0866ff;
  font-weight: 600;
}
