body, html { height: 100%; margin: 0; background-color: #000; color: #fff; font-family: 'Press Start 2P', monospace; display: flex; justify-content: center; align-items: center; text-align: center; } .container { display: flex; justify-content: center; align-items: center; height: 100%; } h1 { font-size: 3rem; text-shadow: 4px 4px 0px #555; animation: flicker 1.5s infinite alternate; } @keyframes flicker { 0%, 18%, 22%, 25%, 53%, 57%, 100% { text-shadow: 0 0 4px #fff, 0 0 11px #fff, 0 0 19px #fff, 0 0 40px #0fa, 0 0 80px #0fa, 0 0 90px #0fa, 0 0 100px #0fa, 0 0 150px #0fa; } 20%, 24%, 55% { text-shadow: none; } }