html, body { margin: 0; height: 100%; } body { background: linear-gradient(-45deg, #0a0a0a, #1e1e66, #7a0f5d, #2b0b50); background-size: 400% 400%; animation: gradientShift 6s ease-in-out infinite; } @keyframes gradientShift { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }