body {
    min-height: 100vh;
    margin: 0;
    background: linear-gradient(135deg, #f06, #004d7a, #00d2ff, #43cea2, #185a9d);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Segoe UI', 'Roboto', Arial, sans-serif;
    overflow: hidden;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.glass {
    background: rgba(255,255,255,0.15);
    box-shadow: 0 8px 32px 0 rgba(31,38,135,0.37);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.18);
}

.calculator {
    width: 340px;
    padding: 28px 24px 18px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
    box-shadow: 0 0 40px 8px #43cea2, 0 0 0 2px #fff3, 0 8px 32px 0 rgba(31,38,135,0.37);
    border: 2px solid #43cea2;
    animation: neon-border 2s infinite alternate;
}

@keyframes neon-border {
    0% { box-shadow: 0 0 40px 8px #43cea2, 0 0 0 2px #fff3; }
    100% { box-shadow: 0 0 60px 16px #43cea2, 0 0 0 4px #fff6; }
}

.display {
    width: 100%;
    height: 64px;
    background: rgba(30,30,30,0.96);
    color: #fff;
    font-size: 2.2rem;
    border: 2px solid #43cea2;
    border-radius: 14px;
    padding: 12px 18px;
    text-align: right;
    margin-bottom: 18px;
    box-sizing: border-box;
    letter-spacing: 1px;
    outline: none;
    transition: box-shadow 0.2s;
    box-shadow: 0 0 16px #43cea2, 0 2px 8px rgba(0,0,0,0.08);
    text-shadow: 0 0 8px #43cea2, 0 0 2px #fff;
}

.buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    width: 100%;
    margin-bottom: 14px;
}

button {
    padding: 0;
    height: 54px;
    font-size: 1.35rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    background: rgba(255,255,255,0.25);
    color: #222;
    font-weight: 500;
    box-shadow: 0 0 8px #43cea2, 0 2px 8px rgba(0,0,0,0.06);
    transition: 
        background 0.2s, 
        color 0.2s, 
        transform 0.1s, 
        box-shadow 0.2s,
        filter 0.2s;
    position: relative;
    overflow: hidden;
    filter: brightness(1.05);
}

button:active {
    transform: scale(0.94);
    filter: brightness(1.2);
    box-shadow: 0 0 16px #ffb347, 0 1px 4px rgba(0,0,0,0.12);
}

button.operator {
    background: linear-gradient(135deg, #ffb347 0%, #ffcc33 100%);
    color: #fff;
    font-weight: 700;
    text-shadow: 0 0 6px #ffb347;
    box-shadow: 0 0 12px #ffb347, 0 2px 8px rgba(0,0,0,0.06);
}

button.operator:hover {
    background: linear-gradient(135deg, #ff9800 0%, #ffc107 100%);
    box-shadow: 0 0 24px #ff9800, 0 0 8px #fff;
}

button.number {
    background: rgba(255,255,255,0.35);
    color: #222;
}

button.number:hover {
    background: #f1f1f1;
}

button.clear {
    background: linear-gradient(135deg, #ff5858 0%, #f857a6 100%);
    color: #fff;
    font-weight: 700;
    text-shadow: 0 0 6px #f857a6;
    box-shadow: 0 0 12px #f857a6, 0 2px 8px rgba(0,0,0,0.06);
}

button.clear:hover {
    background: linear-gradient(135deg, #e53935 0%, #d81b60 100%);
    box-shadow: 0 0 24px #d81b60, 0 0 8px #fff;
}

.equals {
    width: 100%;
    margin-top: 8px;
    height: 54px;
    background: linear-gradient(135deg, #43cea2 0%, #185a9d 100%);
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    box-shadow: 0 0 16px #43cea2, 0 2px 8px rgba(0,0,0,0.08);
    text-shadow: 0 0 6px #43cea2;
}

.equals:hover {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    box-shadow: 0 0 32px #38ef7d, 0 0 8px #fff;
    transform: scale(1.05);
}

footer {
    margin-top: 10px;
    font-size: 1rem;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.2);
    letter-spacing: 1px;
}

/* Custom Cursor */
.custom-cursor {
    position: fixed;
    top: 0; left: 0;
    width: 36px; height: 36px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    background: rgba(67,206,162,0.12);
    border: 3px solid #43cea2;
    box-shadow: 0 0 32px #43cea2, 0 0 8px #fff;
    mix-blend-mode: lighten;
    transition: 
        transform 0.12s cubic-bezier(.4,2,.6,.8), 
        background 0.2s, 
        border-color 0.2s, 
        box-shadow 0.2s;
    transform: translate(-50%, -50%) scale(1);
}

button:hover ~ .custom-cursor,
button:focus ~ .custom-cursor {
    background: rgba(255,255,255,0.35);
    border-color: #ffb347;
    box-shadow: 0 0 48px #ffb347, 0 0 16px #fff;
    transform: translate(-50%, -50%) scale(1.3);
}

/* Ripple Effect */
button .ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    animation: ripple 0.6s linear;
    background: rgba(255,255,255,0.7);
    pointer-events: none;
}
@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}