/* ==========================================================================
   DESIGN SYSTEM & GLOBAL VARIABLES (Cyberpunk Glassmorphism Dark Mode)
   ========================================================================== */
:root {
  --bg-primary: #0a0d16;
  --bg-secondary: #111625;
  --bg-card: rgba(22, 29, 48, 0.65);
  --bg-card-hover: rgba(30, 39, 65, 0.8);
  --bg-input: rgba(10, 13, 22, 0.8);
  
  --border-light: rgba(255, 255, 255, 0.07);
  --border-active: rgba(192, 132, 252, 0.3);
  
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  --accent-purple: #c084fc;
  --accent-cyan: #22d3ee;
  --accent-pink: #f43f5e;
  --accent-yellow: #fbbf24;
  --accent-green: #34d399;
  
  --glow-purple: 0 0 10px rgba(192, 132, 252, 0.4);
  --glow-cyan: 0 0 10px rgba(34, 233, 238, 0.4);
  --glow-pink: 0 0 10px rgba(244, 63, 94, 0.4);
  --glow-green: 0 0 10px rgba(52, 211, 153, 0.4);

  --font-family: 'Plus Jakarta Sans', sans-serif;
  --font-title: 'Space Grotesk', sans-serif;
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
  touch-action: manipulation;
}

input, select, textarea, button {
  font-family: inherit;
  color: inherit;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-purple);
}

/* ==========================================================================
   LAYOUT STRUCTURE
   ========================================================================== */
.app-container {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-secondary);
  border-left: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
  position: relative;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
  padding-bottom: 74px; /* Space for footer */
}

/* Top Header */
.app-header {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-bottom: 1px solid var(--border-light);
  background: rgba(17, 22, 37, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.header-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-light);
  box-shadow: var(--glow-purple);
  transition: var(--transition-smooth);
}

.header-avatar:hover {
  transform: scale(1.05) rotate(5deg);
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

.user-handle {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Toggle Switch (Forum vs Wallet) */
.toggle-container {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 20px;
  padding: 3px;
  border: 1px solid var(--border-light);
  position: relative;
}

.toggle-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 17px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-smooth);
}

.toggle-btn svg {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
}

.toggle-btn.active {
  background: linear-gradient(135deg, var(--accent-purple), #8b5cf6);
  color: #fff;
  box-shadow: var(--glow-purple);
}

.toggle-btn.active svg {
  color: #fff;
}

/* Main Content Area */
.main-content {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: fadeIn 0.4s ease;
}

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

/* ==========================================================================
   FORUM TAB STYLES
   ========================================================================== */

/* Banner Ads Space */
.ads-carousel {
  width: 100%;
  height: 125px;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-light);
  background-color: #000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.ad-card {
  width: 100%;
  height: 100%;
  display: block;
  text-decoration: none;
  position: relative;
  transition: var(--transition-smooth);
}

.ad-card:hover {
  filter: brightness(1.04);
}

.ad-banner-img {
  width: 100%;
  height: 125px;
  object-fit: cover;
  display: block;
}

.ad-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.65) !important;
  color: var(--text-primary) !important;
  backdrop-filter: blur(4px);
  padding: 3px 8px;
  font-size: 0.62rem;
  font-weight: 700;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid var(--border-light) !important;
  box-shadow: none;
  z-index: 5;
}

.ad-nav-btn {
  backdrop-filter: blur(6px);
  background: rgba(0, 0, 0, 0.45) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  transition: all 0.2s ease !important;
}

.ad-nav-btn:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  color: var(--accent-cyan) !important;
}

.ad-dot:hover {
  background: var(--accent-cyan) !important;
  transform: scale(1.2);
}

@keyframes fadeInAd {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Lightbox Modal Animations */
.lightbox-content {
  animation: zoomIn 0.25s ease-out;
}

@keyframes zoomIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Warnings Widget */
.warnings-widget {
  background: rgba(244, 63, 94, 0.05);
  border: 1px solid rgba(244, 63, 94, 0.2);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: inset 0 0 15px rgba(244, 63, 94, 0.05);
  animation: borderGlow 3s infinite alternate;
}

@keyframes borderGlow {
  0% { border-color: rgba(244, 63, 94, 0.15); }
  100% { border-color: rgba(244, 63, 94, 0.4); }
}

.widget-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.warning-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--accent-pink);
  font-family: var(--font-title);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.warning-icon {
  width: 16px;
  height: 16px;
}

