/* Contrast.Finance - Modern Dark Theme */
:root {
  --contrast-green: #10B981;
  --contrast-green-dark: #059669;
  --contrast-green-light: #34D399;
  --contrast-red: #EF4444;
  --contrast-red-dark: #DC2626;
  --contrast-orange: #F59E0B;
  
  --bg-primary: #0A0A0B;
  --bg-secondary: #111113;
  --bg-tertiary: #1A1A1D;
  --bg-card: #1E1E21;
  --bg-hover: #252529;
  
  --text-primary: #FFFFFF;
  --text-secondary: #9CA3AF;
  --text-muted: #6B7280;
  
  --border-primary: #2D2D30;
  --border-secondary: #404045;
  --border-accent: var(--contrast-green);
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  
  --font-mono: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
}

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

html, body {
  height: 100%;
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
}

/* Navigation */
.main-nav {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-primary);
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 60px;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 32px;
}

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

.logo-icon {
  width: 32px;
  height: 32px;
}

.logo-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.nav-tabs {
  display: flex;
  gap: 8px;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

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

.nav-tab.active {
  color: var(--contrast-green);
  background: var(--bg-tertiary);
  border-color: var(--contrast-green);
}

.nav-tab i {
  font-size: 14px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.wallet-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--contrast-green);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.wallet-btn:hover {
  background: var(--contrast-green-dark);
}

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

.wallet-btn.connected:hover {
  background: var(--bg-hover);
  border-color: var(--contrast-green);
}

/* Web3 Integration Styles */
.disconnect-menu {
  position: fixed;
  top: 60px;
  right: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-secondary);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  min-width: 200px;
  overflow: hidden;
}

.disconnect-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.2s ease;
}

.disconnect-option:hover {
  background: var(--bg-hover);
}

.disconnect-option.disconnect {
  color: var(--contrast-red);
  border-top: 1px solid var(--border-secondary);
}

.disconnect-option.disconnect:hover {
  background: rgba(239, 68, 68, 0.1);
}

.wallet-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--contrast-green);
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  z-index: 1001;
  font-weight: 500;
  animation: slideInRight 0.3s ease;
}

.wallet-error {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--contrast-red);
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  z-index: 1001;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Web3Modal Custom Styling */
w3m-modal {
  --w3m-font-family: 'Inter', sans-serif;
  --w3m-accent-color: #10B981;
  --w3m-background-color: #0A0A0B;
  --w3m-foreground-color: #1E1E21;
  --w3m-border-radius-master: 8px;
}

/* Balance Display Enhancements */
.balance-loading {
  opacity: 0.6;
  pointer-events: none;
}

.balance-updated {
  animation: balanceGlow 0.5s ease;
}

@keyframes balanceGlow {
  0% { background-color: rgba(16, 185, 129, 0.2); }
  100% { background-color: transparent; }
}

/* Custom Web3 Modal Styles */
.web3-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(4px);
}

.web3-modal {
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border-secondary);
  box-shadow: var(--shadow-xl);
  max-width: 400px;
  width: 90%;
  max-height: 80vh;
  overflow: hidden;
  animation: modalSlideIn 0.3s ease;
}

.web3-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-secondary);
}

.web3-modal-header h3 {
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

.web3-close-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.2s ease;
}

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

.web3-modal-content {
  padding: 24px;
}

.web3-wallet-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.web3-wallet-option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-secondary);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  width: 100%;
}

.web3-wallet-option:hover {
  background: var(--bg-hover);
  border-color: var(--contrast-green);
  transform: translateY(-1px);
}

.web3-wallet-option img {
  border-radius: 8px;
}

.wallet-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wallet-name {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1rem;
}

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

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Insufficient balance styling */
.insufficient-balance {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: var(--contrast-red) !important;
}

/* Notification types */
.wallet-notification.info {
  background: #3B82F6;
}

.wallet-notification.warning {
  background: var(--contrast-orange);
}

.nav-controls {
  display: flex;
  gap: 8px;
}

.control-btn {
  width: 40px;
  height: 40px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.control-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* Main Content */
.main-content {
  min-height: calc(100vh - 60px);
  padding: 24px;
  max-width: 1440px;
  margin: 0 auto;
}

/* Trading Layout */
.trade-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
}

