body {
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(135deg, #1f1c2c, #928dab);
    font-family: Arial, sans-serif;
}

#calculator {
    background: rgba(25, 25, 25, 0.85);
    border-radius: 20px;
    max-width: 400px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    animation: fadeIn 1s ease-in-out;
}

#display {
    width: 100%;
    padding: 25px;
    font-size: 3.5rem;
    text-align: right;
    border: none;
    background: rgba(0, 0, 0, 0.4);
    color: #00ffcc;
    outline: none;
    letter-spacing: 1px;
    box-sizing: border-box;
    overflow-x: auto;  /* fixes text cutting */
    white-space: nowrap;
}

#keys {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 20px;
}

button {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    border: none;
    background: linear-gradient(145deg, #2d2d2d, #1a1a1a);
    color: #fff;
    font-size: 1.8rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 5px 5px 15px #0a0a0a, -5px -5px 15px #2e2e2e;
    transition: all 0.2s ease-in-out;
}

button:hover {
    transform: scale(1.07);
    background: linear-gradient(145deg, #3d3d3d, #1c1c1c);
}

button:active {
    transform: scale(0.95);
    background: linear-gradient(145deg, #202020, #0f0f0f);
}

/* Neon operator buttons */
.operator-btn {
    background: linear-gradient(145deg, #ff6f00, #ff9500);
    color: #fff;
    box-shadow: 0 0 10px #ff8800, inset 0 0 5px #ff5500;
}

.operator-btn:hover {
    background: linear-gradient(145deg, #ff8533, #ffb366);
    box-shadow: 0 0 15px #ffa64d;
}

.operator-btn:active {
    background: linear-gradient(145deg, #cc5c00, #e67300);
}

/* Special styling for = button */
.equal-btn {
    background: linear-gradient(145deg, #00b894, #00cec9);
    box-shadow: 0 0 15px #00ffe5, inset 0 0 5px #00bfa6;
    color: white;
}

.equal-btn:hover {
    background: linear-gradient(145deg, #00cec9, #1dd1a1);
}

/* Fade-in animation */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}
