/* ═══════════════════════════════════════════════════════════
   NAV — Linear / Vercel / Stripe aesthetic
   Content-first. Navigation almost invisible.
   ═══════════════════════════════════════════════════════════ */

/* ── HEADER SHELL ─────────────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: 52px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 0;
  background: rgba(9, 9, 12, 0.82);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.042);
}

/* ── LOGO ─────────────────────────────────────────────────── */
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  text-decoration: none;
  margin-right: 32px;
}

.logo-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.55);
  flex-shrink: 0;
}

.logo-text {
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  letter-spacing: -0.02em;
  font-family: var(--head);
  line-height: 1;
}

.logo-sub { display: none; }

/* ── CENTER ───────────────────────────────────────────────── */
.header-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── NAV ──────────────────────────────────────────────────── */
.nav-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-sep {
  display: none; /* remove dots completely */
}

.nav-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  font-size: 13px;
  font-weight: 450;
  font-family: var(--head);
  letter-spacing: -0.005em;
  color: rgba(255, 255, 255, 0.36);
  text-decoration: none;
  border-radius: 6px;
  transition:
    color 180ms ease,
    background 180ms ease;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
}

/* hover */
.nav-tab:hover {
  color: rgba(255, 255, 255, 0.68);
  background: rgba(255, 255, 255, 0.038);
}

/* active underline */
.nav-tab::after {
  content: '';
  position: absolute;
  bottom: -13px; /* sits on the header border */
  left: 11px;
  right: 11px;
  height: 1px;
  background: rgba(99, 120, 255, 0.8);
  border-radius: 0;
  opacity: 0;
  transform: scaleX(0.4);
  transition:
    opacity 200ms ease,
    transform 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* active state */
.nav-tab.active {
  color: rgba(255, 255, 255, 0.9);
  background: transparent;
}

.nav-tab.active::after {
  opacity: 1;
  transform: scaleX(1);
}

/* ── HEADER RIGHT ─────────────────────────────────────────── */
.header-right {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

/* ── BTC PRICE ────────────────────────────────────────────── */
.hdr-btc {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-right: 4px;
}
.hdr-btc-label {
  font-size: 10px;
  color: rgba(255,255,255,0.22);
  font-family: var(--mono);
  letter-spacing: .06em;
}
.hdr-btc-price {
  font-family: var(--head);
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(251, 191, 36, 0.82);
  letter-spacing: -0.01em;
}

/* ── PERIOD SWITCH ────────────────────────────────────────── */
.period-switch {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 2px;
  gap: 1px;
}

.period-btn {
  height: 22px;
  padding: 0 8px;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: rgba(255,255,255,0.3);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  transition: all 150ms ease;
  letter-spacing: 0.03em;
}
.period-btn:hover { color: rgba(255,255,255,0.6); }
.period-btn.active {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.82);
}

/* ── LANGUAGE SWITCHER ────────────────────────────────────── */
.lang-switcher { position: relative; }

.lang-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 6px;
  color: rgba(255,255,255,0.35);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  transition: all 150ms ease;
  letter-spacing: 0.04em;
}
.lang-btn:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.65);
}
.lang-btn.open {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.12);
}

.lang-flag { font-size: 12px; line-height: 1; }
.lang-arrow {
  font-size: 7px;
  color: rgba(255,255,255,0.18);
  transition: transform 180ms ease;
  margin-left: 1px;
}
.lang-btn.open .lang-arrow { transform: rotate(180deg); }

.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  min-width: 152px;
  background: rgba(12, 13, 17, 0.97);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 10px;
  padding: 4px;
  z-index: 600;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.02) inset,
    0 8px 32px rgba(0,0,0,0.55),
    0 2px 8px rgba(0,0,0,0.3);
  animation: fadeSlide 150ms cubic-bezier(0.16,1,0.3,1);
}
.lang-dropdown.open { display: block; }

@keyframes fadeSlide {
  from { opacity:0; transform:translateY(-5px) scale(0.97); }
  to   { opacity:1; transform:translateY(0)   scale(1);    }
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-family: var(--head);
  font-weight: 400;
  color: rgba(255,255,255,0.45);
  cursor: pointer;
  transition: all 130ms ease;
}
.lang-option:hover {
  background: rgba(255,255,255,0.055);
  color: rgba(255,255,255,0.82);
}
.lang-option.active {
  color: rgba(148, 163, 255, 0.9);
  background: rgba(96,165,250,0.07);
}