.trade-layout {
  display: grid;
  grid-template-columns: 1fr 400px 320px;
  grid-template-rows: 600px;
  gap: 24px;
  margin-bottom: 24px;
}

/* Chart Section */
.chart-section {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  overflow: hidden;
  height: 600px;
}

.pair-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-primary);
}

.pair-select {
  padding: 8px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 6px;
  color: var(--text-primary);
  font-weight: 600;
}

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

.price {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.change {
  font-size: 14px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
}

.change.positive {
  color: var(--contrast-green);
  background: rgba(16, 185, 129, 0.1);
}

.change.negative {
  color: var(--contrast-red);
  background: rgba(239, 68, 68, 0.1);
}

.change.neutral {
  color: var(--text-secondary);
  background: var(--bg-tertiary);
}

.chart-container {
  flex: 1;
  position: relative;
  background: var(--bg-secondary);
  height: 480px;
}

.chart-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

.chart-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.chart-controls {
  padding: 16px 20px;
  border-top: 1px solid var(--border-primary);
}

.timeframes {
  display: flex;
  gap: 8px;
}

.timeframe {
  padding: 6px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.timeframe:hover {
  color: var(--text-primary);
  border-color: var(--border-secondary);
}

.timeframe.active {
  color: var(--contrast-green);
  border-color: var(--contrast-green);
  background: rgba(16, 185, 129, 0.1);
}

/* Right Panel */
.right-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: 600px;
}

/* Order Book */
.orderbook-section {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  overflow: hidden;
  flex: 1;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-primary);
}

.section-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.orderbook-controls {
  display: flex;
  gap: 4px;
}

.view-toggle {
  width: 28px;
  height: 28px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 4px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.view-toggle.active {
  color: var(--contrast-green);
  border-color: var(--contrast-green);
}

.orderbook {
  padding: 16px;
}

.orderbook-header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  padding-bottom: 8px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

.asks, .bids {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.orderbook-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.orderbook-row:hover {
  background: var(--bg-hover);
}

.orderbook-row.ask {
  color: var(--contrast-red);
}

.orderbook-row.bid {
  color: var(--contrast-green);
}

.spread {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px;
  margin: 8px 0;
  background: var(--bg-tertiary);
  border-radius: 6px;
}

.spread-value {
  font-family: var(--font-mono);
  font-weight: 600;
}

.spread-label {
  font-size: 12px;
  color: var(--text-muted);
}

/* Recent Trades */
.trades-section {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  overflow: hidden;
  height: 300px;
}

.trades-section h3 {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-primary);
  font-size: 16px;
  font-weight: 600;
}

.trades-list {
  padding: 16px;
  overflow-y: auto;
  height: calc(100% - 57px);
}

.trade-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  padding: 6px 0;
  font-family: var(--font-mono);
  font-size: 12px;
}

.trade-row.buy {
  color: var(--contrast-green);
}

.trade-row.sell {
  color: var(--contrast-red);
}

/* Trading Ticket */
.trading-ticket {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  overflow: hidden;
  height: 600px;
  display: flex;
  flex-direction: column;
}

.ticket-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-primary);
}

.ticket-tabs {
  display: flex;
  gap: 4px;
}

.ticket-tab {
  padding: 8px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ticket-tab.active {
  color: var(--contrast-green);
  border-color: var(--contrast-green);
  background: rgba(16, 185, 129, 0.1);
}

.ticket-content {
  padding: 20px;
  flex: 1;
  overflow-y: auto;
}

.side-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 24px;
}

.side-btn {
  padding: 12px 16px;
  border: 2px solid transparent;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.buy-btn {
  background: var(--bg-secondary);
  color: var(--contrast-green);
  border-color: var(--border-primary);
}

.buy-btn.active {
  background: rgba(16, 185, 129, 0.1);
  border-color: var(--contrast-green);
}

.sell-btn {
  background: var(--bg-secondary);
  color: var(--contrast-red);
  border-color: var(--border-primary);
}

.sell-btn.active {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--contrast-red);
}

.input-group {
  margin-bottom: 16px;
}

.input-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.trade-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 16px;
  transition: border-color 0.2s ease;
}

.trade-input:focus {
  outline: none;
  border-color: var(--contrast-green);
}

.leverage-section {
  margin-bottom: 24px;
}

