body {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-color: black;
  background-image: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.2) 1px,
    transparent 1px
  );
  background-size: 1rem 1rem;
}

.container {
 display: flex;
    justify-content: space-between; 
    align-items: center;
    flex-wrap: nowrap;
    gap: 2em;
    padding: 1rem;
    width: 100vw; 
    height: 100vh; 
    text-align: center;
}

.column {
  flex: 1;
  padding: 1rem;
  justify-content: space-between;
  margin: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.error-code {
  font-family: "Schibsted Grotesk", sans-serif;
  font-size: clamp(2rem, 16vw, 14rem);
  font-optical-sizing: auto;
  font-optical-sizing: auto;
  font-weight: 800;
  font-style: normal;
  text-align: center;
  color: #fff;
  line-height: 1;
 }

.error-message {
  font-family: "Schibsted Grotesk", sans-serif;
  font-optical-sizing: auto;
  padding: 1rem;
  line-height: 1.6;
  font-weight: 400;
  font-size: clamp(1rem, 1vw, 10rem);
  font-style: normal;
  text-align: center;
  color: #fff;
  margin-top: 0.1rem;
  
}

.brain-emoji {
    font-size: clamp(6rem, 1vw, 10rem);
    display: inline-block;
    text-align: center;
    opacity: 0;
    animation: bounceIn 1s ease-out forwards, brainPulse 2s ease-in-out infinite;
    transition: opacity 0.8s ease-in-out;
}

.glow-red {
    filter: drop-shadow(0 0 10px #ff3333) drop-shadow(0 0 30px #ff7777);
}

.glow-green {
    filter: drop-shadow(0 0 10px #90e140) drop-shadow(0 0 30px #90e140);
}

.error-code, 
.error-message {
    opacity: 0; 
    animation: bounceIn 1s ease-out forwards;
}

.column.left,
.column.right {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: auto;
}

.speech-bubble {
  position: relative;
  margin: auto;
  justify-content: center;
  align-items: center;
  color: rgba(0, 0, 0, 0.8);
  margin: auto;
  padding: 1.5em;
  max-width: 15vw;
  font-size: clamp(0.6rem, 1vw, 1rem);
  border-radius: 3em;
  text-align: center;
  font-family: "Schibsted Grotesk", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-size: clamp(1rem, 0.8vw, 5rem);
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  animation: brainPulse 2s ease-in-out infinite; 
}

.speech-bubble::after {
  content: "";
  position: absolute;
  bottom: -1em;
  width: 1.5em;
  height: 2em;
  background: inherit; 
    clip-path: polygon(50% 100%, 0 0, 100% 0); /* Triangle shape */
    transform: scale(2);
}

.left .speech-bubble {
  background: #ff4d4d;
  color: black;
}

.left .speech-bubble::after {
  background: #ff4d4d;
  right: 2.5em;
  transform: rotate(-45deg); 
}

.right .speech-bubble {
  background: #90e140;
  color: black;
}

.right .speech-bubble::after {
  background: #90e140;
  left: 2.5em;
   transform: rotate(45deg); 

}

@keyframes brainPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes float {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes bounceIn {
  0% {
    transform: scale(0.7);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
  }
  70% {
    transform: scale(0.9);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes popFade {
   0% { 
        opacity: 0; 
        transform: scale(0.8) translateY(10px); 
    }
    10% { 
        opacity: 1; 
        transform: scale(1) translateY(0); 
    }
    60% { 
        opacity: 1; 
        transform: scale(1.1); 
    }
    100% { 
        opacity: 1; 
        transform: scale(1); 
    }
}

@keyframes brainGlowRed {
    0% { filter: drop-shadow(0 0 0px rgba(255, 77, 77, 0)); } 
    50% { filter: drop-shadow(0 0 30px rgba(255, 77, 77, 1)); } 
    100% { filter: drop-shadow(0 0 0px rgba(255, 77, 77, 0)); } 
}

@keyframes brainGlowGreen {
    0% { filter: drop-shadow(0 0 0px rgba(144, 225, 64, 0)); } 
    50% { filter: drop-shadow(0 0 30px rgba(144, 225, 64, 1)); } 
    100% { filter: drop-shadow(0 0 0px rgba(144, 225, 64, 0)); } 
}


.error-code { animation-delay: 0s; } 
.error-message { animation-delay: 1s; }
.brain-emoji { animation-delay: 2s; } 

.speech-bubble {
    opacity: 0; 
  animation: brainPulse 5s;
}



@media (max-width: 768px) {
  .left .speech-bubble::after,
  left: 25% !important;
    transform: translateX(-25%) !important;
  }

.right .speech-bubble::after,
  right: 25% !important;
    transform: translateX(-25%) !important;
  }
}

@media (max-width: 480px) {
  .left .speech-bubble::after,
  left: 50% !important;
    transform: translateX(-50%) !important;
  
  .right .speech-bubble::after,
  right: 25% !important;
    transform: translateX(-25%) !important;
  }

  .speech-bubble {
    max-width: 80vw;
  }
}