* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  width: 100%; height: 100%; overflow-x: hidden;
  background: #050510;
  font-family: monospace;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  overscroll-behavior: none;
}

#page-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 10px 0;
}

#game-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

#container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #050510;
}

canvas {
  display: block;
  touch-action: none;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* ── Ad wrapper ── */
.ad-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  border-radius: 6px;
}
.ad-bottom {
  min-height: 90px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
}
.ad-wrapper ins {
  display: block !important;
}

/* ── Footer ── */
#footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px 0 28px;
  color: #7788bb;
  font-size: 14px;
}
#footer a {
  color: #8899cc;
  text-decoration: none;
  transition: color 0.2s;
  font-weight: 500;
}
#footer a:hover {
  color: #aabbee;
}
.footer-heart {
  color: #6677aa;
}

/* ── Mobile responsive ── */
@media (max-width: 480px) {
  #page-wrap {
    padding: 4px 0;
  }
  #game-area {
    gap: 4px;
  }
  .ad-bottom {
    min-height: 50px;
    transform: scale(0.85);
    transform-origin: center top;
  }
}
