/* ============================================================
   StreetQuants — Toshi Dock + Segmented Player + Lesson Chrome styles
   Dark green theme matching pixel-trading-academy.
   ============================================================ */
.toshi-dock {
  width: auto;
  user-select: none;
  -webkit-user-drag: none;
}
.toshi-dock-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 6px;
  background: rgba(5,8,10,.92);
  border: 1.5px solid rgba(88,204,2,.4);
  border-radius: 36px;
  cursor: grab;
  touch-action: none;
  box-shadow: 0 4px 20px rgba(0,0,0,.5), 0 0 20px rgba(88,204,2,.1);
  transition: box-shadow .2s;
}
.toshi-dock-head:hover {
  box-shadow: 0 4px 24px rgba(0,0,0,.6), 0 0 30px rgba(88,204,2,.2);
}
.toshi-dock-head:active {
  cursor: grabbing;
}
.toshi-dock-face {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  image-rendering: pixelated;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.5));
}
.toshi-dock-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(88,204,2,.15);
  border: 1px solid rgba(88,204,2,.3);
  color: #3ecf8e;
  font: 700 11px/1 var(--font,monospace);
  cursor: pointer;
  transition: background .2s;
}
.toshi-dock-badge:hover {
  background: rgba(88,204,2,.25);
}
.toshi-dock-badge.speaking {
  background: rgba(88,204,2,.3);
  box-shadow: 0 0 10px rgba(88,204,2,.4);
  animation: toshiBlink 1.2s ease-in-out infinite;
}
@keyframes toshiBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: .6; }
}
.toshi-dock-bubble-wrap {
  position: absolute;
  bottom: 100%;
  left: 0;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.toshi-bubble {
  background: #0a1720;
  border: 1.5px solid #1a3a1a;
  border-radius: 16px 16px 16px 4px;
  padding: 14px 16px;
  font: 700 15px/1.5 var(--font, system-ui);
  color: #fff;
  max-width: 420px;
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
  position: relative;
}
.toshi-bubble p {
  margin: 0;
  line-height: 1.5;
}
.toshi-bubble .toshi-bubble-vis {
  color: #3ecf8e;
}
.toshi-bubble .toshi-bubble-caret {
  color: #3ecf8e;
  margin-left: 4px;
  font-size: 12px;
  animation: caretPulse 1s ease-in-out infinite;
}
@keyframes caretPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .3; }
}
.toshi-dock-tail {
  position: absolute;
  bottom: -8px;
  left: 18px;
  width: 14px;
  height: 14px;
  background: #0a1720;
  border-right: 1.5px solid #1a3a1a;
  border-bottom: 1.5px solid #1a3a1a;
  transform: rotate(45deg);
  z-index: -1;
}
.toshi-dock-ctrl-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 0 4px;
}
.toshi-dock-input {
  background: rgba(5,8,10,.9);
  border: 1px solid rgba(62,207,142,.2);
  border-radius: 20px;
  padding: 6px 12px;
  color: #fff;
  font: 700 13px/1 var(--font, system-ui);
  outline: none;
  width: 180px;
}
.toshi-dock-input:focus {
  border-color: #58cc02;
}
.toshi-dock-mic {
  background: rgba(5,8,10,.9);
  border: 1px solid rgba(62,207,142,.2);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #3ecf8e;
  font-size: 14px;
  transition: background .2s, border-color .2s;
}
.toshi-dock-mic:hover {
  background: rgba(88,204,2,.15);
  border-color: #58cc02;
}
.toshi-dock-mic.live {
  background: rgba(255,90,138,.2);
  border-color: #ff6b81;
  color: #ff6b81;
  animation: micPulse 1s ease-in-out infinite;
}
@keyframes micPulse {
  0%, 100% { box-shadow: 0 0 0 rgba(255,90,138,0); }
  50% { box-shadow: 0 0 12px rgba(255,90,138,.4); }
}
.toshi-dock-send {
  background: rgba(88,204,2,.15);
  border: 1px solid #58cc02;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #3ecf8e;
  font-size: 14px;
  transition: background .2s;
}
.toshi-dock-send:hover {
  background: rgba(88,204,2,.3);
}

