#refreshMidiButton {
    font-size: 11px;
    background-color: #4a5568;
    color: white;
    padding: 2px 8px;
    border: none;
    border-radius: 3px;
    margin-left: 10px;
    cursor: pointer;
}

#refreshMidiButton:hover {
    background-color: #2d3748;
}/* Mode D Combined Layout - Special layout for showing both knobs and p5 */
.mode-d .dynamic-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mode-d .knob-rows-container {
    border-top: 1px solid #e2e8f0;
    padding-top: 20px;
}
/* General */
:root {
    --frame-padding: 20px;
    --bottom-padding: 80px; /* Space for Add button + margin */
    --knob-area-min-height: 120px; /* Ensure space for at least one row */
}

body {
  font-family: 'Inter', Arial, sans-serif;
  display: flex;
  flex-direction: column; /* Stack children vertically */
  align-items: center;    /* Center .frame and .site-footer horizontally */
  justify-content: flex-start; /* Align to top of viewport */
  min-height: 100vh;
  background-color: #f4f7f6; /* Lighter background */
  margin: 0;
  padding: var(--frame-padding) 0;
  box-sizing: border-box;
  gap: var(--frame-padding);
}

/* === RETRO HEADER === */
.site-header {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto 0 auto;
  background: #f7f7fa;
  padding: 18px 0 10px 0;
  box-shadow: none;
  border-radius: 12px 12px 0 0;
  display: flex;
  justify-content: center;
}
.retro-title {
  font-family: 'Press Start 2P', 'Roboto Mono', monospace, cursive;
  font-size: 1.5em;
  color: #232946;
  text-align: center;
  letter-spacing: 1px;
  margin: 0;
  text-shadow: none;
  user-select: none;
  font-weight: 400;
}


/* === FOOTER === */
.site-footer {
  display: block;
  width: 95%;           /* Match .frame width */
  max-width: 1400px;    /* Match .frame max-width */
  background: #f7f7fa;
  color: #232946;
  padding: 12px 0 8px 0;
  text-align: center;
  font-size: 1em;
  border-radius: 0 0 12px 12px;
  box-shadow: none;
  position: static;
  z-index: 10;
  margin: 0;
  box-sizing: border-box;
}

.footer-content {
  display: block;
  text-align: center;
  margin: 0 auto;
}
.footer-link {
  color: #f357a8;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.18s;
}
.footer-link:hover, .footer-link:focus {
  color: #fff;
  text-decoration: underline;
}
.footer-link-separator {
  color: #8d99ae;
  margin: 0 7px;
  font-size: 1.1em;
}

/* About page retro font (inlined for about.html as well) */
.about-header {
  font-size: 2.1em;
  font-weight: bold;
  margin-bottom: 32px;
  font-family: 'Press Start 2P', 'Roboto Mono', monospace, cursive;
  text-align: center;
}


.frame {
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* Content flows from top */
  width: 95%;
  max-width: 1400px; /* Wider for horizontal knobs */
  min-height: calc(90vh - (2 * var(--frame-padding)));
  padding: var(--frame-padding);
  padding-bottom: var(--bottom-padding); /* Reserve space at bottom */
  background-color: #ffffff;
  border-radius: 12px; /* Softer radius */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  position: relative; /* For absolute positioning inside */
  box-sizing: border-box;
  overflow: hidden; /* Prevent content spilling */
}

/* === VARIABLE COLOR HIGHLIGHTING === */
.variable-token, .variable-value {
  font-weight: 700;
  background: #fff;
  border-radius: 4px;
  padding: 0 2px;
  transition: background 0.2s;
  text-shadow: 0 1px 2px #fff, 0 0 2px #fff;
}
.variable-token {
  opacity: 0.97;
}
.variable-value {
  opacity: 1;
}


