/* Reuse the same root variables from index.html */
    :root {
      /* Light theme colors */
      --bg: #ffffff;
      --text: #111111;
      --header-bg: #f7f7f7;
      --nav-link: #444;
      --nav-link-hover: #ff4a4a;
      --card-bg: #f1f1f1;
      --border: #ddd;
      --aside-bg: #f9f9f9;
      --dropdown-bg: #f1f1f1;
      --bubble-bg: #eee;
      --bubble-hover-bg: #ddd;
      --bubble-active-bg: #444;
      --search-bg: #f1f1f1;
      --search-border: #ccc;
      --search-focus-border: #00c3ff;
      --search-focus-shadow: #00c3ff33;
      --search-icon: #888;
      --suggestions-bg: #ffffff;
      --suggestions-border: #ddd;
      --suggestions-shadow: rgba(0, 0, 0, 0.1);
      --suggestion-hover: #f0f0f0;
      --heading-bg: #f0f0f0;
      --heading-text: #666;
      --suggestion-text: #333;
      --match-bg: #00c3ff;
      --match-text: #000;
      --no-results: #999;
      --item-card-bg: #ffffff;
      --item-card-shadow: rgba(0, 0, 0, 0.1);
      --item-details: #666;
      --category-accent: #7b2cff;
      --category-glow: 0 0 4px rgba(123, 44, 255, 0.2);
      --accent-color: #8B5CF6;
      --accent-glow: 0 0 8px rgba(139, 92, 246, 0.3);
      
      /* Message specific colors */
      --message-unread: #e3f2fd;
      --message-highlight: #f5f5f5;
      --message-success: #00b894;
      --message-warning: #fdcb6e;
      --message-danger: #d63031;
      --message-info: #0984e3;
      --message-pending: #6c5ce7;
      --message-disputed: #ff7675;
      --message-completed: #55efc4;
      --message-system: #636e72;
      --message-buyer: #8B5CF6;
      --message-seller: #2d3436;
      
      /* Escrow specific colors */
      --escrow-step-active: #8B5CF6;
      --escrow-step-completed: #00b894;
      --escrow-step-pending: #ddd;
      --escrow-step-error: #d63031;
      --escrow-timer-warning: #fdcb6e;
      --escrow-timer-critical: #d63031;
      --escrow-panel-bg: #f8f9fa;
      --escrow-upload-border: #ddd;
      --escrow-upload-hover: #eee;
    }

    body.dark {
      /* Dark theme colors */
      --bg: #121212;
      --text: #eee;
      --header-bg: #1f1f1f;
      --nav-link: #bbb;
      --nav-link-hover: #ff4a4a;
      --card-bg: #1e1e1e;
      --border: #333;
      --aside-bg: #1a1a1a;
      --dropdown-bg: #252525;
      --bubble-bg: #2d2d2d;
      --bubble-hover-bg: #3d3d3d;
      --bubble-active-bg: #00c3ff;
      --search-bg: #1e1e1e;
      --search-border: #333;
      --search-focus-border: #00c3ff;
      --search-focus-shadow: #00c3ff33;
      --search-icon: #888;
      --suggestions-bg: #1a1a1a;
      --suggestions-border: #333;
      --suggestions-shadow: rgba(0, 0, 0, 0.5);
      --suggestion-hover: #333;
      --heading-bg: #111;
      --heading-text: #999;
      --suggestion-text: #ddd;
      --match-bg: #00c3ff;
      --match-text: #000;
      --no-results: #777;
      --item-card-bg: #1f1f1f;
      --item-card-shadow: rgba(0, 0, 0, 0.4);
      --item-details: #aaa;
      --category-accent: #bb33ff;
      --category-glow: 0 0 10px rgba(187, 51, 255, 0.3);
      --accent-color: #A78BFA;
      --accent-glow: 0 0 12px rgba(139, 92, 246, 0.4);
      
      /* Message specific colors (dark theme) */
      --message-unread: #1a237e;
      --message-highlight: #2d2d2d;
      --message-success: #00a884;
      --message-warning: #e1b12c;
      --message-danger: #c0392b;
      --message-info: #0984e3;
      --message-pending: #7c6af6;
      --message-disputed: #e17055;
      --message-completed: #00b894;
      --message-system: #636e72;
      --message-buyer: #A78BFA;
      --message-seller: #2d3436;
      
      /* Escrow specific colors (dark theme) */
      --escrow-panel-bg: #252525;
      --escrow-upload-border: #444;
      --escrow-upload-hover: #333;
    }

    /* Base styles */
    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    /* at the very top of your style.css or inside your <style> */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

    body {
      margin: 0;
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
      background-color: var(--bg);
      color: var(--text);
      transition: background-color 0.3s ease, color 0.3s ease;
      line-height: 1.6;
      display: flex;
      flex-direction: column;
      min-height: 100vh;
    }

    /* ===== BASE HEADER STYLES ===== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1.5rem;
  background: var(--header-bg);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  height: 70px;
  box-sizing: border-box;
}

/* Left section - Logo + Nav */
.header-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-width: 200px;
  flex-shrink: 0;
}


.marketplace-nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.75rem;
}

.marketplace-nav a {
  text-decoration: none;
  color: var(--nav-link);
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.95rem;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.marketplace-nav a:hover,
.marketplace-nav a:focus {
  color: var(--nav-link-hover);
  background: rgba(0, 0, 0, 0.05);
}

/* Search container - responsive behavior */
.search-container {
  flex: 1;
  max-width: 650px;
  margin: 0 2rem;
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon-mobile {
  display: none;
  font-size: 1.3rem;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--nav-link);
  background: none;
  border: none;
  transition: color 0.2s ease;
}

.search-icon-mobile:hover {
  color: var(--nav-link-hover);
}

.search-bar {
  width: 100%;
  transition: all 0.3s ease;
}

/* Search input styles */
.search-input-wrapper {
  position: relative;
  width: 100%;
}

.search-input-wrapper input {
  width: 100%;
  padding: 0.7rem 2.5rem 0.7rem 3rem;
  border-radius: 999px;
  border: 1px solid var(--search-border);
  background: var(--search-bg);
  color: var(--text);
  font-size: 1rem;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.search-input-wrapper input:focus {
  outline: none;
  border-color: var(--search-focus-border);
  box-shadow: 0 0 0 3px var(--search-focus-shadow);
}

.search-icon {
  position: absolute;
  left: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--search-icon);
  pointer-events: none;
}

.clear-button {
  position: absolute;
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--search-icon);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0.25rem;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.clear-button:hover {
  opacity: 1;
}

/* Right section - Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-width: 200px;
  justify-content: flex-end;
  flex-shrink: 0;
}

/* Auth links */
.auth-links {
  display: flex;
  gap: 0.75rem;
}

.auth-links a {
  padding: 0.6rem 1.25rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.auth-links .login-link {
  color: var(--nav-link);
  border: 1px solid var(--border);
}

.auth-links .login-link:hover {
  background: rgba(0, 0, 0, 0.05);
}

.auth-links .signup-link {
  background: var(--accent-color);
  color: white;
  border: 1px solid var(--accent-color);
}

.auth-links .signup-link:hover {
  background: var(--accent-color-hover);
  border-color: var(--accent-color-hover);
}

/* Account display */
.account-display {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.25rem;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.account-display:hover {
  background: rgba(0, 0, 0, 0.05);
}

.profile-pic-mini {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: bold;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.profile-name {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-display:hover .profile-pic-mini {
  transform: scale(1.05);
}

/* Notifications */
.notifications {
  position: relative;
}

.notification-bell {
  background: none;
  border: none;
  color: var(--nav-link);
  font-size: 1.3rem;
  cursor: pointer;
  position: relative;
  padding: 0.5rem;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.notification-bell:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--nav-link-hover);
}

.notification-count {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  background: var(--nav-link-hover);
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.notification-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  background: var(--dropdown-bg);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  min-width: 320px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
  border: 1px solid var(--border);
  transform-origin: top right;
  animation: fadeInDropdown 0.2s ease-out;
}

@keyframes fadeInDropdown {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.notifications:hover .notification-dropdown {
  display: block;
}

.notification-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.notification-header h4 {
  margin: 0;
  font-size: 1rem;
}

.notification-header .mark-all-read {
  background: none;
  border: none;
  color: var(--accent-color);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
}

.notification-list {
  padding: 0.5rem 0;
}

.no-notifications {
  padding: 1.5rem;
  text-align: center;
  color: var(--item-details);
  font-size: 0.9rem;
}

/* Wallet dropdown */
.wallet-dropdown {
  position: relative;
}

.wallet-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bubble-bg);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  font-weight: 600;
}

.wallet-toggle:hover {
  background: var(--bubble-hover-bg);
}

.token-count {
  color: var(--text);
}

.token-icon {
  color: gold;
  font-size: 1.1rem;
}

.wallet-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  background: var(--dropdown-bg);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  min-width: 200px;
  z-index: 1000;
  border: 1px solid var(--border);
  transform-origin: top right;
  animation: fadeInDropdown 0.2s ease-out;
}

.wallet-dropdown:hover .wallet-menu {
  display: block;
}

.wallet-menu a {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: var(--text);
  text-decoration: none;
  transition: background-color 0.2s ease;
  font-size: 0.95rem;
  gap: 0.75rem;
}

.wallet-menu a:hover {
  background: var(--bubble-hover-bg);
}

.wallet-menu a i {
  width: 1.25rem;
  text-align: center;
  font-size: 1rem;
  color: var(--accent-color);
}

/* Settings dropdown */
.settings-dropdown {
  position: relative;
}

.settings-toggle {
  background: none;
  border: none;
  color: var(--nav-link);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.settings-toggle:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--nav-link-hover);
}

.settings-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  background: var(--dropdown-bg);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  min-width: 200px;
  z-index: 1000;
  border: 1px solid var(--border);
  transform-origin: top right;
  animation: fadeInDropdown 0.2s ease-out;
}

.settings-dropdown.open .settings-menu {
  display: block;
}

.settings-menu a {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: var(--text);
  text-decoration: none;
  transition: background-color 0.2s ease;
  font-size: 0.95rem;
  gap: 0.75rem;
}

.settings-menu a:hover {
  background: var(--bubble-hover-bg);
}

.settings-menu a i {
  width: 1.25rem;
  text-align: center;
  font-size: 1rem;
  color: var(--accent-color);
}

.settings-menu .signout-link {
  color: var(--nav-link-hover);
  border-top: 1px solid var(--border);
  margin-top: 0.25rem;
  padding-top: 0.85rem;
}

/* Dark mode toggle */
.dark-mode-toggle {
  background: none;
  border: none;
  color: var(--nav-link);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.dark-mode-toggle:hover {
  background: rgba(0, 0, 0, 0.05);
}


/* Balance update animation */
.wallet-display.balance-updated {
  animation: pulseBalance 1s ease;
}

@keyframes pulseBalance {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* ===== MOBILE RESPONSIVENESS ===== */
@media (max-width: 1024px) {
  .marketplace-nav {
    display: none;
  }
  
  .header-left {
    min-width: auto;
  }
  
  .search-container {
    margin: 0 1rem;
  }
}

@media (max-width: 768px) {
  header {
    padding: 0.5rem 1rem;
    height: 60px;
  }
  
  .logo img {
    height: 40px;
  }
  
  .logo-text {
    display: none;
  }
  
  .search-container {
    margin: 0 0.5rem;
    justify-content: flex-end;
  }
  
  .search-icon-mobile {
    display: flex;
  }
  
  .search-bar {
    position: fixed;
    left: 0;
    top: 60px;
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--header-bg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
    display: none;
    animation: slideDown 0.3s ease-out;
  }
  
  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .search-bar.active {
    display: block;
  }
  
  .header-actions {
    gap: 0.75rem;
  }
  
  .profile-name {
    display: none;
  }
  
  .auth-links {
    gap: 0.5rem;
  }
  
  .auth-links a {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }
  
  .wallet-toggle {
    padding: 0.4rem 0.75rem;
    font-size: 0.9rem;
  }
  
  .profile-pic-mini,
  .notification-bell,
  .settings-toggle,
  .dark-mode-toggle {
    width: 38px;
    height: 38px;
    font-size: 1.15rem;
  }
}

@media (max-width: 480px) {
  header {
    padding: 0.5rem;
  }
  
  .auth-links .login-link span,
  .auth-links .signup-link span {
    display: none;
  }
  
  .auth-links .login-link,
  .auth-links .signup-link {
    width: 38px;
    height: 38px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
  }
  
  .auth-links .login-link i,
  .auth-links .signup-link i {
    display: block;
    margin: 0;
  }
  
  .auth-links .login-link:before {
    content: "\f2f6"; /* login icon */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
  }
  
  .auth-links .signup-link:before {
    content: "\f234"; /* user-plus icon */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
  }
  
  .wallet-toggle .token-count {
    font-size: 0.85rem;
  }
  
  .token-icon {
    font-size: 1rem;
  }
}
.highlight {
  background-color: #00bfff;
  color: #fff;
  font-size: 0.85em;
  font-weight: bold;
  padding: 2px 8px;
  border-radius: 999px;
  display: inline-block;
}

.chat-tab.highlight {
  background: none !important;
  padding: 0.75rem 1rem !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  border-bottom: 2px solid var(--accent-color) !important;
  color: var(--accent-color) !important;
}

    /* Main content layout */
    .main-container {
      display: flex;
      flex: 1;
    }

    Here's a clean sidebar that matches your existing design system:
css/* Sidebar styles - matching your design system */
.sidebar {
  width: 250px;
  background-color: var(--aside-bg);
  border-right: 1px solid var(--border);
  padding: 1.5rem 0;
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  overflow-y: auto;
}

.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--accent-color);
}

.sidebar-section {
  margin-bottom: 1.5rem;
  padding: 0 1.5rem;
  margin-top: 10px;
}

.sidebar-section h3 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--heading-text);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.sidebar-section h3 i {
  font-size: 0.8rem;
  color: var(--accent-color);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
  transition: all 0.2s ease;
  font-weight: 500;
  border: 1px solid transparent;
}

.sidebar-link:hover {
  background-color: var(--bubble-hover-bg);
  color: var(--nav-link-hover);
  border-color: var(--border);
  transform: translateX(2px);
}

.sidebar-link.active {
  background-color: var(--accent-color);
  color: white;
  font-weight: 600;
  box-shadow: var(--accent-glow);
  border-color: var(--accent-color);
}

.sidebar-link.active i {
  color: white;
}

.sidebar-link i {
  width: 20px;
  text-align: center;
  font-size: 16px;
  color: var(--accent-color);
  transition: color 0.2s ease;
}

.sidebar-link:hover i {
  color: var(--nav-link-hover);
}

.sidebar-link span {
  flex: 1;
}

/* Notification badges */
.sidebar-link .notification-badge {
  background-color: var(--nav-link-hover);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
  min-width: 18px;
  text-align: center;
  line-height: 1;
}

/* Status indicators */
.sidebar-link .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-left: auto;
}

.sidebar-link .status-dot.online {
  background-color: var(--message-success);
}

.sidebar-link .status-dot.away {
  background-color: var(--message-warning);
}

