<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Hacker Terminal</title>
<style>
/* Fullscreen Background */
body {
margin: 0;
overflow: hidden;
background: black;
font-family: 'Courier New', monospace;
color: #00ff00;
text-shadow: 0 0 5px #00ff00;
}
/* Canvas for Matrix Effect */
canvas {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
}
/* Hacker Terminal UI */
.terminal {
position: absolute;
top: 20%;
left: 10%;
width: 80%;
padding: 20px;
background: rgba(0, 0, 0, 0.7);
border: 1px solid #00ff00;
box-shadow: 0 0 10px #00ff00;
overflow: hidden;
}
/* Hacking Text Animation */
.hacker-text {
font-size: 24px;
white-space: nowrap;
overflow: hidden;
display: inline-block;
border-right: 2px solid #00ff00;
animation: typing 4s steps(40) infinite, flicker 1.5s infinite alternate;
}
@keyframes typing {
from { width: 0; }
to { width: 100%; }
}
@keyframes flicker {
0% { opacity: 1; }
100% { opacity: 0.7; }
}
/* Blinking Cursor */
.cursor {
display: inline-block;
width: 10px;
height: 20px;
background: #00ff00;
animation: blink 0.6s infinite alternate;
}
@keyframes blink {
0% { opacity: 1; }
100% { opacity: 0; }
}
</style>
</head>
<body>
<canvas id="matrixCanvas"></canvas>
<div class="terminal">
<div class="hacker-text">ACCESS GRANTED... SYSTEM BREACH DETECTED</div><span class="cursor"></span>
</div>
<script>
// Matrix Effect Code
const canvas = document.getElementById('matrixCanvas');
const ctx = canvas.getContext('2d');
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
const letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%^&*()";
const fontSize = 16;
const columns = canvas.width / fontSize;
const drops = Array(Math.floor(columns)).fill(1);
function drawMatrix() {
ctx.fillStyle = "rgba(0, 0, 0, 0.05)";
ctx.fillRect(0, 0, canvas.width, canvas.height);
ctx.fillStyle = "#0f0"; // Green text
ctx.font = `${fontSize}px monospace`;
for (let i = 0; i < drops.length; i++) {
const text = letters[Math.floor(Math.random() * letters.length)];
ctx.fillText(text, i * fontSize, drops[i] * fontSize);
if (drops[i] * fontSize > canvas.height && Math.random() > 0.975) {
drops[i] = 0;
}
drops[i]++;
}
}
setInterval(drawMatrix, 50);
// Resize canvas on window resize
window.addEventListener('resize', () => {
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
});
</script>
</body>
</html>