body {
    font-family: 'Arial', sans-serif;
    background-color: #e0f7fa;
    color: #004d40;
    text-align: center;
    margin: 0;
    padding: 20px;
}

h1 {
    color: #00796b;
}

.instructions {
    font-size: 1.1em;
    margin-bottom: 20px;
}

#game-container {
    position: relative;
    width: 800px;
    height: 600px;
    margin: 0 auto;
    border: 5px solid #00796b;
    border-radius: 15px;
    background: #80deea url('background.png') repeat-x bottom;
    background-size: contain;
    overflow: hidden;
}

#game-canvas {
    position: absolute;
    top: 0;
    left: 0;
    background: transparent;
}

#ui-container {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.7);
    padding: 10px;
    border-radius: 10px;
    z-index: 10;
}

#level-display {
    font-size: 1.5em;
    font-weight: bold;
    color: #00796b;
}

#co2-meter {
    display: flex;
    align-items: center;
}

#co2-meter label {
    font-weight: bold;
    margin-right: 10px;
}

progress#co2-progress {
    width: 200px;
    height: 25px;
    -webkit-appearance: none;
    appearance: none;
    --progress-color: #388e3c; /* Default green color */
}

progress#co2-progress::-webkit-progress-bar {
    background-color: #b2dfdb;
    border-radius: 5px;
    border: 1px solid #004d40;
}

progress#co2-progress::-webkit-progress-value {
    background-color: var(--progress-color);
    border-radius: 5px;
    transition: width 0.3s ease, background-color 0.3s ease;
}

#score {
    font-size: 1.5em;
    font-weight: bold;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    padding: 20px;
    box-sizing: border-box;
}

.overlay h2 {
    font-size: 3em;
    margin-bottom: 20px;
}

.overlay p {
    font-size: 1.2em;
    max-width: 600px;
    margin-bottom: 30px;
}

.overlay button {
    padding: 15px 30px;
    font-size: 1.5em;
    cursor: pointer;
    border: none;
    border-radius: 10px;
    background-color: #4caf50;
    color: white;
    transition: background-color 0.3s;
}

.overlay button:hover {
    background-color: #66bb6a;
}

.hidden {
    display: none;
}

#fact-popup {
    position: absolute;
    background-color: rgba(25, 118, 210, 0.9);
    color: white;
    padding: 15px;
    border-radius: 10px;
    z-index: 50;
    width: 250px;
    text-align: center;
    pointer-events: none; /* Allows clicks to go through the popup */
    transition: opacity 0.5s;
    font-size: 0.9em;
}