.sidebar-link .status-dot.busy {
  background-color: var(--message-danger);
}

.sidebar-divider {
  height: 1px;
  background-color: var(--border);
  margin: 1.5rem 0;
}

/* Special link types */
.sidebar-link.trade-link:hover {
  border-left: 3px solid var(--message-success);
}

.sidebar-link.marketplace-link:hover {
  border-left: 3px solid var(--message-info);
}

.sidebar-link.premium-link {
  position: relative;
}

.sidebar-link.premium-link::after {
  content: '✨';
  font-size: 0.7rem;
  margin-left: auto;
  opacity: 0.7;
}

.sidebar-link.premium-link:hover::after {
  opacity: 1;
  animation: sparkle 0.6s ease;
}

@keyframes sparkle {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.2) rotate(180deg); }
}

/* User stats section */
.sidebar-stats {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 1.5rem 0;
}

.sidebar-stats h4 {
  color: var(--heading-text);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}

.stat-label {
  color: var(--text);
}

.stat-value {
  color: var(--accent-color);
  font-weight: 600;
}

.stat-value.positive {
  color: var(--message-success);
}

.stat-value.warning {
  color: var(--message-warning);
}

.stat-value.danger {
  color: var(--message-danger);
}

/* Quick actions section */
.sidebar-actions {
  padding: 0 1.5rem;
  margin-top: auto;
}

.sidebar-action-btn {
  display: block;
  width: 100%;
  padding: 0.75rem;
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--category-accent) 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  margin-bottom: 0.5rem;
  transition: all 0.2s ease;
  box-shadow: var(--accent-glow);
}

.sidebar-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--category-glow), 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sidebar-action-btn:active {
  transform: translateY(0);
}

.sidebar-action-btn.secondary {
  background: var(--bubble-bg);
  color: var(--text);
  box-shadow: none;
  border: 1px solid var(--border);
}

.sidebar-action-btn.secondary:hover {
  background: var(--bubble-hover-bg);
  border-color: var(--accent-color);
}

/* Responsive design */
@media (max-width: 1200px) {
  .sidebar {
    display: none;
  }  
  .sidebar-section h3 {
    display: none;
  }
  
  .sidebar-link {
    padding: 0.75rem 0.5rem;
    justify-content: center;
    gap: 0;
  }
  
  .sidebar-link span {
    display: none;
  }
  
  .sidebar-link .notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
  }
  
  .sidebar-link .status-dot {
    position: absolute;
    top: 8px;
    right: 8px;
  }
  
  .sidebar-stats {
    display: none;
  }
  
  .sidebar-actions {
    padding: 0 0.5rem;
  }
  
  .sidebar-action-btn {
    padding: 0.5rem;
    font-size: 0;
  }
  
  .sidebar-action-btn::before {
    content: '+';
    font-size: 1.2rem;
    font-weight: normal;
  }
  
  .sidebar-action-btn.secondary::before {
    content: '⚙';
  }
  
  .sidebar-divider {
    margin: 1rem 0.5rem;
  }
}

@media (max-width: 1200px) {
  .main-container {
    width: 100%;
    overflow: hidden;
  }
  
  .chat-container {
    width: 100%;
    min-width: 0;
  }
  
  .conversation-list {
    min-width: 0;
    flex-shrink: 0;
  }
  
  .chat-area {
    min-width: 0;
    flex: 1;
    overflow: hidden;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  
  .sidebar.mobile-open {
    transform: translateX(0);
    position: fixed;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  }
}

/* Smooth entrance animation */
.sidebar-link {
  opacity: 0;
  animation: slideIn 0.3s ease forwards;
}

.sidebar-link:nth-child(1) { animation-delay: 0.1s; }
.sidebar-link:nth-child(2) { animation-delay: 0.15s; }
.sidebar-link:nth-child(3) { animation-delay: 0.2s; }
.sidebar-link:nth-child(4) { animation-delay: 0.25s; }
.sidebar-link:nth-child(5) { animation-delay: 0.3s; }

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

    /* Main content area */
    .content {
      flex: 1;
      padding: 2rem;
    }

    /* Chat layout */
    .chat-container {
      display: flex;
      height: calc(100vh - 72px);
    }

    /* Conversation list */
    .conversation-list {
      width: 350px;
      background-color: var(--card-bg);
      border-right: 1px solid var(--border);
      display: flex;
      flex-direction: column;
    }

    .conversation-header {
      padding: 1rem 1.5rem;
      border-bottom: 1px solid var(--border);
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .conversation-header h2 {
      font-size: 1.25rem;
      margin: 0;
    }

    .conversation-tabs {
      display: flex;
      border-bottom: 1px solid var(--border);
    }

    .conversation-tab {
      flex: 1;
      padding: 0.75rem;
      text-align: center;
      font-weight: 500;
      cursor: pointer;
      border-bottom: 2px solid transparent;
      transition: all 0.2s ease;
    }

    .conversation-tab:hover {
      background-color: var(--bubble-hover-bg);
    }

    .conversation-tab.active {
      border-bottom-color: var(--accent-color);
      color: var(--accent-color);
    }

    .conversation-search {
      padding: 1rem;
      border-bottom: 1px solid var(--border);
    }

    .conversation-search input {
      width: 100%;
      padding: 0.75rem 1rem;
      border-radius: 8px;
      border: 1px solid var(--border);
      background-color: var(--search-bg);
      color: var(--text);
    }

    .conversation-search input:focus {
      outline: none;
      border-color: var(--search-focus-border);
      box-shadow: 0 0 0 3px var(--search-focus-shadow);
    }

    .conversation-items {
      flex: 1;
      overflow-y: auto;
    }

   .conversation-item {
  position: relative;
  padding: 1rem 1.25rem; /* Removed left padding for dropdown */
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  gap: 0.75rem;
}

    .conversation-item:hover {
      background-color: var(--bubble-hover-bg);
    }

    .conversation-item.unread {
      background-color: var(--message-unread);
    }

    .conversation-item.active {
      background-color: var(--bubble-hover-bg);
    }

    .conversation-avatar {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      object-fit: cover;
      flex-shrink: 0;
    }

    .conversation-content {
      flex: 1;
      min-width: 0;
    }

    .conversation-header-row {
      display: flex;
      align-items: center;
      margin-bottom: 0.25rem;
    }

    .conversation-username {
      font-weight: 600;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      flex: 1;
    }

    .conversation-time {
      font-size: 0.75rem;
      color: var(--item-details);
      margin-left: 0.5rem;
    }

    .conversation-preview {
      font-size: 0.85rem;
      color: var(--item-details);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      margin-bottom: 0.25rem;
    }

    .conversation-status {
      font-size: 0.75rem;
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .status-badge {
      padding: 0.2rem 0.5rem;
      border-radius: 999px;
      font-weight: 500;
    }

    .status-pending {
      background: rgba(108, 92, 231, 0.1);
      color: var(--message-pending);
    }

    .status-active {
      background: rgba(9, 132, 227, 0.1);
      color: var(--message-info);
    }

    .status-completed {
      background: rgba(0, 184, 148, 0.1);
      color: var(--message-success);
    }

    .status-disputed {
      background: rgba(214, 48, 49, 0.1);
      color: var(--message-danger);
    }

    .status-awaiting-delivery {
      background: rgba(108, 92, 231, 0.1);
      color: var(--message-pending);
    }

    .status-declined {
  background: rgba(214, 48, 49, 0.1);
  color: var(--message-danger);
}

    .status-awaiting-content {
      background: rgba(253, 203, 110, 0.1);
      color: var(--message-warning);
    }

    .unread-badge {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--accent-color);
      margin-left: auto;
    }

    /* Chat area */
    ..chat-area {
      flex: 1;
      display: flex;
      flex-direction: column;
      background-color: var(--card-bg);
      min-width: 0;
    }

    .chat-header {
      padding: 1rem 1.5rem;
      border-bottom: 1px solid var(--border);
      display: flex;
      align-items: center;
      gap: 1rem;
    }

    .chat-header-avatar {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      object-fit: cover;
    }

    .chat-header-info {
      flex: 1;
    }

    .chat-header-username {
      font-weight: 600;
      margin-bottom: 0.1rem;
    }

    .chat-header-status {
      font-size: 0.8rem;
      color: var(--item-details);
    }

    .status-awaiting-exchange {
  background: rgba(108, 92, 231, 0.1);
  color: var(--message-pending);
}

    .chat-header-actions {
      display: flex;
      gap: 0.5rem;
    }

    .chat-header-action {
      background: none;
      border: none;
      color: var(--item-details);
      cursor: pointer;
      font-size: 1rem;
      width: 36px;
      height: 36px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.2s ease;
    }

    .chat-header-action:hover {
      background-color: var(--bubble-hover-bg);
      color: var(--text);
    }

  

    .message-group {
      display: flex;
      flex-direction: column;
      gap: 0.25rem;
    }

    .message-group-date {
      text-align: center;
      font-size: 0.75rem;
      color: var(--item-details);
      margin: 0.5rem 0;
    }

    .message {
      display: flex;
      max-width: 80%;
    }

    .message-group {
  order: 1;
}

.message-group-date {
  order: 0;
  width: 100%;
}

.chat-messages {
  display: flex;
  flex-direction: column;
}

    .message.buyer {
      align-self: flex-end;
      flex-direction: row-reverse;
    }

    .message.seller {
      align-self: flex-start;
    }

    .message.system {
      align-self: center;
      max-width: 90%;
    }

    .message-avatar {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      object-fit: cover;
      margin-top: auto;
      flex-shrink: 0;
    }

    .message-bubble {
      padding: 0.75rem 1rem;
      border-radius: 12px;
      margin: 0 0.5rem;
      position: relative;
      word-wrap: break-word;
      line-height: 1.4;
      animation: fadeIn 0.3s ease;
    }

    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(5px); }
      to { opacity: 1; transform: translateY(0); }
    }

    .buyer .message-bubble {
      background-color: var(--message-buyer);
      color: white;
      border-top-right-radius: 4px;
    }

    .seller .message-bubble {
      background-color: var(--message-seller);
      color: white;
      border-top-left-radius: 4px;
    }

    .system .message-bubble {
      background-color: var(--message-system);
      color: white;
      border-radius: 6px;
      text-align: center;
      padding: 0.5rem 1rem;
      font-size: 0.85rem;
    }

    .message-time {
      font-size: 0.7rem;
      color: var(--item-details);
      margin-top: 0.25rem;
      text-align: right;
    }

    .message-status {
      display: flex;
      align-items: center;
      gap: 0.25rem;
      margin-bottom: 0;
  margin-top: 0.1rem;
      color: var(--item-details);
      display: none !important;
    }

    .message-status i {
      font-size: 0.6rem;
    }

    .chat-input {
      padding: 1rem;
      border-top: 1px solid var(--border);
      display: flex;
      gap: 0.75rem;
    }

    .chat-input textarea {
      flex: 1;
      padding: 0.75rem 1rem;
      border-radius: 8px;
      border: 1px solid var(--border);
      background-color: var(--search-bg);
      color: var(--text);
      font-family: inherit;
      resize: none;
      min-height: 70px;
      max-height: 150px;
    }

    .chat-input textarea:focus {
      outline: none;
      border-color: var(--search-focus-border);
      box-shadow: 0 0 0 3px var(--search-focus-shadow);
    }

    .chat-input-actions {
      display: flex;
      flex-direction: column;
      justify-content: center;
      gap: 0.5rem;
    }

    .chat-input-button {
      background-color: var(--accent-color);
      color: white;
      border: none;
      border-radius: 8px;
      padding: 0.5rem 1rem;
      cursor: pointer;
      font-weight: 500;
      display: flex;
      align-items: center;
      gap: 0.5rem;
      transition: all 0.2s ease;
    }

    .chat-input-button:hover {
      opacity: 0.9;
    }

    .chat-input-button.secondary {
      background-color: var(--bubble-bg);
      color: var(--text);
    }

    /* Offer Message Styling */
    .message.offer .message-bubble {
      background-color: var(--card-bg);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 16px;
      max-width: 80%;
      position: relative;
      box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    }

    .message.offer .message-bubble strong {
      display: block;
      margin-bottom: 8px;
      color: var(--text);
      font-size: 15px;
      font-weight: 600;
    }

    .message.offer .message-bubble div {
      margin: 6px 0;
      color: var(--item-details);
      font-size: 14px;
    }

    .message.offer .message-bubble .offer-highlight {
      color: var(--accent-color);
      font-weight: 600;
    }

    /* Offer Status Indicators */
    .offer-status {
      font-weight: 600;
      padding: 6px 10px;
      border-radius: 6px;
      margin: 10px 0;
      display: inline-block;
      font-size: 13px;
    }

    .offer-status.accepted {
      background-color: rgba(0, 184, 148, 0.1);
      color: var(--message-success);
    }

    .offer-status.declined {
      background-color: rgba(214, 48, 49, 0.1);
      color: var(--message-danger);
    }

    /* Offer Action Buttons */
    .offer-actions {
      display: flex;
      gap: 10px;
      margin-top: 12px;
    }

    .offer-button {
      flex: 1;
      padding: 10px 12px;
      border-radius: 8px;
      font-size: 14px;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.2s ease;
      text-align: center;
      border: none;
    }

    .accept-offer {
      background-color: var(--message-success);
      color: white;
    }

    .accept-offer:hover {
      background-color: #00a884;
    }

    .decline-offer {
      background-color: var(--card-bg);
      color: var(--message-danger);
      border: 1px solid var(--message-danger);
    }

    .decline-offer:hover {
      background-color: rgba(214, 48, 49, 0.1);
    }

    .proceed-to-escrow {
      background-color: var(--accent-color);
      color: white;
      width: 100%;
    }

    .proceed-to-escrow:hover {
      background-color: #7c6af6;
    }

    /* Button Loading State */
    .button-loader {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
  margin-right: 8px;
  vertical-align: middle;
}

