01/03/2026
Cartoon Neon Calculator - Galaxy
body{
margin:0;
height:100vh;
display:flex;
flex-direction:column;
justify-content:center;
align-items:center;
overflow:hidden;
font-family:Arial, sans-serif;
background:black;
}
/* Galaxy Background Canvas */
canvas{
position:absolute;
top:0;
left:0;
width:100%;
height:100%;
z-index:-1;
}
/* Calculator Box */calculator{
backdrop-filter: blur(15px);
background: rgba(255,255,255,0.05);
padding:25px;
border-radius:30px;
box-shadow:0 0 40px rgba(0,255,255,0.4);
display:grid;
grid-template-columns: repeat(4,75px);
gap:18px;
margin-bottom:40px; /* space for photo squares */
}
/* Display */display{
grid-column: span 4;
height:65px;
border:none;
border-radius:20px;
font-size:26px;
text-align:right;
padding:10px;
background:linear-gradient(145deg, , );
color:white;
box-shadow:
inset 0 4px 10px rgba(255,255,255,0.5),
0 0 15px ;
}
/* Cartoon Button Base */
button{
height:70px;
border:none;
border-radius:22px;
font-size:22px;
font-weight:bold;
cursor:pointer;
transition:0.3s;
color:white;
box-shadow:
inset 0 4px 8px rgba(255,255,255,0.6),
inset 0 -6px 10px rgba(0,0,0,0.4),
0 8px 15px rgba(0,0,0,0.4);
}
/* Button Colors */
button:nth-child(n+2){
background: linear-gradient(145deg, , );
}
/* Fun colors */
button:nth-child(5n){
background: linear-gradient(145deg, , );
}
button:nth-child(3n){
background: linear-gradient(145deg, , );
}
button:nth-child(4n){
background: linear-gradient(145deg, , );
}
/* Hover Glow */
button:hover{
transform: translateY(-5px) scale(1.05);
box-shadow:
0 0 15px white,
0 0 30px ,
0 10px 20px rgba(0,0,0,0.5);
}
/* Click Effect */
button:active{
transform: scale(0.95);
}
/* BIG Super Glowing Equal Button */equal{
grid-column: span 2;
font-size:28px;
background: linear-gradient(145deg, , );
color:black;
box-shadow:
0 0 20px ,
0 0 40px ,
0 0 80px ;
animation: superGlow 1.5s infinite alternate;
}
superGlow{
from{
box-shadow:
0 0 20px ,
0 0 40px ,
0 0 80px ;
}
to{
box-shadow:
0 0 30px ,
0 0 60px ,
0 0 120px ;
}
}
/* Photo Squares Container */photo-container{
display:flex;
gap:20px;
flex-wrap:wrap;
justify-content:center;
}
/* Each photo square */photo-square{
width:120px;
height:120px;
border-radius:20px;
background: rgba(255,255,255,0.05);
backdrop-filter: blur(10px);
box-shadow:
0 0 20px rgba(0,255,255,0.5),
0 0 40px rgba(255,0,255,0.3);
transition:0.3s;
cursor:pointer;
display:flex;
justify-content:center;
align-items:center;
color:white;
font-weight:bold;
font-size:14px;
}
photo-square:hover{
transform: scale(1.1);
box-shadow:
0 0 30px ,
0 0 60px ,
0 0 90px ;
}
C
DEL
×
-
7
8
9
+
4
5
6
.
1
2
3
0
=
Photo 1
Photo 2
Photo 3
Photo 4
Photo 5
function append(value){
document.getElementById("display").value += value;
}
function clearDisplay(){
document.getElementById("display").value = "";
}
function deleteLast(){
let current = document.getElementById("display").value;
document.getElementById("display").value = current.slice(0,-1);
}
function calculate(){
try{
document.getElementById("display").value =
eval(document.getElementById("display").value);
}
catch{
document.getElementById("display").value = "Error";
}
}
/* Galaxy Background Animation */
const canvas = document.getElementById('galaxy');
const ctx = canvas.getContext('2d');
let stars = [];
let w, h;
function resize(){
w = canvas.width = window.innerWidth;
h = canvas.height = window.innerHeight;
}
window.addEventListener('resize', resize);
resize();
for(let i=0;i