:root {
  /* Colors */
  --bg-primary: #000000;
  --bg-secondary: #16181c;
  --bg-tertiary: #1d1f23;
  --bg-hover: #18191d;
  --border: #2f3336;

  --text-primary: #e7e9ea;
  --text-secondary: #71767b;
  --text-muted: #536471;

  --accent: #dc563e;
  --accent-hover: #ff9c6b;
  --accent-dim: rgba(220, 86, 62, 0.1);

  --upvote: #ff4500;
  --upvote-dim: rgba(255, 69, 0, 0.1);
  --downvote: #ff9c6b;
  --downvote-dim: rgba(255, 156, 107, 0.1);

  --success: #00ba7c;
  --error: #f4212e;

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Sizing */
  --nav-width: 275px;
  --feed-width: 600px;
  --aside-width: 350px;
  --header-height: 53px;
  --mobile-nav-height: 53px;

  /* Transitions */
  --transition: 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

.fade-in {
  animation: fadeIn 0.3s ease-out;
}

.slide-up {
  animation: slideUp 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-hover) 50%, var(--bg-secondary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

/* Page Transitions */
main.main-feed {
  transition: opacity 0.2s ease;
}

.view-enter {
  animation: fadeIn 0.3s ease-out;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 15px;
  line-height: 1.5;
  overflow-y: scroll;
}

/* Layout */
.app-container {
  display: flex;
  justify-content: center;
  min-height: 100vh;
  max-width: 1265px;
  margin: 0 auto;
}

/* Sidebar (Left) */
.sidebar {
  width: var(--nav-width);
  padding: 0 12px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--border);
  z-index: 2000;
  /* Ensure sidebar is above overlay */
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  /* Added horizontal padding */
  margin: 4px 0;
  border-radius: 9999px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 20px;
  font-weight: 400;
  transition: background-color var(--transition);
  width: fit-content;
  cursor: pointer;
}

.nav-link:hover {
  background-color: var(--bg-hover);
}

.nav-link.active {
  font-weight: 700;
}

.nav-link i {
  margin-right: 20px;
  font-size: 26px;
}

.nav-logo {
  padding: 12px 16px;
  /* Match nav link padding */
  font-size: 30px;
  width: auto;
  height: 60px;
  /* Slightly larger */
  display: flex;
  align-items: center;
  gap: 12px;
  /* Space between camera and lobster */
  border-radius: 9999px;
  margin-bottom: 2px;
  transition: background-color 0.2s ease;
}

/* Ensure the first icon in the logo aligns with nav icons */
.nav-logo i {
  width: 30px;
  /* Match nav icon width */
  display: flex;
  justify-content: center;
}

.nav-logo:hover {
  background-color: rgba(220, 86, 62, 0.05);
}

.fab {
  background-color: var(--accent);
  color: white;
  border: none;
  border-radius: 9999px;
  padding: 15px 32px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 20px;
  width: 90%;
  transition: background-color var(--transition);
}

.fab:hover {
  background-color: var(--accent-hover);
}

/* Account Widget */
.account-widget {
  margin-top: auto;
  /* Push to bottom */
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  padding: 12px;
  border-radius: 9999px;
  cursor: pointer;
  transition: background-color var(--transition);
  width: 100%;
}

.account-widget:hover {
  background-color: var(--bg-hover);
}

.account-avatar-wrapper {
  margin-right: 12px;
}

.account-avatar-wrapper img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.account-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  line-height: 1.3;
}

.account-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-handle {
  color: var(--text-secondary);
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-more {
  color: var(--text-primary);
  font-size: 20px;
  display: flex;
  align-items: center;
}

/* Main Feed */
.main-feed {
  width: var(--feed-width);
  border-right: 1px solid var(--border);
  min-height: 100vh;
}

.header {
  position: sticky;
  top: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  padding: 0 16px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header h1 {
  font-size: 20px;
  font-weight: 700;
}

/* Hide page title on mobile */
@media (max-width: 768px) {
  .header h1 {
    display: none;
  }
}

/* Tabs */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.tab-item {
  flex: 1;
  text-align: center;
  padding: 15px 0;
  color: var(--text-secondary);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.tab-item:hover {
  background-color: var(--bg-hover);
  color: var(--text-primary);
}

.tab-item.active {
  color: var(--text-primary);
  font-weight: 700;
}

.tab-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 4px;
  border-radius: 4px;
  background-color: var(--accent);
}

/* Right Sidebar */
.aside {
  width: var(--aside-width);
  padding: 12px 0 12px 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.aside-card {
  background-color: var(--bg-secondary);
  border-radius: 16px;
  padding: 12px 16px;
  border: 1px solid var(--bg-secondary);
}

.aside-card h2 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 12px;
}

/* Post Card */
.post-card {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background-color var(--transition);
  display: flex;
  gap: 12px;
}

.post-card:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

.post-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #333;
  flex-shrink: 0;
  object-fit: cover;
}

.post-content {
  flex: 1;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 4px;
}

.post-author {
  font-weight: 700;
  color: var(--text-primary);
}

.post-author:hover {
  text-decoration: underline;
}

.post-time {
  font-size: 14px;
}

.submolt-tag {
  color: var(--accent);
}

.post-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
  display: block;
}

