body {
    font-family: sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background-color: #f0f0f0;
}

#game-container {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    text-align: center;
    width: 300px;
}

h1 {
    margin-top: 0;
}

#guess-input {
    width: 80%;
    padding: 0.5rem;
    margin-top: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
}

#guess-button {
    width: 85%;
    padding: 0.6rem;
    margin-top: 1rem;
    border: none;
    border-radius: 5px;
    background-color: #007bff;
    color: white;
    font-size: 1rem;
    cursor: pointer;
}

#guess-button:hover {
    background-color: #0056b3;
}

#feedback-container {
    margin-top: 1.5rem;
    min-height: 50px;
}

#message {
    font-size: 1.1rem;
    font-weight: bold;
}

#gauge-container {
    width: 100%;
    background-color: #e9ecef;
    border-radius: 5px;
    margin-top: 1rem;
    height: 30px;
    overflow: hidden;
}

#gauge-bar {
    height: 100%;
    width: 0%; /* Initial width */
    background-color: #28a745;
    border-radius: 5px;
    transition: width 0.5s ease-in-out, background-color 0.5s ease-in-out;
}

#history-line-container {
    margin-top: 2rem;
    height: 50px;
    position: relative;
    width: 100%;
    padding: 10px 0;
}

#history-line {
    width: 100%;
    height: 3px;
    background-color: #ccc;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.guess-marker {
    position: absolute;
    bottom: 50%; /* Start just above the line */
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 10px solid #007bff; /* Arrow pointing down */
    transform: translateX(-50%); /* Center the marker */
    animation: rebound 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes rebound {
    0% {
        bottom: 100%; /* Start high above the line */
        opacity: 0;
    }
    25% {
        bottom: 50%; /* Hit the line */
        opacity: 1;
    }
    50% {
        bottom: 75%; /* Bounce up */
    }
    75% {
        bottom: 50%; /* Settle back down */
    }
    100% {
        bottom: 50%;
    }
}

#chart-container {
    margin-top: 1rem;
}

#distance-chart {
    width: 100%;
    height: 150px;
    border: 1px solid #ccc;
    border-radius: 5px;
}
