/* =====================================================
       CSS RESET & ROOT VARIABLES
    ===================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #4e73df;
  --primary-dark: #3a5bbf;
  --primary-light: #e8edfc;
  --accent: #f6c23e;
  --accent-dark: #e0a800;
  --bg: #f8f9fc;
  --card-bg: #ffffff;
  --text: #343a40;
  --text-muted: #6c757d;
  --border: #e3e6f0;
  --success: #1cc88a;
  --danger: #e74a3b;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.13);
  --radius: 14px;
  --radius-sm: 8px;
  --transition: 0.22s ease;
  --navbar-h: 66px;
  --font: "Poppins", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
}
button {
  font-family: var(--font);
  cursor: pointer;
  border: none;
  background: none;
}
input,
textarea {
  font-family: var(--font);
}
img {
  max-width: 100%;
}

/* =====================================================
       SCROLLBAR
    ===================================================== */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: #c4c9d4;
  border-radius: 99px;
}

/* =====================================================
       NAVBAR
    ===================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 999;
  height: var(--navbar-h);
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  transition: box-shadow var(--transition);
}
.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.5px;
}
.nav-logo .logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), #6f8ee8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
}

/* Search */
.nav-search {
  flex: 1;
  max-width: 340px;
  position: relative;
}
.nav-search input {
  width: 100%;
  padding: 9px 16px 9px 40px;
  border: 1.5px solid var(--border);
  border-radius: 99px;
  background: var(--bg);
  font-size: 0.88rem;
  color: var(--text);
  transition:
    border-color var(--transition),
    box-shadow var(--transition),
    background var(--transition);
  outline: none;
}
.nav-search input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(78, 115, 223, 0.13);
}
.nav-search input::placeholder {
  color: var(--text-muted);
}
.nav-search .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.85rem;
  pointer-events: none;
  transition: color var(--transition);
}
.nav-search input:focus + .search-icon,
.nav-search:focus-within .search-icon {
  color: var(--primary);
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  transition:
    color var(--transition),
    background var(--transition);
  position: relative;
  cursor: pointer;
}
.nav-link i {
  font-size: 1.2rem;
}
.nav-link:hover {
  color: var(--primary);
  background: var(--primary-light);
}
.nav-link.active {
  color: var(--primary);
}
.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 3px;
  background: var(--primary);
  border-radius: 99px;
}

/* Notification badge */
.nav-link .badge {
  position: absolute;
  top: 2px;
  right: 8px;
  min-width: 17px;
  height: 17px;
  border-radius: 99px;
  background: var(--danger);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid #fff;
}

/* Avatar in nav */
.nav-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #6f8ee8);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
  cursor: pointer;
  transition:
    box-shadow var(--transition),
    transform var(--transition);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.nav-avatar:hover {
  box-shadow: 0 0 0 3px var(--primary-light);
  transform: scale(1.07);
}

.nav-avatar[data-guest-logo="true"] {
  font-size: 0;
}

.nav-avatar[data-guest-logo="true"]::before {
  content: "X";
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.nav-avatar[data-guest-logo="true"] i {
  display: none;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.hamburger:hover {
  background: var(--primary-light);
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2.5px;
  background: var(--text);
  border-radius: 99px;
  transition:
    transform var(--transition),
    opacity var(--transition);
}
.hamburger.open span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* Mobile nav menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--navbar-h);
  left: 0;
  right: 0;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  flex-direction: column;
  gap: 4px;
  z-index: 998;
  box-shadow: var(--shadow-md);
  animation: slideDown 0.2s ease;
}
.mobile-menu.open {
  display: flex;
}
.mobile-menu .nav-link {
  flex-direction: row;
  justify-content: flex-start;
  gap: 12px;
  font-size: 0.9rem;
  padding: 10px 16px;
}
.mobile-menu .nav-link i {
  font-size: 1rem;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =====================================================
       MAIN LAYOUT
    ===================================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 20px;
  display: grid;
  grid-template-columns: 240px 1fr 260px;
  gap: 24px;
  align-items: start;
}

