/* CSS Variable Design Tokens */
:root {
  --bg-main: #0B0F19;
  --bg-gradient: radial-gradient(circle at 50% 50%, #151d30 0%, #0B0F19 100%);
  --glass-bg: rgba(17, 25, 40, 0.65);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-focus: rgba(255, 255, 255, 0.25);
  --text-primary: #F3F4F6;
  --text-secondary: #9CA3AF;
  --text-muted: #6B7280;
  
  --primary: #4F46E5;
  --primary-hover: #6366F1;
  --success: #10B981;
  --success-hover: #059669;
  --danger: #EF4444;
  --danger-hover: #DC2626;
  --gold: #F59E0B;
  --gold-hover: #D97706;
  
  --border-radius-lg: 16px;
  --border-radius-md: 10px;
  --border-radius-sm: 6px;
  --transition-speed: 0.25s;
}

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

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg-main);
  background-image: var(--bg-gradient);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  padding: 20px;
  overflow-x: hidden;
}

/* App Layout */
.app-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px;
}

/* Header */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  font-size: 28px;
  text-shadow: 0 0 10px rgba(79, 70, 229, 0.6);
}

.logo h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.logo-sub {
  color: var(--text-secondary);
  font-weight: 300;
}

.user-status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 6px 14px;
  border-radius: 50px;
  transition: all var(--transition-speed);
}

.status-online {
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.status-online::before {
  content: '';
  width: 8px;
  height: 8px;
  background-color: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--success);
}

.status-offline {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-offline::before {
  content: '';
  width: 8px;
  height: 8px;
  background-color: var(--text-muted);
  border-radius: 50%;
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 30px;
}

@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.panel-left, .panel-right {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* Glassmorphism Card styling */
.card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-lg);
  padding: 24px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  transition: box-shadow var(--transition-speed), border var(--transition-speed);
}

.card:hover {
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.12);
}

.card.locked {
  position: relative;
}

.card.locked::after {
  content: '🔒 Log in to interact';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 15, 25, 0.75);
  backdrop-filter: blur(4px);
  border-radius: var(--border-radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  font-size: 16px;
  color: var(--text-secondary);
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-speed);
}

.card.locked.active-lock::after {
  opacity: 1;
  pointer-events: auto;
}

.card-header {
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 12px;
}

.card-header h2, .card-header h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

/* Forms & Inputs */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.input-group label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input, select, textarea {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: var(--border-radius-md);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition-speed), background-color var(--transition-speed);
}

input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.08);
}

.help-text {
  font-size: 10px;
  color: var(--text-muted);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: var(--border-radius-md);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background-color var(--transition-speed), transform 0.1s ease;
}

.btn:active {
  transform: scale(0.97);
}

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

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

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

.btn-gold {
  background: var(--gold);
  color: #0b0f19;
  font-weight: 600;
}
.btn-gold:hover {
  background: var(--gold-hover);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-icon {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  padding: 6px 12px;
}
.btn-icon:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.w-100 { width: 100%; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mt-4 { margin-top: 16px; }
.hidden { display: none !important; }

/* Auth views tabs */
.tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.2);
  padding: 4px;
  border-radius: var(--border-radius-md);
  margin-bottom: 20px;
}

.tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 8px;
  font-family: inherit;
  font-weight: 500;
  font-size: 13px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: all var(--transition-speed);
}

.tab-btn.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.4);
}

/* User Profile Card */
.profile-details {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.profile-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--success));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
}

.profile-email {
  font-size: 14px;
  font-weight: 500;
  max-width: 190px;
  word-break: break-all;
}

.badges {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  text-transform: uppercase;
  font-weight: 600;
}

.badge-vip {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #0b0f19;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

/* Wallet display */
.balance-display {
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--border-radius-md);
  padding: 16px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.02);
}

.balance-label {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.balance-amount {
  font-size: 36px;
  font-weight: 700;
  color: var(--success);
  margin: 4px 0;
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.balance-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.transaction-history {
  margin-top: 24px;
}

.transaction-history h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.transaction-list {
  max-height: 200px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}

.transaction-list::-webkit-scrollbar {
  width: 4px;
}

.transaction-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.empty-list-text {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  padding: 12px 0;
}

.txn-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--border-radius-sm);
  font-size: 12px;
  border-left: 3px solid #ccc;
}

.txn-item.txn-purchase { border-left-color: var(--success); }
.txn-item.txn-vip { border-left-color: var(--gold); }
.txn-item.txn-escrow { border-left-color: var(--primary); }
.txn-item.txn-payout { border-left-color: var(--success); }
.txn-item.txn-refund { border-left-color: var(--danger); }

.txn-details {
  display: flex;
  flex-direction: column;
}

.txn-type {
  font-weight: 500;
  text-transform: capitalize;
}

.txn-date {
  font-size: 10px;
  color: var(--text-muted);
}

.txn-amount {
  font-weight: 600;
}

.txn-amount.pos { color: var(--success); }
.txn-amount.neg { color: var(--danger); }

/* Right Panel Elements */
.content-nav {
  display: flex;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 8px;
}

