/* ── GLOBAL ───────────────────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  display: flex;
  flex-direction: column;    /* stack header + content */
  font-family: Arial, sans-serif;
  background: #f9f9f9;
  overflow: hidden;
}

/* ── SITE HEADER ─────────────────────────────────────────── */
.site-header {
  width: 100%;               /* full width */
  background-color: #fff;
  border-bottom: 1px solid #ddd;
  padding: 0.5rem 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: center;   /* center nav */
}
.site-nav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}
.site-nav a {
  text-decoration: none;
  color: #333;
  font-weight: bold;
  transition: color 0.2s;
}
.site-nav a:hover,
.site-nav a:focus {
  color: #007bff;
}

/* ── MAIN WATERFALLS LAYOUT ─────────────────────────────── */
.waterfalls {
  display: flex;
  gap: 50px;
  padding: 50px;
  flex: 1;                   /* fill remaining height under header */
  overflow: auto;            /* allow scrolling if too tall */
}

/* ── INDIVIDUAL WRAPPER ─────────────────────────────────── */
.waterfall-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #eef1f4;
  border-radius: 8px;
  overflow: hidden;
}

/* ── HEADER INSIDE WRAPPER ───────────────────────────────── */
.waterfall-wrapper h2 {
  text-align: center;
  background: #fff;
  padding: 0.5rem;
  border-bottom: 1px solid #ccc;
}

/* ── FEED AREA ──────────────────────────────────────────── */
.feed {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

/* ── FOOTER INSIDE WRAPPER ──────────────────────────────── */
.footer {
  background: #fff;
  border-top: 1px solid #ccc;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.stats {
  display: flex;
  justify-content: space-around;
  align-items: center;
  font-size: 1rem;
  color: #333;
}
.stats .value { font-weight: bold; }
.stats .label { font-style: italic; }

/* ── GAUGE ──────────────────────────────────────────────── */
.gauge {
  display: flex;
  background: #ddd;
  border-radius: 8px;
  overflow: hidden;
  height: 100px;             /* increased height */
}
.gauge .bar {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: bold;
  transition: width 0.5s ease;
}
.gauge .buy  { background: rgba(0,200,0,0.6); }
.gauge .sell { background: rgba(200,0,0,0.6); }

/* ── DURATION CONTROLS ─────────────────────────────────── */
.track-controls {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}
.track-controls button {
  padding: 0.25rem 0.5rem;
  border: 1px solid #ccc;
  background: transparent;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}
.track-controls button.selected {
  background: #007bff;
  color: #fff;
  border-color: #007bff;
}

/* ── TRANSACTION ROWS ───────────────────────────────────── */
.txn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  padding: 0.75rem 1rem;
  background: #fff;
  border: 4px solid transparent;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  animation: slideIn var(--fade-time) ease-in-out forwards;
}
.txn.large-buy  { background-color: gold; }
.txn.large-sell { background-color: lightcoral; }
.txn-left { display: flex; gap: 0.5rem; overflow: hidden; }
.txn-side { text-transform: uppercase; font-weight: bold; }
.txn-time { flex-shrink: 0; color: #666; font-size: 0.75rem; }

@keyframes slideIn {
  0%   { transform: translateY(-1em); }
  10%  { transform: translateY(0);    }
  90%,100% { transform: translateY(1em); }
}
:root { --fade-time: 180s; }
