/* ─── GrowTracker Community Forum ─────────────────────────────────────────── */

:root {
  --bg:          #0a0d0b;
  --surface:     #111510;
  --surface2:    #17201a;
  --surface3:    #1d2920;
  --border:      rgba(255,255,255,.06);
  --border2:     rgba(255,255,255,.11);
  --text:        #e2e8e4;
  --text-muted:  #7a9180;
  --text-dim:    #4d6357;
  --accent:      #3ddc84;
  --accent2:     #28b568;
  --accent-glow: rgba(61,220,132,.16);
  --red:         #f87171;
  --yellow:      #fbbf24;
  --blue:        #60a5fa;
  --purple:      #a78bfa;
  --radius:      16px;
  --radius-sm:   10px;
  --shadow:      0 8px 40px rgba(0,0,0,.55);
  --card-shadow: 0 2px 16px rgba(0,0,0,.35);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

.hidden { display: none !important; }

/* ─── HEADER ────────────────────────────────────────────────────────────────── */
#forum-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,13,11,.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}

.header-logo img { height: 64px; width: auto; }

.header-center {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.header-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(61,220,132,.7);
}

.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.user-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 99px;
  padding: 5px 14px 5px 10px;
  font-size: .82rem;
}

#user-badge-name { font-weight: 600; color: var(--text); }

/* ─── ROLE BADGES ───────────────────────────────────────────────────────────── */
.role-badge {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 2px 7px;
  border-radius: 99px;
}
.role-user       { background: rgba(100,116,139,.3); color: #94a3b8; }
.role-moderator  { background: rgba(96,165,250,.2);  color: var(--blue);   }
.role-admin      { background: rgba(251,191,36,.2);  color: var(--yellow); }
.role-developer  { background: rgba(167,139,250,.2); color: var(--purple); }

/* ─── BUTTONS ───────────────────────────────────────────────────────────────── */
.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  color: #030d06;
  border: none;
  border-radius: var(--radius-sm);
  padding: 9px 20px;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity .15s, transform .1s, box-shadow .15s;
  letter-spacing: .01em;
}
.btn-primary:hover  { opacity: .92; box-shadow: 0 4px 20px rgba(61,220,132,.3); }
.btn-primary:active { transform: scale(.97); }
.btn-primary svg    { width: 16px; height: 16px; fill: currentColor; }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  font-size: .88rem;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.btn-ghost:hover { background: var(--surface3); color: var(--text); border-color: var(--border2); }

.btn-danger {
  background: rgba(248,113,113,.12);
  color: var(--red);
  border: 1px solid rgba(248,113,113,.25);
  border-radius: var(--radius-sm);
  padding: 9px 16px;
  font-size: .88rem;
  cursor: pointer;
  transition: background .15s;
}
.btn-danger:hover { background: rgba(248,113,113,.22); }

.btn-sm    { padding: 5px 12px !important; font-size: .8rem !important; }
.btn-full  { width: 100%; justify-content: center; }
.btn-back  { background: none; border: none; color: var(--text-muted); font-size: .88rem; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 10px 0; transition: color .15s; font-weight: 500; }
.btn-back:hover { color: var(--accent); }
.btn-back svg { width: 20px; height: 20px; fill: currentColor; }



/* ─── MAIN LAYOUT ──────────────────────────────────────────────────────────── */
#forum-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 20px 100px;
}

/* ─── CATEGORY TABS ─────────────────────────────────────────────────────────── */
.view-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: nowrap;
  overflow: hidden;
}

.category-tabs-wrap {
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
  min-width: 0;
}
.category-tabs-wrap::-webkit-scrollbar { display: none; }

.category-tabs {
  display: flex;
  gap: 6px;
  padding-bottom: 2px;
  white-space: nowrap;
}

.cat-tab {
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 7px 18px;
  font-size: .84rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  flex-shrink: 0;
  white-space: nowrap;
}
.cat-tab:hover { background: var(--surface2); color: var(--text); border-color: var(--border2); }
.cat-tab.active {
  background: var(--accent-glow);
  border-color: rgba(61,220,132,.4);
  color: var(--accent);
  font-weight: 700;
}

/* ─── THREAD GRID ────────────────────────────────────────────────────────────── */
.thread-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  align-items: start;
}

/* ─── THREAD CARD ────────────────────────────────────────────────────────────── */
.thread-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .22s cubic-bezier(.34,1.3,.64,1), box-shadow .22s, border-color .2s;
  box-shadow: var(--card-shadow);
}
.thread-card:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 16px 50px rgba(0,0,0,.5), 0 0 0 1px rgba(61,220,132,.15);
  border-color: rgba(61,220,132,.2);
}
.thread-card.pinned {
  border-color: rgba(61,220,132,.35);
  box-shadow: 0 0 0 1px rgba(61,220,132,.12), var(--card-shadow);
}