/* Knob color border for clarity */
.knob {
  border: 3px solid #888;
  box-shadow: 0 2px 8px 1px var(--knob-glow, #eee);
  background: var(--knob-bg, #f7f7f7);
  position: relative;
  transition: background 0.2s, border 0.2s, box-shadow 0.2s;
}
.knob-dot {
  background: var(--knob-dot, #222);
  border-radius: 50%;
  width: 14px;
  height: 14px;
  position: absolute;
  left: 50%;
  top: 18%;
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.variable-group-name {
  font-weight: 600;
  letter-spacing: 0.01em;
  opacity: 0.95;
  margin-top: 4px;
  margin-bottom: 2px;
}

/* === TOP BAR === */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
}

.button-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Buttons (General) */
button {
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
    border: none;
    border-radius: 6px; /* Consistent radius */
    color: white;
    padding: 8px 16px; /* Slightly more padding */
    font-size: 0.9em;
    font-weight: 500;
}
button:active {
    transform: scale(0.98);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.15);
}

/* Specific Button Styles */
.button-group.left button { background-color: #4a5568; }
.button-group.left button:hover { background-color: #2d3748; }

.button-group.right #randomizeButton { background-color: #4a5568; }
.button-group.right #randomizeButton:hover { background-color: #2d3748; }

/* Project Template Dropdown Button */
.gray-pill-button {
  background: #4a5568;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 18px;
  min-width: 140px;
  height: 40px;
  cursor: pointer;
  font-size: 1em;
  transition: background 0.15s, color 0.15s;
  outline: none;
  margin-left: 10px;
  margin-right: 0;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.gray-pill-button:hover, .gray-pill-button:focus {
  background: #2d3748;
  color: #fff;
}

/* Adjust spacing for Project Template button container */
.template-dropdown-container {
  display: inline-block;
  position: relative;
  margin-left: 10px;
  vertical-align: middle;
}

/* Move about-navbar higher to avoid overlap with buttons */
.about-navbar {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.top-bar {
  margin-top: 0;
}

.text-container.main-prompt .output-label {
  margin-top: 18px;
}

/* Reduce gap between left group buttons */
.button-group.left button {
  margin-right: 10px;
}
.button-group.left button:last-child {
  margin-right: 0;
}
.gray-pill-button:hover, .gray-pill-button:focus {
  background: #2d3748;
  color: #fff;
}

/* Dropdown Menu Styling */
#templateDropdownMenu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 4px 16px rgba(94,96,206,0.10);
  min-width: 230px;
  padding: 8px 0;
  z-index: 100;
  max-height: 50vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

#templateDropdownMenu::-webkit-scrollbar {
  width: 10px;
  background: #f4f7f6;
  border-radius: 8px;
}
#templateDropdownMenu::-webkit-scrollbar-thumb {
  background: #cbd5e0;
  border-radius: 8px;
}
#templateDropdownMenu .template-option {
  padding: 10px 22px;
  color: #333;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-size: 1em;
  cursor: pointer;
  transition: background 0.13s, color 0.13s;
}
#templateDropdownMenu .template-option:hover, #templateDropdownMenu .template-option.active {
  background: #e9eafc;
  color: #5e60ce;
}
#templateDropdownMenu .template-option:not(:last-child) {
  border-bottom: 1px solid #f0f0f0;
}


.mode-control { display: flex; align-items: center; gap: 10px; }
#modeToggleButton { background-color: #5a67d8; }
#modeToggleButton:hover { background-color: #434190; }
#modeDescription { font-size: 0.9em; color: #4a5568; font-weight: 500; }


/* === MAIN CONTENT AREA === */
.main-content-area {
    width: 100%;
    padding: 0 5%; /* Add horizontal padding */
    box-sizing: border-box;
    margin-bottom: 20px; /* Space before dynamic area */
}

.text-container.main-prompt {
    margin-bottom: 20px; /* Space before settings toggle */
}

.text-container label {
    font-weight: 600;
    margin-bottom: 6px;
    color: #334155; /* Darker label */
    font-size: 0.9em;
    display: block; /* Ensure labels are on their own line */
    text-align: left;
    width: 90%; /* Match input width */
    max-width: 800px;
    margin-left: auto; /* Center the label above the centered input */
    margin-right: auto;
}

.text-container label[for="outputText"] {
  font-weight: 500;
  margin-bottom: 4px;
  display: block;
}

#copyOutputButton {
  font-size: 0.95em;
  padding: 3px 12px;
  border-radius: 6px;
  border: none;
  background: #f3f3f3;
  color: #333;
  cursor: pointer;
  transition: background 0.2s;
  align-self: flex-end;
}