.leverage-section label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.leverage-slider {
  width: 100%;
  margin-bottom: 8px;
}

.leverage-marks {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

.options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  accent-color: var(--contrast-green);
}

.tp-sl-section {
  margin-bottom: 24px;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: 8px;
}

.trade-info {
  margin-bottom: 24px;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: 8px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 13px;
}

.info-row:last-child {
  margin-bottom: 0;
}

.info-row span:first-child {
  color: var(--text-secondary);
}

.info-row span:last-child {
  font-family: var(--font-mono);
  font-weight: 600;
}

.place-order-btn {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.place-order-btn.buy {
  background: var(--contrast-green);
  color: white;
}

.place-order-btn.buy:hover {
  background: var(--contrast-green-dark);
}

.place-order-btn.sell {
  background: var(--contrast-red);
  color: white;
}

.place-order-btn.sell:hover {
  background: var(--contrast-red-dark);
}

/* Bottom Panel */
.bottom-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  overflow: hidden;
  height: 300px;
  width: 100%;
}

.bottom-tabs {
  display: flex;
  gap: 1px;
  background: var(--border-primary);
  padding: 1px;
}

.bottom-tab {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: none;
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bottom-tab.active {
  background: var(--bg-card);
  color: var(--contrast-green);
}

.bottom-content {
  height: calc(100% - 45px);
  overflow: hidden;
}

.tab-content {
  display: none;
  height: 100%;
  padding: 20px;
}

.tab-content.active {
  display: block;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  text-align: center;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state p {
  margin-bottom: 8px;
}

.empty-state .text-sm {
  font-size: 14px;
  color: var(--text-muted);
}

.assets-table {
  display: flex;
  flex-direction: column;
}

.asset-header, .asset-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  padding: 12px 0;
}

.asset-header {
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-primary);
}

.asset-row {
  font-family: var(--font-mono);
  border-bottom: 1px solid var(--border-primary);
}

.asset-row:last-child {
  border-bottom: none;
}

/* Positions Table */
.positions-table, .trades-history {
  width: 100%;
}

.table-header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
  gap: 16px;
  padding: 16px 0;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.position-row, .trade-history-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
  gap: 16px;
  padding: 16px 0;
  font-family: var(--font-mono);
  font-size: 14px;
  border-bottom: 1px solid var(--border-primary);
  transition: background 0.2s ease;
}

.position-row:hover, .trade-history-row:hover {
  background: var(--bg-hover);
}

.position-row:last-child, .trade-history-row:last-child {
  border-bottom: none;
}

.side.long {
  color: var(--contrast-green);
  font-weight: 600;
}

.side.short {
  color: var(--contrast-red);
  font-weight: 600;
}

.pnl.positive, .positive {
  color: var(--contrast-green);
  font-weight: 600;
}

.pnl.negative, .negative {
  color: var(--contrast-red);
  font-weight: 600;
}

.position-actions, .actions {
  display: flex;
  gap: 8px;
}

.btn-sm {
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-danger {
  background: var(--contrast-red);
  color: white;
  border: none;
}

.btn-danger:hover {
  background: var(--contrast-red-dark);
}

/* Performance section */
.performance h4 {
  color: var(--contrast-green);
  margin-bottom: 12px;
}

.performance-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.perf-item {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

.perf-item span:first-child {
  color: var(--text-secondary);
}

.perf-item span:last-child {
  font-family: var(--font-mono);
  font-weight: 600;
}

/* TradingView Widget */
.tradingview-widget {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  overflow: hidden;
}

/* Trades History specific */
.trades-history .table-header {
  grid-template-columns: 1.2fr 1fr 0.8fr 1fr 1.2fr 1fr;
}

.trades-history .trade-history-row {
  grid-template-columns: 1.2fr 1fr 0.8fr 1fr 1.2fr 1fr;
}

/* Page Container */
.page-container {
  max-width: 1200px;
  margin: 0 auto;
}

.page-header {
  margin-bottom: 32px;
  text-align: center;
}

.page-header h1 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--contrast-green), var(--contrast-green-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-header p {
  font-size: 18px;
  color: var(--text-secondary);
}

/* Portfolio */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.portfolio-card {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  padding: 24px;
}

.portfolio-card h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.portfolio-card .value {
  font-size: 32px;
  font-weight: 700;
  font-family: var(--font-mono);
  margin-bottom: 8px;
}

.portfolio-card .change {
  font-size: 14px;
  font-weight: 600;
}

.portfolio-card .subtext {
  font-size: 14px;
  color: var(--text-muted);
}

.portfolio-tables {
  display: grid;
  gap: 24px;
}

.table-section {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  padding: 24px;
}

.table-section h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
}

/* Holdings Table */
.holdings-table {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border-primary);
  border-radius: 8px;
  overflow: hidden;
}