.thread-card-img {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface2);
  flex-shrink: 0;
}
.thread-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
}
.thread-card-img .card-img-fallback {
  object-fit: contain;
  padding: 28px;
  opacity: .18;
  filter: saturate(0);
}
.thread-card:hover .thread-card-img img:not(.card-img-fallback) { transform: scale(1.06); }

.thread-card-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.72) 0%, rgba(0,0,0,.05) 45%, transparent 70%);
  pointer-events: none;
}
.card-img-fallback + .thread-card-img-overlay {
  background: linear-gradient(to top, rgba(0,0,0,.4) 0%, transparent 60%);
}

.thread-card-img-meta {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.cat-pill {
  font-size: .71rem;
  font-weight: 700;
  letter-spacing: .03em;
  padding: 3px 10px;
  border-radius: 99px;
  flex-shrink: 0;
}
.cat-showcase   { background: rgba(251,191,36,.22); color: var(--yellow); border: 1px solid rgba(251,191,36,.35); }
.cat-discussion { background: rgba(61,220,132,.2);  color: var(--accent); border: 1px solid rgba(61,220,132,.3); }

.card-overlay-badge { font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; backdrop-filter: blur(6px); }
.card-badge-pinned  { background: rgba(61,220,132,.25); color: var(--accent); border: 1px solid rgba(61,220,132,.3); }
.card-badge-locked  { background: rgba(248,113,113,.2); color: var(--red);    border: 1px solid rgba(248,113,113,.3); }

.thread-card-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.thread-card-title {
  font-size: .96rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.thread-card-preview {
  font-size: .82rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.55;
}
.thread-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.thread-card-author {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  overflow: hidden;
}
.author-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  color: #030d06;
  font-size: .68rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-transform: uppercase;
}
.author-name-text {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.thread-card-stats-row {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: .76rem;
  color: var(--text-dim);
  flex-shrink: 0;
}
.thread-card-stats-row span { display: flex; align-items: center; gap: 2px; }
.star-rating-mini { color: var(--yellow); font-size: .82rem; }

/* ─── PAGINATION ────────────────────────────────────────────────────────────── */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 32px; flex-wrap: wrap; }
.page-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  cursor: pointer;
  font-size: .85rem;
  transition: all .15s;
  font-weight: 500;
}
.page-btn:hover, .page-btn.active { background: var(--surface2); color: var(--text); border-color: var(--border2); }
.page-btn.active { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }

/* ─── THREAD DETAIL ─────────────────────────────────────────────────────────── */
.thread-detail {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}

