body {
    font-family: 'Arial', sans-serif;
    background-color: #f0f0f0;
    margin: 0;
    padding: 0;
    /* Remove body padding */
    line-height: 1.3;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.breadboard {
    background-color: #e0e0e0;
    border: none;
    /* Remove border */
    border-radius: 0;
    /* Remove border radius */
    padding: 8px;
    /* Reduce padding */
    max-width: 100%;
    /* Full width */
    width: 100%;
    margin: 0 auto;
    box-shadow: none;
    /* Remove outer shadow */
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    padding-bottom: 35px;
    /* Add space for status bar */
}

h1 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
    font-size: 22px;
    text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.8);
}

h3 {
    margin-top: 0;
    margin-bottom: 8px;
    color: #444;
    font-size: 15px;
    border-bottom: 1px solid #aaa;
    padding-bottom: 3px;
}

/* Control section with registers and flags */
.control-section {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 10px;
    /* Slightly reduced */
    background-color: #f8f8f8;
    padding: 12px;
    border-radius: 8px;
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
}

.registers {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
}

.register {
    margin-bottom: 4px;
    display: flex;
    align-items: center;
}

.register label {
    font-weight: bold;
    width: 110px;
    display: inline-block;
    color: #333;
    cursor: help;
    font-size: 13px;
}

.register span {
    display: inline-block;
    font-family: 'Courier New', monospace;
    background-color: #000;
    color: #0f0;
    padding: 3px 6px;
    border-radius: 4px;
    min-width: 50px;
    text-align: center;
    font-size: 15px;
    border: 1px solid #444;
    letter-spacing: 1px;
    box-shadow: inset 0 0 5px rgba(0, 255, 0, 0.2);
}

/* Flags section */
.flags {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 10px;
    padding: 8px;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    margin-left: 10px;
}

.flag {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.flag label {
    font-weight: bold;
    margin-bottom: 4px;
    font-size: 13px;
    color: #333;
    cursor: help;
}

.led {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: #444;
    border: 2px solid #222;
    box-shadow: inset 0 0 3px rgba(255, 255, 255, 0.3);
    transition: all 0.15s ease;
}

.led.on {
    background-color: #f00;
    box-shadow: 0 0 10px #f00, inset 0 0 3px rgba(255, 255, 255, 0.8);
}

/* Switches section */
.switches-section {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    /* Slightly reduced */
    margin-bottom: 10px;
    /* Slightly reduced */
}

.data-switches {
    flex: 3;
    min-width: 300px;
    background-color: #ddd;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #ccc;
}

.switches {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 8px;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 6px;
}

.switch {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 3px;
}

.bit-label {
    margin-top: 3px;
    font-weight: bold;
    font-size: 13px;
}

.switch-input {
    display: none;
}

.switch-label {
    display: block;
    width: 30px;
    height: 60px;
    border-radius: 15px;
    position: relative;
    background-color: #888;
    cursor: pointer;
    box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.3);
}

.switch-label:before {
    content: '';
    display: block;
    position: absolute;
    width: 26px;
    height: 26px;
    top: 30px;
    left: 2px;
    background-color: #333;
    border-radius: 13px;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.switch-input:checked+.switch-label {
    background-color: #579;
}

.switch-input:checked+.switch-label:before {
    top: 4px;
    background-color: #fff;
}

.data-display {
    background-color: #000;
    color: #0f0;
    padding: 6px;
    text-align: center;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    margin-top: 10px;
    display: flex;
    justify-content: space-around;
    box-shadow: inset 0 0 10px rgba(0, 255, 0, 0.2);
    border: 1px solid #444;
}

.register-select,
.action-buttons {
    flex: 1;
    min-width: 200px;
    background-color: #ddd;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #ccc;
    display: flex;
    flex-direction: column;
}

/* Memory address controls */
.memory-address-controls {
    display: flex;
    flex-direction: column;
    margin-bottom: 8px;
    padding: 8px;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 6px;
}

.memory-address,
.memory-value {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
}

.memory-address label,
.memory-value label {
    font-weight: bold;
    width: 55px;
    color: #333;
    font-size: 13px;
}

.memory-address span,
.memory-value span {
    font-family: 'Courier New', monospace;
    background-color: #000;
    color: #0f0;
    padding: 3px 6px;
    border-radius: 4px;
    min-width: 50px;
    text-align: center;
    font-size: 15px;
    border: 1px solid #444;
    letter-spacing: 1px;
    box-shadow: inset 0 0 5px rgba(0, 255, 0, 0.2);
    flex-grow: 1;
}

.address-buttons {
    display: flex;
    justify-content: space-between;
    margin: 6px 0;
}

.address-button {
    width: 36px;
    height: 36px;
    background-color: #579;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
}

.address-button:hover {
    background-color: #468;
    transform: translateY(-2px);
}

.address-button:active {
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
    transform: translateY(1px);
}

/* Memory navigation */
.memory-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 10px 0;
    gap: 8px;
}

