#hodge-container {
    display: flex;
    gap: 20px;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap; /* Ensures responsiveness for smaller screens */
}

#inputs {
    flex: 1;
    max-width: 45%;
    padding: 20px;
    border: 1px solid var(--border-color-1);
    border-radius: 10px;
    background-color: var(--body-section-2);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}
.input-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
  }
  
  .input-row label {
    width: 350px;      /* Fixed width for labels for alignment */
    max-width:40%;
    margin-right: 10px;
    padding-left: 10px;
    text-align: left; /* Right-align text in labels */
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
  }
  
  .input-row input[type="range"] {
    flex: 1;           /* Slider takes available space */
    max-width: 25%;
    margin-right: 10px;
  }
  
  .input-row input[type="number"] {
    width: 60px;       /* Fixed width for textbox */
    margin-left: 10px;
  }
  
  .input-row .hodge-input {
    margin-left: 10px;
  }

#diamond-box {
    flex: 1;
    max-width: 45%;
    padding: 20px;
    border: 1px solid var(--border-color-1);
    border-radius: 10px;
    background-color: var(--body-section-2);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.diamond-row {
    display: flex;
    justify-content: center;
}

.diamond-space {
    width: 1em; /* Matches the size of the number dynamically */
    height: 1em; /* Matches the size of the number dynamically */
}

.diamond-value {
    display: inline-block;
    min-width: 1.5em;
    min-height: 1em;
    margin: 0.25em; /* Adjusted for perfect alignment */
    text-align: center;
    padding: 0.5em;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 1.5em;
    background-color: var(--secondary-light);
    color: var(--header-text-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    line-height: 1.5;
}

#degree-toggles {
    margin-top: 10px;
    text-align: left;
}

.degree-toggle {
    margin-bottom: 10px;
}

.degree-toggle label {
    font-weight: bold;
    margin-right: 10px;
}

.hodge-input {
    color: var(--text-color);
    width: 50px;
    padding: 5px;
    font-size: 1rem;
    border: 1px solid var(--border-color-1);
    border-radius: 5px;
    background-color: var(--body-section-2);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.preset-button {
    background: var(--header-color-1);
    color: white;
    border: none;
    padding: 10px 20px;
    margin: 5px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.preset-button:hover {
    background: var(--hover-dark);
    transform: scale(1.02);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.preset-button:active {
    /* transform: scale(1.05); */
}

/* Additional Styling for Toggle Menu */
#toggle-menu {
    margin-bottom: 20px;
    text-align: center;
}

.toggle-button {
    background-color: var(--header-color-2);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 20px;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    margin: 5px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.toggle-button:hover {
    background-color: var(--hover-dark);
    transform: scale(1.02);
    /* color: var(--primary-dark); */
}

.toggle-button:active {
    /* transform: scale(0.95); */
}

#hodge-container {
    display: flex;
    gap: 20px;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap; /* Allows wrapping for small screens */
}


#diamond-container {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.how-does-it-work-div {
    margin-left: 100px;
    margin-right: 100px;
}

#diamond-container-twisted {
    display: flex;
    flex-direction: column-reverse; /* bottom row i+j=0 now appears at bottom */
    align-items: center;
}
/* alternate color for zero-valued Hodge cells when enabled */
.zero-alt-on .is-zero {
  color: var(--zero-highlight, #9aa0a6) !important; /* tweak variable/color as you like */
}
.zero-alt-on .is-zero { fill: var(--zero-highlight, #9aa0a6) !important; }
