/* Explore Market Hub — exchange-grade widgets */

html, body {
  overflow-x: hidden;
  max-width: 100vw;
  overscroll-behavior-x: none;
}

#app {
  overflow-x: hidden;
  max-width: 100%;
  touch-action: pan-y;
}

#screen-explore,
#explore-hub,
.explore-panel {
  overflow-x: hidden;
  max-width: 100%;
}

.ex-hub-block { margin-bottom: 16px; }

.ex-hub-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 10px;
  padding: 0 2px;
}
.ex-hub-head h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #8b8b98;
}
.ex-hub-head span {
  font-size: 10px;
  font-weight: 600;
  color: #6b6b78;
}

/* ── Fear & Greed index ── */
.ex-fng {
  position: relative;
  padding: 16px 16px 14px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .07);
  background: linear-gradient(145deg, rgba(18, 18, 28, .95), rgba(10, 10, 16, .98));
}
.ex-fng::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(124, 109, 240, .12), transparent 70%);
  pointer-events: none;
}
.ex-fng-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  position: relative;
}
.ex-fng-head h3 {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #8b8b98;
}
.ex-fng-updated {
  font-size: 9px;
  font-weight: 600;
  color: #6b6b78;
}
.ex-fng-body {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 14px;
  align-items: center;
  position: relative;
}
.ex-fng-gauge-wrap {
  position: relative;
  width: 100%;
  max-width: 200px;
  margin: 0 auto;
}
.ex-fng-gauge-wrap svg { width: 100%; height: auto; display: block; }
.ex-fng-value {
  position: absolute;
  left: 50%;
  bottom: 6px;
  transform: translateX(-50%);
  text-align: center;
}
.ex-fng-value b {
  display: block;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  color: #fafafa;
  font-variant-numeric: tabular-nums;
}
.ex-fng-value span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
}
.ex-fng-side { min-width: 0; }
.ex-fng-label {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: -.02em;
}
.ex-fng-label.extreme_fear { color: #c97a7a; }
.ex-fng-label.fear { color: #d4a574; }
.ex-fng-label.neutral { color: #a89fd4; }
.ex-fng-label.greed { color: #8ec9a8; }
.ex-fng-label.extreme_greed { color: #7eb8a0; }
.ex-fng-delta {
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 10px;
}
.ex-fng-delta.up { color: #7eb8a0; }
.ex-fng-delta.down { color: #c97a7a; }
.ex-fng-scale {
  display: flex;
  gap: 3px;
  height: 6px;
  border-radius: 6px;
  overflow: hidden;
}
.ex-fng-scale i {
  flex: 1;
  border-radius: 2px;
  opacity: .35;
}
.ex-fng-scale i.on { opacity: 1; box-shadow: 0 0 8px currentColor; }
.ex-fng-scale i:nth-child(1) { background: #c97a7a; color: #c97a7a; }
.ex-fng-scale i:nth-child(2) { background: #d4a574; color: #d4a574; }
.ex-fng-scale i:nth-child(3) { background: #a89fd4; color: #a89fd4; }
.ex-fng-scale i:nth-child(4) { background: #8ec9a8; color: #8ec9a8; }
.ex-fng-scale i:nth-child(5) { background: #7eb8a0; color: #7eb8a0; }

/* ── Daily digest ── */
.ex-digest {
  position: relative;
  padding: 16px 16px 14px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(124,109,240,.22);
  background: linear-gradient(135deg, rgba(124,109,240,.16) 0%, rgba(18,18,26,.92) 55%);
}
.ex-digest::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -20%;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,109,240,.25), transparent 70%);
  pointer-events: none;
}
.ex-digest-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #c4b5fd;
  margin-bottom: 8px;
}
.ex-digest-tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7c6df0;
  box-shadow: 0 0 10px rgba(124,109,240,.6);
  animation: exDigestPulse 2s ease-in-out infinite;
}
@keyframes exDigestPulse {
  0%, 100% { opacity: .6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}
.ex-digest h2 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
  color: #fafafa;
  letter-spacing: -.02em;
}
.ex-digest p {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.5;
  color: #a1a1b5;
}
.ex-digest-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 10px;
  color: #6b6b78;
}
.ex-digest-read {
  border: none;
  background: rgba(124,109,240,.18);
  color: #c4b5fd;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
}

/* ── Top movers horizontal scroll ── */
.ex-movers-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  padding: 2px 2px 8px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  scrollbar-width: none;
}
.ex-movers-track::-webkit-scrollbar { display: none; }

.ex-mover-card {
  flex: 0 0 148px;
  scroll-snap-align: start;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.07);
  background: rgba(16,16,24,.88);
  cursor: pointer;
  transition: transform .25s ease, border-color .25s ease;
}
.ex-mover-card:active { transform: scale(.97); }
.ex-mover-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.ex-mover-top .coin-icon {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ex-mover-top .coin-icon img {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
.ex-mover-ticker {
  font-size: 13px;
  font-weight: 800;
  color: #f4f4f5;
}
.ex-mover-chg {
  margin-left: auto;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 8px;
}
.ex-mover-chg.up { color: #7eb8a0; background: rgba(126,184,160,.12); }
.ex-mover-chg.down { color: #c97a7a; background: rgba(201,122,122,.12); }
.ex-mover-price {
  font-size: 11px;
  font-weight: 600;
  color: #8b8b98;
  margin-bottom: 8px;
}
.ex-mover-spark { width: 100%; height: 36px; display: block; }

/* ── Events calendar ── */
.ex-events-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ex-event-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(16,16,24,.85);
}
.ex-event-ico {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #c4b5fd;
}
.ex-event-ico.macro { background: rgba(124,109,240,.14); color: #a78bfa; }
.ex-event-ico.listing { background: rgba(126,184,160,.12); color: #7eb8a0; }
.ex-event-ico.network { background: rgba(168,159,212,.12); color: #a89fd4; }
.ex-event-ico svg { display: block; }
.ex-event-main { min-width: 0; }
.ex-event-title {
  font-size: 13px;
  font-weight: 800;
  color: #ececf1;
  margin-bottom: 3px;
}
.ex-event-meta {
  font-size: 10px;
  color: #6b6b78;
  font-weight: 600;
}
.ex-event-countdown {
  text-align: right;
  min-width: 72px;
}
.ex-event-countdown b {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: #c4b5fd;
  font-variant-numeric: tabular-nums;
}
.ex-event-countdown span {
  font-size: 9px;
  color: #6b6b78;
  font-weight: 600;
}

/* ── Listings & memecoins grid ── */
.ex-tokens-section { margin-bottom: 14px; }
.ex-tokens-section:last-child { margin-bottom: 0; }
.ex-tokens-label {
  font-size: 10px;
  font-weight: 700;
  color: #6b6b78;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin: 0 0 8px 2px;
}
.ex-tokens-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.ex-token-card {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(16,16,24,.88);
  cursor: pointer;
  transition: transform .22s ease, border-color .22s ease;
}
.ex-token-card:active { transform: scale(.98); }
.ex-token-card.meme {
  border-color: rgba(201,122,122,.15);
  background: linear-gradient(145deg, rgba(201,122,122,.06), rgba(16,16,24,.9));
}
.ex-token-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.ex-token-top .coin-icon {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.ex-token-top .coin-icon img {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  object-fit: cover !important;
  border-radius: 50% !important;
  display: block !important;
}
.ex-token-name {
  font-size: 12px;
  font-weight: 800;
  color: #f4f4f5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ex-token-trade {
  font-size: 9px;
  font-weight: 700;
  color: #8b8b98;
  margin-left: auto;
  flex-shrink: 0;
  white-space: nowrap;
}
.ex-token-card:hover .ex-token-trade,
.ex-token-card:active .ex-token-trade { color: #c4b5fd; }
.ex-token-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 6px;
}
.ex-token-price {
  font-size: 11px;
  font-weight: 700;
  color: #a89fd4;
}
.ex-token-chg {
  font-size: 11px;
  font-weight: 800;
}
.ex-token-chg.up { color: #7eb8a0; }
.ex-token-chg.down { color: #c97a7a; }
.ex-token-spark {
  width: 100%;
  height: 32px;
  margin-top: 8px;
  display: block;
}

.ex-news-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 12px;
  padding: 0 2px;
}
.ex-news-divider::before,
.ex-news-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,.06);
}
.ex-news-divider span {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #6b6b78;
}

/* ── Markets v2 (trade tab) ── */
.markets-toolbar {
  margin-bottom: 12px;
}
.markets-search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 0 12px 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(180deg, rgba(22, 22, 32, .95), rgba(14, 14, 22, .98));
  transition: border-color .25s ease, box-shadow .25s ease;
}
.markets-search-wrap:focus-within {
  border-color: rgba(124, 109, 240, .38);
  box-shadow: 0 0 0 3px rgba(124, 109, 240, .1);
}
.markets-search-ico {
  width: 17px;
  height: 17px;
  stroke: #7c6df0;
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
  opacity: .85;
}
.markets-search-wrap input {
  flex: 1;
  min-width: 0;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  color: #f4f4f5;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 0;
  -webkit-appearance: none;
  appearance: none;
}
.markets-search-wrap input::placeholder { color: #6b6b78; }
.markets-search-clear {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  color: #a1a1b5;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.markets-search-clear:not(.hidden) { display: flex; }
.markets-search-badge {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .03em;
  color: #c4b5fd;
  background: rgba(124, 109, 240, .14);
  border: 1px solid rgba(124, 109, 240, .22);
  padding: 4px 8px;
  border-radius: 20px;
  min-width: 28px;
  text-align: center;
}

.market-row-v2 {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px 12px;
  align-items: center;
  padding: 12px 14px;
  margin-bottom: 8px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.07);
  background: rgba(16,16,24,.9);
  cursor: pointer;
  transition: transform .22s ease, border-color .22s ease, background .22s ease;
}
.market-row-v2:active { transform: scale(.985); }
.market-row-v2:hover { border-color: rgba(124,109,240,.2); }

.coin-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
}
.coin-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.coin-icon-fallback {
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.02em;
}

.m-body { min-width: 0; }
.m-title {
  font-size: 14px;
  font-weight: 800;
  color: #f4f4f5;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.m-sub {
  font-size: 10px;
  font-weight: 600;
  color: #6b6b78;
  margin-top: 2px;
}
.m-chg-pill {
  display: inline-block;
  margin-top: 5px;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 8px;
}
.m-chg-pill.up { color: #7eb8a0; background: rgba(126,184,160,.12); }
.m-chg-pill.down { color: #c97a7a; background: rgba(201,122,122,.12); }

.m-right {
  text-align: right;
  min-width: 88px;
}
.m-right .m-price {
  font-size: 13px;
  font-weight: 800;
  color: #c4b5fd;
  margin-bottom: 6px;
  white-space: nowrap;
}
.m-sparkline {
  width: 72px;
  height: 28px;
  display: block;
  margin-left: auto;
}

.markets-card-v2 {
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(18,18,26,.6);
}