.nav-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  padding: 8px 16px;
  cursor: pointer;
  position: relative;
  transition: color var(--transition-speed);
}

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

.nav-btn.active {
  color: var(--primary-hover);
}

.nav-btn.active::after {
  content: '';
  position: absolute;
  bottom: -9px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary-hover);
  box-shadow: 0 -2px 10px var(--primary-hover);
}

/* Inline forms */
.inline-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  align-items: flex-end;
}

.inline-form .w-full {
  grid-column: 1 / -1;
}

/* Listings grids */
.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  margin-bottom: 16px;
}

.posts-grid, .gigs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* Grid cards styling */
.grid-item-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 200px;
  transition: transform var(--transition-speed), border-color var(--transition-speed), background-color var(--transition-speed);
}

.grid-item-card:hover {
  transform: translateY(-2px);
  border-color: rgba(79, 70, 229, 0.3);
  background: rgba(255, 255, 255, 0.04);
}

.grid-item-card.is-own {
  border-color: rgba(16, 185, 129, 0.2);
}

.grid-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.grid-item-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}

.grid-item-badge {
  font-size: 9px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.badge-crypto { background: rgba(79, 70, 229, 0.15); color: #818CF8; }
.badge-stock { background: rgba(16, 185, 129, 0.15); color: #34D399; }
.badge-nft { background: rgba(245, 158, 11, 0.15); color: #FBBF24; }
.badge-fiat { background: rgba(239, 68, 68, 0.15); color: #FCA5A5; }

.gig-status-open { background: rgba(59, 130, 246, 0.15); color: #60A5FA; }
.gig-status-in_progress { background: rgba(245, 158, 11, 0.15); color: #FBBF24; }
.gig-status-completed { background: rgba(16, 185, 129, 0.15); color: #34D399; }
.gig-status-cancelled { background: rgba(239, 68, 68, 0.15); color: #FCA5A5; }

.grid-item-desc {
  font-size: 13px;
  color: var(--text-secondary);
  flex-grow: 1;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.grid-item-meta {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.grid-item-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--success);
}

.grid-item-owner {
  color: var(--text-muted);
}

.grid-item-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  width: 100%;
  max-width: 460px;
  border-radius: var(--border-radius-lg);
  padding: 30px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal h3 {
  margin-bottom: 10px;
  font-size: 20px;
}

.modal p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.token-tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.tier-card {
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-md);
  padding: 14px 8px;
  text-align: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  flex-direction: column;
  transition: all var(--transition-speed);
}

.tier-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--primary);
}

.tier-card.active {
  background: rgba(79, 70, 229, 0.15);
  border-color: var(--primary);
  box-shadow: 0 0 12px rgba(79, 70, 229, 0.2);
}

.tier-tokens {
  font-weight: 600;
  font-size: 14px;
}

.tier-price {
  font-size: 11px;
  color: var(--success);
  margin-top: 4px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

/* Notifications */
.notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 16px 24px;
  background: #1e293b;
  border-left: 4px solid var(--primary);
  border-radius: 4px;
  color: white;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  z-index: 2000;
  display: flex;
  align-items: center;
  max-width: 350px;
  font-size: 14px;
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
}

.notification.show {
  transform: translateY(0);
  opacity: 1;
}

.notification.success { border-left-color: var(--success); }
.notification.danger { border-left-color: var(--danger); }
.notification.warning { border-left-color: var(--gold); }

/* ==========================================================================
   Phase 2: Image Showcase & Rich Direct Messaging Styles
   ========================================================================== */

/* Showcase Images in Listings Cards */
.grid-item-card-image {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: var(--border-radius-md);
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

/* Chat container grid layout */
.chat-container {
  display: grid;
  grid-template-columns: 260px 1fr;
  height: 550px;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  background: rgba(10, 15, 30, 0.4);
  border: 1px solid var(--glass-border);
}

/* Chat sidebar for active conversations */
.chat-sidebar {
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.15);
}

.sidebar-header {
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.conversation-list {
  flex-grow: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.conversation-list::-webkit-scrollbar {
  width: 4px;
}

.conversation-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

/* Active Conversation Item */
.conv-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: background var(--transition-speed);
  position: relative;
}

.conv-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.conv-item.active {
  background: rgba(79, 70, 229, 0.12);
  border-left: 3px solid var(--primary);
}

.conv-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--success));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.conv-details {
  flex-grow: 1;
  min-width: 0; /* Prevents text overflow breaks */
}

.conv-name-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}

.conv-name {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conv-date {
  font-size: 10px;
  color: var(--text-muted);
}

.conv-preview {
  font-size: 11px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Message Badges */
.badge-unread {
  background: var(--danger);
  color: white;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 10px;
  margin-left: 6px;
  font-weight: 700;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.4);
}

/* Global unread navbar badge */
.content-nav .badge-unread {
  background: var(--danger);
  color: white;
  border-radius: 10px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 700;
  vertical-align: middle;
}

/* Main Chat View Area */
.chat-main {
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.08);
  height: 100%;
  position: relative;
}

.chat-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  text-align: center;
  padding: 40px;
  gap: 12px;
}

.chat-empty-icon {
  font-size: 48px;
  opacity: 0.4;
}

.chat-empty h4 {
  font-size: 18px;
  color: var(--text-primary);
}

.chat-empty p {
  font-size: 13px;
  max-width: 320px;
  line-height: 1.5;
}

.chat-active {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
}

.chat-header {
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.15);
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--success));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.chat-header h4 {
  font-size: 14px;
  font-weight: 600;
}

.chat-header span {
  font-size: 11px;
  color: var(--text-muted);
}

/* Chat History feed */
.chat-messages {
  flex-grow: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.chat-messages::-webkit-scrollbar {
  width: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

/* Message Bubble Alignments */
.message-bubble-row {
  display: flex;
  width: 100%;
}

.message-bubble-row.sent {
  justify-content: flex-end;
}

.message-bubble-row.received {
  justify-content: flex-start;
}

/* Message Bubbles */
.message-bubble {
  max-width: 65%;
  padding: 10px 14px;
  border-radius: var(--border-radius-md);
  font-size: 13px;
  line-height: 1.4;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.message-bubble-row.sent .message-bubble {
  background: var(--primary);
  color: white;
  border-bottom-right-radius: 2px;
}

.message-bubble-row.received .message-bubble {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border-bottom-left-radius: 2px;
}

/* Message details inside bubble */
.message-content {
  word-break: break-word;
  white-space: pre-wrap;
}

.message-time {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.45);
  display: block;
  text-align: right;
  margin-top: 6px;
}

.message-bubble-row.received .message-time {
  color: var(--text-muted);
}

/* Media styling inside bubbles */
.message-bubble-image {
  max-width: 100%;
  max-height: 220px;
  border-radius: var(--border-radius-sm);
  margin-top: 4px;
  display: block;
  cursor: zoom-in;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: transform var(--transition-speed);
}

.message-bubble-image:hover {
  transform: scale(1.02);
}

.message-bubble-audio {
  max-width: 100%;
  margin-top: 6px;
  display: block;
  border-radius: 30px;
  outline: none;
}

/* Input sending controls area */
.chat-input-area {
  padding: 12px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  gap: 8px;
  align-items: center;
  position: relative;
  background: rgba(0, 0, 0, 0.15);
}

.chat-input-area input[type="text"] {
  flex-grow: 1;
  padding: 10px 14px;
  font-size: 13px;
  background: rgba(0, 0, 0, 0.2);
}

/* Actions buttons inside messaging input row */
.btn-chat-action {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-md);
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  transition: background var(--transition-speed), border-color var(--transition-speed);
  position: relative;
  user-select: none;
}

.btn-chat-action:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Emoji selector drawer drawer overlay */
.emoji-drawer {
  position: absolute;
  bottom: 64px;
  left: 18px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--border-radius-lg);
  padding: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
  width: 230px;
  animation: slideUp 0.15s ease-out;
}

.emoji-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  text-align: center;
  max-height: 160px;
  overflow-y: auto;
}