/* =====================================================
       CARD BASE
    ===================================================== */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card:hover {
  box-shadow: var(--shadow-md);
}

/* =====================================================
       LEFT SIDEBAR
    ===================================================== */
.sidebar-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Profile card */
.profile-card {
  position: relative;
}
.profile-card .cover {
  height: 68px;
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    #6f8ee8 60%,
    var(--accent) 100%
  );
}
.profile-card .profile-body {
  padding: 0 16px 18px;
}
.profile-card .avatar-wrap {
  margin-top: -28px;
  margin-bottom: 10px;
}
.profile-card .avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4e73df, #6f8ee8);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  border: 3px solid #fff;
  box-shadow: var(--shadow-sm);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.profile-card .name {
  font-size: 0.97rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.profile-card .role {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.profile-stats {
  display: flex;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 0 -16px 14px;
  padding: 10px 16px;
  gap: 0;
}
.profile-stats .stat {
  flex: 1;
  text-align: center;
}
.profile-stats .stat .value {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--primary);
  display: block;
}
.profile-stats .stat .label {
  font-size: 0.68rem;
  color: var(--text-muted);
  display: block;
  margin-top: 1px;
}

/* Quick links */
.quick-links {
  padding: 6px 0;
}
.quick-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  font-size: 0.83rem;
  color: var(--text-muted);
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition:
    background var(--transition),
    color var(--transition);
  cursor: pointer;
}
.quick-link:hover {
  background: var(--primary-light);
  color: var(--primary);
}
.quick-link i {
  width: 16px;
  text-align: center;
}
.quick-links-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 10px 18px 4px;
}

/* =====================================================
       CENTER FEED
    ===================================================== */
.feed {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sort-toolbar {
  padding: 12px 16px;
}

.post-sort-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 8px 36px 8px 12px;
  color: var(--text);
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 20 20'%3E%3Cpath fill='%234e73df' d='M5.8 7.5 10 11.7l4.2-4.2 1.4 1.4-5.6 5.6-5.6-5.6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 14px;
  font-size: 0.8rem;
  outline: none;
  box-shadow: 0 1px 8px rgba(78, 115, 223, 0.08);
  transition:
    border-color var(--transition),
    box-shadow var(--transition),
    background var(--transition);
}

.post-sort-select::-ms-expand {
  display: none;
}

.post-sort-select:hover {
  border-color: rgba(78, 115, 223, 0.45);
  box-shadow: 0 4px 14px rgba(78, 115, 223, 0.12);
}

.post-sort-select:focus,
.post-sort-select:focus-visible {
  outline: none !important;
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(78, 115, 223, 0.15);
}

.post-sort-select option {
  background: #fff;
  color: var(--text);
}

/* Create Post */
.create-post {
  padding: 18px 20px;
}
.create-post .section-note {
  margin-bottom: 10px;
}
.create-post-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.create-post-top .avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4e73df, #6f8ee8);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
#post-input,
.create-post-trigger {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: 99px;
  padding: 10px 18px;
  font-size: 0.88rem;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
  resize: none;
}
#post-input:focus,
.create-post-trigger:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(78, 115, 223, 0.12);
}
#post-input::placeholder,
.create-post-trigger::placeholder {
  color: var(--text-muted);
}

.create-post-trigger[readonly] {
  cursor: pointer;
}

.create-post-disabled {
  opacity: 0.78;
}

.create-post-disabled .create-post-trigger,
.create-post-disabled [data-publish-post] {
  cursor: not-allowed;
}