.output-label-row {
  width: 90%;
  max-width: 800px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  margin-top: 18px;
}

.output-label-row label.output-label {
  font-weight: 500;
  font-family: inherit;
  margin: 0;
  font-size: 1em;
}

.output-label-row label.output-label {
  font-weight: 500;
  font-family: inherit;
  margin: 0;
  font-size: 1em;
}

#copyOutputButton:hover, #copyOutputButton:focus {
  background: #ececec;
  color: #111;
  outline: none;
}

input[type="text"], .output-box {
  width: 90%; /* Relative width */
  max-width: 800px; /* Max width */
  padding: 10px 14px; /* Adjusted padding */
  font-size: 1em;
  font-family: 'Roboto Mono', monospace;
  text-align: left;
  margin-bottom: 15px;
  border: 1px solid #cbd5e0;
  border-radius: 5px;
  background-color: #f8fafc; /* Very light background */
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.03);
  display: block; /* Ensure they take block space */
  margin-left: auto; /* Center */
  margin-right: auto; /* Center */
  box-sizing: border-box;
}

.output-box {
  min-height: 40px;
  background-color: #eef2f7;
  white-space: pre-wrap;
  word-wrap: break-word;
  line-height: 1.45;
  color: #1e293b; /* Darker output text */
}


/* === SETTINGS AREA === */
.settings-toggle-button {
    display: block;
    margin: 15px auto; /* Center the toggle button */
    padding: 6px 12px;
    font-size: 0.85em;
    background-color: #e2e8f0;
    color: #4a5568;
    border: 1px solid #cbd5e0;
    cursor: pointer;
}
.settings-toggle-button:hover {
    background-color: #cbd5e0;
}

.settings-area {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0px; /* Padding controlled by transition */
    margin-top: 15px;
    box-sizing: border-box;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out, padding 0.4s ease-in-out;
}

.settings-area.collapsed {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-width: 0; /* Hide border when collapsed */
}

.settings-area.expanded {
    max-height: 600px; /* Adjust as needed, large enough for content */
    padding: 20px;
    border-width: 1px;
}

/* Styling for content within settings area */
.settings-area .negative-prompt-container,
.settings-area .dimension-pair,
.settings-area .additional-settings {
    margin-bottom: 15px;
    width: 100%; /* Take full width inside settings area */
    display: flex; /* Use flex for layout */
    box-sizing: border-box;
}
.settings-area .negative-prompt-container { flex-direction: column; align-items: center; }
.settings-area .dimension-pair { justify-content: space-around; }
.settings-area .additional-settings { flex-direction: column; align-items: center; gap: 15px; }

.settings-area .text-container { margin-top: 0; width: 100%; } /* Reset margin */
.settings-area input[type="text"],
.settings-area .output-box { width: 95%; max-width: 600px; } /* Adjust width inside settings */

.settings-area .setting-container { display: flex; flex-direction: column; align-items: center; }
.settings-area .dimension-pair .setting-container { width: 45%; }
.settings-area label { font-size: 0.85em; margin-bottom: 4px; }
.settings-area .setting-container input[type="text"] { width: 100%; max-width: 180px; font-size: 0.9em; padding: 6px 8px; }