/* make sure you have this keyframes already */
@keyframes spin {
  to { transform: rotate(360deg); }
}

    /* System Message Styling */
    .message.system .message-bubble {
      background-color: var(--message-system);
      color: white;
      padding: 10px 16px;
      border-radius: 18px;
      font-size: 14px;
      max-width: 70%;
      margin: 8px auto;
      text-align: center;
    }

    /* Responsive Adjustments */
    @media (max-width: 768px) {
      .offer-actions {
        flex-direction: column;
        gap: 8px;
      }
      
      .message.offer .message-bubble {
        max-width: 90%;
      }
    }

    /* Dark Mode - Inherits from root variables */

    .loading-indicator {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 20px;
      color: var(--text);
    }

    .spinner {
      width: 40px;
      height: 40px;
      border: 4px solid rgba(0, 0, 0, 0.1);
      border-radius: 50%;
      border-top-color: var(--accent-color);
      animation: spin 1s ease-in-out infinite;
      margin-bottom: 10px;
    }

    .error-message {
      padding: 20px;
      text-align: center;
      color: var(--message-danger);
    }

    .retry-button {
      margin: 10px auto;
      padding: 8px 16px;
      background-color: var(--accent-color);
      color: white;
      border: none;
      border-radius: 4px;
      cursor: pointer;
    }

    @keyframes spin {
      to { transform: rotate(360deg); }
    }

    /* Conversation loading states */
    .conversation-item {
        transition: all 0.2s ease;
        position: relative;
    }

    .conversation-item.conversation-loading {
        opacity: 0.7;
        background-color: var(--bubble-hover-bg);
    }

   

    .conversation-item.conversation-error {
        background-color: var(--message-danger);
        opacity: 0.8;
    }

    @keyframes spin {
        to { transform: translate(-50%, -50%) rotate(360deg); }
    }

    /* Skeleton loading animation */
    .skeleton, .skeleton-text {
        background-color: var(--bubble-hover-bg);
        background-image: linear-gradient(
            90deg,
            var(--bubble-hover-bg) 0px,
            var(--bubble-bg) 40px,
            var(--bubble-hover-bg) 80px
        );
        background-size: 200%;
        animation: shine 1.5s infinite linear;
        border-radius: 4px;
        color: transparent !important;
    }

    .skeleton-text {
        display: inline-block;
        height: 1em;
    }

    @keyframes shine {
        0% { background-position: -100px; }
        100% { background-position: 100px; }
    }

    /* -----------------------------
       ESCROW SYSTEM STYLES
       ----------------------------- */
    
    /* Escrow Tab System */
    .chat-tabs {
      display: flex;
      border-bottom: 1px solid var(--border);
      margin: 0 1.5rem;
    }

    .chat-tab {
      padding: 0.75rem 1rem;
      cursor: pointer;
      font-weight: 500;
      border-bottom: 2px solid transparent;
      transition: all 0.2s ease;
      position: relative;
    }

    .chat-tab:hover {
      color: var(--accent-color);
    }

    .chat-tab.active {
      border-bottom-color: var(--accent-color);
      color: var(--accent-color);
    }

    .chat-tab-badge {
      position: absolute;
      top: 2px;
      right: 2px;
      background-color: var(--accent-color);
      color: white;
      border-radius: 50%;
      width: 18px;
      height: 18px;
      font-size: 0.7rem;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    /* Escrow Workflow Panels */
    .escrow-container {
      display: none;
      flex-direction: column;
      padding: 1rem;
      background-color: var(--escrow-panel-bg);
      border-radius: 8px;
      margin: 1rem;
      border: 1px solid var(--border);
    }

    .escrow-container.active {
      display: flex;
    }

    /* Progress Tracker */
    .escrow-progress {
      margin-bottom: 1.5rem;
    }

    .escrow-steps {
      display: flex;
      justify-content: space-between;
      position: relative;
      margin-bottom: 1rem;
    }

    .escrow-steps::before {
      content: '';
      position: absolute;
      top: 15px;
      left: 0;
      right: 0;
      height: 2px;
      background-color: var(--escrow-step-pending);
      z-index: 1;
    }

    .escrow-step {
      display: flex;
      flex-direction: column;
      align-items: center;
      z-index: 2;
      flex: 1;
    }

    .escrow-step:last-child {
      flex: 0;
    }

    .step-indicator {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      background-color: var(--escrow-step-pending);
      color: var(--text);
      display: flex;
      align-items: center;
      justify-content: center;
      margin-bottom: 0.5rem;
      font-weight: bold;
      position: relative;
    }

    .step-indicator.completed {
      background-color: var(--escrow-step-completed);
      color: white;
    }

    .step-indicator.active {
      background-color: var(--escrow-step-active);
      color: white;
    }

    .step-indicator.error {
      background-color: var(--escrow-step-error);
      color: white;
    }

    .step-label {
      font-size: 0.75rem;
      text-align: center;
      max-width: 80px;
      color: var(--item-details);
    }

    .step-label.active {
      color: var(--text);
      font-weight: 500;
    }

    .escrow-timer {
      text-align: center;
      font-size: 0.85rem;
      margin-top: 0.5rem;
      padding: 0.5rem;
      border-radius: 4px;
      background-color: rgba(253, 203, 110, 0.1);
      color: var(--message-warning);
    }

    .escrow-timer.warning {
      background-color: rgba(253, 203, 110, 0.2);
      color: var(--message-warning);
    }

    .escrow-timer.critical {
      background-color: rgba(214, 48, 49, 0.2);
      color: var(--message-danger);
    }

    /* Action Center */
    .escrow-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 0.75rem;
      margin-bottom: 1.5rem;
      justify-content: center;
    }

    .escrow-button {
      padding: 0.75rem 1rem;
      border-radius: 6px;
      border: none;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.2s ease;
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .escrow-button.primary {
      background-color: var(--accent-color);
      color: white;
    }

    .escrow-button.secondary {
      background-color: var(--bubble-bg);
      color: var(--text);
      border: 1px solid var(--border);
    }

    .escrow-button.danger {
      background-color: var(--message-danger);
      color: white;
    }

    .escrow-button:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }

    /* Proof/Content Upload Area */
    .escrow-upload {
      margin-bottom: 1.5rem;
    }

    .upload-area {
      border: 2px dashed var(--escrow-upload-border);
      border-radius: 8px;
      padding: 2rem;
      text-align: center;
      cursor: pointer;
      transition: all 0.2s ease;
      margin-bottom: 1rem;
    }

    .upload-area:hover {
      background-color: var(--escrow-upload-hover);
      border-color: var(--accent-color);
    }

    .upload-icon {
      font-size: 2rem;
      margin-bottom: 0.5rem;
      color: var(--accent-color);
    }

    .upload-instructions {
      font-size: 0.85rem;
      color: var(--item-details);
      margin-bottom: 1rem;
    }

    .upload-preview {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem;
      margin-top: 1rem;
    }

    .upload-preview-item {
      width: 80px;
      height: 80px;
      border-radius: 4px;
      overflow: hidden;
      position: relative;
    }

    .upload-preview-item img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .upload-preview-item video {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .remove-upload {
      position: absolute;
      top: 2px;
      right: 2px;
      background-color: var(--message-danger);
      color: white;
      border: none;
      border-radius: 50%;
      width: 20px;
      height: 20px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      font-size: 0.7rem;
    }

    /* Transaction Details */
    .escrow-details {
      background-color: var(--bubble-bg);
      border-radius: 8px;
      padding: 1rem;
      margin-bottom: 1.5rem;
    }

    .detail-row {
      display: flex;
      justify-content: space-between;
      margin-bottom: 0.5rem;
    }

    .detail-label {
      font-weight: 500;
      color: var(--item-details);
    }

    .detail-value {
      font-weight: 600;
    }

    /* Dispute Modal */
    .dispute-modal {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background-color: rgba(0, 0, 0, 0.5);
      z-index: 1000;
      align-items: center;
      justify-content: center;
    }

    .dispute-modal.active {
      display: flex;
    }

    .dispute-content {
      background-color: var(--card-bg);
      border-radius: 8px;
      width: 90%;
      max-width: 500px;
      max-height: 90vh;
      overflow-y: auto;
      padding: 1.5rem;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .dispute-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 1rem;
    }

    .dispute-title {
      font-size: 1.25rem;
      font-weight: 600;
    }

    .close-dispute {
      background: none;
      border: none;
      font-size: 1.5rem;
      cursor: pointer;
      color: var(--item-details);
    }

    .dispute-form {
      display: flex;
      flex-direction: column;
      gap: 1rem;
    }

    .form-group {
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
    }

    .form-label {
      font-weight: 500;
    }

    .form-select {
      padding: 0.75rem;
      border-radius: 6px;
      border: 1px solid var(--border);
      background-color: var(--search-bg);
      color: var(--text);
    }

    .form-textarea {
      padding: 0.75rem;
      border-radius: 6px;
      border: 1px solid var(--border);
      background-color: var(--search-bg);
      color: var(--text);
      min-height: 100px;
      resize: vertical;
    }

    .dispute-actions {
      display: flex;
      justify-content: flex-end;
      gap: 0.75rem;
      margin-top: 1rem;
    }

    /* Toast Notifications */
    .toast {
      position: fixed;
      bottom: 20px;
      right: 20px;
      padding: 1rem 1.5rem;
      border-radius: 8px;
      color: white;
      font-weight: 500;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
      z-index: 1000;
      animation: slideIn 0.3s ease;
      display: flex;
      align-items: center;
      gap: 0.75rem;
    }

    .toast.success {
      background-color: var(--message-success);
    }

    .toast.error {
      background-color: var(--message-danger);
    }

    .toast.warning {
      background-color: var(--message-warning);
      color: var(--text);
    }

    @keyframes slideIn {
      from { transform: translateY(100px); opacity: 0; }
      to { transform: translateY(0); opacity: 1; }
    }

    /* Mobile Responsive Adjustments */
    @media (max-width: 768px) {
      .chat-tabs {
        margin: 0;
        flex-wrap: wrap;
      }
      
      .chat-tab {
        flex: 1;
        min-width: 50%;
        text-align: center;
        padding: 0.5rem;
        font-size: 0.85rem;
      }
      
      .escrow-steps {
        flex-wrap: wrap;
        gap: 0.5rem;
      }
      
      .escrow-step {
        flex: 0 0 calc(33.333% - 0.5rem);
        margin-bottom: 0.5rem;
      }
      
      .escrow-steps::before {
        display: none;
      }
      
      .escrow-actions {
        flex-direction: column;
      }
      
      .escrow-button {
        width: 100%;
        justify-content: center;
      }
    }

    /* Main container adjustments */
    .main-container {
      display: flex;
      height: calc(100vh - /* footer height */);
    }
    .sidebar {
      width: 300px;
      flex-shrink: 0;
    }
    .chat-container {
      flex: 1;
      display: flex;
      position: relative;
    }
    .conversation-list {
      width: 350px;
      flex-shrink: 0;
      display: flex;
      flex-direction: column;
    }
    .chat-area {
      flex: 1;
      display: flex;
      flex-direction: column;
    }
    .chat-messages {
  flex: 1;
  padding: 1.5rem;       /* restore your top/bottom space */
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  gap: 1rem;             /* a bit more breathing room */
}

    /* Ensure empty state is properly positioned and visible */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  color: var(--text-muted);
  padding: 2rem;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1; /* Ensure it's above other content */
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--border);
  opacity: 0.5;
}

.empty-state h3 {
  margin: 0 0 0.5rem 0;
  font-weight: 600;
  color: var(--text-color);
}

.empty-state p {
  margin: 0;
  opacity: 0.7;
  line-height: 1.5;
}

/* Chat area should have relative positioning */
.chat-area {
  position: relative;
  height: 100%;
}

/* When chat has content, empty state should be hidden */
.chat-area:has(.chat-content[style*="display: flex"]) .empty-state,
.chat-area:has(.chat-content:not([style*="display: none"])) .empty-state {
  display: none;
}

    .conversation-items::-webkit-scrollbar,
    .chat-messages::-webkit-scrollbar {
      width: 6px;                 /* thin scrollbar */
    }

    .conversation-items::-webkit-scrollbar-track,
    .chat-messages::-webkit-scrollbar-track {
      background: rgba(255, 255, 255, 0.05);
      border-radius: 3px;
    }

    .conversation-items::-webkit-scrollbar-thumb,
    .chat-messages::-webkit-scrollbar-thumb {
      background-color: rgba(255, 255, 255, 0.2);
      border-radius: 3px;
    }

    .conversation-items::-webkit-scrollbar-thumb:hover,
    .chat-messages::-webkit-scrollbar-thumb:hover {
      background-color: rgba(255, 255, 255, 0.4);
    }

    /* Firefox */
    .conversation-items,
    .chat-messages {
      scrollbar-width: thin;
      scrollbar-color: rgba(255, 255, 255, 0.2) rgba(255, 255, 255, 0.05);
    }

    /* Container for both buyer & seller proofs */
.escrow-proofs {
  display: none;               /* hidden by default */
  margin-bottom: 1.5rem;
}

/* Section title */
.escrow-proofs h4 {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #222;
}

/* Flex‐wrap layout for proof items */
.proofs-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Individual proof “card” */
.proof-item {
  flex: 0 0 6rem;              /* fixed square size */
  width: 6rem;
  height: 6rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Make the anchor fill the card */
.proof-item a {
  display: block;
  width: 100%;
  height: 100%;
}

/* Image fits the card, crops overflow */
.proof-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Optional hover effect */
.proof-item:hover {
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transform: translateY(-2px);
  transition: all 0.15s ease;
}

.chat-tab.highlight {
  animation: tabGlow 1s ease-in-out 0s 3 alternate;
  box-shadow: 0 0 10px 3px var(--accent-color), 0 0 2px 1px white;
}

@keyframes tabGlow {
  0%   { box-shadow: 0 0 0 0 var(--accent-color), 0 0 2px 0px white; }
  100% { box-shadow: 0 0 20px 8px var(--accent-color), 0 0 5px 2px white; }
}

/* Rating Modal Styles */
.rating-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.rating-modal.active {
  display: flex;
}

.rating-content {
  background-color: var(--card-bg);
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.rating-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.rating-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

.close-rating {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--item-details);
}

.rating-body {
  margin-bottom: 1.5rem;
}

/* Rating Stars Styles - FIXED DIRECTION */
.rating-stars {
  font-size: 2rem;
  margin: 1rem 0;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  /* REMOVE direction: rtl */
  direction: ltr; /* Change from rtl to ltr */
  unicode-bidi: bidi-override; /* Keep this */
}

.star {
  cursor: pointer;
  color: var(--border);
  transition: color 0.2s;
  position: relative;
}

.star:hover,
.star.active {
  color: var(--message-warning);
}

/* Remove the ~ selector that was for RTL */
.star:hover ~ .star {
  color: var(--border); /* Reset other stars on hover */
}

/* Active state - highlight stars from left to right */
.star.active ~ .star {
  color: var(--border); /* Reset stars to the right */
}

/* Hover effect - highlight from first to hovered star */
.rating-stars:hover .star {
  color: var(--border); /* Reset all on container hover */
}

.star:hover,
.rating-stars .star:hover ~ .star {
  color: var(--message-warning); /* Highlight hovered and left stars */
}

/* Escrow rating specific styles */
.escrow-rating .rating-stars {
  font-size: 1.5rem;
  margin: 1rem 0;
  display: flex;
  gap: 0.5rem;
  direction: ltr; /* Ensure left-to-right */
  unicode-bidi: bidi-override;
}

.escrow-rating .star {
  cursor: pointer;
  color: var(--border);
  transition: color 0.2s;
}

.escrow-rating .star:hover,
.escrow-rating .star.active {
  color: var(--message-warning);
}

.escrow-rating .star:hover ~ .star {
  color: var(--border);
}

.escrow-rating .star.active ~ .star {
  color: var(--border);
}

#ratingComment {
  width: 100%;
  padding: 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background-color: var(--search-bg);
  color: var(--text);
  min-height: 80px;
  resize: vertical;
  margin-top: 1rem;
}

