2026-03-03 10:20:49 +07:00
|
|
|
.simulator-canvas-container {
|
|
|
|
|
display: flex;
|
|
|
|
|
height: 100%;
|
2026-03-04 05:30:25 +07:00
|
|
|
position: relative;
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-03 10:20:49 +07:00
|
|
|
.simulator-canvas {
|
|
|
|
|
flex: 1;
|
2026-03-05 08:05:23 +07:00
|
|
|
background-color: #1a1a1a;
|
|
|
|
|
color: #e0e0e0;
|
2026-03-03 10:20:49 +07:00
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-05 08:05:23 +07:00
|
|
|
/* ── Canvas header ───────────────────────────────── */
|
2026-03-03 10:20:49 +07:00
|
|
|
.canvas-header {
|
2026-03-05 08:05:23 +07:00
|
|
|
height: 46px;
|
|
|
|
|
padding: 0 10px;
|
|
|
|
|
background: #252526;
|
|
|
|
|
border-bottom: 1px solid #333;
|
2026-03-03 10:20:49 +07:00
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
2026-03-05 08:05:23 +07:00
|
|
|
justify-content: space-between;
|
|
|
|
|
flex-shrink: 0;
|
2026-03-03 10:20:49 +07:00
|
|
|
}
|
|
|
|
|
|
2026-03-05 08:05:23 +07:00
|
|
|
.canvas-header-left,
|
|
|
|
|
.canvas-header-right {
|
2026-03-03 10:20:49 +07:00
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
2026-03-05 08:05:23 +07:00
|
|
|
gap: 8px;
|
2026-03-03 10:20:49 +07:00
|
|
|
}
|
|
|
|
|
|
2026-03-05 08:05:23 +07:00
|
|
|
/* ── Status LED dot ──────────────────────────────── */
|
|
|
|
|
.status-dot {
|
|
|
|
|
width: 8px;
|
|
|
|
|
height: 8px;
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
transition: background 0.3s, box-shadow 0.3s;
|
2026-03-03 10:20:49 +07:00
|
|
|
}
|
|
|
|
|
|
2026-03-05 08:05:23 +07:00
|
|
|
.status-dot.running {
|
|
|
|
|
background: #4caf50;
|
|
|
|
|
box-shadow: 0 0 6px rgba(76, 175, 80, 0.7);
|
|
|
|
|
animation: pulse-green 2s ease-in-out infinite;
|
2026-03-03 10:20:49 +07:00
|
|
|
}
|
|
|
|
|
|
2026-03-05 08:05:23 +07:00
|
|
|
.status-dot.stopped {
|
|
|
|
|
background: #555;
|
|
|
|
|
box-shadow: none;
|
2026-03-03 10:20:49 +07:00
|
|
|
}
|
|
|
|
|
|
2026-03-05 08:05:23 +07:00
|
|
|
@keyframes pulse-green {
|
|
|
|
|
0%, 100% { box-shadow: 0 0 4px rgba(76, 175, 80, 0.5); }
|
|
|
|
|
50% { box-shadow: 0 0 10px rgba(76, 175, 80, 0.9); }
|
2026-03-03 10:20:49 +07:00
|
|
|
}
|
|
|
|
|
|
2026-03-05 08:05:23 +07:00
|
|
|
/* ── Board Selector ──────────────────────────────── */
|
|
|
|
|
.board-selector {
|
|
|
|
|
padding: 4px 8px;
|
|
|
|
|
background: #1e2a38;
|
|
|
|
|
color: #c9d1d9;
|
|
|
|
|
border: 1px solid #3a4a5a;
|
|
|
|
|
border-radius: 5px;
|
2026-03-03 10:20:49 +07:00
|
|
|
font-size: 12px;
|
2026-03-05 08:05:23 +07:00
|
|
|
font-weight: 500;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
transition: border-color 0.15s;
|
|
|
|
|
height: 32px;
|
|
|
|
|
appearance: none;
|
|
|
|
|
-webkit-appearance: none;
|
|
|
|
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
|
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
|
background-position: right 6px center;
|
|
|
|
|
padding-right: 22px;
|
2026-03-03 10:20:49 +07:00
|
|
|
}
|
|
|
|
|
|
2026-03-05 08:05:23 +07:00
|
|
|
.board-selector:hover:not(:disabled) {
|
|
|
|
|
border-color: #007acc;
|
2026-03-03 10:20:49 +07:00
|
|
|
}
|
|
|
|
|
|
2026-03-05 08:05:23 +07:00
|
|
|
.board-selector:disabled {
|
|
|
|
|
opacity: 0.4;
|
|
|
|
|
cursor: not-allowed;
|
2026-03-03 10:20:49 +07:00
|
|
|
}
|
|
|
|
|
|
2026-03-06 20:24:03 +07:00
|
|
|
/* ── Serial Monitor button ───────────────────────── */
|
|
|
|
|
.canvas-serial-btn {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 5px;
|
|
|
|
|
padding: 0 10px;
|
|
|
|
|
height: 32px;
|
|
|
|
|
background: transparent;
|
|
|
|
|
border: 1px solid #3a4a5a;
|
|
|
|
|
border-radius: 5px;
|
|
|
|
|
color: #9d9d9d;
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
transition: border-color 0.15s, background 0.15s, color 0.15s;
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.canvas-serial-btn:hover {
|
|
|
|
|
border-color: #007acc;
|
|
|
|
|
color: #ccc;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.canvas-serial-btn-active {
|
|
|
|
|
background: #0e3a5a;
|
|
|
|
|
border-color: #007acc;
|
|
|
|
|
color: #4fc3f7;
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-05 08:05:23 +07:00
|
|
|
/* ── Component count ─────────────────────────────── */
|
|
|
|
|
.component-count {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 4px;
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
color: #666;
|
2026-03-03 10:20:49 +07:00
|
|
|
}
|
|
|
|
|
|
2026-03-05 08:05:23 +07:00
|
|
|
/* ── Add Component button ────────────────────────── */
|
|
|
|
|
.add-component-btn {
|
2026-03-03 10:20:49 +07:00
|
|
|
display: flex;
|
2026-03-05 08:05:23 +07:00
|
|
|
align-items: center;
|
2026-03-03 10:20:49 +07:00
|
|
|
gap: 5px;
|
2026-03-05 08:05:23 +07:00
|
|
|
padding: 0 10px;
|
|
|
|
|
height: 32px;
|
|
|
|
|
background: #007acc;
|
|
|
|
|
color: #fff;
|
|
|
|
|
border: none;
|
|
|
|
|
border-radius: 5px;
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
transition: background 0.15s;
|
|
|
|
|
white-space: nowrap;
|
2026-03-03 10:20:49 +07:00
|
|
|
}
|
|
|
|
|
|
2026-03-05 08:05:23 +07:00
|
|
|
.add-component-btn:hover:not(:disabled) {
|
|
|
|
|
background: #1a8bd4;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.add-component-btn:disabled {
|
|
|
|
|
opacity: 0.35;
|
|
|
|
|
cursor: not-allowed;
|
2026-03-03 10:20:49 +07:00
|
|
|
}
|
|
|
|
|
|
2026-03-07 12:00:56 +07:00
|
|
|
/* ── Canvas content (viewport) ───────────────────── */
|
2026-03-05 08:05:23 +07:00
|
|
|
.canvas-content {
|
|
|
|
|
flex: 1;
|
|
|
|
|
position: relative;
|
2026-03-07 12:00:56 +07:00
|
|
|
overflow: hidden;
|
2026-03-05 08:05:23 +07:00
|
|
|
background-color: #1a1a1a;
|
|
|
|
|
background-image:
|
|
|
|
|
repeating-linear-gradient(0deg, transparent, transparent 19px, rgba(255,255,255,0.025) 19px, rgba(255,255,255,0.025) 20px),
|
|
|
|
|
repeating-linear-gradient(90deg, transparent, transparent 19px, rgba(255,255,255,0.025) 19px, rgba(255,255,255,0.025) 20px);
|
2026-03-07 12:00:56 +07:00
|
|
|
user-select: none;
|
2026-03-11 09:38:15 +07:00
|
|
|
touch-action: none; /* Disable browser scroll/zoom so JS handlers take full control */
|
2026-03-07 12:00:56 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* ── Infinite canvas world ───────────────────────── */
|
|
|
|
|
.canvas-world {
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 0;
|
|
|
|
|
left: 0;
|
|
|
|
|
transform-origin: 0 0;
|
2026-03-07 12:17:22 +07:00
|
|
|
width: 4000px;
|
|
|
|
|
height: 3000px;
|
2026-03-03 10:20:49 +07:00
|
|
|
}
|
|
|
|
|
|
2026-03-05 08:05:23 +07:00
|
|
|
/* ── Components area ─────────────────────────────── */
|
2026-03-03 10:20:49 +07:00
|
|
|
.components-area {
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 0;
|
|
|
|
|
left: 0;
|
|
|
|
|
right: 0;
|
|
|
|
|
bottom: 0;
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-07 12:00:56 +07:00
|
|
|
/* ── Zoom controls ───────────────────────────────── */
|
|
|
|
|
.zoom-controls {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 2px;
|
|
|
|
|
background: #1e1e1e;
|
|
|
|
|
border: 1px solid #3a3a3a;
|
|
|
|
|
border-radius: 5px;
|
|
|
|
|
padding: 0 2px;
|
|
|
|
|
height: 28px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.zoom-btn {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
width: 24px;
|
|
|
|
|
height: 24px;
|
|
|
|
|
background: transparent;
|
|
|
|
|
border: none;
|
|
|
|
|
border-radius: 3px;
|
|
|
|
|
color: #9d9d9d;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.zoom-btn:hover {
|
|
|
|
|
background: #3a3a3a;
|
|
|
|
|
color: #ccc;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.zoom-level {
|
|
|
|
|
min-width: 42px;
|
|
|
|
|
text-align: center;
|
|
|
|
|
background: transparent;
|
|
|
|
|
border: none;
|
|
|
|
|
color: #9d9d9d;
|
|
|
|
|
font-size: 11px;
|
|
|
|
|
font-family: monospace;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
padding: 0 2px;
|
|
|
|
|
border-radius: 3px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.zoom-level:hover {
|
|
|
|
|
background: #3a3a3a;
|
|
|
|
|
color: #ccc;
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-03 10:20:49 +07:00
|
|
|
.component-label {
|
|
|
|
|
font-size: 11px;
|
2026-03-05 08:05:23 +07:00
|
|
|
background-color: #252526;
|
2026-03-03 10:20:49 +07:00
|
|
|
padding: 3px 8px;
|
|
|
|
|
border-radius: 3px;
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
margin-top: 5px;
|
|
|
|
|
text-align: center;
|
2026-03-05 08:05:23 +07:00
|
|
|
color: #aaa;
|
2026-03-03 10:20:49 +07:00
|
|
|
}
|
2026-03-25 10:08:46 +07:00
|
|
|
|
|
|
|
|
/* ── Wire creation mode banner ──────────────────── */
|
|
|
|
|
.wire-mode-banner {
|
|
|
|
|
position: absolute;
|
|
|
|
|
bottom: 12px;
|
|
|
|
|
left: 50%;
|
|
|
|
|
transform: translateX(-50%);
|
|
|
|
|
z-index: 100;
|
|
|
|
|
background: rgba(0, 122, 204, 0.92);
|
|
|
|
|
color: #fff;
|
|
|
|
|
padding: 8px 16px;
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 12px;
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
|
|
|
|
|
backdrop-filter: blur(4px);
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
pointer-events: auto;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.wire-mode-banner button {
|
|
|
|
|
background: rgba(255, 255, 255, 0.2);
|
|
|
|
|
color: #fff;
|
|
|
|
|
border: 1px solid rgba(255, 255, 255, 0.4);
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
padding: 4px 14px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
transition: background 0.15s;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.wire-mode-banner button:hover {
|
|
|
|
|
background: rgba(255, 255, 255, 0.35);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* ── Mobile-friendly adjustments ────────────────── */
|
|
|
|
|
@media (max-width: 768px) {
|
|
|
|
|
.canvas-header {
|
|
|
|
|
height: 42px;
|
|
|
|
|
padding: 0 6px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.canvas-header-left,
|
|
|
|
|
.canvas-header-right {
|
|
|
|
|
gap: 4px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.canvas-serial-btn {
|
|
|
|
|
padding: 0 6px;
|
|
|
|
|
font-size: 0; /* hide text, show icon only */
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.canvas-serial-btn svg {
|
|
|
|
|
width: 18px;
|
|
|
|
|
height: 18px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.add-component-btn {
|
|
|
|
|
padding: 0 8px;
|
|
|
|
|
font-size: 0; /* hide text, show icon only */
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.add-component-btn svg {
|
|
|
|
|
width: 18px;
|
|
|
|
|
height: 18px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.board-selector {
|
|
|
|
|
font-size: 11px;
|
|
|
|
|
max-width: 90px;
|
|
|
|
|
padding: 4px 20px 4px 6px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.zoom-controls {
|
|
|
|
|
display: none; /* Use pinch-to-zoom on mobile */
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.component-count {
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.wire-mode-banner {
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
padding: 6px 12px;
|
|
|
|
|
gap: 8px;
|
|
|
|
|
bottom: 8px;
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-04-01 06:53:56 +07:00
|
|
|
|
|
|
|
|
/* ── WiFi / BLE status badges ─────────────────────────────────────────── */
|
|
|
|
|
.canvas-wifi-badge,
|
|
|
|
|
.canvas-ble-badge {
|
|
|
|
|
display: inline-flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
padding: 2px 6px;
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
cursor: default;
|
|
|
|
|
vertical-align: middle;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.canvas-wifi-badge svg,
|
|
|
|
|
.canvas-ble-badge svg {
|
|
|
|
|
display: block;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* WiFi status colours */
|
|
|
|
|
.canvas-wifi-initializing { color: #f59e0b; }
|
|
|
|
|
.canvas-wifi-connected { color: #f59e0b; }
|
|
|
|
|
.canvas-wifi-got_ip { color: #22c55e; }
|
|
|
|
|
.canvas-wifi-disconnected { color: #6b7280; }
|
|
|
|
|
|
2026-04-02 08:41:52 +07:00
|
|
|
.canvas-wifi-clickable {
|
|
|
|
|
cursor: pointer !important;
|
|
|
|
|
transition: transform 0.2s, filter 0.2s;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.canvas-wifi-clickable:hover {
|
|
|
|
|
transform: scale(1.15);
|
|
|
|
|
filter: drop-shadow(0 0 5px currentColor);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.canvas-wifi-clickable:active {
|
|
|
|
|
transform: scale(0.95);
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-01 06:53:56 +07:00
|
|
|
/* BLE status colours */
|
|
|
|
|
.canvas-ble-initialized { color: #3b82f6; }
|
|
|
|
|
.canvas-ble-advertising { color: #6366f1; }
|