body {
  background: #ffe4ef;
  font-family: 'Press Start 2P', 'Consolas', 'Courier New', Courier, monospace;
  color: #7c3752;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}


#game-container {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: #ffeaf5;
  background-image:
    url('data:image/svg+xml;utf8,<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg"><rect width="20" height="20" fill="%23ffeaf5"/><circle cx="10" cy="10" r="1" fill="%23f8b8d2"/><circle cx="5" cy="5" r="1" fill="%23f3a6c2"/><circle cx="15" cy="15" r="1" fill="%23fcd2e2"/></svg>');
  background-repeat: repeat;
  box-shadow: 0 0 24px #f8b8d2, 0 0 48px #fcd2e2;
  border: 2px solid #e48ab9;
  border-radius: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

/* Animated grid overlay */
#game-container::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background-image:
    linear-gradient(135deg, rgba(200,200,200,0.12) 1px, transparent 1px),
    linear-gradient(225deg, rgba(200,200,200,0.11) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: gridMoveDiagonal 9s linear infinite;
}
@keyframes gridMoveDiagonal {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 40px 40px, -40px -40px; }
}

/* Vignette overlay */
#game-container::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  background:
    radial-gradient(ellipse at center, rgba(0,0,0,0) 60%, rgba(0,0,0,0.17) 100%);
}

/* Shimmer/sheen sweep */
#game-container::before {
  /* Previous grid overlay styles above */
}
#game-container::after {
  /* Previous vignette styles above */
  background:
    radial-gradient(ellipse at center, rgba(0,0,0,0) 60%, rgba(0,0,0,0.17) 100%),
    linear-gradient(120deg, rgba(255,255,255,0.05) 30%, rgba(255,255,255,0.18) 45%, rgba(255,255,255,0.05) 60%);
  background-size: cover, 350% 100%;
  background-repeat: no-repeat;
  animation: vignetteSweep 4.5s linear infinite;
}
@keyframes vignetteSweep {
  0% { background-position: center, -100% 0; }
  100% { background-position: center, 200% 0; }
}


/* Animated scanlines overlay */
#game-container .scanlines {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 5;
  mix-blend-mode: multiply;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(0,0,0,0.055) 0px,
      rgba(0,0,0,0.055) 2px,
      transparent 2px,
      transparent 8px
    );
  animation: scanlinesMove 2.2s linear infinite;
}
@keyframes scanlinesMove {
  0% { background-position-y: 0; }
  100% { background-position-y: 16px; }
}



.game-window {
  width: min(1100px, 90vw);
  height: min(700px, 70vh);
  background: #fff0f7;
  border: 6px double #e48ab9;
  box-shadow: 0 0 12px #f8b8d2;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}


#game-canvas {
  display: block;
  width: 100%;
  height: 100%;
  border: none;
  background: #fff;
  margin: 0;
  padding: 0;
  box-shadow: none;
}




.popup-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to bottom, #ededed 0%, #cccccc 100%);
  border-bottom: 1.5px solid #bbb;
  height: 28px;
  padding: 0 0.5em 0 0.7em;
  box-sizing: border-box;
  font-family: 'Times New Roman', Times, serif;
  font-size: 1em;
  font-weight: bold;
  color: #111;
  user-select: none;
}

.popup-title {
  flex: 1;
  text-align: left;
  line-height: 28px;
  color: #111;
  padding-left: 2px;
  font-size: 1em;
}

#close-popup {
  background: #e5e5e5;
  border: 1.5px solid #888;
  border-radius: 2px;
  font-size: 1.12em;
  font-family: inherit;
  color: #111;
  width: 26px;
  height: 26px;
  margin: 0;
  cursor: pointer;
  box-shadow: 1px 1px 0 #fff inset;
  transition: background 0.12s, border-color 0.12s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-left: 1.5px solid #bbb;
}

.popup-titlebar {
  overflow: hidden;
  height: 28px;
  min-height: 28px;
  max-height: 28px;
  cursor: move;
  position: relative;
  z-index: 1;
}
#close-popup:hover {
  background: #bbb;
  border-color: #222;
  color: #111;
}

.popup {
  position: absolute;
  left: 50%;
  top: 40px;
  transform: translateX(-50%);
  min-width: 260px;
  max-width: 96vw;
  max-height: 80vh;
  background: #fff;
  border: 2.5px solid #222;
  border-top: 4px double #222;
  border-bottom: 4px double #222;
  border-radius: 3px;
  box-shadow: 2px 4px 14px #bbb, 0 0 0 1px #eee inset;
  z-index: 1000;
  font-family: 'Times New Roman', Times, serif;
  font-size: 1rem;
  color: #111;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  pointer-events: auto;
}

.popup-titlebar {
  overflow: hidden;
  height: 28px;
  min-height: 28px;
  max-height: 28px;
  cursor: move;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to bottom, #ededed 0%, #cccccc 100%);
  border-bottom: 1.5px solid #bbb;
}

.popup-title {
  flex: 1;
  text-align: left;
  line-height: 28px;
  color: #111;
  padding-left: 2px;
  font-size: 1em;
}

.popup-close {
  position: absolute;
  right: 6px;
  top: 1px;
  background: #e5e5e5;
  border: 1.5px solid #888;
  border-radius: 2px;
  font-size: 1.12em;
  font-family: inherit;
  color: #111;
  width: 26px;
  height: 26px;
  margin: 0;
  cursor: pointer;
  box-shadow: 1px 1px 0 #fff inset;
  transition: background 0.12s, border-color 0.12s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-left: 1.5px solid #bbb;
  z-index: 10;
}
.popup-content {
  padding: 18px 20px 16px 16px;
  background: #fff;
  font-family: 'Times New Roman', Times, serif;
  color: #111;
  overflow-y: auto;
  max-height: 50vh;
  font-size: 1em;
  line-height: 1.5;
}

.popup-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 999;
}

.popup {
  pointer-events: auto;
}




