/* Chart-Seite im Deck-Stil (Owner-Wunsch 2026-09-02: "sieht zu sehr eingefuegt
   aus"). Ein Header fuer die ganze Karte, eine schlanke Toolbar, der Chart als
   Flaeche statt Karte-in-Karte, Seitenkarten in derselben Sprache wie das
   Dashboard: dunkles Glas, lila Haarlinien, Mono-Zahlen, Lavendel-Eyebrows. */

.l3d-detail-wrap {
  /* Der INNERE Scroller ist der richtige (Owner 2026-09-06: "mach den
     aeusseren weg und lass den inneren"): die 3D-Buehne ist fixiert, der
     Dokument-Scrollbalken bewegte hier nie etwas. Der aeussere wird unten
     am html-Element unterdrueckt. */
  max-height: calc(100vh - 196px);
  padding-bottom: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(168, 85, 247, 0.35) transparent;
}
/* Solange das Deck (fixierte Buehne) steht, hat das Dokument selbst nichts zu
   scrollen - ein zweiter, wirkungsloser Balken irritiert nur. */
html:has(.l3d-root) { overflow: hidden; }
.l3d-detail-card.gt-chartpage { padding: 18px 22px 20px; }

/* ---- Kopf ---- */
.gt-cp-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(196, 181, 253, 0.12);
}
.gt-cp-ident {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  min-width: 0;
  flex: 1 1 auto;
}
.gt-cp-symbol {
  font-family: "Bebas Neue", sans-serif;
  font-size: 40px;
  line-height: 0.95;
  letter-spacing: 0.03em;
  color: #fff;
  text-shadow: 0 0 26px rgba(168, 85, 247, 0.38);
}
.gt-cp-venue {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(196, 181, 253, 0.55);
}
.gt-cp-venue b { color: #e9d5ff; }
.gt-chartpage .chart-live-pill {
  min-height: 26px;
  padding: 3px 10px;
  border-color: rgba(196, 181, 253, 0.18);
  background: rgba(5, 7, 13, 0.55);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
}
.gt-cp-price { text-align: right; margin-left: auto; }
.gt-cp-price .last {
  font-family: "JetBrains Mono", monospace;
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  color: #fff;
}
.gt-cp-price .change {
  margin-top: 5px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  color: rgba(196, 181, 253, 0.55);
}
.gt-cp-back { flex: none; }

/* ---- Raster ---- */
.gt-cp-grid {
  /* Seitenspalte seit 2026-09-06 breiter (min. 380px): vier Level-Kacheln je
     Reihe brauchen Platz fuer achtstellige Preise plus "+26,40 USDT". */
  grid-template-columns: minmax(0, 1.7fr) minmax(380px, 0.78fr);
  gap: 18px;
}

/* ---- Chart als Flaeche ---- */
.gt-chartpage .chart-panel {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
.gt-cp-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 0 0 12px;
}
.gt-chartpage .gt-tf-row {
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 3px;
  border: 1px solid rgba(196, 181, 253, 0.12);
  border-radius: 999px;
  background: rgba(5, 7, 13, 0.5);
}
.gt-chartpage .chip.gt-tf {
  min-height: 28px;
  padding: 4px 13px;
  border-color: transparent;
  background: transparent;
  color: rgba(196, 181, 253, 0.7);
  font-size: 12px;
}
.gt-chartpage .chip.gt-tf.active {
  background: rgba(168, 85, 247, 0.28);
  border-color: rgba(168, 85, 247, 0.55);
  color: #f3e8ff;
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.25);
}
.gt-chartpage .chart-stats {
  display: flex;
  gap: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(196, 181, 253, 0.12);
  border-radius: 12px;
  background: rgba(5, 7, 13, 0.5);
}
.gt-chartpage .chart-stats div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
  padding: 7px 15px;
  border: 0;
  border-right: 1px solid rgba(196, 181, 253, 0.1);
  border-radius: 0;
  background: transparent;
}
.gt-chartpage .chart-stats div:last-child { border-right: 0; }
.gt-chartpage .chart-stats span {
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(196, 181, 253, 0.55);
}
.gt-chartpage .chart-stats strong {
  margin: 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  font-weight: 800;
  color: #f5f7fb;
}
.gt-chartpage .chart-stats strong.dir-SHORT { color: #ff6d8a; }
.gt-chartpage .chart-stats strong.dir-LONG { color: #6dffbf; }

.gt-chartpage .chart-frame {
  position: relative;
  min-height: 0;
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 14px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(168, 85, 247, 0.12), transparent 60%),
    repeating-linear-gradient(90deg, rgba(196, 181, 253, 0.02) 0, rgba(196, 181, 253, 0.02) 1px, transparent 1px, transparent 64px),
    linear-gradient(180deg, #0b0718, #05070d);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 18px 50px rgba(0, 0, 0, 0.4);
}
.gt-chartpage #chart-container { height: 560px; }
.gt-chartpage .gt-right-tags { bottom: 30px; }

.gt-cp-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 10px;
  padding: 0 4px;
  font-family: "JetBrains Mono", monospace;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(196, 181, 253, 0.5);
}
.gt-cp-legend span { display: inline-flex; align-items: center; gap: 6px; }
.gt-cp-legend .trail { display: none; }
.gt-cp-legend.trail-style .ind { display: none; }
.gt-cp-legend.trail-style .trail { display: inline-flex; }
.gt-cp-legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; }