.emoji-list::-webkit-scrollbar {
  width: 3px;
}

.emoji-list::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
}

.emoji-list span {
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--border-radius-sm);
  transition: background 0.1s ease;
}

.emoji-list span:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* Voice message recording overlay */
.voice-recording-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background: rgba(239, 68, 68, 0.08);
  border-top: 1px solid rgba(239, 68, 68, 0.15);
  border-bottom: 1px solid rgba(239, 68, 68, 0.15);
  font-size: 13px;
  color: var(--text-primary);
}

.pulse-mic {
  font-size: 14px;
  animation: pulseMic 1.5s infinite ease-in-out;
}

#voice-duration {
  font-family: monospace;
  font-size: 14px;
  font-weight: bold;
}

/* Keyframes animations */
@keyframes pulseMic {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.6; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Phase 3: Post Detail Modal (Expand Post) Styles */
.post-detail-modal-content {
  max-width: 600px;
  width: 90%;
  animation: slideUp var(--transition-speed) ease-out;
}

.post-detail-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 12px;
}

.post-detail-header-row h3 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.3px;
  color: var(--text-primary);
  margin-bottom: 0;
}

.post-detail-body {
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 8px;
  margin-bottom: 20px;
}

.post-detail-body::-webkit-scrollbar {
  width: 6px;
}

.post-detail-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.detail-post-image-container {
  width: 100%;
  margin-bottom: 20px;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.01);
}

.detail-post-image-container img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  display: block;
}

.post-detail-meta-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 12px 16px;
  border-radius: var(--border-radius-md);
}

.detail-post-price {
  font-size: 22px;
  font-weight: 700;
  color: var(--success);
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.detail-post-date {
  font-size: 13px;
  color: var(--text-muted);
}

.detail-section {
  margin-bottom: 20px;
}

.detail-section h4 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.detail-post-description-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
}

.detail-owner-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--border-radius-md);
  padding: 16px;
}

.detail-owner-card h4 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding-bottom: 6px;
}

.detail-owner-details p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  line-height: 1.5;
}

.detail-owner-details p:last-child {
  margin-bottom: 0;
}

.detail-owner-details strong {
  color: var(--text-primary);
  font-weight: 500;
}