.memory-navigation .action-button {
    margin: 0;
    padding: 2px 8px;
    font-size: 16px;
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.memory-navigation .nav-button {
    background-color: #579;
    width: 32px;
}

.memory-navigation .add-button {
    background-color: #5a5;
    font-weight: bold;
    font-size: 18px;
    width: 32px;
}

.memory-navigation .add-button:hover {
    background-color: #494;
}

.memory-navigation .remove-button {
    background-color: #a55;
    font-weight: bold;
    font-size: 18px;
    width: 32px;
}

.memory-navigation .remove-button:hover {
    background-color: #944;
}

.memory-navigation .remove-button:disabled {
    background-color: #caa;
    cursor: not-allowed;
}

#page-indicator {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    background-color: rgba(0, 0, 0, 0.05);
    padding: 4px 10px;
    border-radius: 4px;
    min-width: 100px;
    text-align: center;
}

/* Register selector buttons */
.reg-switches {
    display: flex;
    justify-content: space-around;
    margin-top: 12px;
}

.reg-switch {
    text-align: center;
}

.reg-switch input {
    display: none;
}

.reg-switch label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background-color: #888;
    color: white;
    border-radius: 6px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
}

.reg-switch input:checked+label {
    background-color: #579;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Action buttons */
.action-buttons {
    gap: 6px;
}

.action-button {
    padding: 8px 10px;
    background-color: #579;
    border: none;
    border-radius: 5px;
    color: white;
    font-weight: bold;
    font-size: 13px;
    cursor: pointer;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
    margin: 2px 0;
    width: 100%;
    text-align: center;
}

.action-button:disabled {
    background-color: #aaa;
    color: #ddd;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.action-button:disabled:hover {
    background-color: #aaa;
    transform: none;
}

/* Add button container for Execute All and Continue buttons */
.execution-button-container {
    position: relative;
    height: 40px;
    margin: 2px 0;
}

#execute-all-button,
#continue-button {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    transition: opacity 0.2s ease-in-out;
}

#continue-button {
    opacity: 0;
    pointer-events: none;
}

#continue-button.active {
    opacity: 1;
    pointer-events: auto;
}

#continue-button.active+#execute-all-button {
    opacity: 0;
    pointer-events: none;
}

/* Horizontal action buttons row */
.action-buttons-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    background-color: #ddd;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #ccc;
}

.action-buttons-row .action-button {
    flex: 1;
    min-width: 0;
    padding: 10px 0;
    font-size: 20px;
    /* Larger for emojis */
    margin: 0;
}

.action-buttons-row .execution-button-container {
    position: relative;
    flex: 1;
    height: auto;
    margin: 0;
}

/* Create a container for all the lower sections that can scroll */
.scrollable-sections {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    flex: 1;
    gap: 10px;
    /* Slightly reduced */
    padding-right: 3px;
    /* Reduced */
}

/* Memory display */
.memory-section {
    background-color: #f8f8f8;
    padding: 12px;
    border-radius: 8px;
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
}

.memory-display {
    font-family: 'Courier New', monospace;
    border: 1px solid #ccc;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    font-size: 13px;
    max-height: 300px;
    overflow-y: auto;
}

.memory-row {
    display: flex;
    border-bottom: 1px solid #ddd;
    height: 26px;
    align-items: center;
}

.memory-row:last-child {
    border-bottom: none;
}

.memory-row.header {
    background-color: #e0e0e0;
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 10;
    height: 24px;
    font-size: 12px;
}

.addr {
    width: 50px;
    padding: 3px;
    background-color: #eee;
    border-right: 1px solid #ccc;
    text-align: center;
    font-weight: bold;
    position: sticky;
    left: 0;
    z-index: 5;
}

.memory-row.header .addr {
    z-index: 15;
}

.mem-val {
    width: 28px;
    padding: 3px;
    text-align: center;
    transition: background-color 0.2s;
    cursor: pointer;
}

.mem-val:hover {
    background-color: #e5e5ff;
}

.mem-val.active {
    background-color: #ffd;
    font-weight: bold;
}

