* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: #0c0e13;
  color: #c9cfe0;
  font-family: 'Geist', 'Inter', system-ui, sans-serif;
  font-size: 14px;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

.wrap { max-width: 680px; margin: 0 auto; padding: 32px 18px 100px; }

/* header – deliberately understated */
.top {
  margin-bottom: 30px;
}
.top h1 {
  font-size: 1rem;
  font-weight: 500;
  color: #7a8099;
  letter-spacing: .02em;
}
.top-row2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  flex-wrap: wrap;
  gap: 6px;
}
.top-meta { font-size: .72rem; color: #3e4660; }
.top-meta b { color: #5e687a; }
#refresh-btn {
  font-size: .72rem;
  color: #3e4660;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color .15s;
}
#refresh-btn:hover { color: #c9cfe0; }

/* filter tabs */
.filters {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
}
.f {
  font-size: .72rem;
  padding: 3px 10px;
  border-radius: 4px;
  border: 1px solid #1b1f2c;
  background: #111318;
  color: #3e4660;
  cursor: pointer;
  transition: all .15s;
  user-select: none;
}
.f:hover    { color: #c9cfe0; border-color: #2a2f45; }
.f.on       { color: #c9cfe0; border-color: #2a2f45; background: #161a26; }
.f.on-long  { color: #c9cfe0; border-color: #2a2f45; background: #161a26; }
.f.on-short { color: #c9cfe0; border-color: #2a2f45; background: #161a26; }

/* info bar */
.info-bar {
  font-size: .78rem;
  color: #5e687a;
  background: rgba(94, 104, 122, .05);
  border: 1px solid rgba(94, 104, 122, .15);
  border-radius: 6px;
  padding: 10px 13px;
  margin-bottom: 16px;
  font-style: italic;
}

/* error */
#err {
  display: none;
  font-size: .78rem;
  color: #f04b5f;
  background: rgba(240,75,95,.05);
  border: 1px solid rgba(240,75,95,.2);
  border-radius: 6px;
  padding: 9px 13px;
  margin-bottom: 16px;
}

/* feed */
#feed { display: flex; flex-direction: column; gap: 8px; }

/* card */
.card {
  border: 1px solid #171b27;
  border-radius: 8px;
  padding: 13px 14px 11px;
  position: relative;
  background: #111318;
}
.card::after {
  content: '';
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 2px;
  border-radius: 2px;
  background: #2a2f45;
}
.card.long::after  { background: #2a2f45; }
.card.short::after { background: #2a2f45; }

/* coin line */
.coin-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
  padding-left: 10px;
}
.coin-name {
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .03em;
  color: #dde1f0;
}
.coin-name .pair { font-weight: 400; color: #3e4660; font-size: .8rem; }
.dir {
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .07em;
  padding: 2px 6px;
  border-radius: 3px;
  color: #7a8099;
  border: 1px solid #1b1f2c;
}
.when { font-size: .68rem; color: #3a4055; }

/* prices */
.prices {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: .82rem;
  padding-left: 10px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.prices .pi { display: flex; flex-direction: column; gap: 1px; }
.prices .pl { font-size: .6rem; color: #3a4055; text-transform: uppercase; letter-spacing: .07em; }
.prices .pv { font-weight: 600; }
.pv-entry { color: #c9cfe0; }
.pv-tp    { color: #c9cfe0; }
.pv-sl    { color: #c9cfe0; }
.prices .pp { font-size: .67rem; color: #3a4055; }

/* candle row */
.candle {
  padding-left: 10px;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: .72rem;
  color: #3a4055;
  margin-bottom: 9px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.candle .ctag {
  font-size: .6rem;
  border: 1px solid #1b1f2c;
  border-radius: 3px;
  padding: 0px 4px;
  color: #2e3550;
  align-self: center;
  letter-spacing: .04em;
  flex-shrink: 0;
}
.candle span b { color: #7a8099; font-weight: 600; }

/* badge */
.badge-row { padding-left: 10px; }
.badge {
  display: inline-block;
  font-size: .68rem;
  font-weight: 600;
  border-radius: 4px;
  padding: 2px 8px;
  letter-spacing: .03em;
}
.b-open    { color: #3a4660; }
.b-tp      { color: #aab0c2; }
.b-sl      { color: #aab0c2; }
.b-expired { color: #2e3550; }

/* empty */
.empty { color: #2e3550; font-size: .82rem; padding: 40px 0 20px 2px; }

/* info button */
.info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: rgba(94, 104, 122, .1);
  border: 1px solid rgba(94, 104, 122, .2);
  border-radius: 50%;
  font-size: 12px;
  cursor: pointer;
  transition: all .15s;
  color: #5e687a;
  padding: 0;
}
.info-btn:hover {
  background: rgba(94, 104, 122, .2);
  color: #c9cfe0;
}

/* info modal */
.info-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.info-modal-content {
  background: #111318;
  border: 1px solid #171b27;
  border-radius: 8px;
  padding: 20px;
  max-width: 400px;
  width: 90%;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.close-modal {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: #5e687a;
  font-size: 20px;
  cursor: pointer;
  transition: color .15s;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.close-modal:hover {
  color: #c9cfe0;
}

.info-modal-content h2 {
  font-size: .95rem;
  color: #c9cfe0;
  margin-bottom: 12px;
  font-weight: 600;
}

.info-modal-content p {
  font-size: .85rem;
  color: #7a8099;
  line-height: 1.5;
}

.info-modal-content p.disclaimer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #171b27;
  color: #5e687a;
  font-size: .80rem;
}

@media (max-width: 480px) {
  .prices { gap: 12px; }
  .coin-name { font-size: .88rem; }
}