/* === DYNAMIC CONTENT AREA === */
.dynamic-content {
    width: 100%;
    margin-top: 10px; /* Space below main content/settings */
    /* This area's height will depend on its content (knobs, editor, etc.) */
    min-height: var(--knob-area-min-height); /* Ensure minimum space */
    padding: 0 var(--frame-padding); /* Horizontal padding */
    box-sizing: border-box;
    position: relative; /* Context for potential absolute children */
}

/* Knob Container (Horizontal) */
.knob-rows-container {
  display: flex; /* Enable flexbox */
  flex-wrap: wrap; /* Allow items to wrap to next line */
  justify-content: center; /* Center knobs horizontally */
  align-items: flex-start; /* Align items to the top of each row */
  gap: 25px 20px; /* Row gap, Column gap */
  padding: 20px 0; /* Vertical padding */
  width: 100%;
  box-sizing: border-box;
  min-height: var(--knob-area-min-height); /* Minimum height */
}

.knob-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 auto; /* Don't grow/shrink, use base size */
  width: 100px; /* Fixed width for each knob container */
}

.knob {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), inset 0 1px 2px rgba(255,255,255,0.2);
  display: flex;
  justify-content: center;
  align-items: center;
  background-image: linear-gradient(to bottom, #e8e8e8, #bcbcbc);
  border: 1px solid #ababab;
  transition: opacity 0.2s ease, box-shadow 0.1s linear, transform 0.1s ease;
}
.knob:active {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15), inset 0 1px 3px rgba(0,0,0,0.2);
    cursor: grabbing;
}

/* Knob activity indicator */
.knob-active {
    box-shadow: 0 0 10px 3px rgba(90, 103, 216, 0.5);
    transform: scale(1.05);
}

/* MIDI indicator */
.midi-indicator {
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 0.7em;
    background-color: #4a5568;
    color: white;
    padding: 2px 4px;
    border-radius: 3px;
    pointer-events: none;
    z-index: 10;
}
.knob[data-locked="true"] {
    opacity: 0.6;
    cursor: not-allowed;
    background-image: linear-gradient(to bottom, #d8d8d8, #aaaaaa);
}
.knob[data-locked="true"]:active {
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), inset 0 1px 2px rgba(255,255,255,0.2);
}

.knob-dot {
  width: 7px;
  height: 7px;
  background-color: #2d3748;
  border-radius: 50%;
  position: absolute;
  top: 4px;
  transform-origin: center 19px; /* (48 / 2) - 5 */
  transform: rotate(0deg);
  box-shadow: 0 0 1px rgba(0,0,0,0.5);
}

.knob-value {
  width: 60px;
  text-align: center;
  margin-top: 6px;
  font-size: 0.8em;
  font-family: 'Roboto Mono', monospace;
  padding: 3px 4px;
  border: 1px solid #ccc;
  border-radius: 3px;
  background-color: #f1f5f9;
  color: #333;
  user-select: none;
}

.variable-group-name {
  margin-top: 4px;
  text-align: center;
  font-size: 0.75em;
  font-weight: 500;
  color: #555;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  cursor: default;
}

/* Mode C: Variable Editor Styles */
#variableListContainer {
  width: 95%;
  max-width: 900px;
  margin: 10px auto; /* Center in dynamic area */
  border: 1px solid #ccc;
  border-radius: 8px;
  overflow: hidden;
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  /* Ensure it's not absolutely positioned */
}

.variable-list-header { /* Added header style */
    display: flex;
    background-color: #f1f5f9;
    padding: 8px 15px;
    border-bottom: 1px solid #ccc;
    font-weight: 600;
    font-size: 0.9em;
    color: #4a5568;
}

.variable-list-header .variable-column { flex: 1.5; padding-right: 15px; }
.variable-list-header .value-column { flex: 2.5; }

.variable-list-content { /* Added content style */
    max-height: 400px; /* Limit height and allow scroll */
    overflow-y: auto;
}

