body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background-color: black;
    font-family: Arial, sans-serif;
    overflow: hidden;
}

#game-container {
    width: 100vw;  
    height: 100vh; 
    max-width: 400px; 
    max-height: 800px; 
    aspect-ratio: 1 / 2; 
    border: 2px solid black;
    position: relative;
    overflow: hidden;
    background: linear-gradient(to bottom, #4682B4, #87CEEB);
    z-index: 1;
    margin: 0 auto; 
}

#parallax-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 2;
}

.parallax-layer {
    position: absolute;
    width: 800px;  
    height: 100%;
    background-position: 0 0;
    will-change: transform;
    background-size: cover;
    background-repeat: repeat-x;
}

#bg-far, #bg-mid, #bg-near {
    position: absolute;
    top: 0;
    left: 0;
    width: 800px;  
    height: 100%;
    transform: translateX(0);
    background-color: transparent;
}

#bg-far {
    background-image: none;     
    z-index: 1;
}

#bg-mid {
    background-image: none;     
    z-index: 2;
}

#bg-near {
    background-image: none;     
    z-index: 3;
}

#start-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(135, 206, 235, 0.9);
    z-index: 10;
}

.start-content {
    text-align: center;
    padding: 20px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

#start-screen h1 {
    font-size: 48px;
    margin-bottom: 20px;
    color: #333;
}

#start-button {
    font-size: 24px;
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 20px;
    transition: background-color 0.3s ease;
}

#start-button:hover {
    background-color: #45a049;
}

#start-screen p {
    font-size: 18px;
    color: #666;
}

.hidden {
    display: none !important;
}

#game-over-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 20;
}

.game-over-content {
    text-align: center;
    padding: 40px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.game-over-content h2 {
    font-size: 42px;
    color: #333;
    margin-bottom: 20px;
}

.game-over-content p {
    font-size: 24px;
    color: #666;
    margin-bottom: 30px;
}

#restart-button {
    font-size: 24px;
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 20px;
}

#restart-button:hover {
    background-color: #45a049;
}

#game-ui {
    z-index: 5;
    position: relative;
}

#bird {
    width: 60px;  
    height: 60px; 
    background-color: #FFDB58;
    border-radius: 50%;
    position: absolute;
    left: 50px;
    border: 2px solid #D2691E;
    box-sizing: border-box;
    overflow: visible;
    z-index: 1;
}

#bird-eye {
    width: 9px;   
    height: 9px;  
    background-color: black;
    border-radius: 50%;
    position: absolute;
    top: 15px;    
    right: 15px;  
}

#bird-bill {
    width: 0;
    height: 0;
    border-top: 9px solid transparent;     
    border-bottom: 9px solid transparent;  
    border-left: 30px solid #D2691E;       
    position: absolute;
    top: 21px;    
    right: -18px; 
    z-index: 2;
}

#bird-wing {
    width: 30px;  
    height: 22.5px; 
    background-color: #FFC107;
    border: 1px solid #D2691E;
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    position: absolute;
    top: 22.5px;  
    left: 7.5px;  
    transform-origin: bottom left;
    animation: flap 0.3s infinite alternate ease-in-out;
}

@keyframes flap {
    from {
        transform: rotate(-10deg);
    }
    to {
        transform: rotate(10deg);
    }
}

#score-container {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

#score {
    font-size: 24px;
    color: white;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
}

.pipe {
    position: absolute;
    width: 60px;
    background-color: green;
    z-index: 4;
    min-width: 60px;
}

.clickable-screen {
    cursor: pointer;
}

.dynamic-building {
    position: absolute;
    bottom: 0;
    z-index: inherit;
    border: none;
    transform-origin: bottom center;
}