* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100vh;
    background-color: #f7f7f7;
    font-family: 'Arial', sans-serif;
}

.start-screen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    background: url('https://images.unsplash.com/photo-1506748686214-e9df14d4d9d0?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzNjUyOXwwfDF8c2VhcmNofDV8fHRpbWV8ZW58MHx8fHwxNjk4NzE2MTk3&ixlib=rb-1.2.1&q=80&w=1080') no-repeat center center fixed;
    background-size: cover;
    color: white;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.7);
    position: relative;
    z-index: 10;
}

.start-screen h1 {
    font-size: 48px;
    margin-bottom: 10px;
    animation: fadeIn 1s ease-in-out forwards;
}

.start-screen h2 {
    font-size: 24px;
    margin-bottom: 30px;
    animation: fadeIn 1.5s ease-in-out forwards;
}

.start-screen button {
    padding: 10px 20px;
    font-size: 20px;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.8);
    color: #333;
    transition: background-color 0.3s ease;
    animation: fadeIn 2s ease-in-out forwards;
}

.start-screen button:hover {
    background-color: rgba(255, 255, 255, 1);
}

.controls {
    margin-bottom: 20px;
    text-align: center; /* Center the labels and images */
}

.controls img {
    width: 100px; /* Set a width for the images */
    height: auto; /* Maintain aspect ratio */
    margin-top: 10px; /* Space between label and image */
    border: 2px solid #333; /* Optional border for better visibility */
    border-radius: 5px; /* Rounded corners */
}

.select-screen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    background-color: #fff;
    position: absolute;
    width: 100%;
    z-index: 10;
}

.select-screen h2 {
    margin-bottom: 20px;
}

.select-screen button {
    padding: 10px 20px;
    font-size: 18px;
    cursor: pointer;
    margin-top: 20px;
}

.game-container {
    position: relative;
    width: 600px;
    height: 200px;
    overflow: hidden;
    background-color: #fff;
    border: 2px solid #000;
}

.dinosaur {
    position: absolute;
    bottom: 20px;
    left: 50px;
    width: 40px;
    height: 40px;
    background-image: url('https://img.icons8.com/ios/452/dinosaur.png'); /* Default character */
    background-size: cover;
}

.obstacle {
    position: absolute;
    bottom: 20px;
    right: -60px;
    width: 20px;
    height: 40px;
    background-image: url('https://img.icons8.com/ios/452/cactus.png'); /* Default obstacle */
    background-size: cover;
}

.ground {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 20px;
    background-color: #000;
}

.score {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 20px;
    color: #000;
}

.instructions {
    position: absolute;
    top: 20px;
    font-size: 18px;
    color: #000;
    text-align: center;
    width: 100%;
}

.dinosaur.jump {
    animation: jump 0.5s ease;
}

@keyframes jump {
    0% { bottom: 20px; }
    50% { bottom: 100px; }
    100% { bottom: 20px; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.try-again-screen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    position: absolute;
    width: 100%;
    z-index: 10;
    color: #333;
}

.try-again-screen h2 {
    margin-bottom: 10px;
}

.try-again-screen p {
    margin-bottom: 20px;
    font-size: 20px;
}

.try-again-screen button {
    padding: 10px 20px;
    font-size: 18px;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    background-color: #4CAF50; /* Green background */
    color: white;
    transition: background-color 0.3s ease;
}

.try-again-screen button:hover {
    background-color: #45a049; /* Darker green on hover */
}