#predictions-section {
  --prediction-surface: rgba(9, 14, 29, 0.82);
  --prediction-border: rgba(153, 138, 255, 0.17);
}

.predictions-heading,
.predictions-header-actions,
.prediction-section-heading,
.prediction-market-card,
.prediction-market-main,
.prediction-horizon-card,
.prediction-scenario-summary,
.prediction-range-values > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.predictions-heading {
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.predictions-header-actions {
  align-items: center;
  flex: 0 0 auto;
  gap: 9px;
}

.prediction-membership-badge {
  padding: 9px 12px;
  border: 1px solid rgba(153, 138, 255, 0.25);
  border-radius: 999px;
  color: #dedaff;
  background: rgba(120, 105, 237, 0.12);
  font-size: 10px;
  white-space: nowrap;
}

.prediction-membership-badge.tier-vip {
  border-color: rgba(255, 215, 0, 0.35);
  color: #ffe58a;
  background: rgba(255, 215, 0, 0.08);
}

.prediction-membership-badge.tier-silver {
  border-color: rgba(192, 192, 192, 0.35);
  color: #e4e7ef;
}

.prediction-membership-badge.tier-bronze {
  border-color: rgba(205, 127, 50, 0.4);
  color: #f2ba82;
}

.predictions-heading h2 {
  margin: 0;
  font-size: clamp(20px, 3vw, 28px);
}

.predictions-heading p,
.prediction-section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.predictions-heading > button {
  flex: 0 0 auto;
  min-height: 44px;
}

.predictions-controls {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr);
  align-items: end;
  gap: 16px;
  margin: 18px 0;
}

.predictions-controls label,
.prediction-watchlist-wrap > span {
  display: block;
  color: #c4cbe0;
  font-size: 11px;
  font-weight: 700;
}

.predictions-controls select {
  min-height: 44px;
  margin-top: 7px;
}

.prediction-watchlist {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  margin-top: 7px;
}

.prediction-watchlist-empty {
  color: var(--muted);
  font-size: 10px;
}

.prediction-watch-chip {
  min-width: 48px;
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid var(--prediction-border);
  border-radius: 9px;
  color: #d8d2ff;
  background: rgba(120, 105, 237, 0.1);
  cursor: pointer;
}

.prediction-watch-chip[aria-pressed="true"] {
  border-color: #8d80ff;
  color: #fff;
  background: rgba(120, 105, 237, 0.32);
}

.predictions-status {
  margin: 10px 0;
  color: var(--muted);
  font-size: 11px;
}

.predictions-error {
  margin: 12px 0;
  padding: 13px 15px;
  border: 1px solid rgba(255, 115, 138, 0.35);
  border-radius: 10px;
  color: #ffabb9;
  background: rgba(83, 27, 43, 0.28);
  font-size: 11px;
  line-height: 1.8;
}

.predictions-dashboard {
  display: grid;
  gap: 16px;
}

.prediction-market-card,
.prediction-horizons,
.prediction-detail-card,
.prediction-methodology {
  border: 1px solid var(--prediction-border);
  border-radius: 16px;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(119, 104, 237, 0.1), transparent 55%),
    var(--prediction-surface);
}

.prediction-market-card {
  align-items: center;
  padding: 20px;
}

