/* ── BTC Radar Lite ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0 }

:root {
  --bg:      #09090f;
  --bg2:     #111118;
  --bg3:     #1a1a28;
  --border:  #1e1e30;
  --text:    #e2e2f0;
  --muted:   #5a5a7a;
  --orange:  #f7931a;
  --green:   #00d48c;
  --red:     #ff4055;
  --yellow:  #f5c518;
  --blue:    #4e8ef7;
  --font:    'Inter', system-ui, sans-serif;
  --mono:    'JetBrains Mono', monospace;
}

html, body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
}

/* ── Header ─────────────────────────────────────────────────────── */
.lite-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 12px;
}
.lite-logo { display: flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 700; letter-spacing: .5px }
.lite-logo b { color: var(--orange) }
.badge-lite {
  font-size: 8px; font-weight: 800; letter-spacing: 1.5px;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--muted); padding: 2px 6px; border-radius: 4px;
}
.lite-price-wrap { display: flex; align-items: center; gap: 8px }
.live-price { font-family: var(--mono); font-size: 18px; font-weight: 700; color: var(--text) }
.change-badge {
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  padding: 2px 7px; border-radius: 5px;
}
.change-badge.pos { background: rgba(0,212,140,.15); color: var(--green) }
.change-badge.neg { background: rgba(255,64,85,.15);  color: var(--red) }
.lite-header-right { display: flex; align-items: center; gap: 10px }
.last-update { font-size: 10px; color: var(--muted); font-family: var(--mono) }
.pro-link {
  font-size: 11px; font-weight: 700; letter-spacing: .5px;
  color: var(--orange); text-decoration: none;
  border: 1px solid rgba(247,147,26,.3); border-radius: 5px;
  padding: 4px 10px; transition: background .15s;
}
.pro-link:hover { background: rgba(247,147,26,.1) }

/* ── Layout ─────────────────────────────────────────────────────── */
.lite-main {
  max-width: 680px;
  margin: 0 auto;
  padding: 14px 12px 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Cards ──────────────────────────────────────────────────────── */
.lite-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

/* ── Score card ─────────────────────────────────────────────────── */
.score-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px }
.score-label { font-size: 9px; font-weight: 700; letter-spacing: 1.5px; color: var(--muted); text-transform: uppercase }
.score-zone-badge { font-size: 9px; font-weight: 800; letter-spacing: 1px; padding: 3px 8px; border-radius: 4px; text-transform: uppercase }
.score-zone-badge.opportunity { background: rgba(0,212,140,.15); color: var(--green) }
.score-zone-badge.neutral     { background: rgba(245,197,24,.15); color: var(--yellow) }
.score-zone-badge.danger      { background: rgba(255,64,85,.15);  color: var(--red) }

.score-body { display: flex; align-items: center; gap: 16px; margin-bottom: 12px }
.score-num { font-family: var(--mono); font-size: 52px; font-weight: 900; line-height: 1; flex-shrink: 0; min-width: 72px }
.score-right { flex: 1 }
.score-bar-wrap { margin-bottom: 4px }
.score-bar-bg { height: 10px; background: var(--bg3); border-radius: 8px; overflow: hidden; margin-bottom: 4px }
.score-bar-fill { height: 100%; border-radius: 8px; transition: width 1s ease, background .5s ease }
.score-scale { display: flex; justify-content: space-between; font-size: 8px; color: var(--muted); font-weight: 600; letter-spacing: .5px }
.score-rec { font-size: 12px; color: var(--muted); line-height: 1.6; border-top: 1px solid var(--border); padding-top: 10px }

/* ── Radar card ─────────────────────────────────────────────────── */
.radar-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 8px; flex-wrap: wrap }
.radar-title-wrap { display: flex; align-items: center; gap: 8px }
.radar-title { font-size: 9px; font-weight: 700; letter-spacing: 1.5px; color: var(--muted); text-transform: uppercase }
.radar-tf-badge { font-size: 9px; color: var(--muted); background: var(--bg3); border: 1px solid var(--border); padding: 2px 6px; border-radius: 4px }
.tf-btns { display: flex; gap: 4px }
.tf-btn {
  background: var(--bg3); border: 1px solid var(--border); color: var(--muted);
  font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 5px; cursor: pointer;
  font-family: var(--font); transition: all .15s;
}
.tf-btn:hover  { border-color: var(--orange); color: var(--orange) }
.tf-btn.active { background: rgba(247,147,26,.15); border-color: var(--orange); color: var(--orange) }

