body {
  background:#576f9f;
  color:#e5e7eb;
  font-family: system-ui;
}

.vision-wrapper {
  width: 920px;
  margin: 40px auto;
}
canvas {
  touch-action: pan-y;
}

/* ===============================
   CHART CONTROL BAR
=============================== */
.vision-chart-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 10px 0 6px;
}

/* ===============================
   BASE BUTTON
=============================== */
.vbtn {
  border: none;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: all 0.15s ease;
  background: #1f2937;
  color: #e5e7eb;
}

/* hover */
.vbtn:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

/* active click */
.vbtn:active {
  transform: scale(0.97);
}

/* ===============================
   VARIANTS
=============================== */

/* LIVE */
.vbtn.live {
  background: #ef4444;
  color: #fff;
}
.vbtn.live:hover {
  background: #dc2626;
}

/* REPLAY */
.vbtn.replay {
  background: #2563eb;
  color: #fff;
}
.vbtn.replay:hover {
  background: #1d4ed8;
}

/* STOP */
.vbtn.stop {
  background: #374151;
}
.vbtn.stop:hover {
  background: #4b5563;
}

/* ===============================
   ACTIVE STATES (JS TOGGLED)
=============================== */
.vbtn.active {
  box-shadow: 0 0 0 2px rgba(56,189,248,0.6);
}


.chart-container {
  position: relative;
  background:#05060a;
  border-radius:12px;
  overflow:hidden;
}

#visionCanvas {
  position: relative;
  z-index: 2;
}

.chart-watermark {
  position: absolute;
  inset: 0;
  z-index: 1;           /* BEHIND canvas */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  pointer-events: none;
  color: #ada067;
  font-weight: bolder;
  opacity: 0.3;
  letter-spacing: 6px;
}

.vision-controls {
  gap: 16px;
}

.vision-controls label {
  font-weight: 500;
}

.vision-controls input,
.vision-controls select {
  background: #020617;
  border-color: #334155;
}

.vision-controls input:focus,
.vision-controls select:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 1px rgba(56,189,248,.4);
}

.vision-info {
  display:flex;
  justify-content:space-between;
  margin:10px 0;
}

button {
  padding:10px 18px;
  border:none;
  border-radius:8px;
  cursor:pointer;
}

.amount-quick {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.pct-btn {
  background: #020617;
  color: #e5e7eb;
  border: 1px solid #1f2937;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all .15s ease;
}

.pct-btn:hover {
  background: #1f2937;
}

.pct-btn.active {
  background: #22c55e;
  color: #020617;
  border-color: #22c55e;
}

.vision-topbar {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:10px 14px;
  background:#020617;
  border-radius:10px;
  margin-bottom:12px;
}

.vision-links {
  display: flex;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 500;
}

.vision-links a {
  text-decoration: none;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  transition: background 0.2s ease, color 0.2s ease;
  color: #fff; /* force white text for visibility */
}

/* Different background colors per link */
.vision-links a:nth-of-type(1) {
  background: #0f172a; /* deep navy */
}
.vision-links a:nth-of-type(2) {
  background: #38bdf8; /* sky blue */
}
.vision-links a:nth-of-type(3) {
  background: #10b981; /* emerald green */
}

/* Hover effect */
.vision-links a:hover {
  filter: brightness(1.1);
}

/* Separator styling */
.vision-links span {
  color: var(--muted-color);
  align-self: center;
}

/* Light mode defaults */
:root {
  --muted-color: #64748b;
}

/* Dark mode overrides */
@media (prefers-color-scheme: dark) {
  :root {
    --muted-color: #94a3b8;
  }
}


.vision-wallet {
  color:#22c55e;
  font-family:monospace;
}

.vision-wallet a {
  color: #ffffff;              /* force white text */
  text-decoration: none;       /* remove underline */
  font-weight: 500;
  margin: 0 0.25rem;
  transition: color 0.2s ease;
}

.vision-wallet a:hover {
  color: #38bdf8;              /* light blue accent on hover */
}

/* Optional: separator slash styling */
.vision-wallet {
  color: #ffffff;              /* ensure the "/" stays visible */
  font-size: 0.9rem;
}

/* Base form control styles */
label {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--label-color);
  margin-bottom: 1rem;
}

