
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
*::-webkit-scrollbar {
  display: none
}
:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #14191f;
  --bg-tertiary: #1a1f2e;
  --bg-card: #1e2330;
  --accent-primary: #c4d96e;
  --accent-hover: #d4e97e;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --text-tertiary: #6b7280;
  --border-color: #2a2f3e;
  --positive: #10b981;
  --negative: #ef4444;
  --chart-line: #c4d96e;
  --compare-line: #a78bfa;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  margin: 0;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--accent-primary);
  padding: 24px;
}

/* Header */
.header {
  background: var(--bg-secondary);
  border-radius: 20px;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.logo-icon-img {
  color: var(--accent-primary);
  font-size: 24px;
}

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

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-primary);
}

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

/* Currency Selector */
.currency-selector {
    position: relative;
    background: var(--bg-tertiary);
    padding: 8px 12px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
}

.currency-selector:hover {
    background: var(--bg-card);
}

.currency-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 8px;
    width: 140px;
    display: none;
    z-index: 100;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.currency-selector:hover .currency-dropdown {
    display: block;
}

.currency-option {
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.currency-option:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.wallet-address {
  background: var(--bg-tertiary);
  padding: 10px 16px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
}

.wallet-icon {
    color: var(--accent-primary);
    font-size: 18px;
}

.btn-login {
  background: var(--accent-primary);
  color: var(--bg-primary);
  border: none;
  padding: 10px 20px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-login:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

/* Mobile Bottom Sheet */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    backdrop-filter: blur(4px);
}

.mobile-nav-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--bg-secondary);
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    padding: 24px;
    z-index: 999;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
    border-top: 1px solid var(--border-color);
}

.mobile-nav-sheet.active {
    transform: translateY(0);
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

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

.sheet-title {
    font-size: 20px;
    font-weight: 700;
}

.sheet-close {
    background: var(--bg-tertiary);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
}

.sheet-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sheet-link {
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: 16px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sheet-link.active {
    background: var(--bg-card);
    color: var(--accent-primary);
    border: 1px solid var(--border-color);
}

.sheet-link i {
    font-size: 20px;
}

/* Main Content Layout */
.main-content {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  flex: 1;
}

.chart-section {
  background: var(--bg-secondary);
  border-radius: 24px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
  position: relative;
}

/* AUTH & FORM STYLES (Redesigned) */
.auth-input-group {
    position: relative;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    overflow: hidden;
}

.auth-input-group:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(196, 217, 110, 0.1);
    background: var(--bg-card);
}

.auth-input-icon {
    color: var(--text-tertiary);
    font-size: 20px;
    margin-right: 12px;
    transition: color 0.3s;
}

.auth-input-group:focus-within .auth-input-icon {
    color: var(--accent-primary);
}

.auth-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 16px 0;
    color: var(--text-primary);
    font-size: 15px;
    font-family: var(--font-family);
}

.auth-input:focus {
    outline: none;
}

.btn-premium {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-hover) 100%);
    color: var(--bg-primary);
    border: none;
    padding: 16px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(196, 217, 110, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(196, 217, 110, 0.35);
}

.btn-premium:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.auth-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    font-size: 14px;
}

.link-text {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.link-text:hover {
    color: var(--accent-primary);
}

/* CHAT ADMIN Styles */
.admin-chat-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    height: calc(100vh - 120px);
    gap: 24px;
}

.chat-sidebar {
    background: var(--bg-secondary);
    border-radius: 24px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 700;
    background: var(--bg-tertiary);
    font-size: 16px;
}

.user-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.user-item {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    border: 1px solid transparent;
}

.user-item:hover { background: var(--bg-tertiary); }
.user-item.active { background: var(--bg-card); border-color: var(--accent-primary); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }

.user-item-name { font-weight: 700; font-size: 14px; margin-bottom: 4px; color: var(--text-primary); }
.user-item-preview { font-size: 13px; color: var(--text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.unread-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 10px;
    height: 10px;
    background: var(--accent-primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-primary);
}

/* Chat Window */
.chat-window {
    background: var(--bg-secondary);
    border-radius: 24px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-window-header {
    padding: 16px 24px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-avatar-large {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent-primary);
    color: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
}

.chat-user-info h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.chat-user-info span {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.empty-chat-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    text-align: center;
    padding: 40px;
}

.empty-chat-icon {
    font-size: 64px;
    margin-bottom: 24px;
    opacity: 0.2;
}

/* Chat Messages Area (Shared & Admin specific) */
.chat-messages {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--bg-secondary);
}

.message {
    max-width: 70%;
    padding: 12px 18px;
    border-radius: 18px;
    font-size: 15px;
    line-height: 1.5;
    position: relative;
    animation: messageIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    word-wrap: break-word;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

.message.received {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    border: 1px solid var(--border-color);
}

.message.sent {
    background: var(--accent-primary);
    color: var(--bg-primary);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    font-weight: 500;
}

.message-time {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 6px;
    display: block;
    text-align: right;
}

.chat-input-area {
    padding: 20px;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 16px;
    align-items: center;
}

.chat-input {
    flex: 1;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 14px 20px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 15px;
    transition: all 0.2s;
}

.chat-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: var(--bg-card);
}

.btn-send {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--accent-primary);
    color: var(--bg-primary);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: 0 4px 12px rgba(196, 217, 110, 0.3);
}

