/* Market & Metals */
.market-list { display:grid; grid-template-columns:1fr; gap:0.75rem; }
@media(min-width:640px){ .market-list{ grid-template-columns:1fr 1fr; } }
.market-row {
  display:flex; align-items:center; justify-content:space-between;
  background:rgba(255,255,255,0.05); border-radius:0.75rem; padding:0.75rem;
}
.market-row:hover { background:rgba(255,255,255,0.1); }
.market-left { display:flex; align-items:center; gap:0.75rem; }
.market-icon { width:2.25rem; height:2.25rem; border-radius:0.5rem; background:rgba(255,255,255,0.1); display:flex; align-items:center; justify-content:center; font-size:1rem; }
.market-name { font-weight:600; color:#fff; }
.market-sub { font-size:0.75rem; color:rgba(255,255,255,0.5); }
.market-right { text-align:right; }
.market-price { font-weight:700; color:#fff; }
.market-change { display:flex; align-items:center; gap:0.25rem; font-size:0.75rem; font-weight:500; }
.up { color:#6ee7b7; }
.down { color:#fda4af; }

/* Market cap center column */
.market-center { flex:1; text-align:center; }
.market-mcap-label { font-size:0.625rem; color:rgba(255,255,255,0.5); text-transform:uppercase; }
.market-mcap { font-size:0.875rem; font-weight:700; color:#fff; }

.market-row.market-up { background: rgba(16,185,129,0.08); border:1px solid rgba(16,185,129,0.15); }
.market-row.market-down { background: rgba(244,63,94,0.08); border:1px solid rgba(244,63,94,0.15); }
.forex-list { display:grid; grid-template-columns:1fr; gap:0.5rem; }
.forex-row { display:flex; align-items:center; justify-content:center; background:rgba(255,255,255,0.05); border-radius:0.75rem; padding:0.75rem; }
.forex-line { font-weight:600; color:#fff; font-size:0.875rem; font-variant-numeric:tabular-nums; display:inline-flex; align-items:center; gap:0.25rem; }
.forex-line strong { font-weight:700; }
.forex-flag-img { width:1.125rem; height:0.84375rem; border-radius:2px; vertical-align:middle; display:inline-block; object-fit:cover; }

.forex-row.forex-up { background: rgba(16,185,129,0.08); }
.forex-row.forex-down { background: rgba(244,63,94,0.08); }

/* Theme light overrides */
body.theme-light .market-row { background: rgba(0,0,0,0.06); border-color: transparent; }
body.theme-light .market-row:hover { background: rgba(0,0,0,0.09); }
body.theme-light .market-icon { background: rgba(0,0,0,0.08); }
body.theme-light .market-name { color: #0f172a; }
body.theme-light .market-sub { color: rgba(0,0,0,0.65); }
body.theme-light .market-price { color: #0f172a; }
body.theme-light .market-mcap-label { color: rgba(0,0,0,0.55); }
body.theme-light .market-mcap { color: #0f172a; }
body.theme-light .up { color: #047857; }
body.theme-light .down { color: #be123c; }
body.theme-light .market-row.market-up { background: rgba(16,185,129,0.06); border-color: rgba(16,185,129,0.2); }
body.theme-light .market-row.market-down { background: rgba(244,63,94,0.06); border-color: rgba(244,63,94,0.2); }
body.theme-light .forex-row { background: rgba(0,0,0,0.06); }
body.theme-light .forex-line { color: #0f172a; }
body.theme-light .forex-row.forex-up { background: rgba(16,185,129,0.06); }
/* Metals responsive compact mode in narrow column */
#metalsContent.market-list { grid-template-columns: 1fr; }
#metalsCard .market-row { padding: 0.5rem; gap: 0.5rem; }
#metalsCard .market-icon { width: 1.75rem; height: 1.75rem; font-size: 0.875rem; }
#metalsCard .market-name { font-size: 0.875rem; }
#metalsCard .market-sub { font-size: 0.625rem; }
#metalsCard .market-price { font-size: 0.875rem; }
#metalsCard .market-change { font-size: 0.625rem; }

body.theme-light .forex-row.forex-down { background: rgba(244,63,94,0.06); }

/* SPCX wallet gain styling */
.spcx-gain { font-size:0.75em; margin-left:0.4rem; opacity:0.9; }
.spcx-wallet { font-size:0.65em; margin-left:0.35rem; opacity:0.75; }
.spcx-gain-up { color:#6ee7b7; }
.spcx-gain-down { color:#fda4af; }
body.theme-light .spcx-gain-up { color:#047857; }
body.theme-light .spcx-gain-down { color:#be123c; }