.rating-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.rating-button {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  border: none;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.rating-button.primary {
  background-color: var(--accent-color);
  color: white;
}

.rating-button.secondary {
  background-color: var(--bubble-bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.proceed-to-escrow:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.button-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}


.chat-tab.highlight {
  /* kill the pill shape */
  background: transparent !important;
  padding: 0.75rem 1rem !important;
  border-radius: 0 !important;

  /* infinite, smooth glow pulse */
  animation: tabGlow 2s ease-in-out infinite alternate !important;
  box-shadow: 
    0 0 10px 3px var(--accent-color),
    0 0 2px 1px white !important;

  /* ditch the underline, keep the box */
  border-bottom: none !important;
  color: var(--accent-color) !important;
}

@keyframes tabGlow {
  from {
    box-shadow: 
      0 0 0   0   var(--accent-color),
      0 0 2px 0px white;
  }
  to {
    box-shadow: 
      0 0 20px 8px var(--accent-color),
      0 0 5px  2px white;
  }
}

/* Ensures only one loader can exist at a time */
.chat-messages > .loading-indicator:not(:first-child) {
  display: none !important;
}

/* Ensure only one divider per date is visible */
.message-group-date ~ .message-group-date[data-date] {
  display: none;
}

/* Instagram-style Offer Card */
.instagram-offer-card {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  background: var(--card-bg);
  max-width: 400px;
}

.offer-header {
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.offer-badge {
  background: var(--primary-color);
  color: white;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.8em;
  font-weight: bold;
  margin-right: 8px;
}

.offer-title {
  display: inline;
  font-size: 1em;
  margin: 0;
  color: var(--text-color);
}

.offer-image-container {
  width: 100%;
  aspect-ratio: 1/1;
  overflow: hidden;
  background: #f5f5f5;
}

.offer-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.offer-body {
  padding: 12px;
}

.offer-description {
  margin: 0 0 12px 0;
  font-size: 0.95em;
  line-height: 1.4;
  color: var(--text-color);
}

.offer-details {
  display: flex;
  gap: 15px;
  font-size: 0.9em;
}

.offer-price, .offer-terms {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
}

.offer-price i, .offer-terms i {
  font-size: 0.9em;
}

/* Offer Status & Actions */
.offer-status {
  padding: 8px 12px;
  margin-top: 12px;
  border-top: 1px solid var(--border-color);
  font-weight: bold;
  text-align: center;
}

.offer-status.accepted {
  color: #4CAF50;
}

.offer-status.declined {
  color: #F44336;
}

.offer-status.error {
  color: #FF9800;
}

.offer-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.offer-button {
  flex: 1;
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
}

.offer-button.accept-offer {
  background: var(--primary-color);
  color: white;
}

.offer-button.decline-offer {
  background: #f5f5f5;
  color: var(--text-color);
}

.offer-button.proceed-to-escrow {
  background: #4CAF50;
  color: white;
}

.offer-button:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Final Instagram-style Offer Card with Perfect Image Display */
.message.offer .message-bubble {
  background-color: var(--card-bg, #ffffff);
  border: 1px solid var(--border, #dbdbdb);
  border-radius: 12px;
  padding: 0;
  max-width: 470px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Header */
.message.offer .offer-header {
  padding: 14px 16px;
  display: flex;
  align-items: center;
}

.message.offer .offer-badge {
  background-color: var(--accent-color, #0095f6);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.message.offer .offer-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text, #262626);
  margin-left: 10px;
}

/* Image Container - Fixed to show full image */
.message.offer .offer-image-container {
  width: 100%;
  max-height: 400px; /* Adjust this value as needed */
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: transparent; /* No white background */
}

.message.offer .offer-image {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Changed from 'contain' to 'cover' for better filling */
  display: block;
}

/* Body */
.message.offer .offer-body {
  padding: 16px;
}

.message.offer .offer-description {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text, #262626);
  margin-bottom: 12px;
  white-space: pre-line;
}

.message.offer .offer-details {
  display: flex;
  gap: 20px;
  margin: 12px 0;
}

.message.offer .offer-price,
.message.offer .offer-terms {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.message.offer .offer-price {
  color: var(--accent-color, #0095f6);
  font-weight: 600;
}

.message.offer .offer-terms {
  color: var(--item-details, #8e8e8e);
}

/* Status & Actions */
.message.offer .offer-status {
  font-weight: 600;
  padding: 12px 16px;
  margin: 12px -16px -16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
  background-color: rgba(0, 184, 148, 0.05);
  color: var(--message-success, #00b894);
}

.message.offer .offer-status.declined {
  background-color: rgba(214, 48, 49, 0.05);
  color: var(--message-danger, #d63031);
}

.message.offer .offer-actions {
  display: flex;
  gap: 8px;
  padding: 16px;
}

.message.offer .offer-button {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.message.offer .accept-offer {
  background-color: var(--message-success, #00b894);
  color: white;
}

.message.offer .accept-offer:hover {
  background-color: #00a884;
  transform: translateY(-1px);
}

.message.offer .decline-offer {
  background-color: var(--card-bg, #ffffff);
  color: var(--message-danger, #d63031);
  border: 1px solid var(--border, #dbdbdb);
}

.message.offer .decline-offer:hover {
  background-color: var(--bg-color, #fafafa);
  transform: translateY(-1px);
}

.message.offer .proceed-to-escrow {
  background-color: var(--accent-color, #7c6af6);
  color: white;
  width: 100%;
}

.message.offer .proceed-to-escrow:hover {
  background-color: #6a5af0;
  transform: translateY(-1px);
}


/* Comparison Offer Card */
.offer-comparison-container {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  background: var(--card-bg);
  max-width: 500px;
}

.offer-comparison-header {
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.offer-comparison-badge {
  background: rgba(139, 92, 246, 0.08) !important;
  color: var(--accent-color) !important;
  padding: 0.3rem 0.8rem !important;
  border-radius: 6px !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.3px !important;
  text-transform: uppercase !important;
  display: inline-block !important;
}

.offer-comparison-title {
  display: inline;
  font-size: 1em;
  margin: 0;
  color: var(--text-color);
}

.offer-comparison-images {
  display: flex;
  width: 100%;
  position: relative;
}

.offer-comparison-item {
  flex: 1;
  position: relative;
  overflow: hidden;
  aspect-ratio: 1/1;
}

.offer-comparison-separator {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 8px;
  border-radius: 50%;
  z-index: 2;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  font-weight: bold;
}

.offer-comparison-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.5);
  color: white;
  padding: 5px;
  text-align: center;
  font-size: 0.8em;
}

.offer-comparison-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.offer-comparison-body {
  padding: 12px;
}

.offer-comparison-description {
  margin: 0 0 12px 0;
  font-size: 0.95em;
  line-height: 1.4;
  color: var(--text-color);
}

.offer-comparison-details {
  display: flex;
  gap: 15px;
  font-size: 0.9em;
}

.offer-comparison-price, .offer-comparison-terms {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
}

/* Status & Actions - same as before but with comparison prefix */
.offer-comparison-status {
  padding: 8px 12px;
  margin-top: 12px;
  border-top: 1px solid var(--border-color);
  font-weight: bold;
  text-align: center;
}

.offer-comparison-status.accepted {
  color: #4CAF50;
}

.offer-comparison-status.declined {
  color: #F44336;
}

.offer-comparison-status.error {
  color: #FF9800;
}

.offer-comparison-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.offer-comparison-button {
  flex: 1;
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
}

.offer-comparison-button.accept-offer {
  background: var(--primary-color);
  color: white;
}

.offer-comparison-button.decline-offer {
  background: #f5f5f5;
  color: var(--text-color);
}

.offer-comparison-button.proceed-to-escrow {
  background: #4CAF50;
  color: white;
}

.offer-comparison-button:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}







    /* Confirmation modal styles */
    .confirmation-modal {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background-color: rgba(0, 0, 0, 0.5);
      z-index: 2000;
      align-items: center;
      justify-content: center;
    }

    .confirmation-modal.active {
      display: flex;
    }

    .confirmation-content {
      background-color: var(--card-bg);
      border-radius: 8px;
      width: 90%;
      max-width: 400px;
      padding: 1.5rem;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .confirmation-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 1rem;
    }

    .confirmation-title {
      font-size: 1.25rem;
      font-weight: 600;
      color: var(--text);
    }

    .close-confirmation {
      background: none;
      border: none;
      font-size: 1.5rem;
      cursor: pointer;
      color: var(--item-details);
    }

    .confirmation-body {
      margin-bottom: 1.5rem;
      color: var(--text);
    }

    .confirmation-actions {
      display: flex;
      justify-content: flex-end;
      gap: 0.75rem;
    }

    .confirmation-button {
      padding: 0.5rem 1rem;
      border-radius: 6px;
      border: none;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .confirmation-button.cancel {
      background-color: var(--bubble-bg);
      color: var(--text);
    }

    .confirmation-button.confirm {
      background-color: var(--message-danger);
      color: white;
    }

.conversation-items {
  will-change: transform;
}

.conversation-item {
  transition: opacity 0.2s ease;
}

.conversation-item.updating {
  opacity: 0.8;
}

.conversation-dropdown {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

.conversation-item:hover .conversation-menu-toggle {
  opacity: 1 !important;
}

.conversation-menu-toggle:hover {
  background-color: var(--bubble-hover-bg);
  color: var(--text);
}

.conversation-menu {
  position: absolute;
  left: 0;
  top: 100%;
  background: var(--dropdown-bg);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 150px;
  z-index: 100;
  border: 1px solid var(--border);
  display: none;
  padding: 0.5rem 0;
  margin-top: 5px;
}

.conversation-menu.active {
  display: block;
  animation: fadeInDropdown 0.2s ease-out;
}

.conversation-menu-item {
  padding: 0.75rem 1rem;
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.conversation-menu-item:hover {
  background-color: var(--bubble-hover-bg);
}

.conversation-menu-item.delete {
  color: var(--message-danger);
}

.conversation-menu-item.delete:hover {
  background-color: rgba(214, 48, 49, 0.1);
}

@keyframes fadeInDropdown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* Chat Header Dropdown Styles */
.chat-header-dropdown {
  position: relative;
}

.chat-header-menu {
  position: absolute;
  right: 0;
  top: 100%;
  background: var(--dropdown-bg);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 180px;
  z-index: 100;
  border: 1px solid var(--border);
  display: none;
  padding: 0.5rem 0;
  margin-top: 5px;
}

.chat-header-menu.active {
  display: block;
  animation: fadeInDropdown 0.2s ease-out;
}

.chat-header-menu-item {
  padding: 0.75rem 1rem;
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.chat-header-menu-item:hover {
  background-color: var(--bubble-hover-bg);
}

.chat-header-menu-item.delete-conversation {
  color: var(--message-danger);
}

.chat-header-menu-item.delete-conversation:hover {
  background-color: rgba(214, 48, 49, 0.1);
}

/* Escrow Proofs Styles */
#escrowProofsContainer {
  margin: 20px 0;
  padding: 15px;
  background: var(--bubble-bg);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.proof-section {
  margin-bottom: 20px;
}

.proof-section h4 {
  margin: 0 0 10px 0;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
}

.proofs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.proof-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-primary);
  border: 1px solid var(--border);
}

.proof-item img,
.proof-item video {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

.proof-item .file-proof {
  padding: 20px;
  text-align: center;
  background: var(--bg-secondary);
}

.proof-item .file-proof i {
  font-size: 24px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.proof-item .file-proof p {
  margin: 0;
  font-size: 12px;
  color: var(--text-secondary);
  word-break: break-word;
}

.proof-info {
  padding: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  font-size: 11px;
}

.proof-party {
  display: block;
  font-weight: 600;
  margin-bottom: 2px;
}

.proof-name {
  display: block;
  opacity: 0.8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.no-proofs {
  text-align: center;
  color: var(--text-secondary);
  font-style: italic;
  margin: 0;
  padding: 20px;
}

/* Different colors for buyer/seller proofs */
.proof-buyer {
  border-left: 3px solid var(--accent-color);
}

.proof-seller {
  border-left: 3px solid var(--message-warning);
}

/* Proof Images in Chat */
.system-message-content {
  text-align: center;
}

.proof-images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.proof-image-item {
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.proof-image-item:hover {
  transform: scale(1.05);
}

.proof-image-item img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
}

/* Image Modal */
.image-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
}

.image-modal.active {
  display: flex;
}

.image-modal-content {
  max-width: 90%;
  max-height: 90%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.image-modal-content img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.image-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  color: white;
  font-size: 30px;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
}

/* Rating section in escrow tab */
.escrow-rating {
  padding: 1.5rem;
  background: var(--bubble-bg);
  border-radius: 12px;
  margin-top: 1.5rem;
  border: 1px solid var(--border);
  display: none;
}

.escrow-rating h4 {
  margin-bottom: 1rem;
  color: var(--text);
}

.escrow-rating p {
  margin-bottom: 1rem;
  color: var(--item-details);
}

.escrow-rating .rating-stars {
  font-size: 1.5rem;
  margin: 1rem 0;
  display: flex;
  gap: 0.5rem;
}

.escrow-rating .star {
  cursor: pointer;
  color: var(--border);
  transition: color 0.2s;
}

.escrow-rating .star:hover,
.escrow-rating .star.active {
  color: var(--message-warning);
}

#tradeRatingComment {
  width: 100%;
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--search-bg);
  color: var(--text);
  resize: vertical;
  margin: 1rem 0;
  font-family: inherit;
}

.rating-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

/* Larger proof images in system messages */
.proof-images-grid-large {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.proof-image-item-large {
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.proof-image-item-large:hover {
  transform: scale(1.05);
}

.proof-image-item-large img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
}

/* Make sure system messages with images have proper spacing */
.message.system .message-bubble {
  max-width: 90%;
  padding: 16px;
}

.system-message-content {
  text-align: left;
}

/* Mobile Responsiveness for Messaging */
@media (max-width: 768px) {
  .chat-container {
    flex-direction: column;
    height: auto;
    min-height: calc(100vh - 72px);
    position: relative;
  }
  
  .conversation-list {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    transition: transform 0.3s ease;
  }
  
  .chat-area {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 20;
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }
  
  .chat-area.active {
    transform: translateX(0);
  }
  
  .conversation-list.hidden {
    transform: translateX(-100%);
  }
  
  /* Mobile header for chat view */
  .mobile-chat-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    background: var(--header-bg);
  }
  
  .back-button {
    background: none;
    border: none;
    font-size: 1.2rem;
    margin-right: 1rem;
    color: var(--text);
    cursor: pointer;
  }
  
  /* Adjust conversation items for mobile */
  .conversation-item {
    padding: 1rem;
  }
  
  .conversation-avatar {
    width: 50px;
    height: 50px;
  }
  
  /* Adjust chat input for mobile */
  .chat-input {
    padding: 0.75rem;
  }
  
  .chat-input textarea {
    min-height: 44px; /* Minimum touch target size */
  }
  
  .chat-input-button {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Hide sidebar on mobile */
  .sidebar {
    display: none;
  }
  
  .main-container {
    flex-direction: column;
  }
  
  .content {
    padding: 1rem;
  }
}

/* Desktop styles remain unchanged */
@media (min-width: 769px) {
  .mobile-chat-header {
    display: none;
  }
  
  .back-button {
    display: none;
  }
}

/* Touch-friendly improvements */
.conversation-item {
  padding: 1rem;
  min-height: 72px; /* Minimum touch target size */
}

.chat-header-action {
  min-width: 44px;
  min-height: 44px;
}

.chat-tab {
  padding: 1rem;
  min-height: 44px;
}

.escrow-button {
  min-height: 44px;
  padding: 0.75rem 1rem;
}

/* Prevent zoom on input focus on mobile */
@media (max-width: 768px) {
  input, textarea, select {
    font-size: 16px; /* Prevents zoom on focus in iOS */
  }
}


/* Mobile-friendly trade section */
@media (max-width: 768px) {
  /* Escrow container */
  .escrow-container {
    margin: 0.5rem;
    padding: 0.75rem;
  }
  
  /* Progress steps - horizontal scroll on mobile */
  .escrow-steps {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    justify-content: flex-start;
    gap: 0.5rem;
  }
  
  .escrow-steps::before {
    display: none;
  }
  
  .escrow-step {
    flex: 0 0 auto;
    min-width: 80px;
  }
  
  .step-label {
    font-size: 0.7rem;
    max-width: 70px;
  }
  
  /* Escrow actions - stack vertically */
  .escrow-actions {
    flex-direction: column;
  }
  
  .escrow-button {
    width: 100%;
    justify-content: center;
    margin-bottom: 0.5rem;
  }
  
  /* Upload area */
  .upload-area {
    padding: 1rem;
  }
  
  .upload-icon {
    font-size: 1.5rem;
  }
  
  /* Upload preview */
  .upload-preview {
    justify-content: center;
  }
  
  .upload-preview-item {
    width: 70px;
    height: 70px;
  }
  
  /* Proof sections */
  .proof-section {
    margin-bottom: 1rem;
  }
  
  .proofs-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.5rem;
  }
  
  /* Escrow details */
  .escrow-details {
    padding: 0.75rem;
  }
  
  .detail-row {
    flex-direction: column;
    margin-bottom: 0.75rem;
  }
  
  .detail-label {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
  }
  
  /* Rating section */
  .escrow-rating {
    padding: 1rem;
  }
  
  .rating-stars {
    font-size: 1.25rem;
  }
  
  /* Offer cards on mobile */
  .message.offer .message-bubble {
    max-width: 95%;
  }
  
  .offer-comparison-images {
    flex-direction: column;
  }
  
  .offer-comparison-separator {
    position: relative;
    transform: none;
    margin: 0.5rem 0;
  }
  
  .offer-actions {
    flex-direction: column;
  }
  
  /* Dispute modal */
  .dispute-content {
    width: 95%;
    margin: 1rem;
    padding: 1rem;
  }
  
  /* Confirmation modal */
  .confirmation-content {
    width: 95%;
    padding: 1rem;
  }
}

/* Additional mobile optimizations for trade section */
@media (max-width: 480px) {
  .escrow-step {
    min-width: 70px;
  }
  
  .step-indicator {
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
  }
  
  .step-label {
    font-size: 0.65rem;
    max-width: 60px;
  }
  
  .escrow-timer {
    font-size: 0.8rem;
    padding: 0.4rem;
  }
  
  .proofs-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  }
}

/* Touch-friendly improvements for trade section */
.escrow-button {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-indicator {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-area {
  cursor: pointer;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Prevent zoom on input focus on mobile */
@media (max-width: 768px) {
  .form-select, .form-textarea, #tradeRatingComment {
    font-size: 16px;
  }
}

/* Fix for progress bar lines on mobile */
@media (max-width: 768px) {
  .escrow-steps::before {
    display: block !important; /* Force the line to show on mobile */
    width: 100%;
    left: 0;
    right: 0;
  }
  
  /* Ensure the steps container has proper spacing */
  .escrow-steps {
    padding: 0 10px; /* Add some padding so the line doesn't touch edges */
  }
}



/* Fix for offer display on mobile - UPDATED (MESSAGING APP CENTERED) */
@media (max-width: 768px) {
  /* Center the entire message in the chat */
  .message.offer {
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
    margin: 0.5rem 0 !important;
  }
  
  /* Offer message container - center in chat */
  .message.offer .message-bubble {
    max-width: 90% !important;
    margin: 0 auto !important;
    display: block !important;
    position: relative !important;
  }
  
  /* Ensure container has relative positioning for absolute separator */
  .offer-comparison-container {
    position: relative;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0.5rem !important;
  }
  
  /* Keep horizontal layout like desktop - center the flex container */
  .offer-comparison-images {
    flex-direction: row !important; /* Change from column to row */
    align-items: stretch; /* Allow equal heights */
    gap: 0.5rem;
    justify-content: center !important; /* Center instead of space-between */
    display: flex !important;
    width: 100% !important;
    margin: 0 auto !important;
  }
  
  /* Individual offer items - prevent stretching */
  .offer-comparison-item {
    width: calc(45% - 0.25rem) !important; /* Slightly smaller to ensure centering */
    max-width: 160px !important; /* Add max-width to prevent too wide */
    margin: 0 !important;
    display: flex;
    flex-direction: column;
    height: auto; /* Prevent forced height */
  }
  
  /* Ensure images don't stretch vertically */
  .offer-comparison-item .offer-image-container {
    height: 150px !important; /* Fixed height for consistency */
    overflow: hidden;
    flex-shrink: 0;
  }
  
  /* Keep offer body compact */
  .offer-comparison-body {
    padding: 0.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
  
  /* Trade/swap icon - keep centered between items */
  .offer-comparison-separator {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0;
    z-index: 2;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }
  
  /* Offer details and actions - keep compact */
  .offer-comparison-details {
    flex-direction: column;
    gap: 0.25rem; /* Reduced gap */
    font-size: 0.875rem; /* Smaller text */
  }
  
  .offer-comparison-actions {
    flex-direction: row; /* Keep buttons horizontal */
    gap: 0.25rem;
    margin-top: 0.5rem;
  }
  
  .offer-comparison-button {
    flex: 1; /* Equal width buttons */
    text-align: center;
    padding: 0.375rem 0.5rem; /* Compact padding */
    font-size: 0.75rem; /* Smaller button text */
  }
}

/* Very small screen optimization - UPDATED */
@media (max-width: 480px) {
  .message.offer .message-bubble {
    max-width: 95% !important;
  }
  
  .offer-comparison-item {
    width: calc(42% - 0.25rem) !important;
    max-width: 140px !important;
  }
  
  .offer-comparison-item .offer-image-container {
    height: 120px !important; /* Smaller images on very small screens */
  }
  
  .offer-comparison-body {
    padding: 0.375rem;
  }
  
  .offer-comparison-button {
    padding: 0.25rem 0.375rem;
    font-size: 0.7rem;
  }
  
  .offer-comparison-separator {
    font-size: 1rem;
    padding: 4px;
    min-width: 28px;
    min-height: 28px;
  }
}

/* Remove Delivered status from messages */
.message-status {
  display: none !important;
}

/* Mobile Sidebar Styles - matching desktop design */
.mobile-sidebar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--aside-bg);
  border-top: 1px solid var(--border);
  z-index: 1000;
  padding: 0.75rem 0 0.5rem 0;
  backdrop-filter: blur(10px);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.mobile-sidebar-section {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 1rem;
  max-width: 500px;
  margin: 0 auto;
}

.mobile-sidebar-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 50px;
  padding: 0.5rem 0.25rem;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  font-size: 1.1rem;
  transition: all 0.2s ease;
  position: relative;
  border: 1px solid transparent;
}

.mobile-sidebar-link i {
  font-size: 1.2rem;
  color: var(--accent-color);
  margin-bottom: 0.25rem;
  transition: all 0.2s ease;
}

.mobile-sidebar-link span {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--heading-text);
  text-align: center;
  line-height: 1;
  opacity: 0.8;
}

.mobile-sidebar-link:hover {
  background-color: var(--bubble-hover-bg);
  color: var(--nav-link-hover);
  transform: translateY(-2px);
  border-color: var(--border);
}

.mobile-sidebar-link:hover i {
  color: var(--nav-link-hover);
  transform: scale(1.1);
}

.mobile-sidebar-link:hover span {
  color: var(--nav-link-hover);
  opacity: 1;
}

.mobile-sidebar-link.active {
  background-color: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
  box-shadow: var(--accent-glow);
}

.mobile-sidebar-link.active i {
  color: white;
}

.mobile-sidebar-link.active span {
  color: white;
  opacity: 1;
  font-weight: 600;
}

/* Notification badges for mobile */
.mobile-sidebar-link .notification-badge {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  background-color: var(--nav-link-hover);
  color: white;
  font-size: 0.6rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 10px;
  min-width: 16px;
  text-align: center;
  line-height: 1;
  border: 2px solid var(--aside-bg);
}

/* Status dots for mobile */
.mobile-sidebar-link .status-dot {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1px solid var(--aside-bg);
}

.mobile-sidebar-link .status-dot.online {
  background-color: var(--message-success);
}

.mobile-sidebar-link .status-dot.away {
  background-color: var(--message-warning);
}

.mobile-sidebar-link .status-dot.busy {
  background-color: var(--message-danger);
}

/* Special mobile link styles */
.mobile-sidebar-link.trade-link.active {
  background: linear-gradient(135deg, var(--message-success) 0%, #00a085 100%);
}

.mobile-sidebar-link.marketplace-link.active {
  background: linear-gradient(135deg, var(--message-info) 0%, #0875d1 100%);
}

.mobile-sidebar-link.premium-link::after {
  content: '✨';
  position: absolute;
  top: 0.2rem;
  left: 0.2rem;
  font-size: 0.6rem;
  opacity: 0.7;
}

.mobile-sidebar-link.premium-link.active::after {
  opacity: 1;
  animation: sparkle 0.6s ease;
}

/* Quick action button for mobile */
.mobile-quick-action {
  position: fixed;
  bottom: 80px;
  right: 1rem;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--category-accent) 100%);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 1.5rem;
  box-shadow: var(--accent-glow), 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
  z-index: 999;
}

.mobile-quick-action:hover {
  transform: scale(1.1);
  box-shadow: var(--category-glow), 0 6px 20px rgba(0, 0, 0, 0.2);
}

.mobile-quick-action:active {
  transform: scale(0.95);
}

/* Mobile view adjustments */
@media (max-width: 768px) {
  .mobile-sidebar {
    display: block;
  }
  
  .sidebar {
    display: none;
  }
  
  .main-container {
    padding-bottom: 85px; /* Space for mobile sidebar */
  }
  
  .chat-container {
    height: calc(100vh - 157px); /* Adjust for header + mobile sidebar */
  }
  
  /* Hide desktop sidebar completely */
  .sidebar {
    transform: translateX(-100%);
    width: 0;
  }
  
  /* Adjust main content area */
  .main-content {
    margin-left: 0;
    width: 100%;
  }
}

/* Very small screens */
@media (max-width: 480px) {
  .mobile-sidebar-section {
    padding: 0 0.5rem;
  }
  
  .mobile-sidebar-link {
    min-width: 45px;
    padding: 0.4rem 0.2rem;
  }
  
  .mobile-sidebar-link i {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
  }
  
  .mobile-sidebar-link span {
    font-size: 0.65rem;
  }
  
  .mobile-quick-action {
    width: 50px;
    height: 50px;
    font-size: 1.3rem;
    bottom: 75px;
  }
  
  .main-container {
    padding-bottom: 80px;
  }
  
  .chat-container {
    height: calc(100vh - 152px);
  }
}

/* Entrance animation for mobile */
.mobile-sidebar {
  animation: slideUpMobile 0.3s ease-out;
}

@keyframes slideUpMobile {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Individual link animation */
.mobile-sidebar-link {
  animation: fadeInUp 0.4s ease-out backwards;
}

.mobile-sidebar-link:nth-child(1) { animation-delay: 0.1s; }
.mobile-sidebar-link:nth-child(2) { animation-delay: 0.15s; }
.mobile-sidebar-link:nth-child(3) { animation-delay: 0.2s; }
.mobile-sidebar-link:nth-child(4) { animation-delay: 0.25s; }
.mobile-sidebar-link:nth-child(5) { animation-delay: 0.3s; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Dark theme specific adjustments */
body.dark .mobile-sidebar {
  backdrop-filter: blur(10px);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

/* Haptic feedback simulation for touch devices */
@media (hover: none) and (pointer: coarse) {
  .mobile-sidebar-link:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
  }
}


/* Fix for mobile input area being hidden */
/* Fix for mobile input area spacing */
@media (max-width: 768px) {
  .chat-input {
    padding-bottom:65px; /* Reduced from 65px */
    background-color: var(--card-bg);
    z-index: 1001;
    position: relative;
    margin-bottom: 0;
  }
  
  .chat-area.active {
    padding-bottom: 0;
  }
  
  /* Adjust chat messages area - reduced padding */
  .chat-messages {
    padding-bottom: 20px; /* Reduced from 70px */
  }
  
  /* Ensure proper spacing without excessive padding */
  .chat-container {
    height: calc(100vh - 137px); /* Better height calculation */
  }
}


/* Offer comparison styles */
.offer-comparison-details {
  margin-top: 15px;
  padding: 15px;
  background: var(--message-bg);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.offer-comparison-details h4 {
  margin: 0 0 10px 0;
  font-size: 14px;
  color: var(--text);
  font-weight: 600;
}

.offer-detail {
  margin: 8px 0;
  font-size: 13px;
  line-height: 1.4;
}

.offer-detail strong {
  color: var(--text);
  display: inline-block;
  min-width: 100px;
}

.offer-comparison-message {
  margin: 0 0 15px 0;
  padding: 10px;
  background: var(--message-bg);
  border-radius: 8px;
  border-left: 3px solid var(--accent-color);
  font-size: 14px;
  line-height: 1.4;
}

.offer-comparison-message strong {
  color: var(--accent-color);
}

.offer-comparison-status {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  text-align: center;
}

.offer-comparison-status.accepted {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.offer-comparison-status.declined {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.offer-comparison-status.pending {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}


.offer-comparison-status.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.offer-comparison-actions {
  margin-top: 15px;
  display: flex;
  gap: 10px;
  justify-content: center;
}

.offer-comparison-button {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 13px;
}

.offer-comparison-button.accept-offer {
  background: var(--success-color);
  color: white;
}

.offer-comparison-button.decline-offer {
  background: var(--error-color);
  color: white;
}

.offer-comparison-button.proceed-to-escrow {
  background: var(--accent-color);
  color: white;
}

.offer-comparison-button:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.offer-comparison-button:active {
  transform: translateY(0);
}


/* Minimalist Offer Details - Matches Your Design System */
.offer-comparison-details {
  background: var(--bubble-bg);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.25rem 0;
  border: 1px solid var(--border);
}

.offer-comparison-details h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 1.25rem 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.offer-comparison-details h4 i {
  color: var(--accent-color);
  font-size: 1rem;
}

.offer-detail {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.offer-detail:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.offer-detail strong {
  min-width: 120px;
  font-size: 0.85rem;
  color: var(--item-details);
  font-weight: 600;
  margin-right: 1rem;
  line-height: 1.4;
}

.offer-detail span {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.4;
  flex: 1;
  word-break: break-word;
}

/* Dark mode adjustments */
body.dark .offer-detail {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}/* Minimalist Offer Details - Matches Your Design System */
.offer-comparison-details {
  background: var(--bubble-bg);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.25rem 0;
  border: 1px solid var(--border);
}

.offer-comparison-details h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 1.25rem 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.offer-comparison-details h4 i {
  color: var(--accent-color);
  font-size: 1rem;
}

.offer-detail {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.offer-detail:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.offer-detail strong {
  min-width: 120px;
  font-size: 0.85rem;
  color: var(--item-details);
  font-weight: 600;
  margin-right: 1rem;
  line-height: 1.4;
}

.offer-detail span {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.4;
  flex: 1;
  word-break: break-word;
}

/* Dark mode adjustments */
body.dark .offer-detail {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .offer-comparison-details {
    padding: 1.25rem;
    margin: 1rem 0;
  }
  
  .offer-detail {
    flex-direction: column;
    gap: 0.375rem;
    margin-bottom: 0.875rem;
    padding-bottom: 0.875rem;
  }
  
  .offer-detail strong {
    min-width: auto;
    margin-right: 0;
    font-size: 0.82rem;
  }
  
  .offer-detail span {
    font-size: 0.88rem;
  }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .offer-comparison-details {
    padding: 1.25rem;
    margin: 1rem 0;
  }
  
  .offer-detail {
    flex-direction: column;
    gap: 0.375rem;
    margin-bottom: 0.875rem;
    padding-bottom: 0.875rem;
  }
  
  .offer-detail strong {
    min-width: auto;
    margin-right: 0;
    font-size: 0.82rem;
  }
  
  .offer-detail span {
    font-size: 0.88rem;
  }
}

/* ===== NUCLEAR FIX WITH PROPER FONT ===== */
.offer-comparison-details {
  all: initial; /* Reset everything */
  display: block;
  margin: 1rem 0 0 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
}

.offer-comparison-details h4 {
  all: initial;
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.75rem 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
}

.offer-comparison-details h4 i {
  color: var(--accent-color);
  margin-right: 0.5rem;
}

.offer-detail {
  all: initial;
  display: block;
  margin-bottom: 0.6rem;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
  line-height: 1.4;
}

.offer-detail strong {
  all: initial;
  display: inline;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-right: 0.5rem;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
  opacity: 0.9;
}

.offer-detail span {
  all: initial;
  display: inline;
  font-size: 0.85rem;
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
  opacity: 0.8;
}

/* Make it blend with your offer panel */
.offer-comparison-body {
  padding: 0 1rem 1rem 1rem;
}

/* Dark mode adjustments */
body.dark .offer-detail strong {
  opacity: 0.8;
}

body.dark .offer-detail span {
  opacity: 0.7;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .offer-comparison-details {
    margin: 0.75rem 0 0 0;
  }
  
  .offer-detail {
    margin-bottom: 0.5rem;
    font-size: 0.82rem;
  }
  
  .offer-detail strong {
    font-size: 0.82rem;
    margin-right: 0.4rem;
  }
  
  .offer-detail span {
    font-size: 0.82rem;
  }
  
  .offer-comparison-body {
    padding: 0 0.75rem 0.75rem 0.75rem;
  }
}
.offer-comparison-separator {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.5rem !important;
  color: var(--accent-color) !important;
  font-weight: bold !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  width: auto !important;
  height: auto !important;
  border-radius: 0 !important;
}
/* Notification badge styles for sidebar */
.sidebar-link .notification-badge {
  background: linear-gradient(135deg, #ff4a4a, #ff6b6b);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
  min-width: 20px;
  text-align: center;
  line-height: 1;
  margin-left: auto;
  animation: pulse 2s infinite;
  box-shadow: 0 2px 8px rgba(255, 74, 74, 0.3);
}

.mobile-sidebar-link .notification-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  background: linear-gradient(135deg, #ff4a4a, #ff6b6b);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 10px;
  min-width: 16px;
  text-align: center;
  line-height: 1;
  animation: pulse 2s infinite;
  box-shadow: 0 2px 6px rgba(255, 74, 74, 0.3);
  border: 2px solid var(--aside-bg);
}

/* Pulse animation for attention */
@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 2px 8px rgba(255, 74, 74, 0.3);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 74, 74, 0.5);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 2px 8px rgba(255, 74, 74, 0.3);
  }
}

/* Ensure proper positioning */
.sidebar-link {
  position: relative;
  display: flex;
  align-items: center;
}

.mobile-sidebar-link {
  position: relative;
}

/* Simple fix - make sure mobile links are clickable */
.mobile-sidebar-link {
  pointer-events: auto !important;
  cursor: pointer !important;
  position: relative !important;
  z-index: 1 !important;
}

.mobile-sidebar-link span {
  display: inline-block !important; /* This is the key fix */
}
/* Fix for mobile sidebar links */
.mobile-sidebar-link {
  pointer-events: auto !important;
  position: relative;
  z-index: 1001 !important;
}

.mobile-sidebar-link span {
  display: inline-block !important;
  pointer-events: none;
}

.mobile-sidebar-link i {
  pointer-events: none;
}

/* Ensure mobile sidebar is above other content */
.mobile-sidebar {
  z-index: 1000 !important;
  position: fixed !important;
}

/* Dark mode toggle inside settings dropdown */
.dark-mode-toggle-container {
  padding: 0.75rem 1rem;
  margin: 0;
  border-top: 1px solid var(--border); /* Keep only top border */
  /* Remove border-bottom */
}

.dark-mode-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 0.5rem 0;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.dark-mode-toggle:hover {
  background-color: var(--bubble-hover-bg);
}

.dark-mode-toggle i {
  font-size: 1rem;
  color: var(--accent-color);
  margin-right: 0.75rem;
}

.dark-mode-text {
  flex: 1;
  text-align: left;
  font-size: 0.9rem;
  font-weight: 500;
}

.dark-mode-switch {
  position: relative;
  width: 44px;
  height: 24px;
  background-color: var(--bubble-bg);
  border-radius: 12px;
  transition: background-color 0.3s ease;
}

body.dark .dark-mode-switch {
  background-color: var(--accent-color);
}

.dark-mode-slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

body.dark .dark-mode-slider {
  transform: translateX(20px);
}

/* Remove the old standalone dark mode toggle */
.dark-mode-toggle:not(.dark-mode-toggle-container .dark-mode-toggle) {
  display: none;
}

/* Settings menu adjustments for the new toggle */
.settings-menu {
  width: 220px;
  padding: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.settings-menu a {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: var(--text);
  transition: background-color 0.2s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-size: 0.9rem;
  margin: 0;
  box-sizing: border-box;
}

.settings-menu a i {
  margin-right: 0.75rem;
  width: 16px;
  text-align: center;
}

.settings-menu a:hover {
  background-color: var(--bubble-hover-bg);
}

.signout-link {
  color: #e74c3c !important;
  border-top: 1px solid var(--border);
}

.signout-link:hover {
  background-color: rgba(231, 76, 60, 0.1) !important;
}



/* ===== AUTH MODAL STYLES ===== */
.auth-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  backdrop-filter: blur(5px);
  padding: 20px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.auth-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.auth-modal-content {
  background: var(--card-bg);
  border-radius: 16px;
  width: 100%;
  max-width: 450px;
  max-height: 90vh;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  border: 1px solid var(--border);
  animation: modalSlideIn 0.3s ease-out;
  display: flex;
  flex-direction: column;
  position: relative;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth-modal-header {
  background: var(--accent-color);
  color: white;
  padding: 1.5rem 2rem;
  position: relative;
  flex-shrink: 0;
  text-align: center;
}

.auth-modal-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.auth-modal-title i {
  color: var(--boosted-color);
}

.auth-close-modal {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.2s ease;
  z-index: 10;
}

.auth-close-modal:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.auth-modal-body {
  padding: 2rem;
  overflow-y: auto;
  flex: 1;
}

.auth-tabs {
  display: flex;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.auth-tab {
  flex: 1;
  padding: 0.75rem;
  text-align: center;
  background: none;
  border: none;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.auth-tab.active {
  color: var(--accent-color);
}

.auth-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-color);
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
}

.auth-form .form-group {
  margin-bottom: 1.25rem;
}

.auth-form .form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text);
}

.auth-form .form-control {
  width: 100%;
  padding: 0.875rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.auth-form .form-control:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.auth-form .form-error {
  color: var(--error-color);
  font-size: 0.85rem;
  margin-top: 0.5rem;
  display: none;
}

.auth-form .form-error.show {
  display: block;
}

.auth-modal .age-verification {
  margin: 1.5rem 0;
  padding: 1rem;
  background: var(--bubble-bg);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.auth-modal .checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 1rem;
}

.auth-modal .checkbox-group input[type="checkbox"] {
  margin-top: 0.25rem;
  flex-shrink: 0;
}

.auth-modal .checkbox-group label {
  font-weight: normal;
  margin-bottom: 0;
  line-height: 1.4;
}

.auth-divider {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
  color: var(--item-details);
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-divider span {
  padding: 0 1rem;
  font-size: 0.9rem;
}

.social-auth {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.875rem 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.social-btn.google {
  background: white;
  color: #757575;
  border: 1px solid #ddd;
}

.social-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.social-btn.google:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.social-btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

.social-btn .btn-text {
  transition: opacity 0.2s ease;
}

.social-btn.loading .btn-text {
  opacity: 0;
}

.social-btn .btn-loader {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-top-color: #757575;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.social-btn.loading .btn-loader {
  opacity: 1;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.auth-form-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* SCOPE ALL BUTTON STYLES TO AUTH MODAL ONLY */
.auth-modal .btn {
  padding: 0.875rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-size: 1rem;
  min-width: 120px;
}

.auth-modal .btn-secondary {
  background: var(--bubble-bg);
  color: var(--text);
}

.auth-modal .btn-secondary:hover {
  background: var(--bubble-hover-bg);
}

.auth-modal .btn-primary {
  background: var(--accent-color);
  color: white;
}

.auth-modal .btn-primary:hover {
  background: var(--nav-link-hover);
  transform: translateY(-2px);
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--item-details);
  font-size: 0.9rem;
}

.auth-footer a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 600;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* Success/Error notifications */
.auth-notification {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  display: none;
}

.auth-notification.error {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid var(--error-color);
  color: var(--error-color);
}

.auth-notification.success {
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid var(--success-color);
  color: var(--success-color);
}

.auth-notification.show {
  display: block;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .auth-modal-overlay {
    padding: 10px;
    align-items: flex-start;
  }
  
  .auth-modal-content {
    max-height: 95vh;
    margin-top: 20px;
    margin-bottom: 20px;
  }
  
  .auth-modal-header {
    padding: 1.25rem 1.5rem;
  }
  
  .auth-modal-body {
    padding: 1.5rem;
  }
  
  .auth-modal-title {
    font-size: 1.3rem;
  }
  
  .auth-close-modal {
    top: 1rem;
    right: 1rem;
  }
}

@media (max-width: 480px) {
  .auth-modal-header {
    padding: 1rem 1.25rem;
  }
  
  .auth-modal-body {
    padding: 1.25rem;
  }
  
  .auth-form-actions {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .auth-modal .btn {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
  
  .social-btn {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
  
  .auth-tab {
    padding: 0.5rem;
    font-size: 0.9rem;
  }
}


.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem; /* Reduced from 0.75rem */
  text-decoration: none;
}

.logo img {
  height: 60px;
  width: auto;
  object-fit: contain;
  display: block;
}

.logo-text {
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--accent-color);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0px;
  text-shadow: 0 2px 4px rgba(139, 92, 246, 0.2);
  line-height: 1;
  margin: 0;
}

/* ===== MOBILE CONVERSATION FIX ===== */
@media (max-width: 768px) {
  /* Ensure mobile starts with conversation list visible */
  .conversation-list {
    transform: translateX(0) !important;
    display: flex !important;
    flex-direction: column !important;
    transition: transform 0.3s ease !important; /* Add smooth transition */
  }
  
  .conversation-list.hidden {
    transform: translateX(-100%) !important;
  }
  
  .chat-area {
    transform: translateX(100%) !important;
    transition: transform 0.3s ease !important; /* Add smooth transition */
  }
  
  .chat-area.active {
    transform: translateX(0) !important;
  }
  
  /* Prevent any auto-selection on load */
  .conversation-item.active {
    background-color: var(--bubble-bg) !important;
  }
  
  /* Ensure empty state is visible initially */
  .empty-state {
    display: flex !important;
  }
  
  /* Mobile chat header should always be visible when chat is active */
  .mobile-chat-header {
    display: flex !important;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    background: var(--header-bg);
  }
  
  .back-button {
    background: none;
    border: none;
    font-size: 1.2rem;
    margin-right: 1rem;
    color: var(--text);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.2s ease;
  }
  
  .back-button:hover {
    background-color: var(--bubble-hover-bg);
  }
}
/* Safe viewport tag that fixes issues without breaking accessibility */
@media (max-width: 768px) {
  body {
    height: 100vh;
    height: -webkit-fill-available;
    /* REMOVE these problematic lines: */
    /* overflow: hidden; */
    /* position: fixed; */
    width: 100%;
  }
  
  .main-container {
    height: 100vh;
    height: -webkit-fill-available;
    /* Add this to ensure proper scrolling */
    overflow: hidden;
  }
  
  .chat-container {
    height: 100%;
    position: relative;
  }
  
  .conversation-list,
  .chat-area {
    height: 100%;
    overflow-y: auto;
  }
}


/* Fix mobile back button clickability */
.mobile-chat-header {
  position: relative;
  z-index: 1000 !important;
}

.back-button {
  position: relative;
  z-index: 1001 !important;
  min-width: 44px !important;
  min-height: 44px !important;
  pointer-events: auto !important;
  cursor: pointer !important;
}

/* Ensure the button is properly sized and visible */
#backToConversations {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  font-size: 1.2rem;
  color: var(--text);
}

/* MOBILE CLICKABILITY FIX */
@media (max-width: 768px) {
  /* Ensure all interactive elements are above everything */
  .chat-header-actions,
  .chat-tab,
  .escrow-button,
  .conversation-item,
  .mobile-sidebar-link,
  .header-actions > * {
    position: relative;
    z-index: 1000 !important;
    pointer-events: auto !important;
  }
  
  /* Fix for touch targets */
  .chat-header-action,
  .back-button,
  .mobile-sidebar-link {
    min-width: 44px !important;
    min-height: 44px !important;
  }
  
  /* Remove any overlays blocking clicks */
  body::before {
    display: none !important;
  }
}

/* FIX DELETE BUTTON DROPDOWN Z-INDEX */
@media (max-width: 768px) {
  .chat-header-dropdown,
  .chat-header-menu {
    position: relative;
    z-index: 10000 !important; /* Higher than everything else */
  }
  
  .chat-header-menu {
    z-index: 10001 !important; /* Even higher for the menu itself */
  }
  
  /* Ensure trade tab stays below dropdown */
  .chat-tab {
    z-index: 100 !important; /* Lower than dropdown */
  }
}


/* MOBILE SCROLLING FIX */
@media (max-width: 768px) {
  /* Make scroll containers work */
  .conversation-items,
  .chat-messages {
    overflow-y: scroll !important;
    -webkit-overflow-scrolling: touch !important;
    height: 70vh !important;
  }
  
  /* Ensure they're above other content */
  .conversation-items {
    z-index: 10 !important;
  }
  
  .chat-messages {
    z-index: 10 !important;
  }
}

/* HIDE EMPTY STATE IN MOBILE WHEN CHAT AREA IS ACTIVE */
@media (max-width: 768px) {
  .chat-area.active .empty-state {
    display: none !important;
  }
}
/* ===== NOTIFICATION STYLES ===== */
.notifications {
  position: relative;
  margin-right: 0.5rem;
}

.notification-bell {
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  padding: 0.5rem;
  color: var(--nav-link);
  font-size: 1.2rem;
  transition: all 0.2s ease;
  border-radius: 50%;
}

.notification-bell:hover {
  background-color: var(--bubble-hover-bg);
  color: var(--nav-link-hover);
}

.notification-count {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--nav-link-hover);
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: bold;
}

.notification-dropdown {
  position: absolute;
  right: 0;
  top: 100%;
  width: 350px;
  max-height: 500px;
  background: var(--dropdown-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  padding: 1rem;
  display: none;
  z-index: 100;
  overflow: hidden;
}

.notification-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.notification-header h4 {
  margin: 0;
  font-size: 1.1rem;
}

.mark-all-read {
  background: none;
  border: none;
  color: var(--nav-link-hover);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
}

.mark-all-read:hover {
  text-decoration: underline;
}

.notification-list {
  max-height: 400px;
  overflow-y: auto;
}

.notification-item {
  padding: 0.75rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  background: rgba(255,255,255,0.05);
  border-left: 3px solid var(--nav-link-hover);
  transition: all 0.2s ease;
}

.notification-item.unread {
  background: rgba(255,74,74,0.1);
  border-left: 3px solid var(--nav-link-hover);
}

.notification-item:hover {
  background: rgba(255,255,255,0.1);
}

.notification-time {
  font-size: 0.7rem;
  color: var(--nav-link);
  margin-top: 0.25rem;
}

.no-notifications {
  text-align: center;
  padding: 1rem;
  color: var(--nav-link);
  font-style: italic;
}

body.logged-in .notifications {
  display: block !important;
}

/* Show dropdown on hover */
.notifications:hover .notification-dropdown {
  display: block;
}

/* Mobile responsive fixes */
@media (max-width: 768px) {
  .notification-dropdown {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: none;
    height: calc(100vh - 56px);
    border-radius: 0;
    z-index: 1003;
  }
  
  .notifications:hover .notification-dropdown {
    display: none;
  }
  
  /* Mobile-specific trigger */
  .notifications.mobile-open .notification-dropdown {
    display: flex;
    animation: slideInFromRight 0.3s ease-out;
  }
  
  @keyframes slideInFromRight {
    from {
      transform: translateX(100%);
    }
    to {
      transform: translateX(0);
    }
  }
}

/* Notification list scrollbar styling */
.notification-list::-webkit-scrollbar {
  width: 8px;
}

.notification-list::-webkit-scrollbar-track {
  background: #1a1a1a;
  border-radius: 4px;
  margin: 4px;
}

.notification-list::-webkit-scrollbar-thumb {
  background: #000000;
  border-radius: 4px;
  border: 1px solid #333333;
}

.notification-list::-webkit-scrollbar-thumb:hover {
  background: #111111;
  border: 1px solid #444444;
}

.notification-list::-webkit-scrollbar-thumb:active {
  background: #222222;
}

/* Firefox support for black scrollbar */
.notification-list {
  scrollbar-width: thin;
  scrollbar-color: #000000 #1a1a1a;
}

/* Dark theme support */
.dark-mode .notification-list::-webkit-scrollbar-track {
  background: #2d2d2d;
}

.dark-mode .notification-list::-webkit-scrollbar-thumb {
  background: #000000;
  border: 1px solid #555555;
}

.dark-mode .notification-list::-webkit-scrollbar-thumb:hover {
  background: #111111;
  border: 1px solid #666666;
}

.dark-mode .notification-list {
  scrollbar-color: #000000 #2d2d2d;
}
/* ===== NOTIFICATION STYLES ===== */
.notifications {
  position: relative;
  margin-right: 0.5rem;
}

.notification-bell {
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  padding: 0.5rem;
  color: var(--nav-link);
  font-size: 1.2rem;
  transition: all 0.2s ease;
  border-radius: 50%;
}

.notification-bell:hover {
  background-color: var(--bubble-hover-bg);
  color: var(--nav-link-hover);
}

.notification-count {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--nav-link-hover);
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: bold;
}

.notification-dropdown {
  position: absolute;
  right: 0;
  top: 100%;
  width: 350px;
  max-height: 500px;
  background: var(--dropdown-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  padding: 1rem;
  display: none;
  z-index: 100;
  overflow: hidden;
}

.notification-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.notification-header h4 {
  margin: 0;
  font-size: 1.1rem;
}

.mark-all-read {
  background: none;
  border: none;
  color: var(--nav-link-hover);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
}

.mark-all-read:hover {
  text-decoration: underline;
}

.notification-list {
  max-height: 400px;
  overflow-y: auto;
}

.notification-item {
  padding: 0.75rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  background: rgba(255,255,255,0.05);
  border-left: 3px solid var(--nav-link-hover);
  transition: all 0.2s ease;
}

.notification-item.unread {
  background: rgba(255,74,74,0.1);
  border-left: 3px solid var(--nav-link-hover);
}

.notification-item:hover {
  background: rgba(255,255,255,0.1);
}

.notification-time {
  font-size: 0.7rem;
  color: var(--nav-link);
  margin-top: 0.25rem;
}

.no-notifications {
  text-align: center;
  padding: 1rem;
  color: var(--nav-link);
  font-style: italic;
}

body.logged-in .notifications {
  display: block !important;
}

/* Show dropdown on hover */
.notifications:hover .notification-dropdown {
  display: block;
}

/* Mobile responsive fixes */
@media (max-width: 768px) {
  .notification-dropdown {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: none;
    height: calc(100vh - 56px);
    border-radius: 0;
    z-index: 1003;
  }
  
  .notifications:hover .notification-dropdown {
    display: none;
  }
  
  /* Mobile-specific trigger */
  .notifications.mobile-open .notification-dropdown {
    display: flex;
    animation: slideInFromRight 0.3s ease-out;
  }
  
  @keyframes slideInFromRight {
    from {
      transform: translateX(100%);
    }
    to {
      transform: translateX(0);
    }
  }
}

/* Notification list scrollbar styling */
.notification-list::-webkit-scrollbar {
  width: 8px;
}

.notification-list::-webkit-scrollbar-track {
  background: #1a1a1a;
  border-radius: 4px;
  margin: 4px;
}

.notification-list::-webkit-scrollbar-thumb {
  background: #000000;
  border-radius: 4px;
  border: 1px solid #333333;
}

.notification-list::-webkit-scrollbar-thumb:hover {
  background: #111111;
  border: 1px solid #444444;
}

.notification-list::-webkit-scrollbar-thumb:active {
  background: #222222;
}

/* Firefox support for black scrollbar */
.notification-list {
  scrollbar-width: thin;
  scrollbar-color: #000000 #1a1a1a;
}

/* Dark theme support */
.dark-mode .notification-list::-webkit-scrollbar-track {
  background: #2d2d2d;
}

.dark-mode .notification-list::-webkit-scrollbar-thumb {
  background: #000000;
  border: 1px solid #555555;
}

.dark-mode .notification-list::-webkit-scrollbar-thumb:hover {
  background: #111111;
  border: 1px solid #666666;
}

.dark-mode .notification-list {
  scrollbar-color: #000000 #2d2d2d;
}

/* ===== BUTTON SPINNER ===== */
.button-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.35);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.6s linear infinite;
  margin-right: 6px;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== TRADE TYPE SELECTOR ===== */
.trade-type-selector {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1rem;
  width: 100%;
}

.trade-type-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.trade-type-header i {
  font-size: 1.6rem;
  color: var(--accent-color);
  margin-bottom: 0.2rem;
}

.trade-type-header p {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.trade-type-header span {
  font-size: 0.78rem;
  color: var(--item-details);
  line-height: 1.4;
}

.trade-type-buttons {
  display: flex;
  gap: 0.75rem;
  width: 100%;
}

.trade-type-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 1.1rem 0.75rem;
  border: 2px solid var(--border);
  border-radius: 14px;
  background: var(--bubble-bg);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 120px;
  position: relative;
  overflow: hidden;
}

.trade-type-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-color), #7c3aed);
  opacity: 0;
  transition: opacity 0.2s ease;
  border-radius: 12px;
}

.trade-type-btn:hover::before {
  opacity: 1;
}

.trade-type-btn:hover {
  border-color: var(--accent-color);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.3);
}

.trade-type-btn > * {
  position: relative;
  z-index: 1;
}

.trade-type-icon {
  font-size: 2.2rem;
  line-height: 1;
}

.trade-type-title {
  font-size: 0.92rem;
  font-weight: 700;
  margin: 0;
}

.trade-type-desc {
  font-size: 0.72rem;
  opacity: 0.65;
  text-align: center;
  line-height: 1.3;
  margin: 0;
}

.trade-type-btn:hover .trade-type-desc {
  opacity: 0.85;
}

/* ===== SKIN TRADE CARD ===== */
.skin-trade-input {
  width: 100%;
}

.skin-trade-card {
  background: var(--bubble-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
}

.skin-trade-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.skin-trade-header > i {
  font-size: 1.8rem;
  color: #1b2838;
  flex-shrink: 0;
  margin-top: 1px;
}

body.dark .skin-trade-header > i {
  color: #c6d4df;
}

.skin-trade-title {
  font-weight: 700;
  font-size: 0.9rem;
  margin: 0 0 0.25rem;
  color: var(--text);
}

.skin-trade-hint {
  font-size: 0.74rem;
  color: var(--item-details);
  margin: 0;
  line-height: 1.45;
}

/* ===== HELP BOX ===== */
.help-box {
  background: rgba(139, 92, 246, 0.07);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-left: 3px solid var(--accent-color);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  color: var(--text);
  line-height: 1.5;
}

.help-box i {
  color: var(--accent-color);
  margin-right: 6px;
}

.help-box strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.8rem;
  color: var(--text);
}

.help-box ol {
  margin: 0 0 0 16px;
  padding: 0;
}

.help-box li {
  margin: 3px 0;
  color: var(--item-details);
}

/* ===== ESCROW INPUT ===== */
.escrow-input {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.escrow-input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
}

.escrow-input::placeholder {
  color: var(--item-details);
  font-size: 0.76rem;
  opacity: 0.7;
}

.skin-trade-help {
  font-size: 0.77rem;
  color: var(--accent-color);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.skin-trade-help:hover {
  opacity: 1;
  text-decoration: underline;
}

/* ===== STEAM OFFER CARD IN CHAT ===== */
.message.steam-offer {
  max-width: 85%;
  margin: 0.5rem 0;
}

.steam-offer-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.steam-card-header {
  background: linear-gradient(135deg, #171a21 0%, #1b2838 100%);
  color: white;
  padding: 11px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9rem;
}

.steam-card-header i {
  font-size: 1.15rem;
  color: #66c0f4;
}

.steam-card-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.steam-card-body p {
  margin: 0;
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.5;
}

.steam-accept-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #66c0f4 0%, #2a6e9b 100%);
  color: white;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  font-size: 0.88rem;
}

.steam-accept-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(102, 192, 244, 0.35);
  filter: brightness(1.08);
}

.steam-card-footer {
  background: var(--bubble-bg);
  padding: 7px 16px;
  border-top: 1px solid var(--border);
  font-size: 0.7rem;
  color: var(--item-details);
  text-align: center;
}

/* ===== VERIFICATION STATUS ===== */
.verification-status {
  padding: 0.55rem 0.8rem;
  border-radius: 8px;
  font-size: 0.78rem;
  margin: 0.5rem 0;
  text-align: center;
  font-weight: 500;
}

.verification-status.info {
  background: rgba(9, 132, 227, 0.08);
  color: var(--message-info);
  border: 1px solid rgba(9, 132, 227, 0.3);
}

.verification-status.success {
  background: rgba(0, 184, 148, 0.08);
  color: var(--message-success);
  border: 1px solid rgba(0, 184, 148, 0.3);
}

.verification-status.error {
  background: rgba(214, 48, 49, 0.08);
  color: var(--message-danger);
  border: 1px solid rgba(214, 48, 49, 0.3);
}

.verification-status.warning {
  background: rgba(253, 203, 110, 0.08);
  color: var(--message-warning);
  border: 1px solid rgba(253, 203, 110, 0.3);
}

/* ===== INPUT GROUP ===== */
.input-group {
  margin-bottom: 0.85rem;
}

.input-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.input-hint {
  display: block;
  font-size: 0.7rem;
  color: var(--item-details);
  margin-top: 0.2rem;
  line-height: 1.4;
}

.input-divider {
  text-align: center;
  font-size: 0.75rem;
  color: var(--item-details);
  margin: 0.6rem 0;
  position: relative;
}

.input-divider::before,
.input-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 38%;
  height: 1px;
  background: var(--border);
}

.input-divider::before { left: 0; }
.input-divider::after  { right: 0; }

/* ===== SCREENSHOT UPLOAD ===== */
.screenshot-upload-area {
  padding: 0.6rem;
  border: 1px dashed var(--border);
  border-radius: 8px;
  text-align: center;
  transition: border-color 0.2s;
}

.screenshot-upload-area:hover {
  border-color: var(--accent-color);
}

.screenshot-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--bubble-bg);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.78rem;
  transition: all 0.2s ease;
  color: var(--text);
}

.screenshot-label:hover {
  background: var(--bubble-hover-bg);
}

.screenshot-preview {
  margin-top: 0.5rem;
  text-align: center;
}

/* ===== MANUAL VERIFICATION PROMPT ===== */
.manual-verification-prompt {
  text-align: center;
  padding: 0.5rem;
}

.manual-verification-prompt p {
  margin: 0.4rem 0;
  font-size: 0.83rem;
  color: var(--item-details);
}

/* ===== DARK MODE TWEAKS ===== */
body.dark .steam-card-header {
  background: linear-gradient(135deg, #0e1219 0%, #17212b 100%);
}

body.dark .steam-card-footer {
  background: var(--bubble-hover-bg);
}

body.dark .trade-type-btn {
  background: var(--card-bg);
}

body.dark .skin-trade-card {
  background: var(--card-bg);
  border-color: var(--border);
}

/* ===== MOBILE ===== */
@media (max-width: 600px) {
  .trade-type-buttons {
    flex-direction: column;
  }

  .trade-type-btn {
    min-height: 80px;
    flex-direction: row;
    justify-content: flex-start;
    padding: 0.9rem 1rem;
    gap: 0.75rem;
  }

  .trade-type-icon {
    font-size: 1.8rem;
  }

  .trade-type-title {
    font-size: 0.88rem;
  }

  .trade-type-desc {
    display: none;
  }

  .skin-trade-card {
    padding: 0.9rem;
  }

  .help-box {
    font-size: 0.74rem;
  }
}

/* ===== SKIN SENT STATE ===== */
.skin-trade-card--sent {
  max-width: 340px;
  margin: 0 auto;
}

.skin-sent-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--message-success);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.5rem 0.75rem;
  background: rgba(0, 184, 148, 0.08);
  border-radius: 8px;
  border: 1px solid rgba(0, 184, 148, 0.2);
}

.skin-sent-status i {
  font-size: 1rem;
  flex-shrink: 0;
}

.skin-sent-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.75rem;
  color: var(--item-details);
  word-break: break-all;
}

.skin-sent-link i {
  color: #66c0f4;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.skin-sent-link span {
  line-height: 1.4;
}

.skin-send-btn {
  width: 100%;
  justify-content: center;
}

/* Blurred Proofs Styling */
.blurred-proof-section {
  opacity: 0.8;
}

.blurred-proofs-container {
  position: relative;
  background: linear-gradient(135deg, var(--bubble-bg) 0%, var(--card-bg) 100%);
  border-radius: 12px;
  padding: 1rem;
  border: 1px dashed var(--border);
  overflow: hidden;
}

.blurred-proofs-container .blur-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: 12px;
  text-align: center;
  gap: 0.5rem;
}

.blurred-proofs-container .blur-overlay i {
  font-size: 2rem;
  color: var(--accent-color);
}

.blurred-proofs-container .blur-overlay p {
  color: white;
  font-weight: 600;
  margin: 0;
}

.blurred-proofs-container .blur-overlay small {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.7rem;
}

.blurred-thumbnails {
  display: flex;
  gap: 0.5rem;
  filter: blur(12px);
  pointer-events: none;
  min-height: 80px;
  align-items: center;
  padding: 0.5rem;
}

.blurred-thumb {
  width: 70px;
  height: 70px;
  background: var(--card-bg);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}

.blurred-thumb i {
  font-size: 1.5rem;
  color: var(--item-details);
}

.blurred-thumb.more {
  background: var(--accent-color);
  color: white;
  font-weight: bold;
  font-size: 0.9rem;
}

.waiting-message {
  margin-top: 1rem;
}

.waiting-banner {
  background: rgba(139, 92, 246, 0.1);
  border-left: 4px solid var(--accent-color);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.waiting-banner i {
  font-size: 1.5rem;
  color: var(--accent-color);
}

.waiting-banner p {
  margin: 0;
  font-weight: 500;
}

.waiting-banner small {
  color: var(--item-details);
  font-size: 0.7rem;
}

.proof-section h4 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.proof-section h4 i {
  font-size: 0.9rem;
}

/* Remove the old proof section styles that conflict */
#escrowProofsContainer .proof-section {
  margin-bottom: 1.5rem;
}

#escrowProofsContainer .proofs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.75rem;
}

#escrowProofsContainer .proof-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--border);
  transition: transform 0.2s ease;
  cursor: pointer;
}

#escrowProofsContainer .proof-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#escrowProofsContainer .proof-item img,
#escrowProofsContainer .proof-item video {
  width: 100%;
  height: 100px;
  object-fit: cover;
  display: block;
}

#escrowProofsContainer .proof-info {
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  font-size: 0.7rem;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

#escrowProofsContainer .proof-party {
  display: block;
  font-weight: 600;
}

#escrowProofsContainer .proof-name {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.65rem;
  opacity: 0.8;
}

/* Blurred proof messages in chat */
.system-message.blurred-proof-message {
  position: relative;
}

.blurred-proof-container {
  position: relative;
  background: var(--bubble-bg);
  border-radius: 12px;
  padding: 1rem;
  margin-top: 0.5rem;
  overflow: hidden;
  border: 1px dashed var(--border);
}

.blurred-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: 12px;
  text-align: center;
  gap: 0.5rem;
}

.blurred-overlay i {
  font-size: 1.8rem;
  color: var(--accent-color);
}

.blurred-overlay p {
  color: white;
  font-weight: 600;
  margin: 0;
  font-size: 0.9rem;
}

.blurred-overlay small {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.7rem;
}

.blurred-thumbnails-row {
  display: flex;
  gap: 0.5rem;
  filter: blur(10px);
  pointer-events: none;
  padding: 0.5rem;
  min-height: 70px;
  align-items: center;
}

.blurred-proof-thumb {
  width: 60px;
  height: 60px;
  background: var(--card-bg);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}

.blurred-proof-thumb i {
  font-size: 1.3rem;
  color: var(--item-details);
}

.blurred-proof-thumb.more {
  background: var(--accent-color);
  color: white;
  font-weight: bold;
  font-size: 0.8rem;
}

/* Proof images grid in chat - keep existing */
.proof-images-grid-large {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.proof-image-item-large {
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.proof-image-item-large:hover {
  transform: scale(1.05);
}

.proof-image-item-large img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
}

/* ============================================
   CUSTOM SERVICE STYLES (CLEAN VERSION)
   ============================================ */

/* Modal Styles */
.custom-service-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(5px);
}

.custom-service-content {
  background: var(--card-bg);
  border-radius: 16px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--border);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease;
}

.custom-service-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--accent-color);
  color: white;
  border-radius: 16px 16px 0 0;
}

.custom-service-header h3 {
  margin: 0;
  font-size: 1.2rem;
}

.custom-service-header h3 i {
  margin-right: 0.5rem;
}

.close-custom-modal {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.custom-service-options {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.service-option-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bubble-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.service-option-btn:hover {
  background: var(--bubble-hover-bg);
  border-color: var(--accent-color);
  transform: translateX(5px);
}

.service-option-btn i {
  font-size: 1.8rem;
  width: 40px;
  text-align: center;
}

.service-option-btn span {
  font-weight: 600;
  font-size: 1rem;
  flex: 1;
}

.service-option-btn small {
  font-size: 0.7rem;
  color: var(--item-details);
  display: block;
  margin-top: 0.2rem;
}

/* Form Styles */
.custom-service-form-container {
  width: 100%;
  padding: 1rem;
}

.custom-service-form {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid var(--border);
}

.service-description {
  margin-bottom: 1.25rem;
}

.service-description label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.service-description label i {
  margin-right: 0.5rem;
  color: var(--accent-color);
}

.service-description input,
.service-description textarea,
.service-description select {
  width: 100%;
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--search-bg);
  color: var(--text);
  font-family: inherit;
}

.service-description textarea {
  min-height: 80px;
  resize: vertical;
}

.input-hint {
  display: block;
  font-size: 0.7rem;
  color: var(--item-details);
  margin-top: 0.25rem;
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* Help Box */
.help-box-service {
  background: rgba(139, 92, 246, 0.1);
  border-left: 3px solid var(--accent-color);
  padding: 1rem;
  border-radius: 8px;
  margin: 1rem 0;
  font-size: 0.85rem;
}

.help-box-service i {
  color: var(--accent-color);
  margin-right: 0.5rem;
}

.help-box-service strong {
  display: block;
  margin-bottom: 0.5rem;
}

.help-box-service p {
  margin-top: 0.5rem;
  line-height: 1.5;
  white-space: pre-line;
}

/* Delivery Methods Grid */
.delivery-methods-grid {
  display: flex;
  gap: 1rem;
  margin: 0.5rem 0 1rem 0;
}

.delivery-method-card {
  flex: 1;
  padding: 1rem;
  background: var(--bubble-bg);
  border: 2px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.delivery-method-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-color);
  background: var(--bubble-hover-bg);
}

.delivery-method-card.active {
  border-color: var(--accent-color);
  background: rgba(139, 92, 246, 0.1);
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

.delivery-method-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.delivery-method-title {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.delivery-method-desc {
  font-size: 0.7rem;
  color: var(--item-details);
}

/* Delivery Info Banner */
.delivery-info-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(139, 92, 246, 0.08);
  border-left: 3px solid var(--accent-color);
  border-radius: 8px;
  margin: 0.5rem 0 1rem 0;
}

.delivery-info-banner i {
  font-size: 1.2rem;
  color: var(--accent-color);
  margin-top: 0.1rem;
}

.delivery-info-banner strong {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.delivery-info-banner p {
  font-size: 0.75rem;
  color: var(--item-details);
  margin: 0;
  line-height: 1.4;
}

/* Custom Trade Card (Simple Version) */
.custom-trade-card {
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 1rem;
  margin-bottom: 1rem;
}

.custom-trade-row {
  display: flex;
  margin-bottom: 0.75rem;
}

.custom-trade-row:last-child {
  margin-bottom: 0;
}

.custom-trade-row.highlight {
  background: rgba(139, 92, 246, 0.1);
  padding: 0.5rem;
  border-radius: 8px;
  margin: -0.25rem -0.5rem 0.5rem -0.5rem;
}

.custom-trade-label {
  width: 90px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--item-details);
}

.custom-trade-value {
  flex: 1;
  font-weight: 500;
  word-break: break-word;
}

/* Custom Delivery Section */
.custom-delivery-section {
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 1rem;
  margin-top: 0.5rem;
}

.custom-delivery-buttons {
  display: flex;
  gap: 0.75rem;
}

.custom-delivery-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--bubble-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

.custom-delivery-btn:hover {
  border-color: var(--accent-color);
  background: var(--bubble-hover-bg);
}

.custom-waiting-msg {
  text-align: center;
  padding: 1rem;
  background: rgba(0, 184, 148, 0.1);
  border-radius: 8px;
  color: var(--message-success);
  margin-top: 0.5rem;
}

.custom-waiting-msg i {
  margin-right: 0.5rem;
}

/* Upload Area */
.custom-upload-group .upload-area {
  cursor: pointer;
  padding: 1rem;
  text-align: center;
  border: 2px dashed var(--border);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.custom-upload-group .upload-area:hover {
  border-color: var(--accent-color);
  background: var(--bubble-hover-bg);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .custom-service-content {
    width: 95%;
    margin: 1rem;
  }
  
  .service-option-btn {
    padding: 0.875rem 1rem;
  }
  
  .service-option-btn i {
    font-size: 1.5rem;
    width: 35px;
  }
}

@media (max-width: 600px) {
  .delivery-methods-grid {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .delivery-method-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-align: left;
    padding: 0.75rem;
  }
  
  .delivery-method-icon {
    font-size: 1.5rem;
    margin-bottom: 0;
  }
  
  .delivery-method-title {
    font-size: 0.85rem;
  }
  
  .delivery-method-desc {
    font-size: 0.65rem;
  }
  
  .custom-delivery-buttons {
    flex-direction: column;
  }
  
  .custom-trade-row {
    flex-direction: column;
    gap: 0.25rem;
  }
  
  .custom-trade-label {
    width: auto;
  }
}

/* Animation */
@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Custom Trade - Simple & Clean */

/* Trade Card */
.custom-trade-card {
  background: var(--card-bg);
  border-radius: 16px;
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.custom-trade-header {
  background: var(--bubble-bg);
  padding: 1rem 1.5rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.custom-trade-header i {
  color: var(--accent-color);
}

.custom-trade-body {
  padding: 1.5rem;
}

/* Two column layout - clean and spacious */
.custom-trade-grid {
  display: flex;
  gap: 2rem;
}

.custom-trade-column {
  flex: 1;
}

.custom-trade-column-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--item-details);
  margin-bottom: 0.75rem;
}

.custom-trade-item {
  background: var(--bubble-bg);
  border-radius: 12px;
  padding: 1rem;
}

.custom-trade-item-label {
  font-size: 0.7rem;
  color: var(--item-details);
  margin-bottom: 0.25rem;
}

.custom-trade-item-value {
  font-weight: 600;
  font-size: 1rem;
  word-break: break-word;
  margin-bottom: 0.5rem;
}

.method-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 500;
}

.method-badge.chat {
  background: rgba(9, 132, 227, 0.1);
  color: #0984e3;
}

.method-badge.upload {
  background: rgba(0, 184, 148, 0.1);
  color: #00b894;
}

.method-badge.link {
  background: rgba(139, 92, 246, 0.1);
  color: #8B5CF6;
}

/* Divider between columns on mobile */
@media (max-width: 768px) {
  .custom-trade-grid {
    flex-direction: column;
    gap: 1rem;
  }
}

/* Action Card */
.custom-action-card {
  background: var(--card-bg);
  border-radius: 16px;
  border: 1px solid var(--border);
  margin-top: 1.5rem;
  overflow: hidden;
}

.custom-action-header {
  background: linear-gradient(135deg, var(--accent-color), #7c3aed);
  color: white;
  padding: 1rem 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.custom-action-body {
  padding: 1.5rem;
}

.custom-action-info {
  background: var(--bubble-bg);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.custom-action-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--item-details);
  margin-bottom: 0.25rem;
}

.custom-action-value {
  font-weight: 600;
  font-size: 1rem;
}

.custom-action-btn {
  width: 100%;
  padding: 1rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s;
}

.custom-action-btn.primary {
  background: var(--accent-color);
  color: white;
}

.custom-action-btn.primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.custom-action-btn.primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Upload Area */
.custom-upload-area {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  margin-bottom: 1rem;
  transition: all 0.2s;
}

.custom-upload-area:hover {
  border-color: var(--accent-color);
  background: var(--bubble-hover-bg);
}

.custom-upload-area i {
  font-size: 2rem;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
  display: block;
}

/* File Preview */
.custom-file-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.custom-file-item {
  position: relative;
  width: 70px;
  height: 70px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.custom-file-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.custom-file-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  background: #d63031;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 10px;
}

/* Link Input */
.custom-link-input-group {
  display: flex;
  gap: 0.75rem;
}

.custom-link-input {
  flex: 1;
  padding: 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--search-bg);
  color: var(--text);
  font-size: 0.9rem;
}

.custom-link-input:focus {
  outline: none;
  border-color: var(--accent-color);
}

/* Status Messages */
.custom-waiting-msg {
  text-align: center;
  padding: 1rem;
  background: rgba(0, 184, 148, 0.1);
  border-radius: 12px;
  color: var(--message-success);
  margin-top: 1rem;
}

.custom-completed-msg {
  text-align: center;
  padding: 1rem;
  background: rgba(0, 184, 148, 0.15);
  border-radius: 12px;
  color: var(--message-success);
  font-weight: 500;
  margin-top: 1rem;
}

/* Mobile */
@media (max-width: 600px) {
  .custom-trade-body {
    padding: 1rem;
  }
  
  .custom-link-input-group {
    flex-direction: column;
  }
  
  .custom-action-body {
    padding: 1rem;
  }
}

.escrow-actions {
  display: flex;
  flex-direction: column !important;
  gap: 1rem;
  width: 100%;
}

#escrowTab {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-bottom: 0;
}

.escrow-actions:empty {
  display: none;
  margin: 0;
  padding: 0;
}

.escrow-upload:empty {
  display: none;
  margin: 0;
  padding: 0;
}
