:root {
  --primary: #00ff9d;
  --secondary: #ff00aa;
  --accent: #00e1ff;
  --dark: #0a0a12;
  --darker: #050508;
  --light: #f0f0f0;
  --crt-glow: rgba(0, 255, 157, 0.1);
  --scanline: rgba(0, 0, 0, 0.2);
  --noise: rgba(18, 16, 16, 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--dark);
  color: var(--light);
  font-family: 'VT323', monospace;
  line-height: 1.6;
  letter-spacing: 1px;
  overflow: hidden;
  height: 100vh;
}

.noise-overlay,
.scanlines-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 100;
}

.noise-overlay {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23noiseFilter)' opacity='0.2'/%3E%3C/svg%3E");
}

.scanlines-overlay {
  z-index: 101;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, var(--scanline) 2px, var(--scanline) 4px);
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 10px;
  position: relative;
  z-index: 10;
  height: calc(100vh - 60px);
  overflow-y: auto;
  scrollbar-width: none;
}

.container::-webkit-scrollbar {
  display: none;
}

header {
  text-align: center;
  margin-bottom: 10px;
  padding: 10px 0;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 5px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  margin-right: 10px;
  filter: drop-shadow(0 0 5px var(--primary));
  animation: pulse 2s infinite alternate;
}

h1, .display-value {
  font-family: 'Press Start 2P', cursive;
  color: var(--primary);
  text-shadow: 0 0 10px var(--primary);
}

h1 {
  font-size: 1.8rem;
  margin-bottom: 5px;
}

h1 span {
  color: var(--accent);
  text-shadow: 0 0 10px var(--accent);
}

.tagline {
  font-size: 1.2rem;
  color: var(--secondary);
  text-shadow: 0 0 5px var(--secondary);
  margin-bottom: 5px;
}

.game-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 15px;
}

.crt-screen {
  position: relative;
  background: #000;
  border: 6px solid #1a1a1a;
  border-radius: 5px;
  box-shadow: 0 0 15px var(--crt-glow), inset 0 0 15px rgba(0, 0, 0, 0.5);
  margin-bottom: 15px;
  overflow: hidden;
  animation: crt-flicker 0.1s infinite;
}

.crt-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(0, 255, 157, 0.1) 50%, rgba(0, 0, 0, 0.25) 50%);
  background-size: 100% 4px;
  pointer-events: none;
  z-index: 2;
}

canvas {
  display: block;
  position: relative;
  z-index: 1;
  image-rendering: pixelated;
  width: 350px;
  height: 350px;
}

.control-panel,
.info-card {
  background: rgba(10, 10, 18, 0.7);
  border-radius: 5px;
  padding: 10px;
}

.control-panel {
  width: 100%;
  max-width: 350px;
  border: 2px solid var(--primary);
  box-shadow: 0 0 10px rgba(0, 255, 157, 0.3);
}

.display-panel {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.score-box {
  background: var(--darker);
  border: 2px solid var(--accent);
  border-radius: 3px;
  padding: 5px 8px;
  width: 48%;
  text-align: center;
}

.display-label {
  color: var(--accent);
  font-size: 0.8rem;
  margin-bottom: 2px;
}

.display-value {
  font-size: 1.2rem;
}

.button-group {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.neon-button {
  position: relative;
  background: transparent;
  border: none;
  padding: 8px 15px;
  cursor: pointer;
  overflow: hidden;
  width: 48%;
  height: 40px;
}

.neon-button::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 2px solid var(--primary);
  border-radius: 3px;
  box-shadow: 0 0 8px var(--primary), inset 0 0 8px var(--primary);
  transition: all 0.3s;
}

.neon-button:hover::before {
  border-color: var(--secondary);
  box-shadow: 0 0 15px var(--secondary), inset 0 0 15px var(--secondary);
}

.neon-text {
  color: var(--primary);
  font-size: 0.9rem;
  text-shadow: 0 0 5px var(--primary);
  transition: all 0.3s;
}

.neon-button:hover .neon-text {
  color: var(--secondary);
  text-shadow: 0 0 8px var(--secondary);
}

.keyboard-hint {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.keyboard-key {
  width: 35px;
  height: 35px;
  background: var(--darker);
  border: 2px solid var(--accent);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--light);
  box-shadow: 0 0 5px rgba(0, 225, 255, 0.5);
}

.info-panel {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 15px;
}

.info-card {
  flex: 1;
  min-width: 200px;
  border: 2px solid var(--secondary);
  box-shadow: 0 0 10px rgba(255, 0, 170, 0.2);
}

.info-card h2 {
  color: var(--secondary);
  font-size: 1.1rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
}

.pixel-arrow {
  color: var(--primary);
  margin-right: 8px;
}

.pixel-list {
  list-style: none;
}

.pixel-list li {
  margin-bottom: 6px;
  padding-left: 18px;
  font-size: 0.9rem;
  position: relative;
}

.pixel-list li::before {
  content: '■';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.pixel-food {
  color: #ff5252;
  text-shadow: 0 0 5px #ff5252;
}

footer {
  background: var(--darker);
  padding: 10px;
  text-align: center;
  position: fixed;
  bottom: 0;
  width: 100%;
  height: 50px;
  border-top: 1px solid var(--primary);
  z-index: 10;
}

.footer-content {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-content p {
  font-size: 0.8rem;
}

.social-links {
  display: flex;
  gap: 10px;
}

.social-icon {
  color: var(--accent);
  text-decoration: none;
  font-size: 1rem;
  transition: all 0.3s;
}

.social-icon:hover {
  color: var(--secondary);
  transform: translateY(-3px);
}

@keyframes pulse {
  0% { transform: scale(1); filter: drop-shadow(0 0 5px var(--primary)); }
  100% { transform: scale(1.1); filter: drop-shadow(0 0 10px var(--primary)); }
}

@keyframes crt-flicker {
  0%, 100% { opacity: 0.9; }
  20% { opacity: 0.8; }
  40% { opacity: 0.95; }
  60% { opacity: 0.85; }
  80% { opacity: 0.92; }
}

@media (max-width: 768px) {
  h1 { font-size: 1.5rem; }
  .tagline { font-size: 1rem; }
  canvas { width: 300px; height: 300px; }
  .info-panel, .footer-content { flex-direction: column; gap: 5px; }
}

@media (max-width: 480px) {
  canvas { width: 280px; height: 280px; }
  .button-group { flex-direction: column; gap: 8px; }
  .neon-button { width: 100%; }
  .footer-content p { font-size: 0.7rem; }
}
