body {
    margin: 0;
    padding: 0;
    background-color: #222;
    color: white;
    font-family: 'Press Start 2P', cursive, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
}

#game-container {
    position: relative;
    width: 800px;
    height: 800px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
    border: 4px solid #fff;
}

#gameCanvas {
    background-color: #66BB6A; /* Vibrant green grass yard */
    display: block;
    width: 100%;
    height: 100%;
}

#ui {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
    pointer-events: none;
    text-shadow: 3px 3px 0px #000;
}

#game-over {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 20;
    text-align: center;
    text-shadow: 2px 2px 0px #000;
}

.hidden {
    display: none !important;
}

h2 {
    color: #FFD700;
    font-size: 3.5rem;
    margin-bottom: 30px;
    animation: pulse 1s infinite alternate;
}

p {
    font-size: 1.2rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

button {
    font-family: 'Press Start 2P', cursive, sans-serif;
    padding: 20px 40px;
    margin-top: 20px;
    font-size: 1.5rem;
    background-color: #FFD700;
    color: #333; /* Dark text for better contrast on yellow */
    border: 4px solid #F7F0E9;
    cursor: pointer;
    transition: transform 0.1s, background-color 0.2s;
    box-shadow: 5px 5px 0px #000;
}

button:hover {
    transform: scale(1.05);
    background-color: #E6C200;
}

button:active {
    transform: scale(0.95);
    box-shadow: 2px 2px 0px #000;
}

@keyframes pulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

#wgww-logo {
    position: absolute;
    bottom: 20px;
    left: 20px;
    width: 200px;
    height: auto;
    opacity: 0.8;
    z-index: 5;
    pointer-events: none;
    mix-blend-mode: multiply; /* Eliminates white background */
}

/* Ad Section Styling */
#ad-container {
    margin-top: 40px;
    background-color: rgba(26, 26, 26, 0.9);
    border: 4px solid #4CA246; /* Matching grass color or brand green */
    border-radius: 8px;
    padding: 15px;
    width: 80%;
    max-width: 600px;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    box-shadow: 4px 4px 0px #000;
}

#ad-container a {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
}

#ad-container:hover {
    transform: scale(1.02) translateY(-2px);
    box-shadow: 6px 6px 0px #000;
    border-color: #FFD700;
    cursor: pointer;
}

#ad-sprite {
    height: 100px; /* Scale the 16bit sprite appropriately */
    image-rendering: pixelated; /* Keep it looking retro */
    margin-right: 20px;
}

.ad-text-box {
    text-align: left;
}

.ad-text-box p {
    font-size: 0.8rem;
    margin: 5px 0;
    line-height: 1.4;
    text-shadow: 2px 2px 0px #000;
}

.ad-text-box p.highlight {
    font-size: 0.95rem;
    color: #FFD700;
}