.mem-val.current {
    background-color: #ddf;
    font-weight: bold;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
}

.mem-val.breakpoint {
    background-color: #ff3333 !important;
    color: white !important;
    font-weight: bold;
    position: relative;
    box-shadow: inset 0 0 0 2px #f00, 0 0 6px #f00;
}

.mem-val.breakpoint:before {
    content: '•';
    position: absolute;
    color: yellow;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 18px;
    font-weight: bold;
    text-shadow: 0 0 3px #000;
}

.mem-val.breakpoint.active {
    background-color: #f00 !important;
    color: white !important;
    animation: breakpoint-pulse 1s infinite alternate;
}

@keyframes breakpoint-pulse {
    from {
        background-color: rgba(255, 0, 0, 0.8);
        box-shadow: inset 0 0 0 1px #f00, 0 0 5px #f00;
    }

    to {
        background-color: rgba(255, 0, 0, 1);
        box-shadow: inset 0 0 0 1px #f00, 0 0 10px #f00;
    }
}

.breakpoint-tag {
    display: inline-block;
    background-color: #f55;
    color: #fff;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    margin: 3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 1px solid #d33;
}

.breakpoint-tag:hover {
    background-color: #f33;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.breakpoint-tag:active {
    transform: translateY(0);
    background-color: #d00;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Memory instructions */
.memory-instructions {
    font-size: 0.8em;
    color: #555;
    margin-bottom: 8px;
    padding: 6px;
    background-color: #f0f0f0;
    border-radius: 4px;
    line-height: 1.3;
    border: 1px solid #ddd;
}

.key-instruction {
    background-color: #ddd;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    border: 1px solid #ccc;
    color: #333;
    white-space: nowrap;
    margin: 0 2px;
    font-weight: bold;
}

/* Breakpoint management panel */
.breakpoint-management {
    margin-top: 10px;
    padding: 8px;
    background-color: #f5f5f5;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.breakpoint-management h4 {
    margin-top: 0;
    margin-bottom: 6px;
    color: #444;
    font-size: 13px;
}

.active-breakpoints {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
    min-height: 26px;
}

.breakpoint-tag {
    display: inline-block;
    background-color: #f88;
    color: #700;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.breakpoint-tag:hover {
    background-color: #f66;
    transform: translateY(-2px);
}

.breakpoint-tag:active {
    transform: translateY(0);
}

#clear-breakpoints-button {
    background-color: #a55;
    margin-top: 5px;
    padding-left: 15px;
    padding-right: 15px;
}

#clear-breakpoints-button:hover {
    background-color: #933;
}

.no-breakpoints-msg {
    color: #888;
    font-style: italic;
    font-size: 0.9em;
    padding: 5px 0;
}

/* Program input section */
.program-section {
    background-color: #f8f8f8;
    padding: 12px;
    border-radius: 8px;
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
}

.program-instructions {
    color: #555;
    margin-bottom: 6px;
    font-style: italic;
    font-size: 0.85em;
}

.program-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 6px;
}

#program-input {
    width: 100%;
    height: 60px;
    margin: 6px 0;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    padding: 8px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: vertical;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

#program-input:focus {
    outline: none;
    border-color: #579;
    box-shadow: 0 0 5px rgba(87, 153, 170, 0.5), inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

#load-program {
    background-color: #579;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    float: right;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
}

#load-program:hover {
    background-color: #468;
    transform: translateY(-2px);
}

#load-program:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Debug console */
.debug-section {
    background-color: #f8f8f8;
    padding: 12px;
    border-radius: 8px;
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
}

#debug-console {
    background-color: #000;
    color: #0f0;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    padding: 10px;
    border-radius: 4px;
    height: 120px;
    overflow-y: scroll;
    white-space: pre-wrap;
    word-break: break-all;
    box-shadow: inset 0 0 15px rgba(0, 255, 0, 0.1);
    border: 1px solid #444;
}

#debug-console div {
    margin: 2px 0;
    line-height: 1.3;
    border-bottom: 1px dotted #333;
    padding-bottom: 2px;
}

.debug-actions {
    margin-bottom: 8px;
    display: flex;
    justify-content: flex-end;
}

#clear-console {
    background-color: #777;
    font-size: 13px;
    padding: 6px 12px;
    margin-bottom: 6px;
}

#clear-console:hover {
    background-color: #666;
}

debug-actions {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
}