.thread-detail-header { margin-bottom: 14px; }
.thread-detail-category { margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.thread-detail-title {
  font-size: clamp(1.15rem, 3.5vw, 1.5rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -.01em;
  margin-bottom: 12px;
  color: var(--text);
}
.thread-detail-author-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: .84rem;
  color: var(--text-muted);
}
.author-name { font-weight: 600; color: var(--text); }

.thread-detail-body {
  color: var(--text);
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 18px;
  font-size: .94rem;
}

.thread-images { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.thread-images img {
  max-width: min(320px, 100%);
  max-height: 300px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: transform .15s, box-shadow .15s;
}
.thread-images img:hover { transform: scale(1.02); box-shadow: 0 8px 30px rgba(0,0,0,.4); }

/* Star rating */
.rating-section { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 14px; flex-wrap: wrap; }
.stars { display: flex; gap: 4px; }
.star-btn {
  background: none; border: none; cursor: pointer;
  font-size: 1.6rem; color: var(--text-dim);
  transition: color .1s, transform .1s;
  line-height: 1;
}
.star-btn:hover, .star-btn.active, .star-btn.hover { color: var(--yellow); }
.star-btn:hover { transform: scale(1.15); }
.rating-label { font-size: .88rem; color: var(--text-muted); }
.rating-avg { font-size: 1.1rem; font-weight: 700; color: var(--yellow); }

/* Thread actions */
.thread-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.action-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 8px;
  padding: 5px 12px;
  font-size: .8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all .15s;
  font-weight: 500;
}
.action-btn:hover { background: var(--surface3); color: var(--text); border-color: var(--border2); }
.action-btn.mod   { color: var(--yellow); border-color: rgba(251,191,36,.3); }
.action-btn.mod:hover { background: rgba(251,191,36,.08); }
.action-btn.danger { color: var(--red); border-color: rgba(248,113,113,.3); }
.action-btn.danger:hover { background: rgba(248,113,113,.1); }

/* ─── POSTS ─────────────────────────────────────────────────────────────────── */
.posts-section { margin-bottom: 24px; }
.posts-heading {
  font-size: .8rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: .07em;
  text-transform: uppercase;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.posts-list { display: flex; flex-direction: column; gap: 10px; }

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.post-card.deleted { opacity: .5; }

.post-author-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.post-body {
  color: var(--text);
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 10px;
}
.post-images { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.post-images img {
  max-width: min(220px, 100%);
  max-height: 200px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid var(--border);
}
.post-actions { display: flex; gap: 6px; }
.like-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: .8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all .15s;
}
.like-btn.liked { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }
.like-btn:hover { background: var(--surface3); }

/* ─── REPLY FORM ────────────────────────────────────────────────────────────── */
.reply-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.reply-section h3 { font-size: .95rem; font-weight: 600; margin-bottom: 12px; color: var(--text-muted); }

.reply-target {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(96,165,250,.35);
  background: rgba(96,165,250,.08);
  color: #bfdbfe;
  font-size: .82rem;
}

.reply-inline-btn {
  margin-right: 6px;
}
.reply-form-actions { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }

.login-hint {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-muted);
  font-size: .9rem;
}

/* ─── FORMS ─────────────────────────────────────────────────────────────────── */
.textarea {
  width: 100%;
  background: var(--surface3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: .9rem;
  padding: 10px 14px;
  resize: vertical;
  font-family: inherit;
  transition: border-color .15s;
}
.textarea:focus { outline: none; border-color: var(--accent); }

.input {
  width: 100%;
  background: var(--surface3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: .9rem;
  padding: 10px 14px;
  transition: border-color .15s;
  font-family: inherit;
}
.input:focus { outline: none; border-color: var(--accent); }

select.input { cursor: pointer; }

.field-label { display: block; font-size: .85rem; font-weight: 600; color: var(--text-muted); margin-bottom: 5px; margin-top: 14px; }
.field-hint  { font-size: .78rem; color: var(--text-dim); margin-top: 4px; display: block; }

/* Honeypot – completely off-screen; NOT display:none so CSS-aware bots don't skip it */
.form-hp {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* CAPTCHA */
.captcha-row { margin-top: 12px; }
.captcha-question-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.captcha-code {
  font-family: 'Courier New', monospace;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(74,222,128,.2);
  padding: 2px 10px;
  border-radius: 6px;
  letter-spacing: .05em;
}
.captcha-badge {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  background: rgba(74,222,128,.08);
  border: 1px solid rgba(74,222,128,.18);
  color: var(--text-dim);
  padding: 2px 8px;
  border-radius: 99px;
}

.upload-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.upload-label svg { width: 16px; height: 16px; fill: currentColor; }

.image-preview-row { display: flex; flex-wrap: wrap; gap: 8px; }
.preview-thumb {
  position: relative;
  width: 64px;
  height: 64px;
}
.preview-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.preview-thumb-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: .7rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ─── MODALS ────────────────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-box {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 28px;
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow);
}
.modal-box-lg { max-width: 680px; }

/* Mobile drag handle */
.modal-handle {
  display: none;
  width: 36px;
  height: 4px;
  background: var(--border2);
  border-radius: 99px;
  margin: -8px auto 20px;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
}
.modal-close:hover { background: var(--surface3); color: var(--text); }

.modal-box h2 { font-size: 1.2rem; font-weight: 800; margin-bottom: 6px; letter-spacing: -.01em; }
.auth-hint    { font-size: .84rem; color: var(--text-muted); margin-bottom: 18px; }

.auth-tabs { display: flex; gap: 4px; background: var(--surface2); border-radius: var(--radius-sm); padding: 4px; margin-bottom: 18px; }
.auth-tab { flex: 1; background: none; border: none; color: var(--text-muted); font-size: .86rem; padding: 8px; border-radius: 8px; cursor: pointer; transition: all .15s; font-weight: 500; }
.auth-tab.active { background: var(--surface3); color: var(--text); font-weight: 700; }

.auth-form   { display: flex; flex-direction: column; gap: 2px; }
.thread-form { display: flex; flex-direction: column; gap: 2px; }

.error-msg {
  background: rgba(248,113,113,.1);
  border: 1px solid rgba(248,113,113,.3);
  color: var(--red);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: .84rem;
  margin-top: 8px;
}

.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* ─── TOAST ─────────────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface3);
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 12px 24px;
  border-radius: 99px;
  font-size: .88rem;
  font-weight: 600;
  box-shadow: var(--shadow);
  z-index: 300;
  animation: toastIn .2s ease;
  max-width: calc(100vw - 40px);
  text-align: center;
  white-space: nowrap;
}
@keyframes toastIn { from { opacity:0; transform: translateX(-50%) translateY(12px); } to { opacity:1; transform: translateX(-50%) translateY(0); } }

/* ─── SKELETON ──────────────────────────────────────────────────────────────── */
.skeleton-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.skeleton-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  height: 260px;
  animation: shimmer 1.6s ease-in-out infinite;
}
.skeleton-card:nth-child(2) { animation-delay: .2s; }
.skeleton-card:nth-child(3) { animation-delay: .4s; }
@keyframes shimmer {
  0%, 100% { opacity: .5; }
  50%       { opacity: .85; }
}