/* ── ICON BUTTONS ─────────────────────────────────────────── */
.btn-refresh,
.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 6px;
  color: rgba(255,255,255,0.28);
  font-size: 13px;
  cursor: pointer;
  transition: all 150ms ease;
  flex-shrink: 0;
}
.btn-refresh:hover,
.btn-icon:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.65);
}
.btn-refresh.spin { animation: spinAnim 0.55s linear infinite; }

/* ── STATUS ───────────────────────────────────────────────── */
.status-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
}
.live-dot-small {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34,197,94,0.55);
  flex-shrink: 0;
  animation: breathe 2.2s ease-in-out infinite;
}

/* ── WALLET INPUT ─────────────────────────────────────────── */
.wallet-wrap { position: relative; }
.wallet-input-row { display: flex; align-items: center; gap: 4px; }
.wallet-field { position: relative; }

.wallet-input {
  width: 256px;
  height: 26px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 6px;
  color: rgba(255,255,255,0.8);
  font-family: var(--mono);
  font-size: 11px;
  padding: 0 10px;
  outline: none;
  transition: all 160ms ease;
  letter-spacing: 0.005em;
}
.wallet-input::placeholder { color: rgba(255,255,255,0.18); }
.wallet-input:focus {
  border-color: rgba(96,165,250,0.38);
  background: rgba(255,255,255,0.05);
  box-shadow: 0 0 0 3px rgba(96,165,250,0.07);
}

.wallet-load-btn {
  height: 26px;
  padding: 0 11px;
  background: rgba(96,165,250,0.1);
  border: 1px solid rgba(96,165,250,0.22);
  border-radius: 6px;
  color: rgba(147,197,253,0.85);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  transition: all 150ms ease;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.wallet-load-btn:hover {
  background: rgba(96,165,250,0.18);
  border-color: rgba(96,165,250,0.4);
  color: rgba(255,255,255,0.9);
}

.wallet-save-btn {
  width: 26px; height: 26px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 6px;
  color: rgba(255,255,255,0.2);
  font-size: 12px;
  cursor: pointer;
  transition: all 150ms ease;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.wallet-save-btn:hover { color: rgba(251,191,36,0.7); border-color: rgba(251,191,36,0.2); }
.wallet-save-btn.saved { color: rgba(251,191,36,0.85); }

.wallet-status {
  font-size: 10px;
  color: rgba(255,255,255,0.2);
  padding: 2px 1px 0;
  height: 14px;
  font-family: var(--mono);
  letter-spacing: 0.02em;
}

/* Saved addresses dropdown */
.saved-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: rgba(12,13,17,0.97);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 9px;
  padding: 4px;
  z-index: 500;
  box-shadow: 0 8px 28px rgba(0,0,0,0.5);
  animation: fadeSlide 140ms ease;
}
.saved-item {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 8px; border-radius: 6px; cursor: pointer;
  transition: background 120ms ease;
}
.saved-item:hover { background: rgba(255,255,255,0.055); }
.saved-item-name { font-size: 12px; color: rgba(255,255,255,0.72); font-weight:500; min-width:55px; }
.saved-item-addr { font-family:var(--mono); font-size:10px; color:rgba(255,255,255,0.25); flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.saved-item-del { font-size:11px; color:rgba(255,255,255,0.15); padding:1px 4px; border-radius:3px; transition:all 110ms; flex-shrink:0; }
.saved-item-del:hover { color:rgba(255,77,109,0.75); background:rgba(255,77,109,0.09); }

/* ── KEYFRAMES ────────────────────────────────────────────── */
@keyframes spinAnim { to { transform: rotate(360deg); } }
@keyframes breathe  {
  0%,100% { opacity: 1;   box-shadow: 0 0 6px rgba(34,197,94,.55); }
  50%     { opacity: 0.5; box-shadow: 0 0 3px rgba(34,197,94,.25); }
}

/* ═══════════════════════════════════════════════════════════
   MARKET NAVIGATION BAR
   Asset + Timeframe — first-class navigation
   ═══════════════════════════════════════════════════════════ */

.market-nav {
  background: rgba(9, 9, 12, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.042);
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: sticky;
  top: 52px; /* below header */
  z-index: 190;
}

/* ── ASSET ROW ────────────────────────────────────────────── */
.asset-row {
  display: flex;
  align-items: center;
  height: 38px;
  gap: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.032);
}

.asset-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
  height: 38px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 500;
  font-family: var(--head);
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: color 180ms ease;
  user-select: none;
  white-space: nowrap;
  border: none;
  background: none;
}

