body, html {
    height: 100%;
    margin: 0;
    font-family: 'Anonymous Pro', monospace;
    background: #000; /* Simulating the black background of a terminal */
    color: #33ff33; /* Classic terminal green text */
    display: flex;
    justify-content: center;
    align-items: center;
}

.terminal-monitor {
    position: relative; 
    background: black;
    border: 3px solid #333;
    padding: 20px;
    color: #33ff33;
    font-family: 'Anonymous Pro', monospace;
    border-radius: 20px;
    box-shadow: inset 0 0 15px rgba(0, 255, 0, 0.3),
                0 0 20px rgba(0, 255, 0, 0.2),
                0 0 0 10px black;
    border: 2px solid #00ff00;
    z-index: 2; 
}

.terminal-monitor:before {
    content: '';
    position: absolute;
    top: -2px; left: -2px; bottom: -2px; right: -2px;
    z-index: -1;
    border-radius: 18px; 
    box-shadow: inset 0 0 30px black; 
    pointer-events: none;
}

.link {
    color: #33ff33;
}

#game {
    border: 1px solid #333;
    padding: 20px;
    max-width: 500px; 
    width: 100%;
    margin: 0;
    text-align: left;
    background: #000;
    border-radius: 20px;
    position: relative;
}

.terminal-curve {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 20px; 
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.75);
    pointer-events: none; 
    z-index: 5;
}

.terminal-glass {
    position: absolute;
    top: 0%;
    right: 00%;
    bottom: 0%;
    left: 0%;
    background: linear-gradient(
        140deg,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0) 80%
    );
    border-radius: 20px;
    pointer-events: none;
    z-index: 10;
}

.footer {
    margin-top: 20px;
}

h1 { 
    font-weight: 800;
}

#problem-counter {
    background-color: #222;
    padding: 5px 10px;
    margin-bottom: 5px;
    border-radius: 0;
    color: #33ff33;
}

.problem {
    font-size: 24px;
    margin-bottom: 20px;
    color: #33ff33;
    border-bottom: 2px solid #333;
    padding-bottom: 20px;
}

.answer {
    font-size: 24px;
    padding: 10px;
    margin-bottom: 20px;
    width: calc(100% - 22px);
    box-sizing: border-box;
    border: 1px solid #333;
    background: #000;
    color: #33ff33;
    font-family: 'Anonymous Pro', monospace;
    border-radius: 0;
}

.submit {
    padding: 10px 20px;
    font-size: 18px;
    cursor: pointer;
    background-color: rgba(51, 51, 51, 0.4); 
    color: #33ff33;
    border: 1px solid rgba(255, 255, 255, 0.2); 
    border-radius: 4px; 
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.4); 
    text-shadow: none;
    backdrop-filter: blur(5px); 
}

.submit:hover {
    background-color: rgba(51, 51, 51, 0.6);
    border-color: rgba(255, 255, 255, 0.3); 
}

.submit:active {
    box-shadow:
        0 2px 3px rgba(0, 0, 0, 0.1),
        inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.timer, .score {
    font-size: 18px;
    margin-top: 20px;
    color: #33ff33;
}

@media (max-width: 767px) {
    #game {
        margin: 10px;
        padding: 20px;
    }

    .problem, .answer, .timer, .score {
        font-size: 20px;
    }

    .submit {
        padding: 10px 15px;
        font-size: 16px;
    }
}

@keyframes shake {
    0%, 100% {
      transform: translateX(0);
    }
  
    10%, 30%, 50%, 70%, 90% {
      transform: translateX(-3px);
    }
  
    20%, 40%, 60%, 80% {
      transform: translateX(3px);
    }
  }
  
  .input-error {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    perspective: 1000px;
  }
  
@keyframes flicker {
  0% { opacity: 1; }
  50% { opacity: 0.90; }
  100% { opacity: 1; }
}

.terminal-monitor {
    animation: flicker 10s infinite alternate;
}

#splash-screen {
    position: fixed; 
    max-width: 500px;
    width: 100%;

    text-align: left;
    border-radius: 20px;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000; 
    box-shadow: inset 0 0 15px rgba(0, 255, 0, 0.3),
                0 0 20px rgba(0, 255, 0, 0.2),
                0 0 0 10px black;
  }
  
  #splash-screen h1 {
    color: #33ff33;
    margin-bottom: 20px;
  }
  
  #splash-screen p {
    color: #33ff33;
    margin-bottom: 40px;
    text-align: left;
  }
  
  #start-game {
    padding: 10px 20px;

    font-size: 18px;
    cursor: pointer;
    background-color: rgba(51, 51, 51, 0.4);
    color: #33ff33;
    border: none;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-shadow: none;
    backdrop-filter: blur(5px);
  }
  
  #start-game:hover {
    background-color: rgba(51, 51, 51, 0.6);
  }
  

  @keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
  }
  
  .blinking-cursor {
    font-weight: 100;
    font-size: 24px;
    color: #33ff33;
    -webkit-animation: blink 1s step-end infinite;
    -moz-animation: blink 1s step-end infinite;
    -ms-animation: blink 1s step-end infinite;
    -o-animation: blink 1s step-end infinite;
    animation: blink 1s step-end infinite;
  