body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background-color: #333;
    color: #fff;
    padding: 1rem;
    text-align: center;
}

main {
    padding: 1rem;
    flex: 1;
}

section {
    margin-bottom: 1rem;
}

footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 0.5rem;
}

#race-track {
    position: relative;
}

#race-track img {
    max-width: 100%;
    height: auto;
    position: absolute; /* Ensure images are positioned absolutely */
}

th {
    text-align: left;
}

tr {
    height: 40px;
}

.name {
    padding-right: 30px;
    display: flex;
    align-items: center; /* Center text vertically */
}

.leaderboard-img {
    width: 30px;
    height: 30px;
}

#position-header {
    width: auto;
}

#name-header {
    width: auto;
    padding-right: 80px;
}

#speed-header {
    width: auto;
    padding-right: 60px;
}

#distance-header {
    width: auto;
    padding-right: 40px;

}

#time-header {
    width: auto;
}

.race-sippyPup {
    width: 5vh;
    height: 5vh;
    aspect-ratio: 1 / 1; /* Ensure square ratio */
}

.pup-container {
    height: 5vh;
    padding-bottom: 10px;
}

@keyframes moveUp {
    from {
        transform: translateY(0%);
    }
    to {
        transform: translateY(-100%);
    }
}

@keyframes moveDown {
    from {
        transform: translateY(0%);
    }
    to {
        transform: translateY(100%);
    }
}

@keyframes moveUpFromBottom {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0%);
    }
}

@keyframes moveDownFromTop {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0%);
    }
}

.position-changed {
    animation-duration: 0.25s;
    animation-timing-function: ease-in-out;
}

.position-changed.move-up {
    animation-name: moveUp;
}

.position-changed.move-down {
    animation-name: moveDown;
}

.position-changed.move-up-from-bottom {
    animation-name: moveUpFromBottom;
}

.position-changed.move-down-from-top {
    animation-name: moveDownFromTop;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    width: 500px; /* Increased width */
    text-align: center;
    position: relative;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}

.close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
    cursor: pointer;
}

.sippypup-buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.sippypup-button {
    border: none;
    background: none;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.2s ease;
}

.sippypup-button:hover {
    transform: scale(1.1);
}

.sippypup-button-img {
    width: 100px; /* Make buttons square */
    height: 100px; /* Make buttons square */
    object-fit: cover;
    border-radius: 10px; /* Rounded corners */
    border: 2px solid #ccc;
    transition: border-color 0.2s ease;
}

.sippypup-button:hover .sippypup-button-img {
    border-color: #007bff;
}

.sippypup-button:disabled {
    cursor: not-allowed;
    position: relative;
}

.sippypup-button:disabled::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: calc(100% - 10px); /* Adjust for padding */
    height: calc(100% - 10px); /* Adjust for padding */
    background: rgba(128, 128, 128, 0.75); /* Grey overlay */
    pointer-events: none;
    border-radius: 10px; /* Match button's rounded corners */
    margin: 5px; /* Match padding */
}

.tables-container {
    display: flex;
    gap: 20px; /* Add spacing between the tables */
}

.tables-container table {
    border-collapse: collapse;
    width: auto; /* Adjust table width as needed */
}

.position {
    font-weight: bolder;
    font-size: xx-large;
    padding-left: 10px;
    font-family: 'Courier New'; /* Use Mario Party font */
}

.position.gold {
    color: gold;
    -webkit-text-stroke: 1.5px black; /* Add a black outline to the text for supported browsers */

}

.position.silver {
    color: silver;
    -webkit-text-stroke: 1.5px black; /* Add a black outline to the text for supported browsers */

}

.position.bronze {
    color: burlywood;
    -webkit-text-stroke: 1.5px black; /* Add a black outline to the text for supported browsers */

}