.floating-label {
    padding: 0.2rem 0.5rem;
    position: absolute;
    font-size: 1.2rem;
    font-weight: bold;
    z-index: 10;
    display: none;
}

.left-label {
    top: -107px;
    left: -20px;
    background: #c2e7ff;
}

.right-label {
    top: -107px;
    right: -5px;
    background: #ffd99e;
}

.scale-container {
    position: relative;
    width: 300px;
    height: 200px;
    margin: auto;
    margin-bottom: 1rem;
}

.vertical-shape {
    width: 2px;
    height: 40px;
    background-color: grey;
    position: absolute;
    left: 50%;
    top: -80px;
    transform: translateX(-50%);
    z-index: 15;
}

.pivot {
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    width: 6px;
    height: 20px;
    background: #666;
}

.hand {
    position: absolute;
    bottom: 10px;
    width: 93px;
    /* height: 40px; */
    top: -32px;
    /* background-color: #888; */
    border-radius: 0px;
    z-index: 35;
    transform-origin: top center;
}

.handdot {
    position: absolute;
    bottom: 0px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: #303030;
    border-radius: 50%;
    z-index: 0;
}

.hand.left {
    left: 10px;
}

.hand.right {
    right: 10px;
}

.triangle-container {
    position: absolute;
    width: 60px;
    height: 40px;
    margin: 60px auto;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.triangle {
    /* width: 0;
    height: 0;
    border-left: 155px solid transparent;
    border-right: 155px solid transparent;
    border-bottom: 10px solid #848484;
    position: relative;
    top: 0;
    left: -125px;
    transform-origin: 50% 50%; */
    width: 240px;
    left: -91px;
    position: relative;
}

.circle-outer {
    position: absolute;
    top: 15%;
    left: 50%;
    transform: translate(-50%, -60%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #373737;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 5px #929292;
}

.base {
    position: relative;
    width: 352px;
    left: 50%;
    transform: translateX(-50%);
    /* max-width: 100%; */
    height: 270px;
    /* top: -120px; */
    /* background-color: #cccccc;
    border-radius: 25px; */
    /* margin: 85px auto -50px; */
    margin-top: 85px;
    margin-bottom: -50px;
    z-index: 20;
}

/* .base::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 10px;
    background-color: #999;
    transform: translateY(-50%);
} */

.base::after {
    content: "";
    position: absolute;
    top: -62px;
    z-index: 20;
    width: 110px;
    height: 270px;
    background: url(../img/scales-base.png) center/contain no-repeat;
    /* top: -40px; */
    left: 50%;
    /* width: 16px; */
    /* height: 40px; */
    /* background-color: #999; */
    transform: translateX(-50%);
    /* border-radius: 4px; */
}

.basesupport {
    position: absolute;
    top: -8px;
    left: 50%;
    width: 30px;
    height: 10px;
    background-color: #2c2020;
    transform: translateX(-50%);
    border-radius: 4px;
    z-index: 2;
}

.pad {
    position: absolute;
    bottom: -10px;
    width: 20px;
    height: 20px;
    background-color: #352a2a;
    border-radius: 50%;
}

.pad.left {
    left: 10px;
}

.pad.right {
    right: 10px;
}

.slider-container {
    position: relative;
    margin: 2rem auto;
    width: 500px;
    top: 200px;
    left: 50%;
    transform: translateX(-50%);
}

input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 12px;
    background: #ddd;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    margin-top: 1rem;
    /* Hide the slider visually but keep it functional */
    opacity: 0;
    position: absolute;
    z-index: -1;
    /* Move behind other elements */
}

input[type="range"]::-webkit-slider-thumb {
    position: relative;
    -webkit-appearance: none;
    appearance: none;
    width: 30px;
    height: 30px;
    background: white;
    border: 4px solid rgb(50, 170, 156);
    border-radius: 50%;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.3);
    transition: border 0.3s, background 0.3s;
    z-index: 10;
    /* ensure thumb is above other elements */
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: rgb(224, 191, 91);
}

.slider-tooltip {
    position: absolute;
    top: -25px;
    left: 0;
    transform: translateX(-50%);
    font-size: 1.25rem;
    font-weight: bold;
    pointer-events: none;
    transition: left 0.1s ease;
}

.x-label {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.2rem;
    color: #333;
}

.ticks {
    display: flex;
    justify-content: space-between;
    position: absolute;
    width: 100%;
    top: 17px;
    left: 2px;
    pointer-events: none;
    z-index: 1;
    /* Hide the ticks visually */
    opacity: 0;
}

.ticks span {
    width: 2px;
    height: 10px;
    background-color: #666;
    position: relative;
}

@media screen and (min-width: 815px) {
    .base::after {
        width: 143px;
        height: 354px;
        top: -71px;
    }
    .triangle {
        width: 316px;
        left: -129px;
    }
    .hand {
        width: 133px;
        top: -25px;
    }
    .hand.right {
    right: -46px;
}
.hand.left {
    left: -46px;
}
}