:root {
    --cable-font-size: 16px; /* Font size for cable labels */
    --cable-label-color: #383532; /* Text color for cable labels */
    --cable-spacing: 24px; /* Spacing between cables */
    --cable-width: 10px; /* Width of cables */
    --circuit-border-color: #dac29b; /* Border color for circuit boxes */
    --circuit-color: #383532; /* Fill color for circuit boxes */
    --circuit-font-size: 48px; /* Font size for circuit labels */
    --circuit-description-font-size: 26px; /* Font size for circuit labels */
    --circuit-height: 700px; /* Height of circuit boxes */
    --circuit-input-label-color: #00d7fe; /* Text color for input labels */
    --circuit-label-color: #dac29b; /* Text color for circuit labels */
    --circuit-output-label-color: #ff7460; /* Text color for output labels */
    --circuit-width: 800px; /* Width of circuit boxes */
    --diagram-color: #252525; /* Background color of the diagram */
    --diagram-width: 4000px;
    --font-face: 'Verdana'; /* Font family for all text */
    --input-pin-label-offset: 10px; /* Offset for input pin labels */
    --lanes-offset: 100px; /* Offset for lanes */
    --output-pin-label-offset: 10px; /* Offset for output pin labels */
    --pin-font-size: 36px; /* Font size for pin labels */
    --pin-gap: 50px; /* Gap between pins */
}

body {
    font-family: Helvetica, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--diagram-color);
    color: var(--circuit-label-color);
}

a {
    color: var(--circuit-label-color);
}

header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 50px;
}

footer {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 50px;
}

footer p:after {
    content: "|";
    margin: 0 10px;
}

footer p:last-child:after {
    content: "";
    display: none;
}

.diagram-wrapper {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
}

.diagram-wrapper canvas {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}


/* File input button styling */
#patchFile {
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    z-index: -1;
}

#patchFile + label {
    font-size: 1em;
    font-weight: 600;
    color: var(--diagram-color);
    background-color: var(--circuit-label-color);
    display: inline-block;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

#patchFile + label:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

#patchFile + label:active {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transform: translateY(1px);
}

#patchFile + label svg {
    width: 1em;
    height: 1em;
    vertical-align: middle;
    fill: currentColor;
    margin-right: 0.5em;
}

#patchFile + label .file-name {
    margin-left: 0.5em;
}

/* Ensure the diagram div always fills its parent */
#diagram {
    width: 100%;
    height: 100%;
}

/* Styles for full-screen diagram mode */
body.diagram-mode .diagram-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
}

body.diagram-mode header,
body.diagram-mode footer {
    display: none;
}

body.diagram-mode {
    overflow: hidden;
}
