/* Futuristic Calculator Styling */

body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: #000;
    font-family: 'Orbitron', sans-serif;
    overflow: hidden;
    position: relative;
}

/* Animated Gradient Background */
body::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        #00fff7,
        #ff00c8,
        #00ff73,
        #ffae00,
        #00fff7
    );
    animation: rotateBg 15s linear infinite;
    z-index: -2;
    filter: blur(200px);
    opacity: 0.4;
}

@keyframes rotateBg {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Neon Glow Animation */
@keyframes neonGlow {
    0% { box-shadow: 0 0 15px #00fff7, 0 0 30px #00fff7, 0 0 60px transparent; }
    50% { box-shadow: 0 0 25px #00fff7, 0 0 50px #00fff7, 0 0 80px #00fff7; }
    100% { box-shadow: 0 0 15px #00fff7, 0 0 30px #00fff7, 0 0 60px transparent; }
}

/* Glowing Text Pulse */
@keyframes textPulse {
    0%, 100% { text-shadow: 0 0 5px currentColor, 0 0 15px currentColor, 0 0 25px transparent; }
    50% { text-shadow: 0 0 10px currentColor, 0 0 20px currentColor, 0 0 40px currentColor; }
}

/* Calculator Box */
.calculator {
    background: rgba(20, 20, 40, 0.95);
    padding: 20px;
    border-radius: 20px;
    animation: neonGlow 3s infinite ease-in-out;
    max-width: 400px;
    width: 90%;
    z-index: 2;
}

/* Display Screen */
#display {
    width: 93%;
    height: 90px;
    background-color: #0a0a0a;
    color: #00fff7;
    border-radius: 10px;
    margin-bottom: 1rem;
    text-align: right;
    padding: 15px;
    font-size: 2rem;
    border: none;
    outline: none;
    box-shadow: inset 0 0 15px rgba(0, 255, 255, 0.5);
    text-shadow: 0 0 5px #00fff7, 0 0 15px #00fff7, 0 0 30px #00fff7;
}

/* Buttons Layout */
.buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

/* General Button Style */
button {
    height: 60px;
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    color: #fff;
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
    transition: all 0.2s ease;
    cursor: pointer;
    text-shadow: 0 0 5px #00fff7, 0 0 10px #00fff7, 0 0 20px #00fff7;
}

/* Hover Glow (with animated text pulse) */
button:hover {
    box-shadow: 0 0 20px #00fff7;
    animation: textPulse 1s infinite ease-in-out;
}

/* Glowing effect when pressed */
button:active {
    transform: scale(0.95);
    box-shadow: 0 0 25px #00fff7, 0 0 50px #00fff7, 0 0 80px #00fff7;
    background: linear-gradient(145deg, #00e5ff, #00aaff);
}

/* Special Buttons */
.functions {
    background: linear-gradient(145deg, #ff004c, #9b0036);
    text-shadow: 0 0 5px #ff004c, 0 0 10px #ff004c, 0 0 20px #ff004c;
}
.operations {
    background: linear-gradient(145deg, #ffae00, #ff6f00);
    text-shadow: 0 0 5px #ffae00, 0 0 10px #ffae00, 0 0 20px #ffae00;
}
.equalTo {
    background: linear-gradient(145deg, #00ff73, #00cc5c);
    text-shadow: 0 0 5px #00ff73, 0 0 10px #00ff73, 0 0 20px #00ff73;
}

/* Responsive Styling */
@media (max-width: 600px) {
    #display {
        font-size: 1.5rem;
        height: 70px;
    }
    button {
        height: 55px;
        font-size: 1rem;
    }
}