/* Button animations */
@keyframes button-flash {
    0% {
        background-color: #579;
    }

    50% {
        background-color: #f88;
        box-shadow: 0 0 15px rgba(255, 100, 100, 0.8);
    }

    100% {
        background-color: #579;
    }
}

.button-flash {
    animation: button-flash 0.3s ease-in-out;
}

/* Special button styling */
#reset-button {
    background-color: #755;
}

#reset-button:hover {
    background-color: #644;
}

#execute-all-button {
    background-color: #4a6;
}

#execute-all-button:hover {
    background-color: #395;
}

#execute-button {
    background-color: #579;
}

#full-reset-button {
    background-color: #955;
}

#full-reset-button:hover {
    background-color: #844;
}

#dump-memory {
    background-color: #5a9;
}

#dump-memory:hover {
    background-color: #478;
}

#continue-button {
    background-color: #4a7;
    color: white;
    border-color: #295;
}

#continue-button:hover {
    background-color: #5b8;
}

#continue-button:active {
    background-color: #396;
}

/* Version display */
.version {
    font-size: 14px;
    font-weight: normal;
    color: #666;
    vertical-align: middle;
    background-color: #ddd;
    padding: 2px 6px;
    border-radius: 10px;
}

/* Footer styles */
.footer-section {
    margin-top: 10px;
    /* Reduced */
    text-align: center;
    padding: 8px 0;
    /* Reduced */
    border-top: 1px solid #ccc;
    color: #666;
    font-size: 12px;
    margin-bottom: 30px;
    /* Make room for status bar */
}

.footer-section a {
    color: #579;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: #357;
    text-decoration: underline;
}

.emoji-separator {
    margin: 0 5px;
    display: inline-block;
}

/* Responsive design - update for better flexibility */
@media (max-width: 1000px) {
    .switches-section {
        flex-direction: column;
    }

    .control-section {
        flex-direction: column;
    }

    .flags {
        margin-left: 0;
        margin-top: 10px;
        justify-content: space-around;
    }

    .register-select,
    .action-buttons,
    .data-switches {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .breadboard {
        padding: 5px;
        /* Further reduced padding on smaller screens */
    }

    .switches {
        flex-wrap: wrap;
        justify-content: center;
    }

    .switch {
        margin: 3px 6px;
    }

    .memory-row .mem-val {
        padding: 3px 2px;
        width: 24px;
        font-size: 11px;
    }

    .scrollable-sections {
        max-height: 70vh;
    }

    .action-buttons-row {
        flex-wrap: wrap;
    }

    .action-buttons-row .action-button,
    .action-buttons-row .execution-button-container {
        flex-basis: calc(33.3% - 10px);
    }
}

@media (max-width: 480px) {

    .action-buttons-row .action-button,
    .action-buttons-row .execution-button-container {
        flex-basis: calc(50% - 10px);
    }
}

/* Add a class for the memory scroll container to allow easy max-height adjustments */
.memory-scroll-container {
    max-height: 300px;
    overflow-y: auto;
}

/* Custom tooltip styling */
.custom-tooltip {
    position: absolute;
    z-index: 100;
    background-color: #333;
    color: #fff;
    padding: 6px 10px;
    border-radius: 5px;
    font-family: 'Arial', sans-serif;
    font-size: 13px;
    max-width: 280px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    transition: opacity 0.2s;
    border: 1px solid #555;
    line-height: 1.3;
}

.custom-tooltip::after {
    content: '';
    position: absolute;
    top: -5px;
    left: 10px;
    width: 10px;
    height: 10px;
    background-color: #333;
    transform: rotate(45deg);
    border-top: 1px solid #555;
    border-left: 1px solid #555;
}

/* Slide-out panel styles */
.side-panel {
    position: fixed;
    top: 0;
    right: -320px;
    /* Start off-screen */
    width: 300px;
    height: calc(100vh - 30px);
    /* Subtract status bar height */
    background-color: #f5f5f5;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: right 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding-bottom: 30px;
    /* Add padding at the bottom for status bar */
}

.side-panel.open {
    right: 0;
}

/* Debug panel - positioned slightly lower so both panels can be open at once */
.side-panel.debug-panel {
    z-index: 999;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: #e0e0e0;
    border-bottom: 1px solid #ccc;
}

.panel-header h3 {
    margin: 0;
    font-size: 16px;
    border-bottom: none;
    padding-bottom: 0;
}

.close-panel-button {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #555;
    padding: 0 5px;
    margin: 0;
}

.close-panel-button:hover {
    color: #000;
}

.panel-content {
    padding: 15px;
    flex: 1;
}

.panel-toggle {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    background-color: #579;
    color: white;
    border: none;
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
    padding: 12px 10px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 999;
    transition: all 0.2s;
}

.panel-toggle:hover {
    background-color: #468;
    padding-right: 15px;
}

/* Position debug toggle button below breakpoint toggle */
.panel-toggle.debug-toggle {
    top: calc(50% + 60px);
    background-color: #5a9;
}

.panel-toggle.debug-toggle:hover {
    background-color: #478;
}

/* Position program toggle button below debug toggle */
.panel-toggle.program-toggle {
    top: calc(50% + 120px);
    background-color: #a57;
}

.panel-toggle.program-toggle:hover {
    background-color: #946;
}

.toggle-icon {
    font-size: 18px;
    display: block;
}

/* Debug console styling in panel */
.debug-panel .panel-content {
    padding: 10px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.debug-panel .debug-actions {
    margin-bottom: 8px;
    display: flex;
    justify-content: flex-end;
}

.debug-panel #debug-console {
    background-color: #000;
    color: #0f0;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    padding: 10px;
    border-radius: 4px;
    flex: 1;
    /* Take remaining space */
    overflow-y: scroll;
    white-space: pre-wrap;
    word-break: break-all;
    box-shadow: inset 0 0 15px rgba(0, 255, 0, 0.1);
    border: 1px solid #444;
}

.debug-panel #debug-console div {
    margin: 2px 0;
    line-height: 1.3;
    border-bottom: 1px dotted #333;
    padding-bottom: 2px;
}

