#slider-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
    width: 100%;
}

#slider-values {
    display: flex;
    justify-content: space-between; /* Keep min and max at the edges */
    width: 50%; /* Slightly larger than the slider's width */
    margin-bottom: 10px;
}

#rbslider {
    width: 50%;
    margin: 0 auto;
    height: 10px;
}

.value-box {
    font-family: 'Georgia', serif;
    font-size: 16px;
    color: #d4af37;
    text-shadow: 1px 1px 2px #000;
    padding: 5px 10px;
    border: 2px solid #d4af37;
    border-radius: 0;
    background: linear-gradient(145deg, #3e3e3e, #1a1a1a);
    box-shadow: none;
    text-align: center;
    width: auto;
}

/* --- Mobile-only level inputs --- */
#mobile-level-inputs {
    display: none; /* default hidden; shown on phones */
    align-items: center;
    gap: 8px;
    margin: 6px 0 10px;
}

#mobile-level-inputs input {
    width: 88px;
    max-width: 28vw;
    text-align: center;
    font-family: 'Georgia', serif;
    font-size: 16px;
    color: #d4af37;
    background: linear-gradient(145deg, #3e3e3e, #1a1a1a);
    border: 2px solid #d4af37;
    border-radius: 0;
    padding: 5px 8px;
    outline: none;
}

#mobile-level-inputs .level-sep {
    color: #d4af37;
    user-select: none;
}

/* Phone breakpoint: show inputs, hide slider, hide min/max boxes, tighten widths */
@media (max-width: 576px) {
    #slider-values { display: none; }  /* hide the two boxes */
    #rbslider { display: none; }

    #mobile-level-inputs {
        display: flex;
        width: min(360px, 86vw);
        justify-content: center;
    }
}

/* Desktop/tablet: keep slider visible */
@media (min-width: 577px) {
    #mobile-level-inputs { display: none; }
}

/* Keep existing noUiSlider styles */
.noUi-connect { background: rgb(173, 216, 230); transition: background 0.3s ease; }
#rbslider .noUi-connect { background: linear-gradient(145deg, #3e3e3e, #1a1a1a) !important; border-radius: 6px; height: 12px; }
#rbslider .noUi-handle { width: 20px !important; height: 20px !important; background: #555 !important; border: 2px solid #d4af37 !important; border-radius: 4px !important; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important; cursor: pointer !important; transform: translateX(-50%) !important; }
#rbslider .noUi-handle:before,
#rbslider .noUi-handle:after { content: none !important; display: none !important; }
#rbslider .noUi-handle:last-child { right: 0 !important; transform: translateX(50%) !important; }

.slider { width: 100%; height: 12px; background: #ccc; position: relative; border-radius: 6px; box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2); }
#rbslider .slider-handle { width: 20px; height: 20px; background: #555; position: absolute; top: 50%; transform: translate(-50%, -50%); border-radius: 4px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 10px 2px rgba(0, 0, 0, 0.5); cursor: pointer; animation: dark-pulsating-aura 2s infinite; }
#rbslider { box-shadow: 0 0 10px 2px rgba(0, 0, 0, 0.5); animation: dark-pulsating-aura 2s infinite; }
.value-box, #rbslider .noUi-handle { box-shadow: 0 0 10px 2px rgba(0, 0, 0, 0.5); animation: dark-pulsating-aura 2s infinite; }