/* RACE UI STYLES */

/* HUD Container */
#race-hud {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Outfit', sans-serif;
    color: #FFF;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    pointer-events: none;
    display: none;
    z-index: 1000;
}

#race-status {
    font-size: 24px;
    color: #FFD700;
    margin-bottom: 10px;
}

#race-lobby-status {
    font-size: 20px;
    color: #EEE;
    margin-bottom: 15px;
    display: none;
}

#race-timer {
    font-size: 48px;
    font-weight: bold;
    color: white;
}

#race-lap {
    font-size: 20px;
}

#race-pos {
    font-size: 24px;
    margin-top: 5px;
}

#race-message {
    font-size: 18px;
    color: #AAA;
    margin-top: 10px;
}

/* Prompt Container (Join & Need Horse) */
.race-prompt {
    position: absolute;
    bottom: 25%;
    /* Raised slightly */
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 20, 20, 0.6);
    /* Glassmorphism Dark */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 12px 25px;
    border-radius: 20px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    /* Subtle Gold Border */
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    display: none;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: opacity 0.3s ease;
}

#race-join-prompt {
    border-color: rgba(255, 215, 0, 0.5);
    color: #FFD700;
}

#race-need-horse {
    border-color: rgba(255, 68, 68, 0.5);
    /* Red for warning */
    color: #FFAAAA;
}

/* Notifications */
.race-notification {
    position: absolute;
    top: 30%;
    /* Lowered from 40% */
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-family: 'Outfit', sans-serif;
    font-size: 32px;
    /* Slightly smaller for cleaner look */
    font-weight: bold;
    color: #FFD700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
    z-index: 1001;
    white-space: nowrap;
}

#race-leaderboard-live {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(0, 0, 0, 0.4);
    padding: 15px;
    border-radius: 12px;
    border-left: 3px solid #FFD700;
    min-width: 180px;
    pointer-events: none;
    z-index: 999;
}

.lb-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
}

.lb-me {
    color: #FFD700 !important;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

.lb-rank {
    width: 20px;
    opacity: 0.6;
}

.lb-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}

.lb-stat {
    font-size: 12px;
    opacity: 0.7;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}