:root {
  --bg: #0b0f17;
  --panel: #131a26;
  --panel-2: #18212f;
  --border: #1f2a3b;
  --text: #e6edf6;
  --muted: #8a97ac;
  --green: #2ecc71;
  --red: #ff5470;
  --accent: #6aa7ff;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }

.top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 22px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: rgba(11,15,23,0.92); backdrop-filter: blur(8px); z-index: 5;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; }
.brand em { color: var(--muted); font-style: normal; font-weight: 400; font-size: 12px; margin-left: 4px; }
.status { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.status .sep { opacity: 0.4; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); display: inline-block; }
.dot.live { background: var(--green); box-shadow: 0 0 0 0 rgba(46,204,113,0.6); animation: pulse 1.8s infinite; }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(46,204,113,0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(46,204,113,0); }
  100% { box-shadow: 0 0 0 0 rgba(46,204,113,0); }
}

main { max-width: 1240px; margin: 0 auto; padding: 22px; }

.filters { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
#search {
  flex: 1; min-width: 220px;
  background: var(--panel); color: var(--text); border: 1px solid var(--border);
  padding: 10px 14px; border-radius: 10px; font-size: 14px; outline: none;
}
#search:focus { border-color: var(--accent); }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tab {
  background: var(--panel); color: var(--muted); border: 1px solid var(--border);
  padding: 8px 12px; border-radius: 999px; font-size: 13px; cursor: pointer;
  transition: all .15s ease;
}
.tab:hover { color: var(--text); }
.tab.active { background: var(--accent); color: #07111f; border-color: var(--accent); font-weight: 600; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }

.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  padding: 16px; display: flex; flex-direction: column; gap: 12px;
  transition: transform .15s ease, border-color .15s ease;
}
.card:hover { border-color: #2a3a55; transform: translateY(-1px); }
.card .cat { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; }
.card h3 { margin: 0; font-size: 15px; line-height: 1.35; }
.outcomes { display: flex; flex-direction: column; gap: 8px; }
.outcome { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; background: var(--panel-2); border-radius: 8px; border: 1px solid transparent; }
.outcome.lead { border-color: rgba(46,204,113,0.35); }
.outcome .label { font-size: 13px; }
.outcome .price { display: flex; align-items: baseline; gap: 6px; font-variant-numeric: tabular-nums; }
.outcome .price .pct { font-size: 14px; font-weight: 600; }
.outcome .price .delta { font-size: 11px; }
.outcome .price .delta.up { color: var(--green); }
.outcome .price .delta.down { color: var(--red); }
.outcome .price .delta.flat { color: var(--muted); }
.meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }

footer { text-align: center; padding: 24px; color: var(--muted); font-size: 12px; }

.flash-up   { animation: flashUp   .8s ease; }
.flash-down { animation: flashDown .8s ease; }
@keyframes flashUp   { 0% { background: rgba(46,204,113,0.18); } 100% { background: var(--panel-2); } }
@keyframes flashDown { 0% { background: rgba(255,84,112,0.18); } 100% { background: var(--panel-2); } }
