/* Zorg ervoor dat de body en html de juiste afmetingen hebben */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow-x: hidden; /* Voorkom horizontaal scrollen */
    background-color: #50E1EE; /* Achtergrondkleur voor de hele pagina */
}

/* Container die de gameachtergrond bevat */
.container {
    width: 100%;
    height: 1024px; /* Zet de hoogte in de container */
    margin: 0 auto; /* Centreert de container horizontaal */
    position: relative; /* Zorgt ervoor dat we de achtergronden kunnen positioneren */
    box-sizing: border-box;
    overflow: hidden; /* Zorgt ervoor dat de container geen scrollbars heeft */
}

/* De achtergrond die eindeloos beweegt */
.background {
    width: 2882px; /* Twee afbeeldingen van 1441px naast elkaar */
    height: 512px; /* De hoogte van de bovenste helft van de pagina */
    background-image: url('../images/achtergrond-flappy1.png'), url('../images/achtergrond-flappy2.png');
    background-size: 2882px 512px;
    position: absolute;
    top: -35px;
    left: 0;
    animation: moveBackground 17s linear infinite; /* Voeg animatie toe voor beweging */
}

/* Definieer de animatie voor de beweging */
@keyframes moveBackground {
    0% {
        background-position: 0 0; /* Startpositie (begin van de samengestelde afbeelding) */
    }
    50% {
        background-position: -1441px 0; /* Beweeg de achtergrond naar links, zodat de tweede afbeelding wordt weergegeven */
    }
    100% {
        background-position: -2882px 0; /* Verplaats de achtergrond verder, zodat de eerste afbeelding weer opkomt */
    }
}

.bird-body {
    width: 100%;
    height: 768px; /* De hoogte van de bovenste helft van de pagina */
    position: fixed;
    top: 0px;
    left: 0px;
    display: flex;
    justify-content: center; /* Centreer horizontaal */
    align-items: center; /* Centreer verticaal */
    pointer-events: none; /* Zorgt ervoor dat de vogel geen muisinteracties blokkeert */
    width: 50px; /* Breedte van de cirkel */
    height: 50px; /* Hoogte van de cirkel */
    background-color: #FBE83F; /* De kleur van de cirkel (geel in dit geval) */
    border-radius: 50%; /* Dit maakt de hoeken rond, waardoor het een cirkel wordt */
}
.bird-eye {
    width: 30px; /* Breedte van het oog */
    height: 20px; /* Hoogte van het oog */
    background-color: rgb(255, 255, 255); /* Kleur van het oog */
    border-radius: 50%; /* Maakt het oog rond */
    position: fixed;
    top: 10px; /* Plaats het oog iets naar beneden binnen de cirkel */
    left: 20px; /* Plaats het oog iets naar rechts binnen de cirkel */
    transform: rotate(30deg); /* Draai het oog een beetje voor een speels effect */
}
.bird-pupil {
    width: 10px; /* Breedte van de pupil */
    height: 10px; /* Hoogte van de pupil */
    background-color: rgb(0, 0, 0); /* Kleur van de pupil */
    border-radius: 50%; /* Maakt de pupil rond */
    position: fixed;
    top: 15px; /* Plaats de pupil iets naar beneden binnen het oog */
    left: 35px; /* Plaats de pupil iets naar rechts binnen het oog */
}
.bird-mouth {
    width: 0; 
    height: 0; 
    border-left: 15px solid transparent; /* Linkerzijde van de driehoek */
    border-right: 15px solid transparent; /* Rechterzijde van de driehoek */
    border-top: 15px solid orange; /* Bovenkant van de driehoek (de mond) */
    position: fixed;
    top: 30px; /* Plaats de mond iets naar beneden binnen de cirkel */
    left: 35px; /* Plaats de mond iets naar rechts binnen de cirkel */
    transform: rotate(45deg); /* Draai de mond een beetje voor een speels effect */
}
.bird-wing {
    width: 30px; /* Breedte van het oog */
    height: 20px; /* Hoogte van het oog */
    background-color: rgb(255, 255, 255); /* Kleur van het oog */
    border-radius: 50%; /* Maakt het oog rond */
    position: fixed;
    top: 15px; /* Plaats het oog iets naar beneden binnen de cirkel */
    left: -10px; /* Plaats het oog iets naar rechts binnen de cirkel */
}



@keyframes floatIdle {
    0% { transform: translateY(10px); }
    50% { transform: translateY(-25px); }
    100% { transform: translateY(10px); }
}