.holdings-table .table-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 120px;
  gap: 16px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.holding-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 120px;
  gap: 16px;
  padding: 16px;
  background: var(--bg-card);
  align-items: center;
  transition: background 0.2s;
}

.holding-row:hover {
  background: var(--bg-hover);
}

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

.holding-asset .token-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

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

.asset-symbol {
  font-weight: 600;
  font-size: 14px;
}

.asset-name {
  font-size: 12px;
  color: var(--text-secondary);
}

.holding-balance,
.holding-price,
.holding-value {
  font-family: var(--font-mono);
  text-align: right;
}

.holding-actions {
  display: flex;
  justify-content: flex-end;
}

/* DeFi Positions Table */
.defi-positions-table {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border-primary);
  border-radius: 8px;
  overflow: hidden;
}

.defi-positions-table .table-header {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.5fr 1fr 1fr 120px;
  gap: 16px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.defi-position-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.5fr 1fr 1fr 120px;
  gap: 16px;
  padding: 16px;
  background: var(--bg-card);
  align-items: center;
  transition: background 0.2s;
}

.defi-position-row:hover {
  background: var(--bg-hover);
}

.defi-protocol {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.protocol-badge {
  display: inline-block;
  padding: 2px 8px;
  background: var(--bg-secondary);
  border-radius: 4px;
  font-size: 11px;
  color: var(--text-secondary);
  width: fit-content;
}

.defi-assets {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.token-badge {
  display: inline-block;
  padding: 4px 8px;
  background: var(--contrast-green);
  color: white;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.defi-balance,
.defi-rewards {
  font-family: var(--font-mono);
  text-align: right;
}

.defi-actions {
  display: flex;
  justify-content: flex-end;
}

/* Asset Distribution Card */
.asset-breakdown {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.asset-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 14px;
}

.asset-item span:first-child {
  color: var(--text-secondary);
}

.asset-item span:last-child {
  font-weight: 600;
  font-family: var(--font-mono);
}

/* Connection Status */
.connection-status {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  padding: 48px;
  text-align: center;
}

.connect-wallet-message {
  max-width: 400px;
}

.connect-icon {
  font-size: 48px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.connect-wallet-message h3 {
  font-size: 24px;
  margin-bottom: 12px;
}

.connect-wallet-message p {
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.6;
}

.connect-wallet-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Invest */
.invest-hero {
  margin-bottom: 32px;
}

.pool-card {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 16px;
  padding: 32px;
  position: relative;
  overflow: hidden;
}

.pool-card.main-pool {
  background: linear-gradient(135deg, var(--bg-card), rgba(16, 185, 129, 0.05));
  border-color: var(--contrast-green);
}

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

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

.pool-title h2 {
  font-size: 24px;
  font-weight: 700;
}

.pool-badge {
  padding: 4px 12px;
  background: var(--contrast-green);
  color: white;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
}

.pool-stats {
  display: flex;
  gap: 32px;
}

.stat {
  text-align: center;
}

.stat-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.stat-value.apy {
  color: var(--contrast-green);
}

.pool-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.user-position {
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 24px;
}

.user-position h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

.position-stats {
  margin-bottom: 24px;
}

.position-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 14px;
}

.position-item span:first-child {
  color: var(--text-secondary);
}

.position-item span:last-child {
  font-family: var(--font-mono);
  font-weight: 600;
}

.position-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.pool-info {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.info-section h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
}

.info-section ul {
  list-style: none;
}

.info-section li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}

.info-section li:before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--contrast-green);
  font-weight: bold;
}

.info-section.risks li:before {
  color: var(--contrast-orange);
}

/* Farming */
.farming-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
}

