:root {
  /* Inherited from index.css but reinforced here for module independence if needed */
  --gb-black: #000000;
  --gb-dark: #382843;
  --gb-light: #7c6d80;
  --gb-white: #c7c6c6;
}

/* --- Tamagotchi Section --- */
#tamagotchi-section {
  position: relative;
  width: 100%;
  min-height: 100vh;
  border-top: 4px solid var(--gb-white);
  border-bottom: 4px solid var(--gb-white);
  background-color: var(--gb-dark);
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

#tamagotchi-container {
  position: relative;
  width: 100%;
  max-width: 500px;
  /* Constrain width */
  aspect-ratio: 1 / 1;
  /* Square shape */
  background-color: var(--gb-black);
  /* Screen "off" color */
  border: 4px solid var(--gb-light);
  /* Restore border for better look on square */
  box-shadow:
    0 0 0 4px var(--gb-dark),
    0 0 0 8px var(--gb-white);
  margin: auto;
}

/* Scanlines effect for the screen */
#tamagotchi-container::after {
  content: " ";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
  z-index: 10;
  background-size: 100% 2px, 3px 100%;
  pointer-events: none;
}

#game-canvas {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
  opacity: 0.8;
  /* Slightly dim like a retro screen */
}

/* User Info inside canvas area */
#user-info-display {
  position: absolute;
  top: 10px;
  right: 15px;
  font-family: 'Press Start 2P', cursive;
  font-size: 10px;
  color: var(--gb-white);
  text-shadow: 1px 1px 0 var(--gb-dark);
  z-index: 15;
  pointer-events: none;
  display: none;
  /* Hidden by default */
}

/* Overlay for non-logged users */
#login-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(56, 40, 67, 0.85);
  /* --gb-dark with opacity */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 20;
  text-align: center;
  padding: 20px;
}

#login-overlay p {
  font-family: 'Press Start 2P', cursive;
  color: var(--gb-white);
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 20px;
  text-transform: uppercase;
  max-width: 80%;
}

/* --- Floating Login Button --- */
#auth-floating-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 2000;
  /* Styles inherited from .pixel-button in index.css */
  font-size: 1rem;
  /* Adjust size if needed, but keeping consistent */
}

/* Hover/Active states handled by .pixel-button */

/* --- Mobile Responsiveness --- */
@media screen and (max-width: 768px) {
  #tamagotchi-container {
    width: 95%;
    border-width: 2px;
    box-shadow:
      inset 0 0 10px rgba(0, 0, 0, 0.8),
      0 0 0 2px var(--gb-dark),
      0 0 0 4px var(--gb-white);
  }

  #auth-floating-btn {
    bottom: 20px;
    right: 20px;
    font-size: 10px;
    padding: 12px 16px;
  }

  #user-info-display {
    font-size: 8px;
    top: 5px;
    right: 10px;
  }
}