body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background: radial-gradient(circle at center, #2e7d32, #1b5e20);
    color: white;
    overflow-x: hidden;
}

#topBar {
    display: flex;
    justify-content: space-between;
    padding: 10px 20px;
    background: #1b5e20;
    align-items: center;
}

#wallet {
    font-weight: bold;
    font-size: 18px;
}

#oddsBoard {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    flex-wrap: wrap;
}

.oddsCard {
    background: #ffffff;
    color: black;
    padding: 8px 14px;
    border-radius: 10px;
    font-weight: bold;
}

#timer {
    text-align: center;
    font-size: 22px;
    margin-top: 5px;
    color: #ffeb3b;
}

#commentary {
    text-align: center;
    font-style: italic;
    margin: 5px 0 15px 0;
    min-height: 24px;
}

#track {
    width: 95%;
    max-width: 1000px;
    height: 520px;
    margin: auto;
    position: relative;
    border: 6px solid white;
    border-radius: 10px;
    background: repeating-linear-gradient(
        to bottom,
        #43a047 0px,
        #43a047 60px,
        #2e7d32 60px,
        #2e7d32 120px
    );
    overflow: hidden;
}

#startGate {
    position: absolute;
    left: 0;
    width: 30px;
    top: 0;
    bottom: 0;
    background: #555;
    z-index: 5;
    transition: transform 1s ease;
}

.start-open {
    transform: translateX(-40px);
}

.finish-line {
    position: absolute;
    right: 80px;
    top: 0;
    bottom: 0;
    width: 10px;
    background: repeating-linear-gradient(
        45deg,
        #fff,
        #fff 10px,
        #000 10px,
        #000 20px
    );
}




.running {
    filter: blur(1.5px);
}

#winnerSpotlight {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 120px;
    background: radial-gradient(circle, rgba(255,255,0,0.7) 0%, transparent 70%);
    pointer-events: none;
}

#betSection {
    text-align: center;
    margin-top: 10px;
}

#betSection button {
    padding: 8px 14px;
    margin: 5px;
    border-radius: 20px;
    border: none;
    font-weight: bold;
    cursor: pointer;
}

#result {
    text-align: center;
    margin-top: 15px;
}


.horse {
    position: absolute;
    width: 90px;          /* controls horse size */
    height: 60px;         /* lane height */
    display: flex;
    align-items: center;
    transition: left 0.1s linear;
}

.horse-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.horse-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;   /* prevents distortion */
    pointer-events: none;
}

.horse-number {
    position: absolute;
    top: -8px;
    left: -20px;
    background: black;
    color: white;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 14px;
}