.variable-row { display: flex; align-items: flex-start; padding: 12px 15px; border-bottom: 1px solid #eee; }
.variable-row:last-child { border-bottom: none; }
.variable-info-column { flex: 1.5; padding-right: 15px; display: flex; flex-direction: column; gap: 8px; }
.variable-info-column label { font-size: 0.8em; color: #718096; margin-bottom: 2px; display: block; }
.variable-info-column input[type="text"] { width: 100%; padding: 6px 8px; font-size: 0.9em; border: 1px solid #cbd5e0; border-radius: 4px; box-sizing: border-box; }
.variable-values-column { flex: 2.5; display: flex; flex-direction: column; gap: 8px; }
.value-entry { display: flex; align-items: center; gap: 5px; }
.value-entry input[type="text"] { flex-grow: 1; padding: 6px 8px; font-size: 0.9em; border: 1px solid #cbd5e0; border-radius: 4px; }
.value-entry .delete-value-button { padding: 3px 6px; font-size: 0.8em; background-color: #ef4444; color: white; border: none; border-radius: 3px; cursor: pointer; line-height: 1; flex-shrink: 0; }
.value-entry .delete-value-button:hover { background-color: #dc2626; }
.new-value-input { font-style: italic; color: #718096; padding: 6px 8px; font-size: 0.9em; border: 1px dashed #cbd5e0; border-radius: 4px; width: 100%; box-sizing: border-box; }


/* Mode D: P5 Editor Styles */
#p5-editor {
  width: 95%;
  max-width: 900px;
  margin: 10px auto; /* Center in dynamic area */
  display: none; /* Managed by JS */
  flex-direction: column;
  align-items: center;
}

.p5-label { /* Style for the editor label */
    font-weight: 600;
    margin-bottom: 8px;
    color: #334155;
    font-size: 1em;
    align-self: flex-start; /* Align label to left */
}

#p5-code {
    width: 100%;
    height: 350px; /* Increased height */
    resize: vertical;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.95em;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 12px; /* More padding */
    margin-bottom: 10px;
    box-sizing: border-box;
    background-color: #fdfdfe;
    color: #2d3748;
    line-height: 1.4;
}

.p5-controls { /* Container for buttons */
    display: flex;
    gap: 15px; /* Space between buttons */
    margin-bottom: 15px;
    align-self: flex-start; /* Align buttons left */
}

#runP5Button {
    padding: 10px 25px;
    font-size: 1em;
    background-color: #38a169; /* Green */
    color: white;
}
#runP5Button:hover { background-color: #2f855a; }

#stopP5Button { /* Style for Stop button */
    padding: 10px 25px;
    font-size: 1em;
    background-color: #c53030; /* Red */
    color: white;
}
#stopP5Button:hover { background-color: #9b2c2c; }

#p5ExamplesSelect {
    padding: 10px 15px;
    font-size: 1em;
    background-color: #4a5568;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}
#p5ExamplesSelect:hover {
    background-color: #2d3748;
}

#createRequiredVarsButton {
    padding: 10px 15px;
    font-size: 1em;
    background-color: #6b46c1; /* Purple */
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}
#createRequiredVarsButton:hover {
    background-color: #553c9a;
}


#p5-output {
    width: 100%;
    min-height: 100px;
    border: 1px dashed #cbd5e0; /* Softer border */
    border-radius: 5px;
    background-color: #f8fafc; /* Light background */
    margin-top: 10px;
    display: block; /* Keep as block for potential text content */
    overflow: auto;
    position: relative; /* Needed for p5 canvas positioning */
    box-sizing: border-box;
    padding: 10px; /* Add padding for text errors */
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9em;
    color: #e53e3e; /* Red for error text */
    white-space: pre-wrap; /* Wrap error text */
}

