:root {
  --primary-color: #ff00ff;
  --secondary-color: #00ffff;
  --background-color: #000066;
  --text-glow: 0 0 10px var(--primary-color);
  --grid-color: rgba(255, 0, 255, 0.1);
}

body {
  margin: 0;
  font-family: 'Press Start 2P', cursive;
  background-color: var(--background-color);
  background-image: 
    linear-gradient(var(--grid-color) 2px, transparent 2px),
    linear-gradient(90deg, var(--grid-color) 2px, transparent 2px);
  background-size: 40px 40px;
  min-height: 100vh;
  color: var(--primary-color);
  animation: backgroundScroll 20s linear infinite;
}

@keyframes backgroundScroll {
  from { background-position: 0 0; }
  to { background-position: 0 40px; }
}

.container {
  width: 95%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.game-header {
  text-align: center;
  margin-bottom: 2rem;
}

.energy-bar {
  height: 20px;
  background: rgba(255, 0, 255, 0.2);
  border: 2px solid var(--primary-color);
  margin: 1rem auto;
  max-width: 300px;
  position: relative;
  overflow: hidden;
}

.energy-fill {
  height: 100%;
  width: 100%;
  background: var(--primary-color);
  animation: energyPulse 2s ease-in-out infinite;
}

@keyframes energyPulse {
  0% { transform: scaleX(0.9); }
  50% { transform: scaleX(1); }
  100% { transform: scaleX(0.9); }
}

h1 {
  font-size: 2.5rem;
  margin: 0.5em 0;
  color: var(--primary-color);
  text-shadow: var(--text-glow);
  animation: titlePulse 2s ease-in-out infinite;
}

@keyframes titlePulse {
  0% { text-shadow: 0 0 10px var(--primary-color); }
  50% { text-shadow: 0 0 20px var(--primary-color), 0 0 30px var(--primary-color); }
  100% { text-shadow: 0 0 10px var(--primary-color); }
}

.game-container {
  background: rgba(0, 0, 0, 0.8);
  border: 3px solid var(--primary-color);
  border-radius: 10px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.screen-effect {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.15) 0px,
    rgba(0, 0, 0, 0.15) 1px,
    transparent 1px,
    transparent 2px
  );
  pointer-events: none;
}

.question {
  font-size: 1.2rem;
  margin: 20px 0;
  padding: 15px;
  background: rgba(255, 0, 255, 0.1);
  border: 2px solid var(--primary-color);
  border-radius: 5px;
  white-space: pre-line;
  text-align: center;
}

.input-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

input[type="text"] {
  background: black;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  padding: 10px;
  font-family: 'Press Start 2P';
  font-size: 1rem;
  width: 200px;
  text-align: center;
}

.pixel-button {
  background: black;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  padding: 10px 20px;
  font-family: 'Press Start 2P';
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s;
}

.pixel-button:hover {
  background: var(--primary-color);
  color: black;
  transform: scale(1.05);
}

.property-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.stats-container {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

.stat {
  display: flex;
  gap: 10px;
  margin: 10px 0;
}

.stat-label {
  color: var(--secondary-color);
}

.stat-value {
  color: var(--primary-color);
}

.feedback {
  text-align: center;
  margin: 20px 0;
  padding: 10px;
  border-radius: 5px;
}

.feedback.success {
  background: rgba(0, 255, 0, 0.2);
  border: 2px solid #00ff00;
}

.feedback.error {
  background: rgba(255, 0, 0, 0.2);
  border: 2px solid #ff0000;
  padding: 15px;
  font-size: 0.9rem;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .container {
    width: 100%;
    padding: 10px;
  }
  
  h1 {
    font-size: 1.8rem;
  }
  
  .property-buttons {
    grid-template-columns: 1fr;
  }
}