.filter-group, .sort-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-group label, .sort-group label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.filter-group select, .sort-group select {
  padding: 8px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 6px;
  color: var(--text-primary);
}

.vaults-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 24px;
}

.vault-card {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  padding: 24px;
  transition: border-color 0.2s ease;
}

.vault-card:hover {
  border-color: var(--contrast-green);
}

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

.vault-header h3 {
  font-size: 18px;
  font-weight: 600;
}

.platform-badge {
  padding: 4px 8px;
  background: var(--bg-tertiary);
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.vault-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.vault-tokens {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.token {
  padding: 4px 8px;
  background: var(--contrast-green);
  color: white;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.vault-actions {
  display: flex;
  gap: 12px;
}

/* Bots */
.bots-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
}

.filter-tabs {
  display: flex;
  gap: 8px;
}

.filter-tab {
  padding: 8px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-tab.active {
  color: var(--contrast-green);
  border-color: var(--contrast-green);
  background: rgba(16, 185, 129, 0.1);
}

.sort-controls select {
  padding: 8px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 6px;
  color: var(--text-primary);
}

.bots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 24px;
}

.bots-grid-3x2 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.bot-card {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  padding: 20px;
  position: relative;
  transition: border-color 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 250px;
}

.bot-card:hover {
  border-color: var(--contrast-green);
}

.bot-card.featured {
  border-color: var(--contrast-green);
  background: linear-gradient(135deg, var(--bg-card), rgba(16, 185, 129, 0.05));
}

.featured-badge {
  position: absolute;
  top: -1px;
  right: 16px;
  padding: 4px 12px;
  background: var(--contrast-green);
  color: white;
  border-radius: 0 0 8px 8px;
  font-size: 12px;
  font-weight: 600;
}

.bot-header {
  margin-bottom: 16px;
}

.bot-header h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.bot-strategy {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.bot-stats {
  margin-bottom: 16px;
  flex: 1;
}

.stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 12px;
}

.stat-row:last-child {
  margin-bottom: 0;
}

.bot-chart {
  margin-bottom: 20px;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: 8px;
}

.chart-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px;
}

.sparkline {
  font-family: var(--font-mono);
  color: var(--contrast-green);
  font-weight: 600;
}

.bot-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: auto;
}

/* AI Management */
.ai-hero {
  margin-bottom: 32px;
}

.ai-main-card {
  background: linear-gradient(135deg, var(--bg-card), rgba(16, 185, 129, 0.03));
  border: 2px solid var(--contrast-green);
  border-radius: 16px;
  padding: 32px;
  position: relative;
  overflow: hidden;
}

.ai-main-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--contrast-green), var(--contrast-green-light));
}

.ai-header {
  margin-bottom: 32px;
}

.ai-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.ai-title-text {
  flex: 1;
  margin-left: 16px;
}

.ai-title h2 {
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--contrast-green), var(--contrast-green-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}

.ai-title p {
  color: var(--text-secondary);
  font-size: 16px;
}

.ai-icon {
  font-size: 48px;
  background: var(--contrast-green);
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.ai-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid var(--contrast-green);
  border-radius: 24px;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--contrast-green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.status-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--contrast-green);
}

.ai-performance {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.perf-stat {
  text-align: center;
}

.perf-label {
  display: block;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.perf-value {
  font-size: 32px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.perf-value.highlight {
  background: linear-gradient(135deg, var(--contrast-green), #FFD700);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
}

.ai-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.ai-strategy h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
}

.strategy-flow {
  display: flex;
  align-items: center;
  gap: 16px;
}

.flow-step {
  flex: 1;
  background: var(--bg-secondary);
  padding: 20px;
  border-radius: 12px;
  text-align: center;
}

.step-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.flow-step h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.flow-step p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.flow-arrow {
  font-size: 24px;
  color: var(--contrast-green);
  font-weight: bold;
}

.ai-stats {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.ai-allocation h3, .ai-metrics h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
}

.allocation-item {
  margin-bottom: 16px;
}

.allocation-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-secondary);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.bar.trading {
  background: var(--contrast-green);
  height: 100%;
}

.bar.farming {
  background: var(--contrast-orange);
  height: 100%;
}

.allocation-details {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

.allocation-label {
  color: var(--text-secondary);
}

.allocation-value {
  font-weight: 600;
  font-family: var(--font-mono);
}

.metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.metric-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
}

.metric-label {
  color: var(--text-secondary);
}

.metric-value {
  font-weight: 600;
  font-family: var(--font-mono);
}

.ai-position {
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 24px;
}

.ai-position h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
  text-align: center;
}

.position-overview {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.position-stat {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-primary);
}

.position-stat:last-child {
  border-bottom: none;
}

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

.btn-large {
  padding: 12px 20px;
  font-size: 16px;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--contrast-green);
  color: var(--contrast-green);
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-outline:hover {
  background: var(--contrast-green);
  color: white;
}

.ai-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  transition: border-color 0.2s ease;
}