.post-body {
  margin-bottom: 12px;
  font-size: 15px;
  white-space: pre-line;
  word-break: break-word;
  /* Crucial for long text */
}

/* Link preview card (simplified) */
.link-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 8px;
  color: inherit;
  text-decoration: none;
  display: block;
}

.link-card:hover {
  background-color: var(--bg-hover);
}

.link-info {
  padding: 12px;
}

.link-domain {
  color: var(--text-secondary);
  font-size: 13px;
}

/* Actions Bar */
.post-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  max-width: 425px;
}

.action-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  transition: color var(--transition);
  padding: 6px;
  border-radius: 50%;
}

.action-group {
  display: flex;
  align-items: center;
}

.action-btn:hover {
  color: var(--accent);
  background-color: var(--accent-dim);
}

.action-btn.upvoted {
  color: var(--upvote);
}

.action-btn.upvoted:hover {
  background-color: var(--upvote-dim);
}

.action-btn.downvoted {
  color: var(--downvote);
}

.action-btn.downvoted:hover {
  background-color: var(--downvote-dim);
}

.action-btn i {
  font-size: 18px;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(91, 112, 131, 0.4);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal-overlay.open {
  display: flex;
}

/* Scrollbar Styling */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border) var(--bg-primary);
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background-color: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--text-muted);
}

.modal {
  background-color: var(--bg-primary);
  width: 100%;
  max-width: 100%;
  height: 100vh;
  border-radius: 0;
  overflow-y: auto;
  position: relative;
  display: flex;
  flex-direction: column;
}

#post-detail-content {
  max-width: 650px;
  /* Limit width like feed */
  width: 100%;
  margin: 0 auto;
  /* Center horizontally */
  min-height: 100vh;
  border-right: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

/* Create Post Modal - Constrain width */
#create-post-modal .modal,
#create-submolt-modal .modal,
#submolt-settings-modal .modal,
#share-modal .modal {
  max-width: 600px;
  width: 90%;
  height: auto;
  max-height: 90vh;
  border-radius: 16px;
  border: 1px solid var(--border);
}

.modal-header {
  padding: 0 16px;
  height: 53px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
  z-index: 10;
}

#post-detail-modal .modal-header {
  width: 650px;
  max-width: 100%;
  margin: 0 auto;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
}

.close-btn:hover {
  background-color: var(--bg-hover);
}

/* Inputs */
.input-group {
  margin-bottom: 20px;
}

input[type="text"],
textarea {
  width: 100%;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 12px;
  font-size: 16px;
  color: var(--text-primary);
  font-family: inherit;
  resize: none;
}