select {
  margin-top: 0.4rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: var(--bg-color);
  color: var(--text-color);
  font-size: 0.9rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}

select:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px var(--accent-shadow);
}

/* Light mode variables */
:root {
  --bg-color: #fff;
  --text-color: #0f172a;
  --label-color: #334155;
  --border-color: #cbd5e1;
  --accent-color: #0f172a;
  --accent-shadow: rgba(15, 23, 42, 0.2);
}

/* Dark mode variables */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #1e293b;
    --text-color: #f1f5f9;
    --label-color: #e2e8f0;
    --border-color: #475569;
    --accent-color: #38bdf8;
    --accent-shadow: rgba(56, 189, 248, 0.3);
  }
}

/* Responsive tweaks */
@media (max-width: 600px) {
  label {
    font-size: 0.85rem;
  }
  select {
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem;
  }
}


.vision-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
  background: #020617;
  padding: 12px;
  border-radius: 12px;
  margin-top: 10px;
}

.vision-controls label {
  display: flex;
  flex-direction: column;
  font-size: 11px;
  color: #94a3b8;
  gap: 4px;
}

.vision-controls input,
.vision-controls select {
  background: #020617;
  border: 1px solid #1e293b;
  color: #e5e7eb;
  padding: 6px 8px;
  border-radius: 6px;
  min-width: 90px;
}

.vision-controls button {
  padding: 8px 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

.vision-controls button:first-of-type {
  background: #16a34a;
  color: #000;
}

.vision-controls button:last-of-type {
  background: #dc2626;
  color: #000;
}


.vision-history {
  margin-top: 14px;
  background: #020617;
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 12px;
}

.vision-history h4 {
  margin: 0 0 8px;
  font-size: 13px;
  color: #e5e7eb;
}

#historyList {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 500px;
  overflow-y: auto;
}

.history-head {
  display: grid;
  grid-template-columns:
    60px
    1fr
    70px
    1fr
    60px
    80px
    70px;

  gap: 6px;
  padding: 6px;
  margin-bottom: 4px;

  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;

  background: #020617;
  border: 1px solid #1e293b;
  border-radius: 6px;
}

.history-head span {
  white-space: nowrap;
}
@media (max-width: 900px) {
  .history-head {
    display: none;
  }
}

/* ===============================
   LIVE PRICE INDICATOR
=============================== */

.price {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: monospace;
  font-size: 18px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  background: #020617;
  transition: all .2s ease;
}

.price .arrow {
  font-size: 16px;
  line-height: 1;
}

/* UP */
.price.up {
  color: #22c55e;
  box-shadow: 0 0 0 rgba(34,197,94,0.6);
  animation: pulseGreen .8s ease-out;
}

.price.up .arrow::before {
  content: "▲";
}

/* DOWN */
.price.down {
  color: #ef4444;
  box-shadow: 0 0 0 rgba(239,68,68,0.6);
  animation: pulseRed .8s ease-out;
}

.price.down .arrow::before {
  content: "▼";
}

/* NEUTRAL */
.price.neutral {
  color: #94a3b8;
}

.price.neutral .arrow::before {
  content: "•";
}

/* PULSE ANIMATIONS */
@keyframes pulseGreen {
  0%   { box-shadow: 0 0 0 0 rgba(34,197,94,0.7); }
  100% { box-shadow: 0 0 0 12px rgba(34,197,94,0); }
}

@keyframes pulseRed {
  0%   { box-shadow: 0 0 0 0 rgba(239,68,68,0.7); }
  100% { box-shadow: 0 0 0 12px rgba(239,68,68,0); }
}


.history-row {
  display: grid;
  grid-template-columns:
    60px   /* Direction */
    1fr    /* Entry */
    70px   /* Amount */
    1fr    /* Exit */
    60px   /* Duration */
    80px   /* P/L */
    70px;  /* Result */

  gap: 6px;
  font-size: 11px;
  padding: 6px;
  border-radius: 6px;
  background: #020617;
  border: 1px solid #1e293b;
}

