body {
    font-family: Arial, sans-serif;
    background: #1e1e1e;
    color: white;
    padding: 20px;
    touch-action: manipulation;
    transform: scale(1.5);
    transform-origin: top left;
    width: 65%;
}

a {
    color: #2196f3;
}

.container {
    margin: auto;
}

label {
    display: block;
    margin-top: 4px;
}

input, select {
    width: 100%;
    padding: 4px;
    margin-top: 4px;
    background: #444;
    color: white;
    border: 1px solid #666;
    border-radius: 4px;
    font-size: 14px;
}

select option {
    font-size: 20px;
}

#output {
    min-height: 1000px;
}


#tiers, #altInputs, #extractors, #coal_ratios, #nuclear_ratios {
    display: grid;
    justify-content: start;
    grid-template-columns: auto auto;
    gap: 0px 12px;
}

select {
    width: 200px;
}
input {
    width: 100px;
}
.alt-row {
    display: flex;
    flex-direction: column;
}

.buttons {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

button {
    padding: 10px 20px;
    cursor: pointer;
    background: #555;
    color: white;
    border: 1px solid #777;
    border-radius: 4px;
}

button:hover {
    background: #666;
}

pre {
    margin-top: 20px;
    background: #222;
    padding: 20px;
    white-space: pre-wrap;
    border-radius: 4px;
}

.alt-help {
    margin-top: -5px;
    margin-bottom: 15px;
    color: #bbb;
    font-size: 14px;
}

.tree {
    display: flex;
    flex-direction: column;
    gap: 24px;
}


details {
    margin: 0;
    padding: 0;
}

.indent_1, details details {
    border-left: 2px solid #444;
    padding-left: 12px;
}

.indent_1, .indent_2 {
    padding-right: 6px;
    vertical-align: middle;
    white-space: nowrap;
    line-height: 0;
}


.img {
    width: 20px;
    height: 20px;
}

.node {
    margin-left: 12px;
}

summary {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    white-space: nowrap;
    max-width: 100%;
    line-height: 0;
    margin: 0;
    padding: 0px 0px;
    cursor: pointer;
    list-style: none;
}

table {
    width: max-content;
    border-collapse: collapse;
    border-spacing: 0;
}


.collapsible > summary {
  cursor: pointer;
  font-weight: bold;
  display: flex;
  align-items: center;
}

.collapsible > summary::before {
  content: "▷";
  margin-right: 10px;
  transition: transform 0.2s ease;
}

.collapsible[open] > summary::before {
  transform: rotate(90deg);
}




.checkbox-container {
    display: block;
    position: relative;
    line-height: 20px;
    padding-left: 25px;
    margin: 2px 40px 4px 0;
    user-select: none;
    color: #ffffff;
    cursor: pointer; /* important: label is what you hover */
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    border-radius: 6px;
    background-color: #2e2e2e;
}

.checkbox-container:hover input ~ .checkmark {
    background-color: #3e3e3e;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: #2196f3;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

/* the “tick” */
.checkbox-container .checkmark:after {
    left: 7px;
    top: 3px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}


.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.fake-select {
    position: relative;
    margin-bottom: 5px;
}
.fake-select.small {
    width: 150px;
}

.fake-select.large {
    width: 200px;
}

/* Make the fake “selected” control look like your other buttons,
   but without forcing button width/height. */
.fake-select .selected {
    width: 100%;
    height: 25px;
    margin-bottom: 0;              /* avoids double spacing inside container */
    display: flex;
    align-items: center;        /* vertical */
    font-size: 14px;
    gap: 8px;
}
.fake-select.small .selected {
    justify-content: center;    /* horizontal */
}


/* icons inside dropdown + selected */
.fake-select img {
    width: 20px;
    height: 20px;
}

/* dropdown panel */
.fake-select .options {
    display: none;
    position: absolute;
    width: 100%;
    margin-top: 4px;

    background: #1e1e1e;
    border: 1px solid #6b6b6b;
    border-radius: 8px;

    max-height: 300px;
    overflow-y: auto;
    z-index: 10;

    color: #ffffff;
    font-size: 14px;
}

.fake-select.open .options {
    display: block;
}

.fake-select .option {
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.fake-select .option:hover {
    background: #3e3e3e;
}

/* scrollbar for the custom dropdown */
.fake-select .options::-webkit-scrollbar { width: 8px; }
.fake-select .options::-webkit-scrollbar-track {
    background: #2e2e2e;
    border-radius: 6px;
}
.fake-select .options::-webkit-scrollbar-thumb {
    background: #ffffff;
    border-radius: 6px;
}

/* Firefox only */
@supports (-moz-appearance: none) {
    .fake-select .options {
        scrollbar-width: thin;
        scrollbar-color: #ffffff #2e2e2e;
    }
}