.feature-card:hover {
  border-color: var(--contrast-green);
}

.feature-icon {
  font-size: 32px;
  margin-bottom: 16px;
}

.feature-card h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Buttons */
.btn-primary {
  padding: 10px 16px;
  background: var(--contrast-green);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-primary:hover {
  background: var(--contrast-green-dark);
}

.btn-secondary {
  padding: 10px 16px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-primary);
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.full-width {
  width: 100%;
}

.positive {
  color: var(--contrast-green);
}

.negative {
  color: var(--contrast-red);
}

/* Modals */
.modal-overlay {
  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: 2000;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-primary);
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 600;
}

.close-btn {
  width: 32px;
  height: 32px;
  background: var(--bg-secondary);
  border: none;
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.modal-content {
  padding: 24px;
}

.wallet-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.wallet-option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.wallet-option:hover {
  background: var(--bg-hover);
  border-color: var(--contrast-green);
}

.wallet-safety {
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: 8px;
}

.wallet-safety p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}

.wallet-safety p:last-child {
  margin-bottom: 0;
}

.wallet-safety i {
  color: var(--contrast-green);
}

.deposit-form, .withdraw-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 16px;
}

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

.amount-btn {
  padding: 6px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: 4px;
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.amount-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.deposit-info, .withdraw-info {
  padding: 16px;
  background: var(--bg-tertiary);
  border-radius: 8px;
}

/* Responsive */
@media (max-width: 1200px) {
  .trade-layout {
    grid-template-columns: 1fr 350px;
    grid-template-rows: 1fr auto;
  }
  
  .trading-ticket {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .nav-container {
    padding: 0 16px;
  }
  
  .nav-tabs {
    display: none;
  }
  
  .main-content {
    padding: 16px;
  }
  
  .trade-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .page-header h1 {
    font-size: 28px;
  }
  
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
  
  .pool-content {
    grid-template-columns: 1fr;
  }
  
  .pool-stats {
    gap: 20px;
  }
  
  .vaults-grid {
    grid-template-columns: 1fr;
  }
  
  .bots-grid {
    grid-template-columns: 1fr;
  }
  
  .bots-filters {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }
  
  .filter-tabs {
    justify-content: center;
  }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--border-secondary);
  border-radius: 3px;
}

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

/* Homepage */
.homepage {
  min-height: calc(100vh - 60px);
}

.hero-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 80px 24px;
  max-width: 1440px;
  margin: 0 auto;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

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

.logo-icon-large {
  background: linear-gradient(135deg, var(--contrast-green), var(--contrast-green-light));
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 0 40px rgba(16, 185, 129, 0.3);
}

.hero-title {
  font-size: 48px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--contrast-green), var(--contrast-green-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
}

.hero-subtitle {
  font-size: 24px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
}

.stat-card h3 {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.stat-value.highlight {
  background: linear-gradient(135deg, var(--contrast-green), #FFD700);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.feature {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  color: var(--text-secondary);
}

.feature i {
  color: var(--contrast-green);
  font-size: 18px;
}

.launch-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, var(--contrast-green), var(--contrast-green-light));
  color: white;
  text-decoration: none;
  font-size: 18px;
  font-weight: 700;
  padding: 16px 32px;
  border-radius: 12px;
  transition: all 0.2s ease;
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
  align-self: flex-start;
}

.launch-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(16, 185, 129, 0.4);
}

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.trading-preview {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 16px;
  padding: 24px;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

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

.preview-tabs {
  display: flex;
  gap: 8px;
}

.tab {
  padding: 8px 16px;
  background: var(--bg-secondary);
  border-radius: 6px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab.active {
  background: var(--contrast-green);
  color: white;
}

.preview-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.preview-price .price {
  font-size: 20px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.preview-price .change {
  font-size: 14px;
  font-weight: 600;
}

.preview-chart {
  margin: 20px 0;
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 16px;
}

.preview-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.preview-stat {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

.preview-stat span:first-child {
  color: var(--text-secondary);
}

.preview-stat span:last-child {
  font-weight: 600;
  font-family: var(--font-mono);
}

.features-section {
  background: var(--bg-secondary);
  padding: 80px 24px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  max-width: 1440px;
  margin: 0 auto;
}

.feature-card-large {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  transition: all 0.2s ease;
}

.feature-card-large:hover {
  border-color: var(--contrast-green);
  transform: translateY(-4px);
}

.feature-card-large .feature-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.feature-card-large h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.feature-card-large p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Responsive Homepage */
@media (max-width: 1024px) {
  .hero-section {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }
  
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 36px;
  }
  
  .hero-subtitle {
    font-size: 20px;
  }
  
  .hero-stats {
    grid-template-columns: 1fr;
  }
  
  .hero-features {
    grid-template-columns: 1fr;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
}

/* Utilities */
.text-sm {
  font-size: 14px;
}

.hidden {
  display: none !important;
}

/* ========================================
   PORTFOLIO & ASSETS DISPLAY STYLES
   ======================================== */

/* Portfolio Summary */
.portfolio-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.05));
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 12px;
  margin-bottom: 32px;
}

.summary-card {
  flex: 1;
}

.summary-label {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.summary-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--contrast-green);
  letter-spacing: -0.5px;
}