.debug-panel #clear-console {
    background-color: #777;
    font-size: 13px;
    padding: 6px 12px;
    margin-bottom: 6px;
}

.debug-panel #clear-console:hover {
    background-color: #666;
}

/* Program panel styling */
.program-panel .panel-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.program-panel .program-instructions {
    color: #555;
    margin-bottom: 8px;
    font-style: italic;
    font-size: 0.85em;
}

.program-panel #program-input {
    width: 100%;
    height: 150px;
    /* Make it taller in the panel view */
    font-family: 'Courier New', monospace;
    font-size: 14px;
    padding: 8px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: vertical;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
    flex: 1;
}

.program-panel #program-input:focus {
    outline: none;
    border-color: #579;
    box-shadow: 0 0 5px rgba(87, 153, 170, 0.5), inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.program-panel .program-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.program-panel #load-program {
    background-color: #579;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
}

.program-panel #load-program:hover {
    background-color: #468;
    transform: translateY(-2px);
}

/* Responsive design adjustments */
@media (max-width: 480px) {
    .side-panel {
        width: 85%;
        right: -87%;
    }

    /* Position debug toggle when screen is small */
    .panel-toggle.debug-toggle {
        top: calc(50% + 50px);
    }

    .panel-toggle.program-toggle {
        top: calc(50% + 100px);
    }
}

/* Status bar */
.status-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    background-color: #222;
    /* Darker background */
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    font-size: 13px;
    z-index: 1001;
    /* Above slide-out panels */
    box-shadow: 0 -3px 10px rgba(0, 0, 0, 0.4);
    /* Enhanced shadow */
    border-top: 1px solid #444;
}

.status-indicator {
    display: flex;
    align-items: center;
    min-width: 100px;
    /* Increased from 80px */
}

.status-label {
    font-weight: bold;
}

.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #4a6;
    /* Green for ready */
    margin-right: 8px;
    box-shadow: 0 0 5px rgba(74, 170, 102, 0.8);
    /* Add glow */
}

.status-dot.running {
    background-color: #fb3;
    /* Yellow for running */
    box-shadow: 0 0 5px rgba(255, 187, 51, 0.8);
    /* Yellow glow */
}

.status-dot.paused {
    background-color: #f55;
    /* Red for paused at breakpoint */
    box-shadow: 0 0 5px rgba(255, 85, 85, 0.8);
    /* Red glow */
    animation: blink-status 1s infinite alternate;
}

.status-dot.error {
    background-color: #f33;
    /* Bright red for errors */
    box-shadow: 0 0 5px rgba(255, 51, 51, 0.8);
    /* Bright red glow */
}

.execution-time {
    color: #8cf;
    /* Light blue for timing info */
    margin-left: 10px;
    font-style: italic;
}

@keyframes blink-status {
    from {
        opacity: 0.6;
    }

    to {
        opacity: 1;
    }
}

.status-message {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
    font-family: 'Courier New', monospace;
    max-width: calc(100% - 100px);
    color: #bbb;
}