.prediction-market-main {
  min-width: 215px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.prediction-asset-name {
  color: #f6f7ff;
  font-size: 14px;
  font-weight: 700;
}

.prediction-asset-symbol {
  margin-right: 8px;
  color: #aaa0ff;
  font: 11px 'DM Mono', monospace;
}

.prediction-current-price {
  direction: ltr;
  text-align: right;
  font: 700 clamp(25px, 4vw, 36px) 'DM Mono', monospace;
  letter-spacing: -1.5px;
}

.prediction-daily-change {
  font-size: 11px;
}

.prediction-daily-change.positive {
  color: #67e2b7;
}

.prediction-daily-change.negative {
  color: #ff8598;
}

.prediction-market-stats {
  display: grid;
  flex: 1;
  grid-template-columns: repeat(4, minmax(90px, 1fr));
  gap: 9px;
}

.prediction-market-stats > div {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
}

.prediction-market-stats span,
.prediction-market-stats strong {
  display: block;
}

.prediction-market-stats span {
  color: var(--muted);
  font-size: 9px;
}

.prediction-market-stats strong {
  overflow: hidden;
  margin-top: 7px;
  color: #e9ebf5;
  direction: ltr;
  font: 600 12px 'DM Mono', monospace;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prediction-horizons,
.prediction-detail-card {
  padding: 18px;
}

.prediction-section-heading {
  align-items: center;
  margin-bottom: 14px;
}

.prediction-section-heading h3 {
  margin: 0;
  color: #f0f1fa;
  font-size: 14px;
}

.prediction-section-heading p {
  font-size: 10px;
}

.prediction-horizon-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.prediction-horizon-card {
  min-width: 0;
  min-height: 136px;
  align-items: flex-start;
  flex-direction: column;
  justify-content: center;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.025);
  text-align: right;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, transform 0.18s;
}

.prediction-horizon-card:hover {
  transform: translateY(-2px);
  border-color: rgba(153, 138, 255, 0.5);
}

.prediction-horizon-card.active {
  border-color: #9184ff;
  background: linear-gradient(145deg, rgba(120, 105, 237, 0.2), rgba(14, 19, 38, 0.7));
  box-shadow: inset 0 0 0 1px rgba(145, 132, 255, 0.12);
}

.prediction-horizon-card:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.prediction-horizon-card.locked {
  border-color: rgba(255, 215, 0, 0.2);
  background:
    linear-gradient(135deg, rgba(255, 215, 0, 0.045), transparent 70%),
    rgba(255, 255, 255, 0.025);
}

.prediction-horizon-card.locked:hover {
  border-color: rgba(255, 215, 0, 0.48);
}

.prediction-horizon-lock {
  color: #e8d38b;
  font-size: 11px;
}

.prediction-horizon-unlock {
  color: #c4b36e;
  font-size: 9px;
}

.prediction-horizon-label,
.prediction-horizon-range,
.prediction-horizon-chance {
  color: var(--muted);
  font-size: 9px;
}

.prediction-horizon-direction {
  color: #d8d2ff;
  font-size: 12px;
}

.prediction-horizon-direction.up,
.prediction-direction-value.up {
  color: #67e2b7;
}

.prediction-horizon-direction.down,
.prediction-direction-value.down {
  color: #ff8598;
}

.prediction-horizon-price {
  direction: ltr;
  font: 700 17px 'DM Mono', monospace;
}

.prediction-horizon-range {
  direction: ltr;
  font-family: 'DM Mono', monospace;
}

.prediction-horizon-chance {
  margin-top: 2px;
}

.prediction-detail-heading {
  align-items: flex-start;
}

.prediction-detail-heading > button {
  min-height: 42px;
}

.prediction-kicker {
  display: block;
  margin-bottom: 6px;
  color: #a99fff;
  font-size: 10px;
}

.prediction-scenario-summary {
  align-items: stretch;
  padding: 14px 0 17px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.prediction-direction,
.prediction-confidence {
  display: flex;
  min-width: 120px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.prediction-direction > span,
.prediction-confidence > span,
.prediction-likelihood-labels > span {
  color: var(--muted);
  font-size: 9px;
}

.prediction-direction-value,
.prediction-confidence strong {
  color: #e9e7ff;
  font-size: 15px;
}

.prediction-direction small,
.prediction-confidence small,
.prediction-likelihood > small {
  color: #858da4;
  font-size: 9px;
}

.prediction-likelihood {
  display: flex;
  min-width: 180px;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  gap: 9px;
}

.prediction-likelihood-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.prediction-likelihood-labels strong {
  color: #e9e7ff;
  direction: ltr;
  font: 700 15px 'DM Mono', monospace;
}

.prediction-likelihood-track {
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 133, 152, 0.3);
}

.prediction-likelihood-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #62ddea, #67e2b7);
  transition: width 0.3s ease;
}

.prediction-chart-wrap {
  margin-top: 18px;
}

.prediction-chart-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 9px;
}

.prediction-chart-labels span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.prediction-chart-labels i {
  width: 14px;
  height: 3px;
  border-radius: 99px;
  background: #8b7bff;
}

.prediction-chart-labels span:last-child i {
  height: 8px;
  background: rgba(139, 123, 255, 0.35);
}

.prediction-chart {
  min-height: 190px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 12px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 100% 25%,
    rgba(4, 9, 20, 0.48);
}

.prediction-chart svg {
  display: block;
  width: 100%;
  height: 220px;
  overflow: visible;
}

.prediction-chart-divider {
  stroke: rgba(255, 255, 255, 0.25);
  stroke-dasharray: 4 5;
}

.prediction-chart-band {
  fill: rgba(139, 123, 255, 0.18);
}

.prediction-chart-history {
  fill: none;
  stroke: #61d5df;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
}

.prediction-chart-median {
  fill: none;
  stroke: #a295ff;
  stroke-dasharray: 7 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
}

.prediction-chart-point {
  fill: #c3baff;
  stroke: #14142a;
  stroke-width: 2;
}