.flappy-bird {
    position: absolute;
    top: 200px; /* or whatever vertical position within the container */
    left: 46%;
    transform: translateX(-50%);
    z-index: 1000;
    animation: floatIdle 2s ease-in-out infinite;
    pointer-events: none;
}

.container {
    position: relative;
    /* ... other styles remain the same */
}


.no-float {
    animation: none !important;
}

.hitbox {
    position: absolute;
    top: -85px;       /* expand a bit above */
    left: -30px;      /* expand a bit left */
    width: calc(100% + 60px);  /* expand width by 20px */
    height: calc(100% + 125px); /* expand height by 40px */
    background-color: rgba(255, 0, 0, 0); /* semi-transparent for testing */
    pointer-events: none;
}


.pipe-pair {
    position: absolute;
    top: 0;
    left: 100%; /* Start off-screen right */
    width: 150px;
    height: 512px;
    overflow: visible;
}

.pipe {
    position: absolute;
    width: 80px;
    left: 25px; /* Center pipe inside 150px container */
    background-color: rgb(0, 220, 0);
}



.pipe.top {
    height: 200px; /* adjustable */
    top: 0;
    transform: rotate(0deg);
}

.pipe.bottom {
    height: 60px; /* adjustable */
    bottom: 35px;
}

/* pipe top "head" styling */
.pipe::before {
    content: "";
    position: absolute;
    width: 150px;
    height: 50px;
    background-color: rgb(0, 220, 0);
    border: 3px solid black;
    left: -35px;
    top: -50px;
}

/* Adjust ::before for top pipe */
.pipe.top::before {
    top: auto;
    bottom: -50px;
}

.menu-projecten{
width: 90px;
height: 100px;
position: absolute;
top: 375px;
left: 110%;
background-color: rgb(0, 220, 0);
border: black 3px solid;

}
.menu-overmij{
width: 90px;
height: 100px;
position: absolute;
top: 375px;
left: 70%;
background-color: rgb(0, 220, 0);
border: black 3px solid;
}
.menu-contacts{
width: 90px;
height: 100px;
position: absolute;
top: 375px;
left: 90%;
background-color: rgb(0, 220, 0);
border: black 3px solid;
}
.menu-projecten-top{
width: 150px;
height: 50px;
position: absolute;
top: -30px;
left: -30px;
background-color: rgb(0, 220, 0);
border: black 3px solid;
}
.menu-contacts-top{
width: 150px;
height: 50px;
position: absolute;
top: -30px;
left: -30px;
background-color: rgb(0, 220, 0);
border: black 3px solid;
}
.menu-overmij-top{
width: 150px;
height: 50px;
position: absolute;
top: -30px;
left: -30px;
background-color: rgb(0, 220, 0);
border: black 3px solid;
}

.menu-projecten-text,
.menu-contacts-text,
.menu-overmij-text {
    position: absolute;       /* Position relative to their container */
    top: 50%;                /* Vertically center */
    left: 50%;               /* Horizontally center */
    transform: translate(-50%, -50%); /* Center exactly */
    color: white;            /* Text color */
    font-weight: bold;
    font-size: 18px;
    font-family: Arial, sans-serif;
    pointer-events: none;    /* So text doesn’t block clicks on the pipe */
    user-select: none;       /* Prevent text selection */
    white-space: nowrap;     /* Prevent text from wrapping */
    z-index: 10;             /* Make sure text is above the pipe */
}

.menu-contacts-hitboxes, .menu-overmij-hitboxes, .menu-projecten-hitboxes {
    position: absolute;
    top: -70px; /* Adjust as needed to cover the area */
    left: -40px; /* Adjust as needed to cover the area */
    width: 150px;
    height: 150px;
    z-index: 5; /* Ensure hitboxes are above other elements */
}

#start-overlay {
  position: absolute;
  top:8%;
  left: 38%;
  width: 200px;
  height: 50px;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 20px 40px;
  border-radius: 10px;
  font-size: 24px;
  font-family: Arial, sans-serif;
  text-align: center;
  z-index: 2000;
  pointer-events: none;
  transition: opacity 0.3s ease;
  opacity: 1;
}
#start-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}
#score {
  position: absolute;
  top: 20px;
  left: 20px;
  font-family: Arial, sans-serif;
  font-size: 24px;
  color: rgb(0, 0, 0);
  z-index: 10000;
  user-select: none;
}