/* Expanded editor */
.post-editor {
  display: none;
  flex-direction: column;
  gap: 10px;
  animation: fadeIn 0.2s ease;
}
.post-editor.open {
  display: flex;
}
.post-editor textarea {
  width: 100%;
  min-height: 90px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 0.88rem;
  color: var(--text);
  background: var(--bg);
  resize: vertical;
  outline: none;
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
}
.post-editor textarea:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(78, 115, 223, 0.12);
}
#post-title-input,
.post-field,
.post-editor input[data-create-title] {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
}
#post-title-input:focus,
.post-field:focus,
.post-editor input[data-create-title]:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(78, 115, 223, 0.12);
}
#post-title-input::placeholder,
.post-field::placeholder,
.post-editor input[data-create-title]::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.create-post-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.upload-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg);
  border: 1.5px solid var(--border);
  transition: all var(--transition);
}
.upload-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-light);
}
.upload-btn.image:hover {
  color: #1cc88a;
  border-color: #1cc88a;
  background: #e6faf3;
}
.upload-btn.video:hover {
  color: var(--danger);
  border-color: var(--danger);
  background: #fdecea;
}
.upload-btn.file:hover {
  color: var(--accent-dark);
  border-color: var(--accent-dark);
  background: #fff8e1;
}

.create-upload-preview {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.create-upload-preview img {
  width: 110px;
  height: 90px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.create-upload-preview-meta {
  display: grid;
  align-content: space-between;
  gap: 8px;
}

.post-submit-btn {
  margin-left: auto;
  padding: 8px 24px;
  background: linear-gradient(135deg, var(--primary), #6f8ee8);
  color: #fff;
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition);
  box-shadow: 0 3px 10px rgba(78, 115, 223, 0.3);
}
.post-submit-btn:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  box-shadow: 0 5px 18px rgba(78, 115, 223, 0.45);
  transform: translateY(-1px);
}
.post-submit-btn:active {
  transform: translateY(0);
}

/* --------- Post Card --------- */
.post-card {
  padding: 20px;
  animation: fadeIn 0.4s ease;
}
.post-card .post-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.post-card .avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  flex-shrink: 0;
  cursor: pointer;
  transition:
    box-shadow var(--transition),
    transform var(--transition);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.post-card .avatar:hover {
  box-shadow: 0 0 0 3px rgba(78, 115, 223, 0.2);
  transform: scale(1.07);
}

.post-card .user-info {
  flex: 1;
}
.post-card .user-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  display: inline-block;
}
.post-card .user-name:hover {
  color: var(--primary);
}
.post-card .user-university {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.35;
}
.post-card .user-role {
  font-size: 0.76rem;
  color: var(--text-muted);
}
.post-card .post-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-left: auto;
  white-space: nowrap;
}
.post-more-wrap {
  position: relative;
  flex-shrink: 0;
}
.post-more-btn {
  padding: 6px;
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 0.85rem;
  transition:
    background var(--transition),
    color var(--transition);
}
.post-more-btn:hover {
  background: var(--bg);
  color: var(--primary);
}
.post-more-menu {
  display: none;
  position: absolute;
  top: 34px;
  right: 0;
  min-width: 152px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  padding: 6px;
  z-index: 15;
}
.post-more-menu.open {
  display: block;
  animation: fadeIn 0.18s ease;
}
.post-menu-item {
  width: 100%;
  text-align: left;
  font-size: 0.78rem;
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  transition: background var(--transition), color var(--transition);
}
.post-menu-item:hover {
  background: var(--bg);
}
.post-menu-item.danger {
  color: var(--danger);
}
.post-menu-item.danger:hover {
  background: #fdecea;
}

.post-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.post-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 12px;
}
.post-desc-toggle {
  border: none;
  background: none;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  margin-left: 6px;
  padding: 0;
  cursor: pointer;
}
.post-desc-toggle:hover {
  text-decoration: underline;
}
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--primary-light);
  color: var(--primary);
  cursor: pointer;
  transition:
    background var(--transition),
    color var(--transition);
}
.tag:hover {
  background: var(--primary);
  color: #fff;
}