/* ── Zone bar (ported from style.css) ───────────────────────────── */
.zone-bar-wrap { margin: 8px 0 6px }
.zone-bar { position: relative; height: 36px; border-radius: 6px; overflow: visible; margin: 0 12px }
.zone-gradient {
  position: absolute; inset: 10px 0; border-radius: 4px;
  background: linear-gradient(to right,
    rgba(0,212,140,.18) 0%, rgba(0,212,140,.06) 42%,
    rgba(100,100,120,.12) 48%, rgba(100,100,120,.12) 52%,
    rgba(255,64,85,.06) 58%, rgba(255,64,85,.18) 100%);
  border: 1px solid var(--border);
}
.zone-price-marker {
  position: absolute; top: 0; bottom: 0; transform: translateX(-50%);
  z-index: 5; display: flex; flex-direction: column; align-items: center;
}
.zone-price-line { width: 2px; height: 36px; background: var(--orange); border-radius: 1px }
.zone-price-tag {
  position: absolute; top: -18px; left: 50%; transform: translateX(-50%);
  background: var(--orange); color: #000; font-size: 8px; font-weight: 700;
  padding: 1px 4px; border-radius: 3px; white-space: nowrap;
}
.zone-dots { position: absolute; inset: 0; pointer-events: none }
.zone-dot-wrap {
  position: absolute; top: 0; display: flex; flex-direction: column; align-items: center;
  transform: translateX(-50%); pointer-events: all; cursor: default; z-index: 2;
}
.zone-dot-wrap:hover .zone-dot { transform: scale(1.4) }
.zone-dot {
  width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.15); margin-top: 7px;
  transition: transform .2s; box-shadow: 0 0 6px rgba(0,0,0,.4); flex-shrink: 0;
}
.zone-dot.fraco     { background: #444466 }
.zone-dot.relevante { background: #4e8ef7 }
.zone-dot.bom       { background: #f5c518 }
.zone-dot.muito_bom { background: #f7931a; box-shadow: 0 0 8px rgba(247,147,26,.5) }
.zone-dot.super_bom { background: #00d48c; box-shadow: 0 0 10px rgba(0,212,140,.6); animation: glowPulse 2s infinite }
@keyframes glowPulse { 0%,100% { box-shadow: 0 0 8px rgba(0,212,140,.5) } 50% { box-shadow: 0 0 16px rgba(0,212,140,.9) } }
.zone-dot-price { font-size: 8px; font-weight: 600; color: var(--muted); white-space: nowrap; margin-top: 2px }
.zone-dot-rating { font-size: 7px; font-weight: 700; white-space: nowrap; letter-spacing: .3px }
.zone-dot-rating.fraco     { color: #444466 }
.zone-dot-rating.relevante { color: #4e8ef7 }
.zone-dot-rating.bom       { color: #f5c518 }
.zone-dot-rating.muito_bom { color: #f7931a }
.zone-dot-rating.super_bom { color: #00d48c }
.zone-dot-wrap::before {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 4px); left: 50%;
  transform: translateX(-50%); background: var(--bg3); border: 1px solid var(--border);
  color: var(--text); font-size: 9px; padding: 3px 7px; border-radius: 5px;
  white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .15s; z-index: 10;
}
.zone-dot-wrap:hover::before { opacity: 1 }

.zone-labels { display: flex; justify-content: space-between; font-size: 8px; color: var(--muted); margin-top: 4px; padding: 0 12px }

.legend-row { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 10px }
.legend-row span {
  font-size: 9px; padding: 2px 7px; border-radius: 3px;
  border: 1px solid var(--border); color: var(--muted); cursor: default;
  display: flex; align-items: center; gap: 4px;
}

/* ── Scored levels ──────────────────────────────────────────────── */
.scored-wrap { display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--border); padding-top: 10px; margin-top: 4px }
.scored-col { display: flex; flex-direction: column; gap: 2px }
.scored-price-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 8px; background: var(--bg3); border-radius: 5px;
  border: 1px solid var(--border); margin: 3px 0;
}
.scored-price-divider { font-size: 9px; font-weight: 700; letter-spacing: 1px; color: var(--orange) }
.scored-price-val { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--orange) }
.scored-row {
  display: flex; align-items: center; gap: 6px; padding: 5px 8px;
  border-radius: 5px; background: var(--bg); border: 1px solid transparent;
}
.scored-row.resistance { border-color: rgba(255,64,85,.15) }
.scored-row.support    { border-color: rgba(0,212,140,.15) }
.scored-row:hover { background: var(--bg3) }
.scored-badge {
  font-size: 8px; font-weight: 700; letter-spacing: .5px;
  padding: 2px 6px; border-radius: 3px; flex-shrink: 0; min-width: 64px; text-align: center;
}
.rating-super   { background: rgba(0,212,140,.2);  color: var(--green) }
.rating-muito   { background: rgba(247,147,26,.2); color: var(--orange) }
.rating-bom     { background: rgba(245,197,24,.2); color: var(--yellow) }
.rating-relevante { background: rgba(78,142,247,.2); color: var(--blue) }
.rating-fraco   { background: rgba(90,90,122,.2);  color: var(--muted) }
.scored-label { font-size: 10px; color: var(--muted); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.scored-p { font-family: var(--mono); font-size: 12px; font-weight: 600 }
.scored-d { font-family: var(--mono); font-size: 10px; color: var(--muted); width: 44px; text-align: right; flex-shrink: 0 }
.resistance-col .scored-p { color: var(--red) }
.support-col    .scored-p { color: var(--green) }

/* ── Context pills ──────────────────────────────────────────────── */
.ctx-pills { display: flex; flex-wrap: wrap; gap: 8px }
.ctx-pill {
  font-size: 11px; font-weight: 600; padding: 6px 12px;
  border-radius: 20px; background: var(--bg3); border: 1px solid var(--border);
  color: var(--muted); transition: all .15s;
}
.ctx-pill.pos  { border-color: rgba(0,212,140,.3); color: var(--green) }
.ctx-pill.neg  { border-color: rgba(255,64,85,.3);  color: var(--red) }
.ctx-pill.warn { border-color: rgba(245,197,24,.3); color: var(--yellow) }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .lite-header { flex-wrap: wrap; gap: 8px }
  .score-body { flex-direction: column; align-items: flex-start }
  .score-num { font-size: 40px }
  .score-right { width: 100% }
}
