body {
    min-height: 100vh;
    margin: 0;
    background: linear-gradient(135deg, #191720 0%, #232946 100%);
    overflow: hidden;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 0;
    background: repeating-radial-gradient(circle at 20% 30%, #00ffe7 0, #00ffe7 2px, transparent 3px, transparent 100px),
                repeating-radial-gradient(circle at 80% 70%, #ff00cc 0, #ff00cc 2px, transparent 3px, transparent 100px);
    opacity: 0.08;
    animation: bgmove 10s linear infinite alternate;
}

@keyframes bgmove {
    0% { background-position: 0 0, 100vw 100vh; }
    100% { background-position: 100vw 100vh, 0 0; }
}

.calculator {
    width: 100%;
    max-width: 380px;
    margin: 6vh auto;
    border-radius: 18px;
    padding: 4vw 3vw 3vw 3vw;
    background: rgba(24, 27, 38, 0.97);
    box-shadow: 0 0 40px #00ffe766, 0 0 0 4px #232946;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
}

#display {
    width: 100%;
    box-sizing: border-box;
    height: 3.5em;
    font-size: 2em;
    font-family: 'Share Tech Mono', 'Consolas', monospace;
    background: #232946;
    color: #00ffe7;
    border: 2px solid #00ffe7;
    border-radius: 10px;
    margin-bottom: 1.2em;
    padding: 0.5em 0.7em;
    text-align: right;
    letter-spacing: 1px;
    box-shadow: 0 0 12px #00ffe744 inset;
    outline: none;
}

.buttons {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.7em;
}

button {
    padding: 1em 0;
    font-size: 1.1em;
    font-family: 'Orbitron', 'Share Tech Mono', monospace;
    border: none;
    border-radius: 8px;
    background: linear-gradient(145deg, #232946 60%, #191720 100%);
    color: #fff;
    box-shadow: 0 2px 8px #191720cc, 0 0 8px #00ffe799 inset;
    cursor: pointer;
    transition: 
        background 0.2s,
        color 0.2s,
        box-shadow 0.2s,
        transform 0.1s;
    border-bottom: 3px solid #00ffe7;
    text-shadow: 0 0 4px #00ffe7, 0 0 2px #fff;
    min-width: 0;
}

button:hover, button:focus {
    background: linear-gradient(135deg, #00ffe7 40%, #ff00cc 100%);
    color: #232946;
    box-shadow: 0 0 16px #ff00cc99, 0 0 32px #00ffe799 inset;
    transform: translateY(-2px) scale(1.04);
    border-bottom: 3px solid #ff00cc;
}

button:nth-child(5n+1) {
    background: linear-gradient(135deg, #ff00cc 60%, #232946 100%);
    color: #fff;
    border-bottom: 3px solid #00ffe7;
    box-shadow: 0 2px 10px #ff00cc99, 0 0 10px #ff00cc77 inset;
}

button:nth-child(5n+1):hover, button:nth-child(5n+1):focus {
    background: linear-gradient(135deg, #00ffe7 40%, #ff00cc 100%);
    color: #232946;
    border-bottom: 3px solid #00ffe7;
}

/* Responsive Design */
@media (max-width: 600px) {
    .calculator {
        max-width: 98vw;
        padding: 5vw 2vw 3vw 2vw;
        margin: 4vw auto;
    }
    #display {
        font-size: 6vw;
        height: 2.8em;
        padding: 0.4em 0.5em;
    }
    .buttons {
        gap: 2vw;
    }
    button {
        font-size: 5vw;
        padding: 4vw 0;
    }
}

@media (max-width: 400px) {
    .calculator {
        max-width: 100vw;
        padding: 2vw 1vw 2vw 1vw;
    }
    #display {
        font-size: 7vw;
        padding: 0.3em 0.3em;
    }
    button {
        font-size: 6vw;
        padding: 3vw 0;
    }
}