@media (max-width: 900px) {
  .vision-wrapper {
    width: 100%;
  }

  .history-row {
    grid-template-columns: repeat(3, 1fr);
    row-gap: 4px;
  }

  /* Make Result + P/L stand out */
  .history-row span:nth-child(6),
  .history-row span:nth-child(7) {
    font-weight: 600;
  }

  /* Duration slightly muted */
  .history-row span:nth-child(5) {
    opacity: 0.7;
    font-size: 10px;
  }
}

.history-row.win {
  border-left: 3px solid #22c55e;
}

.history-row.lose {
  border-left: 3px solid #ef4444;
}

.history-row.pending {
  border-left: 3px solid #facc15;
}

.history-row span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


.vision-session {
  display:flex;
  gap:14px;
  margin:12px 0;
  padding:10px;
  background:#020617;
  border-radius:10px;
  font-size:12px;
}

.vision-session .stat {
  display:flex;
  flex-direction:column;
  min-width:80px;
}

.vision-session .label {
  color:#94a3b8;
  font-size:11px;
}

.vision-session .green span:last-child {
  color:#22c55e;
  font-weight:600;
}

.vision-session .red span:last-child {
  color:#ef4444;
  font-weight:600;
}
@media (max-width: 900px) {
  .vision-wrapper {
    width: 100%;
  }

  .history-row {
    grid-template-columns: repeat(3, 1fr);
    row-gap: 4px;
  }
}





/* css4ss */
/* Make canvas fill screen on large displays */
@media (min-width: 1024px) {
  .chart-container {
    width: 100%;
    height: calc(100vh - 160px); /* adjust offset for header/topbar */
    display: flex;
    justify-content: center;
    align-items: center;
  }

  #visionCanvas {
    width: 100% !important;
    height: 100% !important;
  }
}

/* Default wrapper for normal screens */
.vision-wrapper {
  width: 920px;
  margin: 40px auto;
}

/* On large screens, let it stretch */
@media (min-width: 1024px) {
  .vision-wrapper {
    width: 100%;
    max-width: none;
    margin: 20px auto; /* keep some top/bottom spacing */
    padding: 0 20px;   /* optional side padding so content isn’t flush */
  }

  .chart-container {
    width: 100%;
    height: calc(100vh - 160px);
  }

  #visionCanvas {
    width: 100% !important;
    height: 100% !important;
  }
}

    .wallet-point {
  position: relative;
}

.wallet-menu {
  position: absolute;
  top: 110%;
  right: 0;
  min-width: 220px;

  background: #020617;
  border: 1px solid #1f2937;
  border-radius: 10px;

  box-shadow: 0 12px 30px rgba(0,0,0,.45);
  z-index: 999;

  display: none;
}

.wallet-point.open .wallet-menu {
  display: block;
}

.wallet-menu a {
  display: block;
  padding: 10px 12px;
  color: #e5e7eb;
  text-decoration: none;
}

.wallet-menu a:hover {
  background: #020617;
}

.wallet-menu a.active {
  background: rgba(34,197,94,.15);
  color: #22c55e;
}

.vision-topbar {
  position: relative;
  z-index: 1000;
}

.wallet-menu {
  z-index: 2000;
}

canvas {
  position: relative;
  z-index: 1;
}

#vision-alerts {
  position: fixed;
  top: 70px;
  right: 20px;
  z-index: 5000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vision-alert {
  min-width: 260px;
  max-width: 340px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,.4);
  animation: slideIn .35s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.vision-alert.success {
  background: linear-gradient(135deg, #16a34a, #22c55e);
}

.vision-alert.error {
  background: linear-gradient(135deg, #dc2626, #ef4444);
}

.vision-alert.warning {
  background: linear-gradient(135deg, #ca8a04, #eab308);
}

.vision-alert.info {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
}

.vision-alert .icon {
  font-size: 16px;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.wallet-inline {
  display: flex;
  align-items: center;
  gap: 6px;
}

.deposit-btn {
  font-size: 10px;
  padding: 4px 6px;
  border-radius: 6px;
  background: #22c55e;
  color: #020617;
  font-weight: 600;
  text-decoration: none;
}

.deposit-btn:hover {
  background: #16a34a;
}