/*
 * DREAMMAKER BETA NAVIGATION + KALSHI HELP V1
 *
 * Visual-only frontend enhancement.
 * Does not modify trading, TP, orders, credentials, or backend logic.
 */

#dm-beta-quick-navigation {
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  top: 50%;
  transform: translateY(-50%);
  z-index: 2147483000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  pointer-events: none;
}

#dm-beta-quick-navigation button {
  pointer-events: auto;
}

.dm-beta-nav-button {
  min-height: 54px;
  border: 1px solid rgba(92, 164, 255, 0.72);
  border-radius: 999px;
  padding: 13px 22px;
  background:
    linear-gradient(
      135deg,
      rgba(42, 105, 226, 0.97),
      rgba(29, 190, 199, 0.97)
    );
  box-shadow:
    0 14px 35px rgba(0, 0, 0, 0.38),
    0 0 26px rgba(47, 142, 255, 0.18);
  color: #ffffff;
  font: inherit;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.01em;
  cursor: pointer;
  white-space: nowrap;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    opacity 160ms ease;
}

.dm-beta-nav-button:hover,
.dm-beta-nav-button:focus-visible {
  transform: translateY(-2px);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.46),
    0 0 34px rgba(47, 162, 255, 0.34);
  outline: none;
}

.dm-beta-nav-button:active {
  transform: translateY(0);
}

#dm-beta-back-top {
  display: none;
  background:
    linear-gradient(
      135deg,
      rgba(22, 35, 71, 0.98),
      rgba(43, 71, 126, 0.98)
    );
}

#dm-beta-help-button {
  background:
    linear-gradient(
      135deg,
      rgba(20, 59, 124, 0.98),
      rgba(42, 114, 174, 0.98)
    );
}

.dm-beta-target-highlight {
  animation:
    dmBetaTargetGlow 1.8s ease-out;
}

@keyframes dmBetaTargetGlow {
  0% {
    box-shadow:
      0 0 0 3px rgba(73, 170, 255, 0.92),
      0 0 44px rgba(37, 209, 255, 0.70);
  }

  100% {
    box-shadow: inherit;
  }
}

#dm-beta-help-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483640;
  display: none;
  overflow-y: auto;
  padding:
    max(24px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(36px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  background: rgba(1, 7, 20, 0.89);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

#dm-beta-help-overlay.dm-open {
  display: block;
}

.dm-beta-help-modal {
  width: min(920px, 100%);
  margin: 0 auto;
  border: 1px solid rgba(76, 151, 255, 0.52);
  border-radius: 30px;
  padding: clamp(22px, 4vw, 42px);
  background:
    radial-gradient(
      circle at top right,
      rgba(32, 118, 223, 0.20),
      transparent 42%
    ),
    linear-gradient(
      145deg,
      rgba(8, 18, 45, 0.99),
      rgba(5, 12, 31, 0.99)
    );
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.62),
    0 0 50px rgba(34, 117, 255, 0.13);
  color: #eef5ff;
}

.dm-beta-help-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.dm-beta-help-title {
  margin: 0;
  color: #ffffff;
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1.08;
  font-weight: 950;
}

.dm-beta-help-subtitle {
  margin: 12px 0 0;
  color: #92c6ff;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.dm-beta-help-close {
  flex: 0 0 auto;
  width: 50px;
  height: 50px;
  border: 1px solid rgba(150, 182, 231, 0.42);
  border-radius: 50%;
  background: rgba(20, 32, 65, 0.84);
  color: #ffffff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.dm-beta-help-close:hover,
.dm-beta-help-close:focus-visible {
  border-color: #65b8ff;
  background: rgba(38, 75, 132, 0.95);
  outline: none;
}

.dm-beta-help-section {
  margin-top: 26px;
  border: 1px solid rgba(83, 125, 196, 0.30);
  border-radius: 22px;
  padding: clamp(18px, 3vw, 28px);
  background: rgba(10, 22, 50, 0.72);
}

.dm-beta-help-section h3 {
  margin: 0 0 13px;
  color: #5cb3ff;
  font-size: clamp(20px, 3vw, 28px);
}

.dm-beta-help-section p,
.dm-beta-help-section li {
  color: #d8e3f6;
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.65;
}

.dm-beta-help-section ol,
.dm-beta-help-section ul {
  margin:
    12px 0
    0 22px;
  padding: 0;
}

.dm-beta-help-section li + li {
  margin-top: 8px;
}

.dm-beta-important {
  border-color: rgba(255, 171, 81, 0.50);
  background: rgba(78, 44, 10, 0.32);
}

.dm-beta-very-important {
  border-color: rgba(255, 91, 111, 0.60);
  background: rgba(80, 15, 32, 0.32);
}

.dm-beta-key-example {
  display: block;
  overflow-x: auto;
  margin: 12px 0;
  border: 1px solid rgba(71, 167, 255, 0.33);
  border-radius: 14px;
  padding: 14px;
  background: rgba(2, 9, 24, 0.88);
  color: #bfe5ff;
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    monospace;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre;
}

.dm-beta-success-list strong {
  color: #56e89b;
}

#dm-beta-inline-instructions {
  margin: 26px 0;
  border: 1px solid rgba(62, 151, 255, 0.42);
  border-radius: 24px;
  padding: clamp(20px, 3vw, 30px);
  background:
    linear-gradient(
      145deg,
      rgba(10, 31, 70, 0.96),
      rgba(7, 19, 45, 0.97)
    );
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.24);
}

#dm-beta-inline-instructions h3 {
  margin: 0;
  color: #59b4ff;
  font-size: clamp(23px, 3vw, 32px);
}

#dm-beta-inline-instructions p {
  margin: 12px 0 0;
  color: #cbd8ee;
  font-size: 16px;
  line-height: 1.55;
}

.dm-beta-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.dm-beta-inline-actions button {
  min-height: 48px;
  border: 1px solid rgba(81, 164, 255, 0.64);
  border-radius: 999px;
  padding: 11px 20px;
  background:
    linear-gradient(
      135deg,
      rgba(39, 102, 214, 0.98),
      rgba(32, 156, 192, 0.98)
    );
  color: #ffffff;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.dm-beta-inline-warning {
  margin-top: 18px !important;
  border-left: 4px solid #ff9a66;
  padding-left: 14px;
  color: #ffd2bd !important;
}

@media (max-width: 720px) {
  #dm-beta-quick-navigation {
    top: auto;
    right: max(10px, env(safe-area-inset-right));
    bottom:
      calc(
        18px +
        env(safe-area-inset-bottom)
      );
    transform: none;
    gap: 9px;
  }

  .dm-beta-nav-button {
    min-height: 48px;
    padding: 11px 16px;
    font-size: 14px;
    box-shadow:
      0 10px 25px rgba(0, 0, 0, 0.42);
  }

  .dm-beta-help-modal {
    border-radius: 22px;
  }

  .dm-beta-help-heading-row {
    gap: 12px;
  }

  .dm-beta-help-close {
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 430px) {
  #dm-beta-quick-navigation {
    align-items: stretch;
  }

  .dm-beta-nav-button {
    max-width: 190px;
    white-space: normal;
    line-height: 1.15;
  }
}
