* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Comic Sans MS', cursive, sans-serif;
  overflow: hidden;
  background: linear-gradient(45deg, #ffb3d9, #c9a0ff);
  transition: background 0.3s;
}

body.glitch {
  animation: bgGlitch 0.1s infinite;
}

#game-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

#gameCanvas {
  border: 4px solid #fff;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
  background: #ffe6f2;
  transition: all 0.3s;
}

#gameCanvas.cursed {
  animation: shake 0.1s infinite;
  filter: hue-rotate(180deg) saturate(3);
}

#ui {
  position: absolute;
  top: 20px;
  left: 20px;
  color: #fff;
  font-size: 24px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  z-index: 10;
}

#ui.vibrate {
  animation: vibrate 0.05s infinite;
}

#fish-counter, #chaos-meter {
  margin-bottom: 10px;
  padding: 10px;
  background: rgba(255, 182, 193, 0.7);
  border-radius: 10px;
  display: inline-block;
}

#floating-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 48px;
  font-weight: bold;
  color: #ff0066;
  text-shadow: 3px 3px 0 #00ff00, -3px -3px 0 #0066ff;
  pointer-events: none;
  opacity: 0;
  white-space: nowrap;
}

#floating-text.show {
  animation: floatText 2s forwards;
}

#game-over {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.95);
  padding: 40px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
  z-index: 100;
}

#game-over.hidden {
  display: none;
}

#end-title {
  font-size: 48px;
  color: #ff0066;
  margin-bottom: 20px;
  animation: glitchText 0.3s infinite;
}

#end-message {
  font-size: 24px;
  margin-bottom: 30px;
  color: #333;
}

#restart-btn {
  font-size: 20px;
  padding: 15px 30px;
  background: #ff69b4;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-family: 'Comic Sans MS', cursive;
  transition: all 0.3s;
}

#restart-btn:hover {
  background: #ff1493;
  transform: scale(1.1);
}

@keyframes shake {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(-5px, 5px) rotate(-1deg); }
  50% { transform: translate(5px, -5px) rotate(1deg); }
  75% { transform: translate(-5px, -5px) rotate(-1deg); }
}

@keyframes vibrate {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-2px, 2px); }
  50% { transform: translate(2px, -2px); }
  75% { transform: translate(-2px, -2px); }
}

@keyframes bgGlitch {
  0% { background: linear-gradient(45deg, #ffb3d9, #c9a0ff); }
  33% { background: linear-gradient(45deg, #00ff00, #ff0000); }
  66% { background: linear-gradient(45deg, #0000ff, #ffff00); }
  100% { background: linear-gradient(45deg, #ff00ff, #00ffff); }
}

@keyframes floatText {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5) rotate(-10deg);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2) rotate(5deg);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8) rotate(-5deg);
  }
}

@keyframes glitchText {
  0%, 100% { transform: translate(0, 0); text-shadow: 3px 3px 0 #00ff00, -3px -3px 0 #0066ff; }
  25% { transform: translate(-2px, 2px); text-shadow: -3px -3px 0 #ff0000, 3px 3px 0 #00ff00; }
  50% { transform: translate(2px, -2px); text-shadow: 3px -3px 0 #0066ff, -3px 3px 0 #ff00ff; }
  75% { transform: translate(-2px, -2px); text-shadow: -3px 3px 0 #ffff00, 3px -3px 0 #ff0066; }
}
