:root {
    --bg-color: #f7f7f7;
    --text-color: #535353;
    --canvas-bg: #fff;
    --canvas-border: #f7f7f7;
    --font-stack: 'Press Start 2P', system-ui, sans-serif;
}

/* Dark mode class to simulate night cycle *optional*/
body.night-mode {
    --bg-color: #1a1a1a;
    --text-color: #f7f7f7;
    --canvas-bg: #222;
    --canvas-border: #2c2c2c;
}

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

body {
    font-family: var(--font-stack);
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 20px;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.5s, color 0.5s;
}

.page-container {
    max-width: 600px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

/* Header */
.seo-header {
    text-align: center;
    background: transparent;
    padding: 10px 0;
    width: 100%;
}

.seo-header h1 {
    font-size: 1.4rem;
    color: var(--text-color);
    margin-bottom: 20px;
    line-height: 1.5;
}

.seo-header p {
    font-size: 0.8rem;
    line-height: 1.8;
    color: #888;
    font-family: system-ui, -apple-system, sans-serif;
}

.seo-header strong {
    color: #535353;
}

body.night-mode .seo-header strong {
    color: #f7f7f7;
}

/* Game Interface */
.game-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: var(--canvas-bg);
    border: 2px solid var(--canvas-border);
    border-radius: 8px;
    padding: 20px 10px;
}

.score-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
    font-size: 1rem;
    color: #535353;
    padding-right: 20px;
    letter-spacing: 2px;
}

body.night-mode .score-container {
    color: #acacac;
}

.score-label {
    opacity: 0.7;
}

/* Canvas Area */
.canvas-container {
    width: 100%;
    aspect-ratio: 16/6;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

#game-canvas {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
    /* Crisp retro look */
}

/* Overlays */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.overlay.hidden {
    display: none;
}

.overlay-content {
    text-align: center;
}

.overlay-content p {
    font-size: 0.7rem;
    color: #535353;
    margin-top: 15px;
    line-height: 2;
}

body.night-mode .overlay-content p {
    color: #f7f7f7;
}

.blink {
    animation: blinker 1.5s linear infinite;
}

@keyframes blinker {
    50% {
        opacity: 0;
    }
}

.game-over-text {
    font-size: 1.2rem;
    color: #535353;
    letter-spacing: 2px;
}

body.night-mode .game-over-text {
    color: #f7f7f7;
}


/* Article & SEO Area */
.seo-article {
    background: transparent;
    padding: 20px;
    width: 100%;
    font-family: system-ui, -apple-system, sans-serif;
    color: #777;
    border-top: 2px solid #eaeaea;
}

body.night-mode .seo-article {
    border-color: #333;
}

.seo-article h2 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--text-color);
}

.seo-article ul {
    list-style-position: inside;
    line-height: 1.8;
}

.seo-article li {
    margin-bottom: 15px;
}

.seo-article strong {
    color: var(--text-color);
}

.back-link {
    margin-bottom: 40px;
    font-family: system-ui, -apple-system, sans-serif;
}

.back-link a {
    color: #007bff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
}

.back-link a:hover {
    text-decoration: underline;
}