:root {
  --oracle-gold: #e8c76a;
  --oracle-violet: #7c3aed;
  --oracle-violet-2: #a78bfa;
  --oracle-ink: #050510;
  --oracle-ink-2: #0b0720;
  --oracle-border: rgba(232, 199, 106, 0.55);
  --oracle-glow: rgba(124, 58, 237, 0.65);
}

/* Header controls */
#matrixBotHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.oracle-header__title {
  font-weight: 700;
}

.oracle-header__controls {
  display: flex;
  gap: 6px;
  align-items: center;
}

.oracle-header__btn {
  border: 1px solid rgba(232, 199, 106, 0.35);
  background: rgba(5, 5, 16, 0.35);
  color: rgba(232, 199, 106, 0.95);
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 11px;
  letter-spacing: 0.08em;
  cursor: pointer;
  user-select: none;
}

.oracle-header__btn:hover {
  background: rgba(124, 58, 237, 0.14);
}

.oracle-header__btn[aria-pressed="true"] {
  border-color: rgba(167, 139, 250, 0.55);
  box-shadow: 0 0 14px rgba(124, 58, 237, 0.22);
}

/* Quick actions */
#oracleQuickActions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 10px 0;
}

.oracle-chip {
  border: 1px solid rgba(232, 199, 106, 0.22);
  background: rgba(11, 7, 32, 0.30);
  color: rgba(232, 199, 106, 0.95);
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
}

.oracle-chip:hover {
  background: rgba(124, 58, 237, 0.16);
}

/* Apps panel */
#oracleAppsPanel {
  margin: 10px 10px 0;
  border: 1px solid rgba(232, 199, 106, 0.25);
  border-radius: 10px;
  background: rgba(5, 5, 16, 0.45);
  overflow: hidden;
}

.oracle-apps__header {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(232, 199, 106, 0.18);
  color: rgba(232, 199, 106, 0.95);
  letter-spacing: 0.10em;
  font-size: 11px;
}

.oracle-apps__list {
  max-height: 170px;
  overflow: auto;
}

.oracle-apps__item {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-bottom: 1px solid rgba(232, 199, 106, 0.10);
}

.oracle-apps__name {
  color: rgba(255, 245, 210, 0.92);
  font-weight: 650;
  font-size: 13px;
}

.oracle-apps__desc {
  color: rgba(232, 199, 106, 0.75);
  font-size: 12px;
  line-height: 1.25;
}

.oracle-apps__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.oracle-apps__action {
  border: 1px solid rgba(167, 139, 250, 0.22);
  background: rgba(124, 58, 237, 0.10);
  color: rgba(255, 245, 210, 0.92);
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 11px;
  cursor: pointer;
}

.oracle-apps__action:hover {
  background: rgba(124, 58, 237, 0.18);
}

/* Matrix toast popups */
#oracleMatrixToasts {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.oracle-toast {
  width: min(360px, calc(100vw - 32px));
  background: rgba(0, 0, 0, 0.76);
  border: 1px solid rgba(0, 255, 65, 0.35);
  box-shadow: 0 0 18px rgba(0, 255, 65, 0.14), inset 0 0 22px rgba(0, 255, 65, 0.08);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: "Courier New", monospace;
  color: rgba(0, 255, 65, 0.92);
  position: relative;
  overflow: hidden;
  animation: oracleToastIn 220ms ease-out both, oracleToastFlicker 2.2s infinite;
}

.oracle-toast::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 255, 65, 0.10), transparent);
  transform: translateY(-100%);
  animation: oracleToastScan 2.3s linear infinite;
  opacity: 0.9;
}

.oracle-toast__title {
  font-weight: 800;
  letter-spacing: 0.14em;
  font-size: 11px;
  margin-bottom: 6px;
  opacity: 0.95;
}

.oracle-toast__body {
  font-size: 12px;
  line-height: 1.25;
  opacity: 0.92;
  white-space: pre-wrap;
}

@keyframes oracleToastIn {
  from { transform: translateY(-6px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes oracleToastScan {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

@keyframes oracleToastFlicker {
  0%, 100% { opacity: 1; }
  45% { opacity: 0.90; }
  46% { opacity: 0.72; }
  47% { opacity: 0.95; }
}

@media (max-width: 420px) {
  #matrixBotWindow { width: 92vw; right: 4vw; }
  #matrixBotButton { right: 16px; bottom: 16px; }
}

