body {
    font-family: sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #f0f0f0;
    margin: 0;
    padding: 20px;
}

h1, h2 {
    color: #333;
}

#player-info {
    background-color: #e0f2fe;
    padding: 10px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    width: 90%;
    max-width: 800px;
    text-align: center;
    border: 1px solid #60a5fa;
}

#player-info h2 {
    margin-top: 0;
    margin-bottom: 5px;
    color: #1e3a8a;
}

#player-money, #player-points {
    font-weight: bold;
    font-size: 1.1em;
}

#betting-area, #results-area, #ability-area {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    width: 90%;
    max-width: 800px;
    text-align: center;
}

#betting-area label, #betting-area select, #betting-area input, #betting-area button, #ability-area button {
    margin: 5px;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

#betting-area button {
    background-color: #28a745;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#betting-area button:hover {
    background-color: #218838;
}

#betting-area button:disabled, #ability-area button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    color: #666;
}

#ability-area button {
    background-color: #007bff;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin: 5px 10px;
}

#ability-area button:hover:not(:disabled) {
    background-color: #0056b3;
}

#ability-info {
    font-size: 0.9em;
    color: #666;
    min-height: 1.2em;
    margin-top: 10px;
}

#race-track-container {
    width: 90%;
    max-width: 1000px;
    background-color: #8B4513;
    border: 5px solid #5a2d0c;
    padding: 20px 10px;
    box-sizing: border-box;
    margin-bottom: 20px;
    overflow: hidden;
    border-radius: 5px;
}

#race-track {
    position: relative; 
    width: 100%;
    height: 400px; 
    background: repeating-linear-gradient(
        to bottom,
        #6abf69, 
        #6abf69 78px, 
        #5a2d0c 78px, 
        #5a2d0c 80px 
    );
}

.lane {
    height: 80px; 
    position: relative; 
    box-sizing: border-box;
}

.lane:last-child {
    border-bottom: none;
}

.horse {
    position: absolute;
    left: 10px; 
    bottom: 10px; 
    transition: left 0.1s linear; 
    will-change: left; 
}

#finish-line {
    position: absolute;
    right: 30px; 
    top: 0;
    bottom: 0;
    width: 10px; 
    background: repeating-linear-gradient(
        45deg,
        white,
        white 10px,
        black 10px,
        black 20px
    );
    border-left: 3px solid black;
    border-right: 3px solid black;
    z-index: 10; 
}

#status {
    font-weight: bold;
    min-height: 2em; 
}