/* ─── EMPTY STATE ───────────────────────────────────────────────────────────── */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 70px 20px 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.empty-state-logo {
  width: 80px;
  height: 80px;
  border-radius: 24px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.empty-state-logo img { width: 56px; height: 56px; object-fit: contain; opacity: .45; filter: saturate(.4); }
.empty-state h3 { font-size: 1.05rem; font-weight: 700; color: var(--text); }
.empty-state p  { font-size: .88rem; color: var(--text-muted); max-width: 280px; line-height: 1.6; }
.empty-state svg { width: 44px; height: 44px; fill: var(--text-dim); }

/* ─── RESPONSIVE ────────────────────────────────────────────────────────────── */
@media (max-width: 700px) {
  #forum-main { padding: 16px 12px 96px; }
  .header-inner { padding: 0 14px; height: 56px; }
  .header-center { display: none; }
  .header-logo img { height: 56px; }

  .thread-list,
  .skeleton-list { grid-template-columns: 1fr; gap: 14px; }
  .thread-card-img { aspect-ratio: 4 / 3; }

  .view-toolbar { margin-bottom: 16px; }

  .thread-detail { padding: 16px; }

  /* Modal: slide up as bottom sheet */
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal-box {
    border-radius: 22px 22px 0 0;
    min-height: 60vh;
    max-height: 88vh;
    max-width: 100%;
    padding: 18px 16px 32px;
  }
  .modal-box-lg {
    min-height: 78vh;
  }
  #thread-body { height: 100px; resize: none; }
  .modal-handle { display: block; }
  .modal-close { top: 14px; right: 14px; }
}

@media (min-width: 701px) and (max-width: 960px) {
  .thread-list,
  .skeleton-list { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 961px) {
  .thread-list,
  .skeleton-list { grid-template-columns: repeat(3, 1fr); }
}

/* ─── LIGHTBOX ──────────────────────────────────────────────────────────────── */
#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
#lightbox img { max-width: 95vw; max-height: 92vh; object-fit: contain; border-radius: var(--radius-sm); }

/* ─── GROW SHOWCASE STYLES ────────────────────────────────────────────────── */

/* Thread card grow badges */
.grow-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 4px 0 2px;
}
.grow-badge {
  font-size: .73rem;
  background: rgba(61,220,132,.12);
  color: var(--accent);
  border: 1px solid rgba(61,220,132,.25);
  border-radius: 20px;
  padding: 2px 9px;
  white-space: nowrap;
}

/* Grow report detail view */
.grow-report {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 4px 0 8px;
}
.grow-report-info {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 14px 16px;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border2);
}
.grow-info-item {
  font-size: .85rem;
  color: var(--text);
}
.grow-info-item strong { color: var(--accent); }

.grow-phase-timeline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 10px 16px;
  background: var(--surface3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.grow-phase-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(61,220,132,.1);
  color: var(--accent);
  border: 1px solid rgba(61,220,132,.2);
  border-radius: 16px;
  padding: 3px 10px;
  font-size: .78rem;
  font-weight: 600;
}
.grow-phase-days {
  font-size: .72rem;
  opacity: .75;
  font-weight: 400;
}
.grow-phase-arrow {
  color: var(--text-dim);
  font-size: .8rem;
}

.grow-report-notes {
  font-size: .9rem;
  color: var(--text);
  line-height: 1.65;
  white-space: pre-wrap;
}

/* Grow diary */
.grow-diary-section {
  margin-top: 4px;
}
.grow-diary-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
}
.grow-diary-entries {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.diary-entry-row {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.diary-icon {
  font-size: 1.05rem;
  flex-shrink: 0;
  margin-top: 1px;
}
.diary-entry-content { flex: 1; min-width: 0; }
.diary-entry-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}
.diary-type {
  font-size: .82rem;
  font-weight: 600;
  color: var(--accent);
}
.diary-value {
  font-size: .82rem;
  color: var(--text);
}
.diary-date {
  font-size: .75rem;
  color: var(--text-dim);
  margin-left: auto;
}
.diary-note {
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 6px;
}
.diary-images {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.diary-images img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  cursor: zoom-in;
  border: 1px solid var(--border2);
}
@media (max-width: 480px) {
  .diary-images img { width: 72px; height: 72px; }
  .grow-report-info { gap: 6px 10px; }
}
