.sidebar-feed-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.predictor-overlay {
  position: absolute;
  inset: 0;
  z-index: 25;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #0d1520 0%, #07080c 100%);
  border: 1px solid var(--line);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.predictor-overlay-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: #0c1018;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.35px;
  text-transform: uppercase;
  color: #c9d2e3;
}

.predictor-close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: #1a2030;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.pred-lock,
.pred-panel {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.pred-lock h2 {
  margin: 6px 0;
  font-size: 15px;
  color: #fff;
}

.pred-kicker {
  margin: 0 0 2px;
  font-size: 8px;
  color: #5eead4;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 800;
}

.pred-header h2 {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.1px;
}

.pred-status {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 4px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.pred-lock {
  justify-content: center;
  text-align: center;
  color: #c5d4e8;
}

.pred-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.pred-status.on { background: rgba(94, 234, 212, 0.16); color: #5eead4; }
.pred-status.off { background: #1a2433; color: var(--muted); }
.pred-status.off { background: #1a2433; color: var(--muted); }

.pred-signal {
  background: linear-gradient(180deg, #12151c, #0d1016);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 8px 9px;
  text-align: center;
}

.pred-phase {
  margin: 0;
  font-size: 8px;
  letter-spacing: 1.1px;
  color: var(--muted);
  font-weight: 800;
}

.pred-action {
  margin: 4px 0 3px;
  font-size: clamp(17px, 4.5vw, 22px);
  font-weight: 800;
  letter-spacing: 0.5px;
  line-height: 1.1;
}

.pred-note {
  margin: 0 auto;
  max-width: 280px;
  color: #c5d4e8;
  font-size: 9px;
  line-height: 1.35;
}

.pred-signal.skip .pred-action,
.pred-signal.ended .pred-action { color: var(--red); }
.pred-signal.bet .pred-action { color: var(--green); }
.pred-signal.cash .pred-action { color: #f5c84c; animation: pred-pulse 0.9s ease-in-out infinite; }
.pred-signal.hold .pred-action,
.pred-signal.wait .pred-action { color: #5eead4; }

@keyframes pred-pulse { 50% { filter: brightness(1.25); } }

.pred-crash-row,
.pred-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pred-crash-row article,
.pred-metrics article {
  background: #10131a;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 7px 8px;
}

.pred-crash-row span,
.pred-metrics span {
  display: block;
  font-size: 8px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.pred-crash-row strong,
.pred-metrics strong { font-size: 14px; }

.pred-crash-row .crash strong { color: var(--red); }
.pred-crash-row article:first-child strong { color: #f5c84c; }

.pred-meter {
  background: #10131a;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 7px 8px;
}

.pred-meter-head {
  display: flex;
  justify-content: space-between;
  font-size: 8px;
  color: var(--muted);
  margin-bottom: 6px;
}

.pred-bar {
  height: 6px;
  background: #142033;
  border-radius: 99px;
  overflow: hidden;
}

.pred-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #5eead4, #86efac);
}

.pred-quota {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}

.pred-quota article {
  background: #10131a;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
}

.pred-quota span {
  display: block;
  font-size: 8px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 4px;
}

.pred-quota strong {
  font-size: 12px;
  color: #fff;
}

.pred-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pred-bet-setup {
  background: #10131a;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
}

.pred-setup-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  font-size: 12px;
  color: #c5d4e8;
}

.pred-setup-row span:first-child { flex: 1; }

.pred-setup-row input[type="number"] {
  width: 80px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0a0c10;
  color: #fff;
  text-align: center;
  font-weight: 700;
}

.pred-setup-row.auto input[type="checkbox"] { width: 18px; height: 18px; }
.pred-setup-row.auto input[type="number"] { width: 68px; }
.pred-setup-row.auto input[type="number"]:disabled { opacity: 0.45; }

.pred-setup-hint {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

.pred-history {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  min-height: 28px;
}

.pred-history::-webkit-scrollbar { display: none; }

.pred-history .chip {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: #122033;
}

.pred-history .chip.low { color: #d0d4de; }
.pred-history .chip.mid { color: #7aa7ff; }
.pred-history .chip.high { color: #c084fc; }
.pred-history .chip.moon { color: #f5c84c; }

.pred-actions {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 8px 10px 10px;
  border-top: 1px solid var(--line);
  background: #0c1018;
}

.pred-actions-lock {
  border-top: 1px solid var(--line);
}

.pred-actions-panel {
  border-top: 1px solid var(--line);
}

#btnGetSignal {
  grid-column: 1 / -1;
}

.pred-btn {
  min-height: 46px;
  height: 46px;
  border: 0;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.3px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}

.pred-btn.primary {
  background: var(--green);
  color: #052e16;
}

.pred-btn.ghost {
  background: #1e2430;
  color: #e8edf5;
}

.pred-lock p {
  font-size: 10px;
  line-height: 1.4;
}

@media (min-width: 900px) {
  .sidebar-feed-wrap {
    flex: 1;
    min-height: 0;
  }

  .feed {
    flex: 1;
    min-height: 0;
  }
}

@media (max-width: 899px) {
  .game-sidebar {
    display: flex;
    flex-direction: column;
  }

  /* Tall enough that the in-place overlay shows all predictor UI without inner scroll */
  .sidebar-feed-wrap {
    position: relative;
    min-height: 540px;
  }

  .predictor-overlay {
    position: absolute;
    inset: 0;
    border-radius: 14px 14px 0 0;
    overflow: hidden;
  }

  .pred-lock,
  .pred-panel {
    overflow: hidden;
    overscroll-behavior: none;
    gap: 4px;
    padding: 6px 10px 4px;
  }

  .predictor-overlay-bar {
    padding: 6px 10px;
  }

  .predictor-close {
    width: 32px;
    height: 32px;
  }

  .pred-header h2 {
    font-size: 12px;
  }

  .pred-kicker {
    font-size: 7px;
    margin-bottom: 0;
  }

  .pred-signal {
    padding: 6px 6px 5px;
    border-radius: 10px;
    flex-shrink: 0;
  }

  .pred-action {
    margin: 2px 0;
    font-size: clamp(15px, 4.2vw, 18px);
  }

  .pred-note {
    font-size: 8px;
    line-height: 1.25;
    max-height: 2.5em;
    overflow: hidden;
  }

  .pred-crash-row,
  .pred-metrics,
  .pred-quota {
    gap: 4px;
    flex-shrink: 0;
  }

  .pred-crash-row article,
  .pred-metrics article,
  .pred-quota article {
    padding: 5px 6px;
    border-radius: 8px;
  }

  .pred-crash-row span,
  .pred-metrics span,
  .pred-quota span {
    font-size: 7px;
  }

  .pred-crash-row strong,
  .pred-metrics strong,
  .pred-quota strong {
    font-size: 12px;
  }

  .pred-meter {
    padding: 5px 6px;
    gap: 4px;
    flex-shrink: 0;
  }

  .pred-meter-head {
    font-size: 8px;
  }

  .pred-bar {
    height: 5px;
  }

  .pred-actions {
    padding: 6px 10px 10px;
    gap: 5px;
  }

  .pred-btn {
    min-height: 42px;
    height: 42px;
    font-size: 11px;
  }
}