/* Post media */
.post-media {
  margin-bottom: 14px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-light), #f0f4ff);
  border: 1px solid var(--border);
}
.post-media-inner {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  flex-direction: column;
  gap: 8px;
}
.post-media-inner p {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.post-media-inner.image-ratio {
  height: auto;
  aspect-ratio: 1 / 1;
  display: block;
  padding: 0;
}

.post-media-inner.image-ratio img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Post stats bar */
.post-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.post-stats .likes-count {
  display: flex;
  align-items: center;
  gap: 4px;
}
.post-stats .likes-count .like-icon-small {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  color: #fff;
}
.post-stats .comments-link {
  cursor: pointer;
}
.post-stats .comments-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* Action buttons */
.post-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px 0;
}
.action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  transition:
    background var(--transition),
    color var(--transition),
    transform var(--transition);
  flex: 1;
  justify-content: center;
}
.action-btn:hover {
  background: var(--bg);
}
.action-btn.like-btn:hover {
  color: var(--danger);
}
.action-btn.like-btn.liked {
  color: var(--danger);
}
.action-btn.like-btn.liked i {
  animation: heartPop 0.3s ease;
}
.action-btn.comment-btn:hover {
  color: var(--primary);
}
.action-btn.share-btn:hover {
  color: var(--success);
}
.action-btn.save-btn:hover {
  color: var(--accent-dark);
}
.action-btn.save-btn.saved {
  color: var(--accent-dark);
}

@keyframes heartPop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.4);
  }
  100% {
    transform: scale(1);
  }
}

/* Comments section */
.comments-section {
  display: none;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  animation: fadeIn 0.2s ease;
}
.comments-section.open {
  display: block;
}
.comment-input-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}
.comment-input-row .avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4e73df, #6f8ee8);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
}
.comment-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 99px;
  overflow: hidden;
  transition: border-color var(--transition);
}
.comment-input-wrap:focus-within {
  border-color: var(--primary);
}
.comment-input-wrap input {
  flex: 1;
  padding: 8px 14px;
  background: none;
  border: none;
  outline: none;
  font-size: 0.82rem;
  color: var(--text);
}
.comment-input-wrap input::placeholder {
  color: var(--text-muted);
}
.comment-send-btn {
  padding: 8px 14px;
  color: var(--primary);
  font-size: 0.9rem;
  transition: color var(--transition);
}
.comment-send-btn:hover {
  color: var(--primary-dark);
}

/* Individual comment */
.comment-item {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  animation: fadeIn 0.25s ease;
}
.comment-item .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  flex-shrink: 0;
}
.comment-bubble {
  background: var(--bg);
  border-radius: 0 12px 12px 12px;
  padding: 9px 13px;
  flex: 1;
}
.comment-bubble .c-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.comment-bubble .c-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.comment-bubble .c-time {
  font-size: 0.68rem;
  color: #adb5bd;
  margin-top: 4px;
}

/* =====================================================
       RIGHT SIDEBAR
    ===================================================== */
.sidebar-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-section {
  padding: 18px;
}
.sidebar-title {
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-title i {
  color: var(--primary);
  font-size: 0.9rem;
}

/* Trending */
.trend-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  cursor: pointer;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.trend-item:hover {
  background: var(--bg);
}
.trend-rank {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  width: 20px;
  flex-shrink: 0;
}
.trend-info .trend-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}
.trend-info .trend-count {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.trend-badge {
  margin-left: auto;
  font-size: 0.62rem;
  padding: 2px 7px;
  border-radius: 99px;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  white-space: nowrap;
}
.trend-badge.hot {
  background: #fff0ee;
  color: var(--danger);
}
.trend-badge.new {
  background: #e6faf3;
  color: var(--success);
}

/* Suggested users */
.suggested-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.suggested-user .avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}
.suggested-user .user-info {
  flex: 1;
  min-width: 0;
}
.suggested-user .user-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.suggested-user .user-role {
  font-size: 0.71rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.follow-btn {
  padding: 5px 14px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1.5px solid var(--primary);
  color: var(--primary);
  background: transparent;
  transition: all var(--transition);
  white-space: nowrap;
}
.follow-btn:hover,
.follow-btn.following {
  background: var(--primary);
  color: #fff;
}

/* Tip of the day */
.tip-card {
  background: linear-gradient(135deg, var(--primary) 0%, #6f8ee8 100%);
  border-radius: var(--radius-sm);
  padding: 16px;
  color: #fff;
}
.tip-card .tip-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.8;
  margin-bottom: 6px;
}
.tip-card .tip-text {
  font-size: 0.82rem;
  line-height: 1.6;
  opacity: 0.95;
}
.tip-card .tip-emoji {
  font-size: 1.6rem;
  margin-bottom: 8px;
  display: block;
}

/* =====================================================
       FOOTER
    ===================================================== */
.footer {
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  padding: 24px 20px;
  text-align: center;
  margin-top: 32px;
}
.footer-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.footer-credit-link {
  color: var(--primary);
  font-weight: 600;
  transition: color var(--transition);
}
.footer-credit-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}
.social-links {
  display: flex;
  justify-content: center;
  gap: 12px;
}
.social-link {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: all var(--transition);
}
.social-link:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-2px);
}