/* ---- Seitenkarten ---- */
.gt-cp-side { gap: 14px; }
.gt-chartpage .signal-card {
  padding: 16px 18px;
  border: 1px solid rgba(168, 85, 247, 0.22);
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(30, 15, 55, 0.7), rgba(8, 5, 20, 0.82));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 14px 40px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(10px);
}
.gt-chartpage .signal-card .eyebrow {
  margin: 0 0 4px;
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(196, 181, 253, 0.6);
}
.gt-chartpage .card-head h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #f5f7fb;
}
.gt-chartpage .card-head > strong {
  font-family: "JetBrains Mono", monospace;
  font-size: 16px;
  font-weight: 800;
}
.gt-chartpage .position-levels { gap: 7px; margin-top: 12px; }
.gt-chartpage .position-levels div {
  padding: 8px 10px;
  border: 1px solid rgba(196, 181, 253, 0.12);
  border-radius: 10px;
  background: rgba(5, 7, 13, 0.45);
}
.gt-chartpage .position-levels span {
  font-family: "JetBrains Mono", monospace;
  font-size: 8.5px;
  letter-spacing: 0.12em;
  color: rgba(196, 181, 253, 0.55);
}
.gt-chartpage .position-levels strong {
  margin-top: 4px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12.5px;
  font-weight: 800;
  /* Umbruch nur an Leerzeichen ("+26,40 USDT" -> USDT in die zweite Zeile):
     `overflow-wrap: anywhere` brach Preise mitten in der Zahl ("0.2053|00"),
     das sah dem Owner zu Recht "optisch nicht gut" aus (2026-09-06). */
  white-space: normal;
}
.gt-chartpage .position-levels div { min-width: 0; overflow: hidden; }
.gt-chartpage .position-levels + .position-levels { margin-top: 7px; }
/* Manueller Start des Bot-Setups auf der Chart-Seite (statt Bubblemap-Popover). */
.gt-cp-start {
  width: 100%;
  margin-top: 12px;
  min-height: 36px;
  border-radius: 10px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  cursor: pointer;
}
.gt-cp-start.long {
  border: 1px solid rgba(109, 255, 191, 0.55);
  background: rgba(109, 255, 191, 0.12);
  color: #6dffbf;
}
.gt-cp-start.short {
  border: 1px solid rgba(255, 109, 138, 0.55);
  background: rgba(255, 109, 138, 0.12);
  color: #ff8fa6;
}
.gt-cp-start:hover { color: #fff; filter: brightness(1.15); }
/* Manuelles Schließen der laufenden Position direkt am Chart (2026-09-04). */
.gt-cp-close-pos {
  width: 100%;
  margin-top: 12px;
  min-height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(240, 68, 100, 0.55);
  background: rgba(240, 68, 100, 0.12);
  color: #ff8fa6;
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  cursor: pointer;
}
.gt-cp-close-pos:hover { background: rgba(240, 68, 100, 0.22); color: #fff; }
.gt-cp-close-pos:disabled { opacity: 0.55; cursor: default; }
.gt-cp-replay {
  width: 100%;
  margin-top: 10px;
  min-height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(240, 68, 100, 0.45);
  background: rgba(240, 68, 100, 0.1);
  color: #ffb3c1;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  cursor: pointer;
}
.gt-cp-replay:hover { background: rgba(240, 68, 100, 0.2); color: #fff; }
.gt-chartpage .rr-text,
.gt-chartpage .reasoning-item,
.gt-chartpage .disclaimer {
  font-size: 12.5px;
  line-height: 1.55;
  color: rgba(196, 181, 253, 0.72);
}
.gt-chartpage .rr-text b { color: #f3e8ff; }
.gt-chartpage hr { margin: 14px 0; border-top-color: rgba(196, 181, 253, 0.12); }
.gt-chartpage .level-row {
  padding: 6px 0;
  font-size: 13px;
  color: rgba(196, 181, 253, 0.7);
}
.gt-chartpage .level-row .value {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  font-weight: 800;
}
.gt-chartpage .prob-bar {
  height: 8px;
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.06);
}
.gt-chartpage .prob-labels {
  margin-top: 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
}
.gt-chartpage .confidence-strip {
  margin-top: 12px;
  font-size: 13px;
  color: rgba(196, 181, 253, 0.7);
}
.gt-chartpage .confidence-strip strong {
  font-family: "JetBrains Mono", monospace;
  font-size: 15px;
  font-weight: 800;
  color: #f5f7fb;
}
.gt-chartpage .reasoning-title {
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(196, 181, 253, 0.6);
  margin-bottom: 6px;
}

/* ---- Stop-Trail-Choreografie auf dem Live-Chart (main.js playStopTrailOnChart):
   Untertitel, Glimmen der Stop-Linie und Gewinnband sind die einzigen Overlays;
   Kerzen, Linien und Treppe sind der Chart selbst. ---- */
.gt-cine-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 40px;
  z-index: 8;
  text-align: center;
  font: 500 20px "Space Grotesk", sans-serif;
  color: #f5f7fb;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.85);
  opacity: 0;
  pointer-events: none;
}
.gt-cine-cap.show { animation: gtCineCapIn 0.5s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
@keyframes gtCineCapIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.gt-cine-glow {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  margin-top: -1px;
  z-index: 7;
  display: none;
  background: rgba(255, 42, 42, 0.85);
  pointer-events: none;
}
.gt-cine-band {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 6;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(34, 197, 94, 0.1);
  border-top: 1px solid rgba(34, 197, 94, 0.35);
  border-bottom: 1px solid rgba(34, 197, 94, 0.35);
  font: 700 13px "JetBrains Mono", monospace;
  color: rgba(74, 222, 128, 0.92);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
  pointer-events: none;
  overflow: hidden;
}
.gt-cine-band.risk {
  background: rgba(250, 204, 21, 0.09);
  border-color: rgba(250, 204, 21, 0.35);
  color: rgba(253, 224, 71, 0.92);
}
.gt-cine-hint {
  position: absolute;
  right: 10px;
  top: 8px;
  z-index: 8;
  font: 700 9.5px "JetBrains Mono", monospace;
  letter-spacing: 0.08em;
  color: rgba(196, 181, 253, 0.45);
  pointer-events: none;
}

/* ---- Schmal ---- */
@media (max-width: 1000px) {
  .gt-cp-grid { grid-template-columns: 1fr; gap: 14px; }
  .gt-chartpage #chart-container { height: 420px; }
}
@media (max-width: 700px) {
  .l3d-detail-card.gt-chartpage { padding: 14px 14px 16px; }
  .gt-cp-head { flex-wrap: wrap; gap: 10px 12px; position: relative; padding-right: 96px; }
  .gt-cp-symbol { font-size: 32px; }
  .gt-chartpage .chart-live-pill { order: 0; }
  .gt-cp-price { width: 100%; margin-left: 0; text-align: left; }
  .gt-cp-price .last { font-size: 28px; }
  .gt-cp-back { position: absolute; right: 0; top: 0; }
  .gt-cp-toolbar { flex-direction: column; align-items: stretch; }
  .gt-chartpage .gt-tf-row { width: 100%; overflow-x: auto; }
  .gt-chartpage .chip.gt-tf { flex: 1 0 auto; text-align: center; }
  .gt-chartpage .chart-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gt-chartpage .chart-stats div:nth-child(2) { border-right: 0; }
  .gt-chartpage .chart-stats div:nth-child(-n + 2) { border-bottom: 1px solid rgba(196, 181, 253, 0.1); }
  .gt-chartpage .chart-frame,
  .gt-chartpage #chart-container { height: 380px; min-height: 380px; }
}
