:root {
    --bg-color: #202124;
    --text-color: #acacac;
    --accent: #535353;
    --primary: #f2f2f2;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    text-align: center;
}

/* Header */
header {
    background: #171717;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

header h1 { margin: 0; font-size: 1.5rem; color: var(--primary); }
nav a { color: var(--text-color); text-decoration: none; margin: 0 10px; font-weight: bold; }
nav a:hover { color: var(--primary); }

.container { max-width: 1000px; margin: 0 auto; padding: 0 20px; }

/* Game Canvas */
#game-wrapper {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: 300px;
    margin: 20px auto;
    background: #f7f7f7; /* Classic Dino Background */
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #535353;
}

canvas { width: 100%; height: 100%; display: block; }

#game-ui {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; /* Let clicks pass through to canvas when playing */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#game-ui.hidden #start-screen, 
#game-ui.hidden #game-over-screen { display: none; }

#score-display {
    position: absolute;
    top: 10px; right: 20px;
    font-family: monospace;
    font-size: 1.2rem;
    color: #535353;
    font-weight: bold;
}

#start-screen h2, #game-over-screen h2 {
    color: #535353;
    font-size: 2rem;
    margin-bottom: 5px;
}

button {
    pointer-events: auto;
    background: #202124;
    color: white;
    border: none;
    padding: 10px 25px;
    font-size: 1.2rem;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 15px;
}

button:hover { background: #535353; }

/* Ads */
.ad-banner {
    background: #2d2d2d;
    height: 90px;
    width: 100%;
    max-width: 728px;
    margin: 20px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444;
    font-size: 0.8rem;
}

/* Game Grid */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin: 30px 0;
}

.game-card {
    background: #2d2d2d;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s;
}

.game-card:hover { transform: translateY(-5px); background: #333; }
.card-img { font-size: 3rem; margin-bottom: 10px; }
.game-card h3 { font-size: 1rem; color: var(--primary); margin: 0; }

/* Content Section */
.content-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    text-align: left;
    margin-bottom: 50px;
}

.text-content { flex: 2; min-width: 300px; }
.sidebar-ad { flex: 1; min-width: 300px; }
.ad-rectangle {
    background: #2d2d2d;
    height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #444;
}

h2, h3 { color: var(--primary); }
p { line-height: 1.6; }

/* Utilities */
.hidden { opacity: 1; } /* Helper for logic */