/* =====================================================
       SHIMMER LOADER
    ===================================================== */
.shimmer-card {
  padding: 20px;
  animation: fadeIn 0.5s ease;
}
.shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
  border-radius: 6px;
}
.shimmer-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
}
.shimmer-line {
  height: 12px;
  margin-bottom: 8px;
}
.shimmer-line.short {
  width: 40%;
}
.shimmer-line.medium {
  width: 65%;
}
.shimmer-line.long {
  width: 90%;
}
.shimmer-box {
  height: 180px;
  margin-bottom: 12px;
  border-radius: var(--radius-sm);
}
.shimmer-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* =====================================================
       UTILITIES & ANIMATIONS
    ===================================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes popIn {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  80% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.fade-in-card {
  animation: fadeIn 0.45s ease;
}

.new-post-highlight {
  border-left: 4px solid var(--primary);
  animation: popIn 0.4s ease;
}

/* empty state */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.empty-state i {
  font-size: 2.5rem;
  margin-bottom: 10px;
  opacity: 0.35;
}
.empty-state p {
  font-size: 0.85rem;
}

/* =====================================================
       RESPONSIVE – TABLET (≤ 960px)
    ===================================================== */
@media (max-width: 960px) {
  .container {
    grid-template-columns: 220px 1fr;
  }
  .sidebar-right {
    display: none;
  }
}

/* =====================================================
       RESPONSIVE – MOBILE (≤ 640px)
    ===================================================== */
@media (max-width: 640px) {
  :root {
    --navbar-h: 58px;
  }

  .navbar {
    padding: 0 16px;
  }
  .nav-logo span {
    display: none;
  }
  .nav-search {
    display: none;
  }
  .nav-links {
    display: none;
  }
  .nav-avatar {
    display: none;
  }
  .hamburger {
    display: flex;
  }

  .container {
    grid-template-columns: 1fr;
    padding: 16px 12px;
    gap: 16px;
  }
  .sidebar-left {
    display: none;
  }
  .sidebar-right {
    display: none;
  }

  .post-actions {
    gap: 0;
  }
  .action-btn {
    padding: 7px 8px;
    font-size: 0.72rem;
  }
  .action-btn span {
    display: none;
  }
}

/* =====================================================
       NOTIFICATION TOAST
    ===================================================== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--text);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.83rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.auth-dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(18, 23, 34, 0.52);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.auth-dialog-card {
  width: min(460px, 100%);
  max-width: 100%;
  max-height: min(88vh, 640px);
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 22px;
}

.auth-dialog-card h2 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.auth-dialog-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 14px;
}

.auth-dialog-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.auth-login-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.auth-login-actions .btn-primary,
.auth-login-actions .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
}

.confirm-delete-btn {
  background: #fdecea;
  color: var(--danger);
  border-color: rgba(231, 74, 59, 0.25);
}

.confirm-delete-btn:hover {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

/* Divider */
.divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}