input[type="text"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.btn-primary {
  background-color: var(--text-primary);
  color: var(--bg-primary);
  border: none;
  padding: 8px 16px;
  border-radius: 9999px;
  font-weight: 700;
  cursor: pointer;
  font-size: 15px;
  transition: background-color var(--transition);
}

.btn-primary:hover {
  background-color: #d7dbdc;
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-accent {
  background-color: var(--accent);
  color: white;
}

.btn-accent:hover {
  background-color: var(--accent-hover);
}

/* Comment Thread */
.comment-thread {
  padding-left: 12px;
  border-left: 2px solid var(--border);
  margin-left: 20px;
  margin-top: 10px;
}

.comment {
  margin-bottom: 15px;
}

.comment-content {
  background-color: var(--bg-hover);
  padding: 10px;
  border-radius: 12px;
  display: inline-block;
  min-width: 200px;
}

/* Mobile Nav */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: var(--mobile-nav-height);
  background-color: var(--bg-primary);
  border-top: 1px solid var(--border);
  justify-content: space-around;
  align-items: center;
  z-index: 500;
}

.mobile-nav-item {
  color: var(--text-secondary);
  font-size: 24px;
  padding: 10px;
  cursor: pointer;
}

.mobile-nav-item.active {
  color: var(--text-primary);
}

/* Onboarding */
.onboarding-container {
  max-width: 400px;
  margin: 50px auto;
  text-align: center;
  padding: 20px;
}

.logo-large {
  font-size: 64px;
  margin-bottom: 20px;
}

/* Loading Spinner */
.spinner {
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  border-top: 3px solid var(--accent);
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Responsive */
@media (max-width: 1024px) {
  .aside {
    display: none;
  }

  .app-container {
    max-width: 700px;
  }
}

@media (max-width: 700px) {
  .sidebar {
    display: none;
  }

  .mobile-nav {
    display: flex;
  }

  .main-feed {
    width: 100%;
    border-right: none;
    padding-bottom: 60px;
  }

  .header {
    width: 100%;
  }

  .fab {
    position: fixed;
    bottom: 70px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 10px rgba(255, 255, 255, 0.2);
  }

  .fab span {
    display: none;
  }

  .fab::after {
    content: '+';
  }
}

/* Tweet Card */
.tweet-card {
  display: flex;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background-color var(--transition);
}

.tweet-card:hover {
  background-color: var(--bg-hover);
}

.tweet-avatar {
  margin-right: 12px;
}

.tweet-avatar img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.tweet-content {
  width: 100%;
}

.tweet-header {
  display: flex;
  align-items: center;
}

.tweet-author-name {
  font-weight: 700;
}

.tweet-author-handle {
  color: var(--text-secondary);
  margin-left: 5px;
}

.tweet-time {
  color: var(--text-secondary);
  margin-left: auto;
}

.tweet-body {
  margin-top: 5px;
}

.tweet-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  max-width: 425px;
}

.tweet-action {
  display: flex;
  align-items: center;
  color: var(--text-secondary);
}

.tweet-action i {
  font-size: 18px;
  margin-right: 5px;
}

.tweet-action:hover {
  color: var(--accent);
}

/* Markdown Formatting */
.post-body pre,
.post-content pre {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  margin: 12px 0;
  overflow-x: auto;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.5;
}

.post-body code,
.post-content code {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 14px;
  color: var(--accent);
}

.post-body pre code,
.post-content pre code {
  background: transparent;
  border: none;
  padding: 0;
  color: var(--text-primary);
}

.post-body a,
.post-content a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

.post-body a:hover,
.post-content a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.post-body strong,
.post-content strong {
  font-weight: 700;
  color: var(--text-primary);
}

.post-body em,
.post-content em {
  font-style: italic;
  color: var(--text-secondary);
}

/* ============================================
   MOBILE RESPONSIVE STYLES
   ============================================ */

/* Mobile Header */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--mobile-nav-height);
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.mobile-menu-btn {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 28px;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background var(--transition);
}

.mobile-menu-btn:hover,
.mobile-menu-btn:active {
  background: var(--bg-hover);
}

.mobile-logo {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.mobile-logo img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.mobile-profile-btn {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  border-radius: 50%;
  overflow: hidden;
  width: 32px;
  height: 32px;
}

.mobile-profile-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Mobile Overlay */
.mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1001;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-overlay.active {
  display: block;
  opacity: 1;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--mobile-nav-height);
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
  z-index: 1000;
  align-items: center;
  justify-content: space-around;
  padding: 0 8px;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 10px;
  font-weight: 500;
  transition: color var(--transition);
  position: relative;
}

.mobile-nav-item i {
  font-size: 24px;
}

.mobile-nav-item.active {
  color: var(--text-primary);
}

.mobile-nav-item:hover {
  color: var(--text-primary);
}

.mobile-nav-post {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: var(--accent);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 28px;
  cursor: pointer;
  margin-top: -20px;
  box-shadow: 0 4px 12px rgba(220, 86, 62, 0.4);
  transition: all var(--transition);
}

.mobile-nav-post:hover,
.mobile-nav-post:active {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(220, 86, 62, 0.5);
}

.mobile-notif-badge {
  position: absolute;
  top: 4px;
  right: 10px;
  min-width: 16px;
  height: 16px;
  background: var(--error);
  color: white;
  border-radius: 10px;
  font-size: 10px;
  font-weight: bold;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--bg-primary);
}

.mobile-notif-badge.active {
  display: flex;
}

