/* ===== Shared base — merged from styles.css ===== */

:root{
  --paper: #FFFFFF;
  --surface: #F5F7F9;
  --border: #E2E7EC;
  --ink: #071120;
  --ink-mid: #2C3847;
  --ink-dim: #51606F;
  --signal: #00C896;
  --signal-soft: rgba(0,200,150,0.12);
  --alert: #E14F4F;
  --maxw: 1180px;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a{ color: inherit; text-decoration: none; }

button, .btn{
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 15px;
  border: none;
  border-radius: 6px;
  padding: 13px 24px;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
button:hover, .btn:hover{ opacity: 0.88; }
button:active, .btn:active{ transform: translateY(1px); }
button:focus-visible, .btn:focus-visible, a:focus-visible{
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}
.btn-primary{ background: var(--signal); color: var(--ink); }
.btn-ghost{
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
}

.pill{
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  background: var(--signal-soft);
  color: var(--ink);
  padding: 5px 10px;
  border-radius: 4px;
  white-space: nowrap;
}

.app-body{ background: var(--surface); }
/* avatar base styles → avatar.css */
/* topbar styles → topbar.css */

.app-shell{
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px;
  align-items: start;
}

.feed-main{ display: flex; flex-direction: column; gap: 12px; max-width: 600px; margin-left: 136px; }

.feed{ display: flex; flex-direction: column; gap: 14px; }
/* --- Profile --- */
.profile-header{
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
}
.profile-avatar-wrap{ margin-bottom: 16px; }
.profile-avatar{ width: 120px; height: 120px; font-size: 38px; }
.profile-username{ font-size: 22px; margin-bottom: 6px; }
.profile-bio{ color: var(--ink-dim); font-size: 14.5px; margin: 0 0 20px; max-width: 500px; margin-left: auto; margin-right: auto; }
.profile-stats{ display: flex; justify-content: center; gap: 28px; margin-bottom: 20px; }
.profile-stats span{ font-size: 14px; color: var(--ink-dim); }
.profile-stats strong{ color: var(--ink); font-weight: 700; }
.profile-actions{ display: flex; justify-content: center; gap: 10px; }
.profile-follow{ padding: 8px 24px; font-size: 14px; }

/* --- Config --- */
.config-card{
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
}
.config-card h2{ font-size: 20px; margin-bottom: 24px; }
.config-form{ display: flex; flex-direction: column; gap: 20px; }
.config-form label{ display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink); }
.config-form textarea,
.config-form input[type="text"]{
  padding: 10px 14px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 14px; font-family: 'Inter', sans-serif;
  color: var(--ink); background: var(--surface); resize: vertical;
}
.config-actions{ display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }

/* --- Filter bar, empty, pagination --- */
.filter-bar{ display: flex; align-items: center; gap: 8px; padding: 8px 0; }
.empty-feed{
  text-align: center; padding: 48px 24px;
  color: var(--ink-dim); font-size: 15px;
}
.pagination{ display: flex; justify-content: center; gap: 12px; padding: 24px 0; }


@media (max-width: 980px){
  .app-shell{ grid-template-columns: 1fr; padding: 16px; gap: 16px; }
  .feed-main{ margin-left: 0; }
  .sidebar-desktop{ display: none; }
  .post{ padding: 16px; }
  .post-body{ font-size: 15px; }
  .post-actions{ gap: 16px; }
  .profile-header{ padding: 24px 20px; }
  .config-card{ padding: 24px 20px; }
}

@media (max-width: 640px){
  .app-shell{ padding: 12px; gap: 12px; }
  .post{ padding: 14px; border-radius: 8px; }
  .post-head{ gap: 10px; }
  .post-body{ font-size: 14.5px; }
  .post-actions{ gap: 12px; }
  .action{ font-size: 12.5px; }
  .report-btn{ padding: 8px; }
  .report-btn svg{ width: 18px; height: 18px; }
  .profile-header{ padding: 20px 16px; }
  .profile-avatar{ width: 56px; height: 56px; font-size: 20px; }
  .profile-username{ font-size: 18px; }
  .profile-stats{ gap: 16px; }
  .profile-stats span{ font-size: 13px; }
  .config-card{ padding: 20px 16px; }
  .empty-feed{ padding: 32px 16px; }
}

/* ===== Feed tabs ===== */
.feed-tabs{ display: flex; gap: 4px; padding: 4px 0; background: var(--paper); border-radius: 10px; border: 1px solid var(--border); }
.feed-tab{
  flex: 1; padding: 10px; text-align: center;
  font-size: 13.5px; font-weight: 600; color: var(--ink-dim);
  background: none; border: none; cursor: pointer;
  border-radius: 8px; font-family: 'Inter', sans-serif;
  transition: all 0.15s;
}
.feed-tab:hover{ color: var(--ink); background: var(--surface); }
.feed-tab.active{ color: var(--ink); background: var(--signal-soft); }

/* ===== Toast container ===== */
.toast-container{
  position: fixed; bottom: 24px; left: 24px; z-index: 10000;
  display: flex; flex-direction: column;
  gap: 8px; align-items: flex-start; pointer-events: none;
}
.toast{
  background: #071120; color: #fff;
  padding: 12px 24px; border-radius: 10px;
  font-size: 13.5px; font-weight: 500;
  box-shadow: 0 4px 12px rgba(7,17,32,0.15);
  opacity: 0; transform: translateY(10px);
  transition: all 0.3s ease; pointer-events: auto;
  max-width: 360px; text-align: center;
}
.toast-error{ background: var(--alert); }
.toast-visible{ opacity: 1; transform: translateY(0); }

.community-copyright{
  text-align: center;
  padding: 32px 16px 24px;
  font-size: 12px;
  color: var(--ink-dim);
  border-top: 1px solid var(--border);
  margin-top: 40px;
}