.asset-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 14px;
  right: 14px;
  height: 1px;
  background: rgba(99, 120, 255, 0.8);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.asset-item:hover { color: rgba(255, 255, 255, 0.62); }

.asset-item.active {
  color: rgba(255, 255, 255, 0.92);
}
.asset-item.active::after { transform: scaleX(1); }

/* Monochrome icon */
.asset-icon {
  font-size: 13px;
  opacity: 0.55;
  transition: opacity 180ms ease;
  line-height: 1;
}
.asset-item:hover  .asset-icon { opacity: 0.75; }
.asset-item.active .asset-icon { opacity: 1.0; }

/* Disabled asset (not available for current TF) */
.asset-item.disabled {
  opacity: 0.2;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── TIMEFRAME ROW ────────────────────────────────────────── */
.tf-row {
  display: flex;
  align-items: center;
  height: 32px;
  gap: 0;
}

.tf-item {
  position: relative;
  display: flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  font-size: 11px;
  font-weight: 500;
  font-family: var(--mono);
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: color 180ms ease;
  user-select: none;
  white-space: nowrap;
  border: none;
  background: none;
  text-transform: uppercase;
}

.tf-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 12px;
  right: 12px;
  height: 1px;
  background: rgba(99, 120, 255, 0.7);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.tf-item:hover { color: rgba(255, 255, 255, 0.55); }

.tf-item.active {
  color: rgba(255, 255, 255, 0.82);
}
.tf-item.active::after { transform: scaleX(1); }

/* ── CONTEXT SUBTITLE ─────────────────────────────────────── */
.logo-sub {
  font-size: 9.5px !important;
  color: rgba(255, 255, 255, 0.28) !important;
  letter-spacing: 0.06em !important;
  margin-top: 2px !important;
  font-family: var(--mono) !important;
  transition: opacity 200ms ease;
}

/* ── SECONDARY FILTERS ────────────────────────────────────── */
.filters-section {
  background: transparent;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 0;
  padding: 8px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-label {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.22);
  white-space: nowrap;
  letter-spacing: 0.04em;
  font-family: var(--mono);
}

/* Smaller filter buttons */
.fb {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.28);
  font-family: var(--mono);
  font-size: 10px;
  padding: 3px 8px;
  cursor: pointer;
  transition: all 150ms ease;
  letter-spacing: 0.02em;
}
.fb:hover {
  color: rgba(255, 255, 255, 0.55);
  border-color: rgba(255, 255, 255, 0.12);
}
.fb.active {
  background: rgba(99, 120, 255, 0.08);
  border-color: rgba(99, 120, 255, 0.22);
  color: rgba(148, 163, 255, 0.85);
}

/* Day filter */
.d-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.25);
  font-family: var(--mono);
  font-size: 10px;
  padding: 3px 7px;
  cursor: pointer;
  transition: all 150ms ease;
}
.d-btn.active {
  background: rgba(99, 120, 255, 0.07);
  border-color: rgba(99, 120, 255, 0.18);
  color: rgba(148, 163, 255, 0.75);
}

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .asset-row { overflow-x: auto; }
  .tf-row    { overflow-x: auto; }
  .asset-row::-webkit-scrollbar,
  .tf-row::-webkit-scrollbar { display: none; }
}


/* ── MARKET NAV LABELS ────────────────────────────────────── */
.market-nav-labels {
  display: none; /* hidden - labels are inline in rows */
}

.asset-row-wrap,
.tf-row-wrap {
  display: flex;
  align-items: center;
}

.market-nav-label {
  font-size: 9px;
  font-family: var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.2);
  padding: 0 16px 0 4px;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 74px;
}

/* Update active state - stronger underline */
.asset-item.active::after {
  height: 1.5px !important;
  background: rgba(148, 163, 255, 0.9) !important;
}

.asset-item.active {
  color: rgba(255,255,255,0.95) !important;
  font-weight: 600 !important;
}

.tf-item.active::after {
  height: 1.5px !important;
  background: rgba(148, 163, 255, 0.8) !important;
}

.tf-item.active {
  color: rgba(255,255,255,0.88) !important;
  font-weight: 600 !important;
}

/* ── MARKET ROW with label ────────────────────────────────── */
.market-row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.032);
}
.market-row:last-child { border-bottom: none; }
.tf-market-row { border-bottom: none; }
.market-nav-label {
  font-size: 9.5px;
  font-family: var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  padding: 0 16px 0 0;
  white-space: nowrap;
  width: 84px;
  flex-shrink: 0;
  text-align: right;
  font-weight: 500;
}
.asset-row, .tf-row {
  flex: 1;
  border: none;
}
