/* ===================================================
   Lie Social — styled to match truthsocial.com
   Font: Inter (same as TS), primary purple #5448ee
   Light theme to match TS default appearance
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;900&display=swap');

:root {
  --bg:           #f9f9fb;
  --surface:      #ffffff;
  --border:       #e5e4e7;
  --border-light: #ededef;
  --text:         #08051b;
  --text-muted:   #868393;
  --text-sub:     #656175;
  --accent:       #5448ee;   /* TS purple */
  --accent-dark:  #3d31d4;
  --accent-light: rgba(84,72,238,0.08);
  --lie-red:      #e63946;
  --lie-red-bg:   rgba(230,57,70,0.09);
  --sidebar-w:    245px;
  --right-w:      330px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.5;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-w);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  padding: 12px 8px 20px;
  border-right: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 20;
  overflow-y: auto;
}

.logo {
  display: block;
  padding: 10px 14px 18px;
  text-decoration: none;
}
.logo-img {
  width: 90px;
  height: auto;
  display: block;
}

nav { display: flex; flex-direction: column; gap: 2px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-sub);
  font-size: 0.95rem;
  font-weight: 500;
  transition: background 0.12s, color 0.12s;
}
.nav-item:hover { background: var(--accent-light); color: var(--accent); }
.nav-item.active { color: var(--accent); font-weight: 700; background: var(--accent-light); }
.nav-icon { font-size: 1.15rem; width: 22px; text-align: center; flex-shrink: 0; }

.sidebar-cta {
  margin: 12px 8px 0;
  padding: 11px 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
  width: calc(100% - 16px);
}
.sidebar-cta:hover { background: var(--accent-dark); }

.sidebar-footer {
  margin-top: auto;
  padding: 12px 14px 4px;
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ===== MAIN COLUMN ===== */
.main {
  margin-left: var(--sidebar-w);
  margin-right: var(--right-w);
  max-width: 620px;
  flex: 1;
  border-right: 1px solid var(--border);
  border-left: 1px solid var(--border);
  background: var(--surface);
  min-height: 100vh;
}

.feed-header {
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-light);
  z-index: 10;
}
.feed-header h1 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.2px;
}

/* ===== PROFILE CARD ===== */
.profile-card {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.profile-banner {
  height: 200px;
  background: linear-gradient(135deg, #201c3c 0%, #3d31d4 60%, #5448ee 100%);
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}
.profile-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.18));
}

.profile-body {
  padding: 0 20px 20px;
  position: relative;
}

.profile-top-row {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  padding-top: 12px;
  min-height: 48px;
  margin-bottom: 8px;
}

.avatar-wrap {
  position: absolute;
  left: 20px;
  top: -46px;
}

.avatar {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  border: 4px solid #fff;
  background: #e5e4e7;
  object-fit: cover;
  display: block;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.liar-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--lie-red);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 6px;
  letter-spacing: 0.4px;
  margin-top: 6px;
  margin-bottom: 4px;
}

.follow-btn {
  padding: 8px 18px;
  border: 1.5px solid var(--border);
  background: #fff;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 700;
  font-family: inherit;
  color: var(--text);
  cursor: pointer;
  transition: background 0.12s;
}
.follow-btn:hover { background: var(--bg); }

.profile-name-row {
  margin-top: 4px;
}
.profile-name-row h2 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.2px;
}
.handle {
  font-size: 0.875rem;
  color: var(--text-muted);
  display: block;
  margin: 2px 0 10px;
}
.bio {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text);
  margin-bottom: 14px;
}
.bio a { color: var(--accent); text-decoration: none; }

.profile-stats {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.profile-stats a {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.12s;
}
.profile-stats a:hover { color: var(--accent); }
.profile-stats strong {
  color: var(--text);
  font-weight: 700;
}

/* ===== FEED TABS ===== */
.feed-label {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 53px;
  z-index: 9;
}
.tab {
  flex: 1;
  text-align: center;
  padding: 14px 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.12s, border-color 0.12s, background 0.12s;
  white-space: nowrap;
}
.tab:hover { color: var(--accent); background: var(--accent-light); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ===== POSTS ===== */
.feed { display: flex; flex-direction: column; }

.post {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  gap: 12px;
  background: var(--surface);
  transition: background 0.1s;
  cursor: pointer;
}
.post:hover { background: #faf9fc; }

.post-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--border);
  object-fit: cover;
  border: 1.5px solid var(--border-light);
}

.post-body { flex: 1; min-width: 0; }

.repost-indicator {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
}

.post-header {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 5px;
  flex-wrap: wrap;
}
.post-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
  letter-spacing: -0.1px;
}
.post-handle {
  color: var(--text-muted);
  font-size: 0.85rem;
  flex-shrink: 0;
}
.post-time {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-left: auto;
  flex-shrink: 0;
}

/* The key parody element */
.post-lie-label {
  display: inline-flex;
  align-items: center;
  background: var(--lie-red);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.post-content {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text);
  word-break: break-word;
}
.post-content p { margin-bottom: 6px; }
.post-content p:last-child { margin-bottom: 0; }
.post-content a { color: var(--accent); text-decoration: none; }
.post-content a:hover { text-decoration: underline; }

.post-media {
  margin-top: 10px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.post-media img,
.post-media video {
  width: 100%;
  display: block;
  max-height: 380px;
  object-fit: cover;
  background: var(--bg);
}

.post-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
}
.action-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 8px;
  transition: color 0.12s, background 0.12s;
  font-weight: 500;
}
.action-btn:hover { color: var(--accent); background: var(--accent-light); }

.truth-link {
  text-decoration: none;
  margin-left: auto;
  color: var(--text-muted) !important;
  font-size: 0.78rem !important;
  font-weight: 600;
  font-style: normal;
  padding: 4px 10px !important;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #fff;
  white-space: nowrap;
  transition: border-color 0.12s, color 0.12s, background 0.12s;
}
.truth-link:hover {
  color: var(--accent) !important;
  border-color: var(--accent);
  background: var(--accent-light);
}

/* ===== RIGHT PANEL ===== */
.right-panel {
  width: var(--right-w);
  position: fixed;
  right: 0; top: 0; bottom: 0;
  padding: 20px 16px;
  overflow-y: auto;
  background: var(--bg);
  border-left: 1px solid var(--border);
}

.panel-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
}
.panel-box h3 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.1px;
}
.panel-box p {
  font-size: 0.845rem;
  line-height: 1.55;
  color: var(--text-sub);
}

.lie-count {
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--lie-red);
  text-align: center;
  padding: 6px 0;
  letter-spacing: -1px;
}

/* ===== MISC ===== */
.loading {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.error-msg {
  margin: 16px 20px;
  padding: 14px 16px;
  background: var(--lie-red-bg);
  border: 1px solid rgba(230,57,70,0.2);
  border-radius: 10px;
  color: var(--lie-red);
  font-size: 0.875rem;
}

.load-more {
  display: block;
  width: calc(100% - 40px);
  margin: 16px 20px 24px;
  padding: 11px;
  background: #fff;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 700;
  font-family: inherit;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.load-more:hover { background: var(--accent); color: #fff; }
.load-more:disabled { opacity: 0.5; cursor: default; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
  .right-panel { display: none; }
  .main { margin-right: 0; border-right: none; }
}
@media (max-width: 700px) {
  .sidebar { width: 68px; padding: 12px 8px; }
  .logo-img, .nav-item span.nav-label, .sidebar-footer, .sidebar-cta { display: none; }
  .main { margin-left: 68px; }
  .nav-item { justify-content: center; padding: 12px; }
  .logo { padding: 8px; }
}
