/* 页面区块 */
#trade-controls h2 { margin: 0 0 12px; }
.trade-config { background: #fff; border-radius: 10px; padding: 12px; border: 1px solid #eee; }
.trade-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.panel { background: #fff; border: 1px solid #eee; border-radius: 10px; padding: 12px; }
.panel-title { font-weight: 600; margin-bottom: 8px; }

.input { width: 420px; max-width: 100%; padding: 8px 10px; border: 1px solid #ddd; border-radius: 8px; }
.badge { display: inline-block; padding: 3px 8px; border-radius: 999px; background: #f3f4f6; margin-right: 8px; font-size: 12px; }
.log { height: 220px; overflow: auto; background: #0b1020; color: #dbeafe; padding: 10px; border-radius: 8px; }
.table .row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed #eee; }
.table .row:last-child { border-bottom: none; }

.detect-entry { display:flex; align-items:center; gap:10px; margin: 10px 0; }
.primary-btn { padding: 10px 14px; border-radius: 10px; border: none; background: #2563eb; color: #fff; cursor: pointer; }
.primary-btn:disabled { opacity: .5; cursor: not-allowed; }
.secondary-btn { padding: 8px 12px; border-radius: 10px; border: 1px solid #ddd; background: #fff; cursor: pointer; }
.danger-btn { padding: 8px 12px; border-radius: 10px; border: 1px solid #ef4444; background: #ef4444; color: #fff; cursor: pointer; }
.detect-hint { color: #6b7280; font-size: 12px; }

.status-bar { margin-top: 10px; display:flex; align-items:center; gap: 6px; flex-wrap: wrap; }
.status-text { color: #374151; }

/* overlay（复用 lingdang 的类名） */
.overlay-mask {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.overlay-panel {
  width: min(1100px, 92vw);
  height: min(760px, 86vh);
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.overlay-header {
  padding: 10px 12px;
  background: #0f172a;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: move; /* 你要拖动的话 */
}

.overlay-header button {
  background: transparent;
  color: #fff;
  border: none;
  font-size: 20px;
  cursor: pointer;
}

#overlayContent {
  padding: 12px;
  flex: 1;
  overflow: auto;
  background: #dadef7;
}

.canvas-wrapper {
  background: #dadef7;
  border-radius: 12px;
  padding: 10px;
}

#debugCanvas {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  background: #000;
}

.overlay-footer {
  padding: 10px 12px;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #eee;
}

.footer-actions { display:flex; gap: 8px; }


.trade-topbar{
  display:flex;
  gap:16px;
  align-items:flex-start;
  margin: 10px 0 16px 0;
}

.trade-board-wrap{
  flex: 1 1 auto;
  min-width: 680px;
}

.trade-board-title{
  font-size: 14px;
  margin-bottom: 6px;
  opacity: .9;
}

.trade-price-grid{
  width:100%;
  border-collapse: collapse;
  table-layout: fixed;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  overflow:hidden;
}

.trade-price-grid th,
.trade-price-grid td{
  border: 1px solid rgba(255,255,255,0.10);
  padding: 6px 8px;
  vertical-align: top;
  height: 54px;
}

.trade-price-grid th{
  font-size: 12px;
  opacity: .85;
  background: rgba(255,255,255,0.06);
}

.trade-cell-name{
  font-size: 12px;
  opacity: .9;
  line-height: 1.1;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trade-cell-price{
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}

.trade-cell-delta{
  font-size: 12px;
  opacity: .85;
  margin-top: 2px;
}

.trade-cell.good{
  background: rgba(0, 255, 140, 0.10);
}
.trade-cell.bad{
  background: rgba(255, 80, 120, 0.10);
}

.trade-board-hint{
  margin-top: 6px;
  font-size: 12px;
  opacity: .75;
}

.trade-countdown{
  width: 260px;
  flex: 0 0 260px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.04);
}

.trade-countdown-title{
  font-size: 12px;
  opacity: .85;
  margin-bottom: 8px;
}

.trade-countdown-value{
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 1px;
}