/* Segmented player */
.toshi-lesson-player {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
}
.toshi-player-frame {
  position: relative;
  width: 100%;
  max-width: 900px;
  aspect-ratio: 16/9;
  background: #05080a;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(62,207,142,.14), 0 8px 30px rgba(0,0,0,.5);
}
.toshi-player-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.toshi-player-prog {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: rgba(62,207,142,.8);
  border-radius: 0 2px 2px 0;
  transition: width .1s linear;
  z-index: 5;
}
.toshi-player-ctrl-overlay {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  align-items: center;
  background: rgba(5,8,10,.88);
  backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: 28px;
  border: 1px solid rgba(62,207,142,.2);
  box-shadow: 0 4px 20px rgba(0,0,0,.5);
}
.toshi-player-btn-play,
.toshi-player-btn-next {
  padding: 6px 14px;
  border: 1px solid rgba(62,207,142,.3);
  border-radius: 20px;
  background: rgba(62,207,142,.1);
  color: #3ecf8e;
  font: 800 13px/1 var(--font, var(--font-mono, monospace));
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background .2s, border-color .2s, opacity .2s;
}
.toshi-player-btn-play:hover,
.toshi-player-btn-next:hover {
  background: rgba(62,207,142,.25);
  border-color: #3ecf8e;
}
.toshi-player-btn-play:disabled,
.toshi-player-btn-next:disabled {
  opacity: 0.4;
  cursor: default;
}
.toshi-player-btn-next {
  background: rgba(88,204,2,.2);
  border-color: #58cc02;
}
.toshi-player-btn-next:not(:disabled):hover {
  background: rgba(88,204,2,.35);
}
.toshi-player-subs {
  max-width: 900px;
  padding: 8px 0;
  font: 700 15px/1.5 var(--font, system-ui);
  color: #f2f7f4;
}
.toshi-player-subs p {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.5;
}
.toshi-subs-spoken {
  color: #3ecf8e;
}
.toshi-subs-pending {
  color: rgba(242,247,244,.4);
}
.toshi-bubble-caret {
  color: #3ecf8e;
  margin-left: 4px;
  font-size: 12px;
  animation: caretPulse 1s ease-in-out infinite;
}

/* Lesson chrome */
.toshi-lesson-chrome {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 8px 16px;
  background: rgba(5,8,10,.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(62,207,142,.14);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
}
.toshi-chrome-exit {
  background: rgba(255,90,138,.1);
  border: 1px solid rgba(255,90,138,.3);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #ff6b81;
  font: 700 16px/1 var(--font, sans-serif);
  transition: background .2s;
}
.toshi-chrome-exit:hover {
  background: rgba(255,90,138,.25);
}
.toshi-chrome-prog-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.toshi-chrome-prog {
  position: relative;
  height: 6px;
  background: rgba(255,255,255,.08);
  border-radius: 3px;
  cursor: pointer;
  outline: none;
}
.toshi-chrome-prog-fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  background: linear-gradient(90deg, #58cc02, #3ecf8e);
  border-radius: 3px;
  box-shadow: 0 0 8px rgba(62,207,142,.5);
  transition: width .3s ease;
}
.toshi-chrome-pct {
  color: #3ecf8e;
  font: 800 12px/1 var(--font, monospace);
  letter-spacing: 0.04em;
  font-family: 'JetBrains Mono', monospace;
}
.toshi-chrome-xp {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(88,204,2,.1);
  border: 1px solid rgba(88,204,2,.3);
  border-radius: 12px;
  padding: 4px 10px;
  font: 800 12px/1 var(--font, monospace);
  color: #3ecf8e;
}
.toshi-chrome-replay {
  background: rgba(5,8,10,.9);
  border: 1px solid rgba(62,207,142,.2);
  border-radius: 8px;
  padding: 4px 10px;
  color: #3ecf8e;
  font: 700 11px/1 var(--font, monospace);
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.toshi-chrome-replay:hover {
  background: rgba(62,207,142,.15);
  border-color: #3ecf8e;
}