.widget-desc {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.warnings-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.warning-item {
  background: rgba(0, 0, 0, 0.3);
  padding: 10px 12px;
  border-radius: 8px;
  border-left: 3px solid var(--accent-pink);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.warning-text {
  font-size: 0.8rem;
  color: var(--text-primary);
}

.warning-text strong {
  color: var(--accent-pink);
}

.warning-timer {
  font-size: 0.72rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.warning-timer svg {
  width: 12px;
  height: 12px;
}

.warning-countdown {
  color: var(--accent-yellow);
  font-weight: 600;
}

/* Forum Navigation & Categories */
.forum-nav {
  display: flex;
  gap: 10px;
  align-items: center;
}

.search-box {
  flex: 1;
  position: relative;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.search-box input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  padding: 10px 12px 10px 38px;
  font-size: 0.85rem;
  border-radius: 20px;
  outline: none;
  transition: var(--transition-smooth);
}

.search-box input:focus {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 2px rgba(192, 132, 252, 0.15);
}

.new-thread-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  padding: 10px 16px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
}

.new-thread-btn:hover {
  background: var(--accent-purple);
  color: #fff;
  border-color: var(--accent-purple);
  box-shadow: var(--glow-purple);
}

.category-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.category-pills::-webkit-scrollbar {
  display: none;
}

.category-pill {
  white-space: nowrap;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.category-pill.active {
  background: rgba(192, 132, 252, 0.15);
  border-color: var(--accent-purple);
  color: var(--accent-purple);
}

/* Threads Feed */
.threads-feed {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.thread-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: var(--transition-smooth);
  backdrop-filter: blur(8px);
}

.thread-card:hover {
  transform: translateY(-2px);
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.thread-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.author-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.author-name {
  font-size: 0.8rem;
  font-weight: 600;
}

.thread-date {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.category-badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  padding: 2px 8px;
  font-size: 0.65rem;
  font-weight: 600;
  border-radius: 6px;
  color: var(--text-secondary);
}

.thread-card-title {
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
}

.thread-card-excerpt {
  font-size: 0.82rem;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.thread-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 10px;
  margin-top: 2px;
}

.thread-stats {
  display: flex;
  gap: 14px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.stat-item svg {
  width: 14px;
  height: 14px;
}

/* Glowing Badges & Nicknames */
.badge-guaranteed {
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.2), rgba(52, 211, 153, 0.05));
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: var(--accent-green);
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  text-shadow: var(--glow-green);
  box-shadow: inset 0 0 5px rgba(52, 211, 153, 0.1);
}

/* Nickname Glowing Styles */
.glow-text-software {
  background: linear-gradient(90deg, #10b981, #34d399, #059669);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 3s linear infinite;
  font-weight: 800;
  text-shadow: 0 0 10px rgba(52, 211, 153, 0.2);
}

.glow-text-otc {
  background: linear-gradient(90deg, #f43f5e, #fda4af, #e11d48);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 3s linear infinite;
  font-weight: 800;
  text-shadow: 0 0 10px rgba(244, 63, 94, 0.3);
}

.glow-text-design {
  background: linear-gradient(90deg, #06b6d4, #67e8f9, #0891b2);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 3s linear infinite;
  font-weight: 800;
  text-shadow: 0 0 10px rgba(34, 211, 238, 0.3);
}

@keyframes shine {
  to {
    background-position: 200% center;
  }
}

/* ==========================================================================
   WALLET TAB STYLES
   ========================================================================= */

/* Wallet Card */
.wallet-card {
  background: linear-gradient(135deg, #1a103c 0%, #0d1e3d 100%);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 22px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.wallet-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 80% 20%, rgba(192, 132, 252, 0.12), transparent 50%);
  pointer-events: none;
}

.wallet-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.card-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.wallet-status-badge {
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.3);
  color: var(--accent-cyan);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.status-dot {
  width: 6px;
  height: 6px;
  background-color: var(--accent-cyan);
  border-radius: 50%;
  box-shadow: var(--glow-cyan);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.6; }
}

.total-balance-usd {
  font-family: var(--font-title);
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.balances-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  margin-bottom: 16px;
}

.token-balance-item {
  flex: 1;
}

.token-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 4px;
}

.token-icon-small {
  width: 14px;
  height: 14px;
}

.token-val {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.token-locked {
  font-size: 0.65rem;
  color: var(--accent-yellow);
  margin-top: 1px;
}

.token-balance-separator {
  width: 1px;
  height: 38px;
  background-color: rgba(255, 255, 255, 0.08);
}

.wallet-address-box {
  background: rgba(255, 255, 255, 0.04);
  padding: 8px 12px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.address-label {
  font-size: 0.65rem;
  color: var(--text-secondary);
}

.address-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.address-text {
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-icon-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.action-icon-btn:hover {
  color: var(--accent-purple);
}

.action-icon-btn svg {
  width: 15px;
  height: 15px;
}

/* Wallet Actions Grid */
.wallet-actions-grid {
  display: flex;
  gap: 12px;
}

.wallet-action-btn {
  flex: 1;
  border: none;
  border-radius: 14px;
  padding: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-smooth);
}

.wallet-action-btn.primary {
  background: linear-gradient(135deg, var(--accent-purple), #8b5cf6);
  color: #fff;
  box-shadow: var(--glow-purple);
}

.wallet-action-btn.primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.wallet-action-btn.secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
}

.wallet-action-btn.secondary:hover {
  background: var(--bg-card-hover);
}

.wallet-action-btn.deposit {
  background: linear-gradient(135deg, var(--accent-green), #10b981);
  color: #fff;
  box-shadow: 0 0 15px rgba(52, 211, 153, 0.35);
}

.wallet-action-btn.deposit:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.wallet-action-btn.deposit:active {
  transform: translateY(0);
}

.action-icon {
  width: 16px;
  height: 16px;
}

/* Wallet Sections */
.wallet-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wallet-section h3 {
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.add-collateral-btn {
  background: rgba(192, 132, 252, 0.12);
  border: 1px solid var(--border-active);
  color: var(--accent-purple);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.add-collateral-btn:hover {
  background: var(--accent-purple);
  color: #fff;
  box-shadow: var(--glow-purple);
}

/* Collateral Items */
.collaterals-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.collateral-item {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.collateral-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.collateral-sector-name {
  font-size: 0.85rem;
  font-weight: 700;
}

.collateral-amount {
  font-size: 0.72rem;
  color: var(--accent-green);
  font-weight: 600;
}

.collateral-status-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.collateral-status-text {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
}

.collateral-status-text.locked {
  background: rgba(52, 211, 153, 0.1);
  color: var(--accent-green);
  border: 1px solid rgba(52, 211, 153, 0.2);
}

.collateral-status-text.requested {
  background: rgba(251, 191, 36, 0.1);
  color: var(--accent-yellow);
  border: 1px solid rgba(251, 191, 36, 0.2);
}

.release-btn {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: var(--accent-pink);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.release-btn:hover {
  background: var(--accent-pink);
  color: #fff;
  box-shadow: var(--glow-pink);
}

/* Transaction List */
.tx-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tx-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tx-details {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tx-icon-wrapper {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tx-icon-wrapper.deposit {
  background: rgba(52, 211, 153, 0.1);
  color: var(--accent-green);
}

.tx-icon-wrapper.withdraw {
  background: rgba(244, 63, 94, 0.1);
  color: var(--accent-pink);
}

.tx-icon-wrapper.lock {
  background: rgba(251, 191, 36, 0.1);
  color: var(--accent-yellow);
}

.tx-icon-wrapper svg {
  width: 16px;
  height: 16px;
}

.tx-info {
  display: flex;
  flex-direction: column;
}

.tx-type-name {
  font-size: 0.8rem;
  font-weight: 600;
}

.tx-date-str {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.tx-value {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.tx-amt {
  font-size: 0.82rem;
  font-weight: 700;
}

.tx-amt.positive {
  color: var(--accent-green);
}

.tx-amt.negative {
  color: var(--accent-pink);
}

.tx-token-lbl {
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* ==========================================================================
   FOOTER NAVIGATION BAR
   ========================================================================== */
.app-footer {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: 60px;
  border-top: 1px solid var(--border-light);
  background: rgba(17, 22, 37, 0.98);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 999;
}

.nav-item {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 0.68rem;
  font-weight: 500;
  cursor: pointer;
  flex: 1;
  height: 100%;
  justify-content: center;
  transition: var(--transition-smooth);
}

.nav-item svg {
  width: 20px;
  height: 20px;
}

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

.nav-item.active {
  color: var(--accent-purple);
}

/* ==========================================================================
   MODAL COMPONENT
   ========================================================================== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end; /* Dynamic bottom sheet style */
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: var(--bg-secondary);
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  padding: 24px;
  border: 1px solid var(--border-light);
  border-bottom: none;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.4);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 85vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal.active .modal-content {
  transform: translateY(0);
}

.modal-content.large {
  max-height: 90vh;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  color: var(--text-secondary);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.modal-close svg {
  width: 16px;
  height: 16px;
}

.modal-intro-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Forms & Inputs */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-group input, 
.form-group select, 
.form-group textarea {
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 12px;
  font-size: 0.85rem;
  outline: none;
  transition: var(--transition-smooth);
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 2px rgba(192, 132, 252, 0.15);
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.max-balance-label {
  font-size: 0.7rem;
  color: var(--accent-purple);
  cursor: pointer;
  font-weight: 600;
}

.max-balance-label:hover {
  text-decoration: underline;
}

.sector-limits-info {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  padding: 10px;
  border-radius: 8px;
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.warning-box {
  display: flex;
  gap: 10px;
  background: rgba(251, 191, 36, 0.05);
  border: 1px solid rgba(251, 191, 36, 0.2);
  padding: 10px;
  border-radius: 10px;
  color: var(--accent-yellow);
  font-size: 0.72rem;
  line-height: 1.4;
}

.warning-box svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

.network-fee-info {
  display: flex;
  gap: 6px;
  font-size: 0.68rem;
  color: var(--text-secondary);
  align-items: center;
}

.network-fee-info svg {
  width: 14px;
  height: 14px;
}

.submit-btn {
  background: linear-gradient(135deg, var(--accent-purple), #8b5cf6);
  border: none;
  color: #fff;
  padding: 14px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: var(--glow-purple);
  transition: var(--transition-smooth);
}

.submit-btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

/* ==========================================================================
   THREAD DETAIL PAGE STYLES
   ========================================================================== */
.thread-detail-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.thread-original-post {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 16px;
}

.thread-op-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.thread-op-title {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 4px;
}

.thread-op-body {
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.5;
  white-space: pre-wrap;
}

.thread-comments-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comments-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 6px;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 250px;
  overflow-y: auto;
}

.comment-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 10px 12px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.comment-body {
  font-size: 0.8rem;
  color: var(--text-primary);
  line-height: 1.45;
}

.comment-form {
  margin-top: 10px;
}

.comment-input-row {
  display: flex;
  gap: 8px;
}

.comment-input-row input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.8rem;
  outline: none;
}

.comment-input-row input:focus {
  border-color: var(--accent-purple);
}

.comment-submit-btn {
  background: var(--accent-purple);
  border: none;
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   SPONSOR REKLAM & MOCK PROFILES STYLES
   ========================================================================== */
.ad-preview-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.preview-label {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.ad-preview-box {
  border: 1px solid var(--border-light);
  border-radius: 10px;
  overflow: hidden;
  height: 60px;
  position: relative;
}

.ad-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ad-badge-preview {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0,0,0,0.6);
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 0.5rem;
  font-weight: 700;
  color: var(--accent-yellow);
}

.profile-card-large {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  position: relative;
}

.profile-avatar-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.06);
  margin-bottom: 12px;
}

.profile-name-large {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 2px;
}

.profile-handle-large {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.profile-id-large {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-family: monospace;
  margin-bottom: 16px;
}

.profile-stats-row {
  display: flex;
  gap: 24px;
  width: 100%;
  justify-content: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 14px;
}

.stat-box {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-val {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 700;
}

.stat-lbl {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.text-success {
  color: var(--accent-green);
}

.profile-badge-showcase {
  margin-top: 14px;
}

.mock-changer-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.mock-changer-section h4 {
  font-size: 0.85rem;
  font-weight: 700;
}

.mock-changer-section p {
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.mock-profiles-grid {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.mock-profile-btn {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  padding: 8px 4px;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.mock-profile-btn.active {
  background: rgba(192, 132, 252, 0.15);
  border-color: var(--accent-purple);
  color: var(--accent-purple);
  box-shadow: 0 0 10px rgba(192, 132, 252, 0.1);
}

/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(40px);
  background: rgba(17, 22, 37, 0.9);
  border: 1px solid var(--border-active);
  box-shadow: var(--glow-purple);
  color: #fff;
  padding: 10px 18px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  z-index: 2000;
  pointer-events: none;
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
  backdrop-filter: blur(8px);
}

.toast.active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Demo banner */
.demo-banner {
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.15), rgba(192, 132, 252, 0.15));
  border-bottom: 1px solid rgba(34, 211, 238, 0.25);
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 480px;
  margin: 0 auto;
  font-size: 0.72rem;
  color: var(--text-primary);
  z-index: 1001;
}

.demo-banner-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.demo-banner-content svg {
  width: 14px;
  height: 14px;
  color: var(--accent-cyan);
}

.close-demo-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
}

.close-demo-btn svg {
  width: 14px;
  height: 14px;
}

/* Category Sync settings styles */
.sync-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 8px 12px;
  transition: var(--transition-smooth);
}

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

.sync-item-label {
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sync-item-label svg {
  width: 16px;
  height: 16px;
  color: var(--accent-purple);
}

/* Switch styling */
.switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: .4s;
  border-radius: 20px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-secondary);
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--accent-purple);
}

input:checked + .slider:before {
  transform: translateX(16px);
  background-color: #fff;
  box-shadow: var(--glow-purple);
}

/* Trading & Buy-Sell Specific Styles */
.badge-alim {
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: var(--accent-green);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  box-shadow: var(--glow-green);
}

.badge-satim {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: var(--accent-pink);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  box-shadow: var(--glow-pink);
}

/* Special merchant card glow when a guaranteed user posts a trade */
.merchant-glow-software {
  border-color: rgba(52, 211, 153, 0.25) !important;
  box-shadow: 0 4px 15px rgba(52, 211, 153, 0.08), inset 0 0 10px rgba(52, 211, 153, 0.03);
}

.merchant-glow-software:hover {
  border-color: rgba(52, 211, 153, 0.45) !important;
  box-shadow: 0 8px 25px rgba(52, 211, 153, 0.18), inset 0 0 15px rgba(52, 211, 153, 0.06) !important;
}

.merchant-glow-otc {
  border-color: rgba(244, 63, 94, 0.25) !important;
  box-shadow: 0 4px 15px rgba(244, 63, 94, 0.08), inset 0 0 10px rgba(244, 63, 94, 0.03);
}

.merchant-glow-otc:hover {
  border-color: rgba(244, 63, 94, 0.45) !important;
  box-shadow: 0 8px 25px rgba(244, 63, 94, 0.18), inset 0 0 15px rgba(244, 63, 94, 0.06) !important;
}

/* Escrow Payment System Styles */
.escrow-status-card {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.08), rgba(139, 92, 246, 0.05));
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-radius: 12px;
  padding: 16px;
  margin: 16px 0;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.05);
}

.escrow-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 8px;
}

.escrow-title {
  font-family: var(--font-title);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.escrow-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.escrow-badge.pending {
  background: rgba(234, 179, 8, 0.15);
  border: 1px solid rgba(234, 179, 8, 0.3);
  color: var(--accent-yellow);
  box-shadow: var(--glow-yellow);
}

.escrow-badge.delivered {
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: var(--accent-cyan);
  box-shadow: var(--glow-cyan);
}

.escrow-badge.completed {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: var(--accent-green);
  box-shadow: var(--glow-green);
}

.escrow-badge.disputed {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: var(--accent-pink);
  box-shadow: var(--glow-pink);
}

.escrow-badge.refunded {
  background: rgba(156, 163, 175, 0.15);
  border: 1px solid rgba(156, 163, 175, 0.3);
  color: var(--text-secondary);
}

.escrow-info-row {
  font-size: 0.78rem;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.escrow-info-row strong {
  color: var(--text-primary);
}

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

.escrow-btn {
  flex: 1;
  padding: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  border: none;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.escrow-btn.primary {
  background: linear-gradient(135deg, var(--accent-cyan), #06b6d4);
  color: #000;
  box-shadow: var(--glow-cyan);
}

.escrow-btn.primary:hover {
  filter: brightness(1.1);
  transform: translateY(-0.5px);
}

.escrow-btn.danger {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: var(--accent-pink);
}

.escrow-btn.danger:hover {
  background: rgba(244, 63, 94, 0.2);
}

.escrow-btn.secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
}

.escrow-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Offers & Propose Sub-system Styles */
.offers-section {
  margin-top: 20px;
  border-top: 1px solid var(--border-light);
  padding-top: 16px;
}

.offers-section h4 {
  font-family: var(--font-title);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.offers-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.offer-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 12px;
  transition: var(--transition-smooth);
}

.offer-card:hover {
  background: rgba(255, 255, 255, 0.04);
}

.offer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.offer-author-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.offer-author-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
}

.offer-author-name {
  font-size: 0.78rem;
  font-weight: 600;
}

.offer-amount {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.offer-message {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 8px;
}

.offer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  padding-top: 6px;
  margin-top: 4px;
}

.offer-date {
  font-size: 0.65rem;
  color: var(--text-secondary);
}

/* Dispute Admin Item */
.dispute-admin-card {
  background: rgba(244, 63, 94, 0.04);
  border: 1px solid rgba(244, 63, 94, 0.2);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 8px;
  border-left: 3px solid var(--accent-pink);
}

.dispute-admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.dispute-admin-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
}

.dispute-admin-details {
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 10px;
}

.dispute-admin-actions {
  display: flex;
  gap: 8px;
}

/* User Rank Badges */
.user-rank-badge {
  font-size: 0.55rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.rank-admin {
  background: rgba(239, 68, 68, 0.12) !important;
  color: #ef4444 !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
}

.rank-merchant {
  background: rgba(251, 191, 36, 0.12) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(251, 191, 36, 0.3) !important;
}

.rank-legend {
  background: rgba(168, 85, 247, 0.12) !important;
  color: #a855f7 !important;
  border: 1px solid rgba(168, 85, 247, 0.3) !important;
}

.rank-expert {
  background: rgba(6, 182, 212, 0.12) !important;
  color: #06b6d4 !important;
  border: 1px solid rgba(6, 182, 212, 0.3) !important;
}

.rank-regular {
  background: rgba(59, 130, 246, 0.12) !important;
  color: #3b82f6 !important;
  border: 1px solid rgba(59, 130, 246, 0.3) !important;
}

.rank-active {
  background: rgba(16, 185, 129, 0.12) !important;
  color: #10b981 !important;
  border: 1px solid rgba(16, 185, 129, 0.3) !important;
}

.rank-new {
  background: rgba(156, 163, 175, 0.12) !important;
  color: #9ca3af !important;
  border: 1px solid rgba(156, 163, 175, 0.2) !important;
}

/* Faucet Mini Button inside Wallet Card */
.faucet-mini-btn:hover {
  background: rgba(6,182,212,0.2) !important;
  border-color: rgba(6,182,212,0.5) !important;
  color: #fff !important;
  box-shadow: 0 0 10px rgba(6,182,212,0.25);
  transform: translateY(-1px);
}
.faucet-mini-btn:active {
  transform: translateY(0);
}
