/* Word Embedding & PCA Visualizer - local scoped styles */
#we-sim {
  max-width: 800px;
  margin: 0 auto;
  font-family: 'Courier New', Courier, monospace;
  background: #000;
  color: #eee;
  padding: 12px;
  box-sizing: border-box;
}

#we-sim * {
  box-sizing: border-box;
}

#we-sim .we-app {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#we-sim .we-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

#we-sim .we-row .we-label {
  min-width: 140px;
  color: #0f0;
  font-size: 12px;
}

#we-sim .we-input-words {
  flex: 1;
  min-width: 200px;
  height: 80px;
  background: #111;
  color: #0f0;
  border: 1px solid #444;
  padding: 8px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  resize: vertical;
}

#we-sim .we-preset {
  min-width: 160px;
  background: #222;
  color: #0f0;
  border: 1px solid #444;
  padding: 6px 8px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
}

#we-sim .we-btn {
  background: #333;
  color: #0f0;
  border: 1px solid #555;
  padding: 8px 14px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  cursor: pointer;
}

#we-sim .we-btn:hover {
  background: #444;
  border-color: #0f0;
}

#we-sim .we-status {
  font-size: 12px;
  color: #888;
}

#we-sim .we-spin {
  width: 52px;
  background: #1a1a1a;
  color: #0f0;
  border: 1px solid #333;
  padding: 6px 8px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  outline: none;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}

#we-sim .we-spin:hover {
  border-color: #444;
  background: #222;
}

#we-sim .we-spin:focus {
  border-color: #555;
  background: #222;
}

/* Subtle native number spinners so they blend with dark theme */
#we-sim .we-spin::-webkit-outer-spin-button,
#we-sim .we-spin::-webkit-inner-spin-button {
  opacity: 0.5;
}

#we-sim .we-manual-axes-label {
  min-width: auto;
  margin-left: 8px;
}

#we-sim .we-canvas-wrap {
  position: relative;
  width: 100%;
  max-width: 800px;
  background: #000;
  border: 1px solid #444;
}

#we-sim .we-canvas-controls {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  pointer-events: none;
}

#we-sim .we-canvas-controls .we-canvas-btn {
  pointer-events: auto;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #444;
  background: rgba(20, 20, 20, 0.9);
  color: #00ffcc;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#we-sim .we-canvas-controls .we-canvas-btn:hover {
  background: rgba(40, 40, 40, 0.95);
  border-color: #00ffcc;
  color: #fff;
}

#we-sim .we-canvas-controls .we-canvas-btn.we-canvas-btn-active {
  background: rgba(0, 255, 204, 0.2);
  border-color: #00ffcc;
  color: #00ffcc;
}

#we-sim .we-canvas-controls .we-canvas-btn.we-canvas-btn-rotate3d {
  margin-left: 8px;
}

#we-sim .we-canvas-controls .we-canvas-btn svg {
  flex-shrink: 0;
}

#we-sim #we-vizCanvas {
  width: 100%;
  height: 400px;
  display: block;
  cursor: crosshair;
}

#we-sim .we-loading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  font-size: 14px;
  color: #0f0;
}

#we-sim .we-analogy-panel {
  background: rgba(25, 25, 25, 0.95);
  border: 1px solid #444;
  border-top: 3px solid #00ffcc;
  padding: 14px;
  border-radius: 6px;
  margin-top: 8px;
}

#we-sim .we-analogy-panel h4 {
  margin: 0 0 8px 0;
  font-size: 13px;
  color: #00ffcc;
}

#we-sim .we-analogy-panel .we-subtitle {
  font-size: 11px;
  color: #888;
  margin-bottom: 10px;
}

#we-sim .we-analogy-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 10px 0;
}

#we-sim .we-analogy-row input {
  flex: 1;
  min-width: 0;
  background: #111;
  border: 1px solid #555;
  color: #00ffcc;
  padding: 6px 8px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  text-align: center;
}

#we-sim .we-analogy-row span.op {
  color: #888;
  font-weight: bold;
  min-width: 18px;
  text-align: center;
}

#we-sim #we-btnCalculate {
  width: 100%;
  background: #00ffcc;
  color: #000;
  border: none;
  padding: 10px;
  font-family: 'Courier New', Courier, monospace;
  font-weight: bold;
  font-size: 12px;
  cursor: pointer;
  border-radius: 4px;
  margin-top: 6px;
}

#we-sim #we-btnCalculate:hover {
  background: #00e6b8;
}

#we-sim #we-btnCalculate:disabled {
  background: #444;
  color: #666;
  cursor: not-allowed;
}

#we-sim .we-result-display {
  margin-top: 12px;
  font-size: 13px;
  text-align: center;
  color: #ffcc00;
}

#we-sim .we-result-display .we-thinking {
  color: #888;
  animation: we-pulse 0.8s ease-in-out infinite;
}

@keyframes we-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

#we-sim .we-note {
  margin-top: 10px;
  padding: 8px;
  background: #111;
  border-left: 3px solid #555;
  font-size: 11px;
  color: #aaa;
}

#we-sim .we-tooltip {
  position: fixed;
  background: rgba(0, 0, 0, 0.9);
  border: 1px solid #00ffcc;
  color: #0f0;
  padding: 6px 10px;
  font-size: 12px;
  pointer-events: none;
  z-index: 1000;
  border-radius: 4px;
  font-family: 'Courier New', Courier, monospace;
  display: none;
}

#we-sim .we-tooltip.we-visible {
  display: block;
}

#we-sim .we-vector-section {
  margin-top: 16px;
  border: 1px solid #444;
  background: #0a0a0a;
  padding: 10px;
  border-radius: 4px;
}

#we-sim .we-vector-title {
  margin: 0 0 8px 0;
  font-size: 12px;
  color: #00ffcc;
}

#we-sim .we-vector-table-wrap {
  max-height: 320px;
  overflow-x: auto;
  overflow-y: auto;
  border: 1px solid #333;
  background: #111;
  scrollbar-color: #333 #1a1a1a;
  scrollbar-width: thin;
}

#we-sim .we-vector-table-wrap::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

#we-sim .we-vector-table-wrap::-webkit-scrollbar-track {
  background: #1a1a1a;
  border-radius: 2px;
}

#we-sim .we-vector-table-wrap::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 5px;
  border: 2px solid #1a1a1a;
}

#we-sim .we-vector-table-wrap::-webkit-scrollbar-thumb:hover {
  background: #444;
}

#we-sim .we-vector-table-wrap::-webkit-scrollbar-corner {
  background: #1a1a1a;
}

#we-sim .we-vector-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 10px;
  font-family: 'Courier New', Courier, monospace;
  table-layout: fixed;
}

#we-sim .we-vector-table th,
#we-sim .we-vector-table td {
  border: 1px solid #333;
  padding: 2px 6px;
  text-align: right;
  min-width: 112px;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}

#we-sim .we-vector-table td {
  color: #fff;
}

#we-sim .we-vector-table th {
  background: #222;
  color: #00ffcc;
  position: sticky;
  top: 0;
  z-index: 1;
}

#we-sim .we-vector-table th.dim-col {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 72px;
  text-align: right;
}

#we-sim .we-vector-table td.dim-col {
  position: sticky;
  left: 0;
  background: #111;
  z-index: 0;
  min-width: 72px;
  color: #666;
}

#we-sim .we-vector-table tbody tr:hover td {
  background: #1a1a1a;
}

#we-sim .we-vector-table tbody tr:hover td.dim-col {
  background: #222;
}