.prediction-range-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 10px;
}

.prediction-range-values > div {
  min-width: 0;
  flex-direction: column;
  gap: 6px;
  padding: 11px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.prediction-range-values span {
  color: var(--muted);
  font-size: 9px;
}

.prediction-range-values strong {
  overflow: hidden;
  color: #e9ebf5;
  direction: ltr;
  font: 600 13px 'DM Mono', monospace;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prediction-range-median {
  border: 1px solid rgba(145, 132, 255, 0.25);
}

.prediction-methodology {
  padding: 15px 18px;
}

.prediction-methodology summary {
  color: #d9d5ff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.prediction-methodology div {
  max-width: 900px;
  padding-top: 8px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.9;
}

.prediction-methodology p {
  margin: 7px 0;
}

.prediction-premium-card {
  padding: 18px;
  border: 1px solid var(--prediction-border);
  border-radius: 16px;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(119, 104, 237, 0.08), transparent 55%),
    var(--prediction-surface);
}

.prediction-feature-tier {
  display: inline-block;
  margin-bottom: 7px;
  color: #dfc28d;
  font-size: 9px;
  font-weight: 700;
}

.prediction-premium-card .prediction-section-heading {
  margin-bottom: 12px;
}

.prediction-premium-card .prediction-section-heading h3 {
  font-size: 13px;
}

.prediction-premium-card .prediction-section-heading p {
  font-size: 9px;
}

.prediction-indicator-grid,
.prediction-backtest-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.prediction-indicator-card {
  display: flex;
  min-width: 0;
  min-height: 94px;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.025);
}

.prediction-indicator-card > span {
  color: var(--muted);
  font-size: 9px;
}

.prediction-indicator-card > strong {
  overflow-wrap: anywhere;
  color: #e9e7ff;
  font: 700 15px 'DM Mono', Alexandria, sans-serif;
}

.prediction-indicator-card > small {
  color: #8991a7;
  font-size: 9px;
  line-height: 1.7;
}

.prediction-lock-message {
  margin: 0 0 10px;
  color: #aeb5c8;
  font-size: 10px;
  line-height: 1.8;
}

.prediction-unlock-button {
  min-height: 42px;
  border-color: rgba(255, 215, 0, 0.28);
  color: #ffe58a;
  background: rgba(255, 215, 0, 0.08);
}

.prediction-backtest-note {
  display: block;
  margin-top: 9px;
  color: #8991a7;
  font-size: 9px;
  line-height: 1.8;
}

.prediction-disclaimer {
  margin: 14px 0 0;
  color: #929ab1;
  font-size: 9px;
  line-height: 1.8;
}

#predictions-section button:focus-visible,
#predictions-section select:focus-visible,
#predictions-section summary:focus-visible {
  outline: 2px solid #9c91ff;
  outline-offset: 2px;
}

@media (max-width: 760px) {
  .predictions-heading {
    align-items: flex-start;
  }

  .predictions-header-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .predictions-controls {
    grid-template-columns: 1fr;
  }

  .prediction-market-card {
    align-items: stretch;
    flex-direction: column;
  }

  .prediction-market-main {
    min-width: 0;
  }

  .prediction-market-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .prediction-scenario-summary {
    flex-wrap: wrap;
  }

  .prediction-likelihood {
    order: 3;
    flex-basis: 100%;
  }
}

@media (max-width: 480px) {
  .predictions-heading {
    flex-direction: column;
  }

  .predictions-header-actions {
    width: 100%;
    flex-direction: row;
  }

  .predictions-header-actions > button {
    flex: 1;
  }

  .prediction-indicator-grid,
  .prediction-backtest-results {
    grid-template-columns: 1fr;
  }

  .prediction-premium-card {
    padding: 13px;
  }

  .prediction-premium-card .prediction-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  #prediction-run-backtest {
    width: 100%;
  }

  .prediction-horizons,
  .prediction-detail-card {
    padding: 13px;
  }

  .prediction-horizon-cards {
    grid-template-columns: 1fr;
  }

  .prediction-horizon-card {
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 7px;
  }

  .prediction-horizon-price,
  .prediction-horizon-range {
    text-align: left;
  }

  .prediction-horizon-chance {
    grid-column: 1 / -1;
  }

  .prediction-detail-heading {
    flex-direction: column;
  }

  .prediction-detail-heading > button {
    width: 100%;
  }

  .prediction-range-values {
    grid-template-columns: 1fr;
  }

  .prediction-chart {
    min-height: 150px;
  }

  .prediction-chart svg {
    height: 165px;
  }
}