.summary-actions {
  display: flex;
  gap: 12px;
}

/* Assets Section */
.assets-section {
  margin-bottom: 40px;
}

.assets-section h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.assets-section h3 i {
  color: var(--contrast-green);
}

/* Responsive Table */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
}

.assets-data-table {
  width: 100%;
  border-collapse: collapse;
}

.assets-data-table thead {
  background: var(--bg-secondary);
}

.assets-data-table thead th {
  padding: 16px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-primary);
}

.assets-data-table tbody tr {
  transition: background-color 0.2s ease;
}

.assets-data-table tbody tr:hover {
  background: var(--bg-hover);
}

.assets-data-table tbody tr:not(:last-child) {
  border-bottom: 1px solid var(--border-secondary);
}

.assets-data-table tbody td {
  padding: 20px 16px;
  font-size: 14px;
  color: var(--text-primary);
}

/* Asset Name Cell */
.asset-name {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.asset-name strong {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.asset-fullname {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Chain Badge */
.chain-badge {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--contrast-green);
  text-transform: capitalize;
}

/* Position Type */
.position-type {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #3b82f6;
  text-transform: capitalize;
}

/* Loading & Empty States */
.loading-state, .empty-state, .error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.loading-state p, .empty-state p, .error-state p {
  color: var(--text-secondary);
  margin-top: 0;
}

.empty-state button, .error-state button {
  margin-top: 20px;
}

/* Balance Update Animation */
@keyframes balanceGlow {
  0%, 100% {
    box-shadow: 0 0 0 rgba(16, 185, 129, 0);
  }
  50% {
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
  }
}

.assets-table.balance-updated {
  animation: balanceGlow 0.5s ease;
}

/* Web3 Notifications */
.wallet-notification {
  position: fixed;
  top: 80px;
  right: 20px;
  padding: 16px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  animation: slideIn 0.3s ease;
  max-width: 400px;
}

.wallet-notification.success {
  border-color: var(--contrast-green);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.05));
}

.wallet-notification.info {
  border-color: #3b82f6;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(37, 99, 235, 0.05));
}

.wallet-notification.error {
  border-color: #ef4444;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.05));
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Mobile Responsive for Assets Table */
@media (max-width: 768px) {
  .portfolio-summary {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
  
  .summary-actions {
    width: 100%;
    justify-content: center;
  }
  
  .table-responsive {
    overflow-x: scroll;
  }
  
  .assets-data-table {
    min-width: 600px;
  }
  
  .assets-data-table thead th,
  .assets-data-table tbody td {
    padding: 12px 10px;
    font-size: 12px;
  }
  
  .summary-value {
    font-size: 24px;
  }
}