.btn-send:hover {
    transform: scale(1.05);
}

/* Existing styles preserved below... */
/* Fullscreen Styles */
.chart-section:fullscreen {
  background: var(--bg-secondary);
  padding: 32px;
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.chart-section:fullscreen .chart-wrapper {
  flex: 1;
  height: auto;
  min-height: 0; /* Chrome flex fix */
}

.chart-section:fullscreen .chart-container {
  height: 100%;
}

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

.pair-selector {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 12px;
  transition: background 0.2s;
}

.pair-selector:hover {
  background: var(--bg-tertiary);
}

.pair-icons {
  display: flex;
  align-items: center;
}

.crypto-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  padding: 2px;
  border: 2px solid var(--bg-secondary);
}

.quote-icon {
  margin-left: -10px;
}

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

.pair-label {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.dropdown-arrow {
  color: var(--text-secondary);
  font-size: 16px;
}

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

.chart-btn {
  background: var(--bg-tertiary);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-secondary);
  font-size: 18px;
}

.chart-btn:hover, .chart-btn.active {
  background: var(--bg-card);
  color: var(--text-primary);
}

.chart-btn.active {
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
}

.price-display {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.current-price {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.price-value {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -1px;
}

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

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

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

.timeframe-selector {
  display: flex;
  background: var(--bg-tertiary);
  padding: 4px;
  border-radius: 12px;
}

.timeframe-btn {
  background: transparent;
  border: none;
  padding: 6px 14px;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

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

.timeframe-btn.active {
  background: var(--bg-secondary);
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Interactive Chart */
.chart-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 32px;
    display: flex;
    flex-direction: column;
}

.chart-container {
  height: 350px;
  width: 100%;
  position: relative;
  cursor: crosshair;
}

#price-chart {
  width: 100%;
  height: 100%;
}

.chart-tooltip {
    position: absolute;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: 8px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.1s;
    font-size: 12px;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.chart-tooltip-price {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 14px;
}

.chart-tooltip-date {
    color: var(--text-secondary);
    margin-top: 2px;
}

.chart-tooltip-compare {
    color: var(--compare-line);
    font-size: 12px;
    margin-top: 4px;
    font-weight: 600;
}

/* Exchange List */
.exchange-list {
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
}

.exchange-header {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1.5fr 1fr 1.5fr;
  gap: 16px;
  padding: 0 16px 16px 16px;
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.exchange-row {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1.5fr 1fr 1.5fr;
  gap: 16px;
  padding: 16px;
  border-radius: 12px;
  transition: background 0.2s;
  align-items: center;
  margin-bottom: 4px;
}

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

.exchange-name {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 14px;
}

.exchange-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.exchange-price {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
}

.exchange-amount, .exchange-volume {
    font-size: 14px;
    color: var(--text-secondary);
}

.exchange-badge {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  display: inline-block;
}

.exchange-badge.limited { background: rgba(139, 92, 246, 0.15); color: #a78bfa; }
.exchange-badge.trending { background: rgba(236, 72, 153, 0.15); color: #f472b6; }
.exchange-badge.rising { background: rgba(16, 185, 129, 0.15); color: var(--positive); }

/* Trading Panel */
.trading-panel {
  background: var(--bg-secondary);
  border-radius: 24px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border: 1px solid var(--border-color);
  position: relative;
}

.trade-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.trade-tab {
  flex: 1;
  background: var(--bg-tertiary);
  border: none;
  padding: 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-secondary);
}

.trade-tab.active {
  color: var(--text-primary);
  background: var(--bg-card);
}

.trade-tab[data-tab="buy"].active {
  background: rgba(16, 185, 129, 0.15);
  color: var(--positive);
}

.trade-tab[data-tab="sell"].active {
  background: rgba(239, 68, 68, 0.15);
  color: var(--negative);
}

.action-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  position: absolute;
  top: 24px;
  right: 24px;
}

.action-btn {
  background: transparent;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-secondary);
  font-size: 18px;
}

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

.trade-input-group {
  background: var(--bg-tertiary);
  border-radius: 16px;
  padding: 16px;
}

.input-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.input-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.fiat-icon-placeholder {
    background: var(--positive);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
    font-size: 14px;
}

.input-label {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.input-side {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 600;
}

.input-wrapper {
  position: relative;
  margin-bottom: 8px;
}

.trade-input {
  width: 100%;
  background: transparent;
  border: none;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: inherit;
  padding: 8px 0;
}

.trade-input:focus {
  outline: none;
}

.swap-btn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-secondary);
}

.swap-btn:hover {
  background: var(--accent-primary);
  color: var(--bg-primary);
  border-color: var(--accent-primary);
}

.input-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.balance-label {
  color: var(--text-tertiary);
}

.balance-value {
  color: var(--text-secondary);
  font-weight: 600;
}

.btn-trade {
  width: 100%;
  background: var(--accent-primary);
  color: var(--bg-primary);
  border: none;
  padding: 16px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-trade:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(196, 217, 110, 0.2);
}

.btn-connect-wallet {
  width: 100%;
  background: transparent;
  color: var(--text-primary);
  border: 1px dashed var(--text-tertiary);
  padding: 14px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-connect-wallet:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: rgba(196, 217, 110, 0.05);
}

.balance-card {
  background: var(--bg-tertiary);
  border-radius: 16px;
  padding: 16px;
}

.balance-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.balance-card-label {
  font-size: 11px;
  color: var(--text-tertiary);
  font-weight: 600;
  text-transform: uppercase;
}

.balance-card-amount {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-left: auto;
}

.balance-card-change {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
}

.balance-card-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.balance-detail {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.detail-value {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 600;
}

/* Pair Selector Dropdown */
.pair-selector-dropdown {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background: var(--bg-secondary);
  border-radius: 20px;
  width: 400px;
  max-width: 90%;
  max-height: 500px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
}

.pair-selector-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.dropdown-header {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.dropdown-search {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 12px 12px 40px;
  font-size: 14px;
  color: var(--text-primary);
  font-family: inherit;
}

.dropdown-search:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.search-icon {
    position: absolute;
    left: 28px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 18px;
}

.dropdown-list {
  overflow-y: auto;
  padding: 8px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.dropdown-item:hover {
  background: var(--bg-tertiary);
}

.dropdown-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.dropdown-item-info {
  flex: 1;
}

.dropdown-item-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.dropdown-item-name {
  font-size: 11px;
  color: var(--text-tertiary);
}

.dropdown-item-price {
  text-align: right;
}

.dropdown-item-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.dropdown-item-change {
  font-size: 11px;
  font-weight: 700;
}

.dropdown-item-change.positive { color: var(--positive); }
.dropdown-item-change.negative { color: var(--negative); }

/* Toast */
#toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 16px 20px;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
  animation: slideIn 0.3s ease;
  pointer-events: all;
  border-left: 4px solid var(--accent-primary);
  border: 1px solid var(--border-color);
  border-left-width: 4px;
}

.toast.success { border-left-color: var(--positive); }
.toast.error { border-left-color: var(--negative); }
.toast.warning { border-left-color: #f59e0b; }

.toast-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.toast-content { flex: 1; }

.toast-title {
  font-weight: 700;
  font-size: 14px;
}

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

.toast-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  font-size: 18px;
}

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

@keyframes slideOut {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(400px); opacity: 0; }
}

.toast.removing { animation: slideOut 0.3s ease forwards; }

/* Responsive Media Queries */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .trading-panel {
        max-width: 100%;
        order: -1; /* Move trading panel to top on medium screens if desired, or keep bottom */
    }
    
    .admin-chat-layout {
        grid-template-columns: 100px 1fr;
    }
    .user-item-name, .user-item-preview { display: none; }
}

@media (max-width: 768px) {
    .app {
        padding: 16px 8px;
    }

    div#currency-selector {
    display: none;
}

    .desktop-nav {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .header {
        padding: 12px 16px;
    }

    .header-right .btn-login,
    .header-right .wallet-address {
        display: none;
    }

        .chart-section {
        padding: 5vw;
        max-width: 100%;
        width: 95vw;
    }

    .price-value {
        font-size: 28px;
    }

    .exchange-header, .exchange-row {
        grid-template-columns: 2fr 1fr 1fr;
    }

    .mobile-hide {
        display: none;
    }

    .chart-container {
        height: 250px;
    }
    
    .admin-chat-layout {
        grid-template-columns: 1fr;
        height: auto;
    }
    .chat-sidebar {
        height: 200px;
    }
    .chat-window {
        height: 400px;
    }
}
.hidden {
  display: none !important;
}
div#panel-trade-view {
    display: flex
;
    flex-direction: column;
    gap: 1em;
}
  .node.active {
            background: var(--bg-card);
            border-color: var(--accent-primary);
            color: var(--accent-primary);
            box-shadow: 0 0 15px rgba(196, 217, 110, 0.3);
        }
        
        .node.success {
            background: var(--positive);
            border-color: var(--positive);
            color: var(--bg-primary);
            box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
        }

        .node.failed {
            background: var(--negative);
            border-color: var(--negative);
            color: white;
            box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
        }