/* Algemene stijl voor de body */
body {
    font-family: Arial, sans-serif;
    text-align: center;
    margin: 0;
    padding: 0;
    background-color: #f4e7c3; /* Woestijnkleur */
    background-size: cover; /* Zorg dat de afbeelding de volledige pagina bedekt */
    background-position: center; /* Plaats de afbeelding in het midden */
    background-repeat: no-repeat;
}

/* Titelstijl */
h1 {
    margin-top: 20px;
    color: #8d5524; /* Zandkleurig thema */
    text-shadow: 2px 2px 4px #000; /* Schaduw voor leesbaarheid */
}

/* Racebaan-stijl */
.race-track {
    position: relative;
    margin: 50px auto;
    width: 80%;
    height: 300px;
    background-image: url('../img/i4oi_1rjm_210426.jpg'); /* Woestijnachtergrond */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 2px solid #fff;
    border-radius: 10px; /* Ronde hoeken */
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); /* Subtiele schaduw rond de racebaan */
}

.race-track::before {
    content: "";
    position: absolute;
    top: 0;
    left: 90%; /* Finishlijn op 90% */
    width: 10px;
    height: 100%;
    background: #eab676;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.5); /* Optische schaduw */

}

/* Finishlijn */
.finish-line {
    position: absolute;
    top: 0;
    right: 92%; /* Plaats de lijn op 90% van rechts */
    width: 10px;
    height: 100%;
    background: repeating-linear-gradient(
        to bottom,
        black 0%,
        black 4%,
        white 4%,
        white 8%
    ); /* Zwart-wit geblokt patroon */
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.5); /* Optische schaduw */
}


/* Stijl voor de kamelen */
.camel {
    position: absolute;
    right: 5%;
    width: 50px;
    font-size: 3rem; /* Maak de kamelen groter */
}

.camel.animation {
    z-index: 2; /* Zorg dat ze boven de animaties staan */
    animation: camel-bounce 1s infinite; /* Subtiele bounce-animatie */
}

/* Animatie voor de kamelen */
@keyframes camel-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Posities voor de kamelen */
#camel1 { top: 3%;  }
#camel2 { top: 28%; }
#camel3 { top: 53%; }
#camel4 { top: 78%; }

/* De timer mooi maken */
#timer {
    font-size: 40px;
    font-weight: bold;
    color: #8b0000;
    text-shadow: 2px 2px #ffffff;
    margin: 20px;
    animation: countdown 0.5s ease-in-out infinite alternate; /* Gloweffect */
}

@keyframes countdown {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.1);
    }
}

/* Victory animatie */
@keyframes victory {
    0%, 100% {
        transform: scale(1) rotate(0);
    }
    50% {
        transform: scale(1.2) rotate(10deg);
    }
}

.camel.winner {
    animation: victory 0.5s ease-in-out infinite;
    font-size: 60px;
    color: gold;
}

/* Stijl voor de overwinningstekst */
#winnerMessage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    font-weight: bold;
    color: gold;
    text-shadow: 2px 2px 5px #000;
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 10px;
    z-index: 1000;
    display: none; /* Begin verborgen */
}

/* Klasse om het zichtbaar te maken */
#winnerMessage.show {
    display: block;
    animation: fadeIn 1s ease-in-out;
}

/* Fade-in animatie */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

#scoreboard {
    position: absolute;
    top: 10px;
    width: 100%;
    display: flex;
    justify-content: space-around;
}

.score-column {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 15px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    text-align: center;
    min-width: 120px;
}

.score-column h2 {
    margin: 0;
    font-size: 18px;
    text-transform: uppercase;
}

.score-column ul {
    list-style: none;
    padding: 0;
}

.score-column li {
    font-size: 16px;
    margin: 5px 0;
}

#raceTimer {
    font-size: 30px;
    font-weight: bold;
    color: #ff4500; /* Oranje kleur voor zichtbaarheid */
    text-shadow: 2px 2px 4px #000;
    margin-top: 10px;
}



