/* ============================================================================
   SocialX - style.css
   Global theme styles for SocialX front-end
   ============================================================================ */

/* === ROOT THEME COLORS === */
:root {
  --surface: #1e1e1e;
  --surface-2: #2a2a2a;
  --line: #444;
  --text: #fff;
  --text-dim: #bbb;
  --primary: #00c2c2;
  --danger: #e74c3c;
  --success: #4caf50;
  --radius: 8px;
}

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

html, body {
  height: 100%;
}

body {
  font-family: "Montserrat", Arial, sans-serif;
  background: var(--surface);
  color: var(--text);
  line-height: 1.5;
}

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* === TOPBAR === */
.sx-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}

.sx-brand {
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--primary);
}

/* === BUTTONS === */
.sx-btn,
.sx-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  padding: 8px 14px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border 0.2s;
}
.sx-btn:hover {
  background: var(--primary);
  color: #fff;
}
.sx-btn.sx-primary {
  background: var(--primary);
  color: #fff;
}
.sx-btn.sx-primary:hover {
  background: #00a0a0;
}

/* === ICON BUTTONS (like bell) === */
.sx-icon-btn {
  font-size: 1.2rem;
  padding: 6px;
  border-radius: 50%;
  background: transparent;
}
.sx-icon-btn:hover {
  background: rgba(255,255,255,0.1);
}

/* === BADGE (unread notifications) === */
.sx-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: red;
  color: #fff;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 999px;
  font-weight: bold;
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* === USER MENU === */
.sx-user-menu {
  position: relative;
}
.sx-user-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  font-size: 0.95rem;
}
.sx-user-btn img.sx-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}
.sx-caret {
  font-size: 0.8rem;
}
.sx-menu {
  display: none;
  position: absolute;
  top: 120%;
  right: 0;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  min-width: 180px;
  z-index: 200;
}
.sx-menu a {
  display: block;
  padding: 10px 14px;
  color: var(--text);
}
.sx-menu a:hover {
  background: var(--primary);
}

/* === MAIN WRAPPER === */
.sx-main {
  max-width: 800px;
  margin: 20px auto;
  padding: 0 12px;
}

/* === CARDS === */
.sx-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
}
.sx-card-pad {
  padding: 14px 16px;
}

/* === FEED COMPOSER === */
.composer-wrap {
  display: flex;
  flex-direction: column;
}
#postForm textarea {
  width: 100%;
  min-height: 70px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
  color: var(--text);
  resize: vertical;
}
.composer-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.editor-footer {
  display: flex;
  gap: 12px;
  margin-top: 6px;
}
.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: var(--text);
}

/* === POSTS === */
.sx-post-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.sx-avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}
.sx-meta {
  font-size: 0.8rem;
  color: var(--text-dim);
}
.sx-post-body p {
  margin-bottom: 10px;
}
.sx-post-actions {
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* === COMMENTS === */
.sx-comments {
  margin-top: 12px;
}
.sx-comment {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}
.sx-comment .comment-text {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px 10px;
  font-size: 0.9rem;
}
.comment-form-wrap {
  margin-top: 8px;
}
.comment-row {
  display: flex;
  gap: 8px;
}
.comment-row textarea {
  flex: 1;
  min-height: 40px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px;
  color: var(--text);
}
.comment-footer {
  display: flex;
  gap: 12px;
  margin-top: 6px;
}

/* === FOOTER === */
.site-footer {
  margin-top: 40px;
  padding: 20px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-dim);
  border-top: 1px solid var(--line);
}