#p5-output canvas { /* Ensure canvas fits nicely */
    display: block; /* Remove extra space below canvas */
    max-width: 100%;
    height: auto; /* Maintain aspect ratio */
    margin: 0; /* Reset margin */
    padding: 0; /* Reset padding */
}


/* === FOOTER / ACTIONS === */
.add-variable-button {
  position: absolute; /* Position relative to .frame */
  bottom: 20px;
  right: 20px;
  background-color: #38a169;
  color: white;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  font-size: 24px;
  line-height: 45px; /* Adjust for font */
  padding: 0;
  text-align: center;
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
  z-index: 50; /* Ensure it's above knobs */
}
.add-variable-button:hover {
  background-color: #2f855a;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
  transform: scale(1.05);
}


/* Tooltip Styles */
.subtle-tooltip {
  position: absolute; /* Use absolute positioning */
  background-color: rgba(45, 55, 72, 0.95);
  color: white;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 0.85em;
  line-height: 1.3;
  z-index: 1000; /* High z-index */
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
  max-width: 280px;
  word-wrap: break-word;
  white-space: pre-line;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.subtle-tooltip.visible { opacity: 1; }

/* MIDI STATUS PANEL STYLING */
.midi-status-panel {
    margin-top: 15px;
    background-color: #2c2c2c;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 10px;
    font-family: 'Inter', sans-serif;
    color: #eee;
}

.midi-status-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #444;
}

.midi-status-header h3 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #fff;
}

.midi-status-description {
    font-size: 12px;
    color: #aaa;
    font-style: italic;
}

.midi-mappings-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 150px;
    overflow-y: auto;
}

.midi-mapping-entry {
    display: flex;
    align-items: center;
    padding: 5px 8px;
    background-color: #383838;
    border-radius: 4px;
    font-size: 13px;
}

.midi-mapping-entry.active {
    background-color: #454f6d;
    animation: pulse 0.5s ease-out;
}

.midi-cc-number {
    background-color: #5a67d8;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: bold;
    min-width: 30px;
    text-align: center;
    margin-right: 10px;
}

.midi-variable-name {
    flex-grow: 1;
    font-weight: 500;
}

.midi-current-value {
    color: #ffcc00;
    font-family: 'Roboto Mono', monospace;
    font-size: 12px;
    margin-left: 10px;
    padding: 2px 8px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.no-mappings-message {
    color: #888;
    font-style: italic;
    text-align: center;
    padding: 10px;
}

@keyframes pulse {
    0% { background-color: #454f6d; }
    50% { background-color: #5a67d8; }
    100% { background-color: #454f6d; }
}

/* P5 CONSOLE STYLING */
#p5-console-container {
    margin-top: 10px;
    background-color: #1e1e1e;
    border: 1px solid #333;
    border-radius: 4px;
    font-family: 'Roboto Mono', monospace;
    max-height: 150px;
    display: flex;
    flex-direction: column;
}

.p5-console-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px;
    background-color: #2c2c2c;
    border-bottom: 1px solid #333;
    font-size: 12px;
    color: #ddd;
}

.p5-console-header button {
    background-color: #444;
    border: none;
    border-radius: 3px;
    color: #ddd;
    cursor: pointer;
    font-size: 11px;
    padding: 2px 8px;
}

.p5-console-header button:hover {
    background-color: #555;
}

.p5-console {
    overflow-y: auto;
    padding: 8px;
    color: #ddd;
    font-size: 12px;
    flex-grow: 1;
    max-height: 120px;
}

.p5-console .log {
    border-bottom: 1px dotted #333;
    padding: 4px 0;
    display: flex;
    align-items: flex-start;
    word-break: break-word;
}

.p5-console .log .timestamp {
    color: #777;
    padding-right: 8px;
    font-size: 10px;
    min-width: 70px;
}

.p5-console .error {
    color: #ff5555;
}

.p5-console .warn {
    color: #ffaa55;
}

.p5-console .info {
    color: #55aaff;
}