* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    /* Changed font color to black for all text */
    color: black;
}

/* Added brown text class for specific elements */
.brown-text {
    color: #8B4513; /* Changed to dark brown as requested */
}

/* Added black text class for the elements that need to be black */
.black-text {
    color: black;
}

.container {
    max-width: 1000px;
    margin: 20px auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Added style for the title */
.simulation-title {
    text-align: center;
    margin-bottom: 20px;
    font-size: 24px;
    color: black;
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px;
    background-color: #f0f0f0;
    border-radius: 5px;
}

.slider-container {
    flex: 1;
    margin-right: 20px;
}

.slider {
    width: 100%;
    height: 15px;
    border-radius: 5px;
    background: #d3d3d3;
    outline: none;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #2196F3;
    cursor: pointer;
}

.constants {
    display: flex;
    flex-direction: column;
    font-weight: bold;
}

.simulation-area {
    display: flex;
    margin-bottom: 20px;
    height: 400px;
}

.animation-container {
    flex: 1;
    position: relative;
    border: 1px solid #ccc;
    height: 100%;
    /* Changed background color to light yellow */
    background-color: lightyellow;
}

#ball {
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    /* Changed ball color to blue with 3D effect using gradients and box-shadow */
    background: radial-gradient(circle at 30% 30%, #6495ED, #0000CD);
    box-shadow: inset -3px -3px 5px rgba(0, 0, 0, 0.3), 2px 2px 5px rgba(0, 0, 0, 0.2);
    left: 50%;
    transform: translateX(-50%);
}

#floor {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 2px;
    background-color: #777;
}

/* Added floor label style */
#floor-label {
    position: absolute;
    bottom: 5px;
    right: 10px;
    font-weight: bold;
    font-size: 14px;
}

/* Modified height arrow style to be closer to the ball */
#height-arrow {
    position: absolute;
    width: 2px;
    background-color: purple;
    /* Modified position to be closer to the ball */
    left: calc(50% - 25px);
    bottom: 0;
    /* Arrow head */
    &::before, &::after {
        content: '';
        position: absolute;
        width: 8px;
        height: 2px;
        background-color: purple;
        top: 0;
    }
    &::before {
        transform: rotate(45deg);
        left: -3px;
    }
    &::after {
        transform: rotate(-45deg);
        left: -3px;
    }
}

#height-indicator {
    position: absolute;
    left: 10px;
    top: 10px;
    font-weight: bold;
}

.graph-container {
    flex: 1;
    border: 1px solid #ccc;
    margin-left: 20px;
    position: relative;
    background-color: #fff;
    padding: 10px;
    /* Added margin-right to shift the graph to the right */
    margin-right: 10px;
}

.graph-title {
    text-align: center;
    font-weight: bold;
    margin-bottom: 10px;
}

#graph {
    position: relative;
    height: 300px;
    /* Added left margin to shift the graph right */
    margin-left: 40px; /* Increased to prevent scale overlap with axes */
}

.axis-label {
    position: absolute;
    font-weight: bold;
}

.y-axis {
    transform: rotate(-90deg);
    left: -40px; /* Moved further left to avoid overlap with axis */
    top: 50%;
}

.x-axis {
    bottom: -25px;
    right: 10px;
}

/* Added style for axis scale markers */
.scale-marker {
    position: absolute;
    font-size: 10px;
    color: #555;
}

/* Modified legend to be vertical and centered right */
.legend {
    display: flex;
    flex-direction: column;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.7);
    padding: 5px;
    border-radius: 5px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.ke-color, .pe-color, .te-color {
    display: inline-block;
    width: 20px;
    height: 3px;
    margin-right: 5px;
}

.ke-color {
    background-color: red;
}

.pe-color {
    background-color: blue;
}

/* Added style for total energy line */
.te-color {
    background-color: green;
}

.button-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

button {
    padding: 10px 20px;
    margin: 0 10px;
    font-size: 16px;
    cursor: pointer;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #45a049;
}

.energy-values {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
}

.energy-value {
    display: flex;
    align-items: center;
}

.energy-value label {
    font-weight: bold;
    margin-right: 10px;
}

.value-box {
    padding: 8px 15px;
    background-color: white;
    border: 1px solid #ccc;
    min-width: 100px;
    text-align: center;
}