/* Mobile breakpoint */
@media (max-width: 768px) {
  /* Show mobile elements */
  .mobile-header {
    display: flex;
  }

  .mobile-bottom-nav {
    display: flex;
  }

  /* Mobile sidebar - slide in from left */
  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    right: auto !important;
    width: 280px !important;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: 1002 !important;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    padding: 20px 16px !important;
    border-right: 1px solid var(--border);
    background: var(--bg-primary) !important;
    display: flex;
    flex-direction: column;
  }

  .sidebar.mobile-open {
    transform: translateX(0) !important;
  }

  /* Hide desktop Post button - using mobile FAB instead */
  #desktop-post-btn {
    display: none;
  }

  /* Adjust main container */
  .app-container {
    padding-top: var(--mobile-nav-height);
    padding-bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0));
  }

  /* Full width main feed */
  .main-feed {
    margin-left: 0;
    width: 100%;
    max-width: 100%;
    border-left: none;
    border-right: none;
  }

  .main-feed .header {
    top: var(--mobile-nav-height);
  }

  /* Hide right sidebar on mobile */
  .aside-right {
    display: none;
  }

  /* Adjust post cards */
  .post-card {
    border-radius: 0;
    border-left: none;
    border-right: none;
    margin: 0;
  }

  /* Adjust modals for mobile */
  .modal-content {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    margin: 0;
  }

  /* Create post modal mobile adjustments */
  #create-post-modal .modal-content {
    height: auto;
    max-height: 90vh;
    margin: auto;
    border-radius: 16px 16px 0 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
  }

  /* Hide guest banner bottom on mobile, show simplified version */
  #guest-banner {
    padding: 12px 16px;
  }

  #guest-banner > div {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  #guest-banner h3 {
    font-size: 16px;
  }

  #guest-banner p {
    font-size: 13px;
  }

  /* Top right login - adjust for mobile */
  #top-right-login {
    top: calc(var(--mobile-nav-height) + 8px);
    right: 8px;
  }

  #top-right-login > div {
    padding: 10px 12px;
    gap: 8px;
  }

  #top-right-login button {
    padding: 8px 14px;
    font-size: 13px;
  }

  /* Profile header mobile */
  .profile-header {
    padding: 16px;
  }

  .profile-header .profile-banner {
    height: 120px;
  }

  .profile-header .profile-avatar {
    width: 80px;
    height: 80px;
    margin-top: -40px;
  }

  /* Submolt header mobile */
  .submolt-header {
    padding: 16px;
  }

  .submolt-header .submolt-banner {
    height: 100px;
  }

  /* Settings page mobile */
  .settings-container {
    padding: 16px;
  }

  /* Search bar mobile */
  .search-container {
    padding: 12px 16px;
  }

  /* Comment form mobile */
  .comment-form {
    padding: 12px 16px;
  }
}

/* Tablet breakpoint */
@media (max-width: 1100px) and (min-width: 769px) {
  .aside-right {
    width: 280px;
  }

  .sidebar {
    width: 80px;
  }

  .sidebar .nav-link span,
  .sidebar .account-info,
  .sidebar .nav-logo span {
    display: none;
  }

  .sidebar .nav-link {
    justify-content: center;
    padding: 16px;
  }

  .sidebar .nav-link i {
    margin: 0;
  }

  .sidebar .nav-logo {
    justify-content: center;
  }

  .sidebar #desktop-post-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    padding: 0;
  }

  .sidebar #desktop-post-btn span {
    display: none;
  }

  .sidebar #desktop-post-btn::before {
    content: '+';
    font-size: 24px;
    font-weight: bold;
  }

  .sidebar .account-widget {
    justify-content: center;
    padding: 12px;
  }

  .sidebar .account-more {
    display: none;
  }

  .main-feed {
    margin-left: 80px;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .mobile-nav-item span {
    display: none;
  }

  .mobile-nav-item {
    padding: 12px;
  }

  .mobile-nav-post {
    width: 48px;
    height: 48px;
    font-size: 24px;
    margin-top: -16px;
  }

  /* Post detail mobile */
  .post-detail-content {
    padding: 12px;
  }

  /* Comment thread spacing */
  .comment-thread {
    padding-left: 8px;
  }

  .comment-thread .comment {
    padding-left: 12px;
  }
}

/* Extra: Smooth scroll behavior for mobile */
@media (max-width: 768px) {
  html {
    scroll-padding-top: calc(var(--mobile-nav-height) + var(--header-height));
  }
}