/* JPS Lab - 避障平滑实验样式 */

.jps-lab {
  background-color: #020617;
  color: #f8fafc;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  overflow: hidden;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 顶部状态栏 */
.jl-header {
  height: 3.5rem;
  border-bottom: 1px solid #1e293b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  background: rgba(15, 23, 42, 0.8);
  z-index: 20;
  flex-shrink: 0;
}

.jl-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1;
}

.jl-status-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 9999px;
  background: #3b82f6;
  box-shadow: 0 0 10px #3b82f6;
}

.jl-title {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1;
  display: flex;
  align-items: center;
}

.jl-divider {
  height: 1rem;
  width: 1px;
  background: #334155;
}

.jl-status-text {
  font-size: 0.625rem;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  line-height: 1;
}

.jl-header-right {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-shrink: 0;
}

.jl-weight-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.625rem;
}

.jl-weight-label {
  color: #64748b;
  text-transform: uppercase;
}

.jl-slider {
  -webkit-appearance: none;
  width: 6rem;
  height: 0.25rem;
  background: #1e293b;
  border-radius: 99px;
}

.jl-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  background: #3b82f6;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #fff;
}

.jl-weight-val {
  color: #60a5fa;
  width: 1.5rem;
}

/* 主体区域 */
.jl-body {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
}

/* 左侧工具栏 */
.jl-aside {
  width: 16rem;
  border-right: 1px solid #1e293b;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  background: rgba(2, 6, 23, 0.5);
  z-index: 10;
}

.jl-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.jl-section-label {
  font-size: 0.625rem;
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.jl-btn-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.jl-btn {
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s ease;
}

.jl-btn:hover {
  background: #1e293b;
}

.jl-btn-active {
  background: #1e293b;
  border: 1px solid #475569;
  color: #fff;
}

.jl-btn-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 0.125rem;
}

.jl-dot-wall {
  background: #94a3b8;
}

.jl-dot-start {
  background: #10b981;
}

.jl-dot-end {
  background: #ef4444;
}

.jl-divider-h {
  height: 1px;
  background: #1e293b;
}

/* 配置项 */
.jl-config-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.jl-checkbox-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem;
  border-radius: 0.375rem;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid #1e293b;
  cursor: pointer;
  font-size: 0.6875rem;
}

.jl-checkbox-item input[type="checkbox"] {
  accent-color: #3b82f6;
}

/* 底部按钮区 */
.jl-bottom-panel {
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: auto;
}

.jl-btn-primary {
  width: 100%;
  background: #2563eb;
  color: #fff;
  padding: 0.75rem;
  border-radius: 0.5rem;
  font-weight: 700;
  font-size: 0.75rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.15s ease;
}

.jl-btn-primary:hover {
  background: #3b82f6;
}

.jl-btn-primary:active {
  transform: scale(0.95);
}

.jl-btn-secondary {
  width: 100%;
  background: #1e293b;
  color: #94a3b8;
  padding: 0.5rem;
  border-radius: 0.5rem;
  font-weight: 700;
  font-size: 0.75rem;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.jl-btn-secondary:hover {
  background: #334155;
}

/* 主画布区域 */
.jl-main {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #020617;
  padding: 0.5rem;
  min-width: 0;
}

.jl-canvas-wrap {
  position: relative;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(51, 65, 85, 0.5);
  padding: 0.25rem;
  border-radius: 0.75rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  flex-shrink: 1;
  min-width: 0;
  min-height: 0;
}

#main-canvas {
  image-rendering: pixelated;
  touch-action: none;
  cursor: crosshair;
  display: block;
}

/* 播放控件 */
.jl-playback {
  margin-top: 0.75rem;
  width: 100%;
  max-width: 42rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 2rem;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(51, 65, 85, 0.5);
  border-radius: 1rem;
}

.jl-play-btn {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: #2563eb;
  color: #fff;
  box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.jl-play-btn:hover {
  transform: scale(1.05);
}

.jl-play-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.jl-progress-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.jl-progress-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 0.375rem;
  background: #1e293b;
  border-radius: 99px;
  cursor: pointer;
}

.jl-progress-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  background: #3b82f6;
  border-radius: 50%;
  cursor: pointer;
}

.jl-progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.5625rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: -0.025em;
}

.jl-step-label {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.jl-progress-hint {
  letter-spacing: 0.05em;
}

/* 日志终端 */
.jl-log-aside {
  width: 18rem;
  border-left: 1px solid #1e293b;
  display: flex;
  flex-direction: column;
  background: rgba(2, 6, 23, 0.5);
}

.jl-log-header {
  padding: 0.75rem;
  border-bottom: 1px solid #1e293b;
  background: rgba(15, 23, 42, 0.5);
  font-size: 0.625rem;
  font-weight: 700;
  color: #64748b;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.jl-stat-dist {
  color: #10b981;
}

.jl-log-container {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.625rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.jl-log-container::-webkit-scrollbar {
  width: 4px;
}

.jl-log-container::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 10px;
}

.jl-log-item {
  padding: 0.5rem;
  border-bottom: 1px solid #0f172a;
  color: #94a3b8;
}

.jl-log-item .jl-log-type {
  color: #3b82f6;
}

/* 滚动条 */
.custom-scrollbar::-webkit-scrollbar {
  width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 10px;
}
