* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(120deg, #2c3e50, #3498db);
}

.calculator {
    position: relative;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 25px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    transition: transform 0.3s ease;
    max-width: 400px;
    width: 90%;
}

.calculator:hover {
    transform: scale(1.02);
}

.display {
    width: 100%;
    height: 100px;
    border: none;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    margin-bottom: 25px;
    font-size: 2.5rem;
    text-align: right;
    color: #fff;
    padding: 20px;
    pointer-events: none;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.2);
}

.buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

button {
    padding: min(25px, 4vw);
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: min(24px, 5vw);
    cursor: pointer;
    border-radius: 15px;
    transition: all 0.3s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

button:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

button.operator {
    background: rgba(255, 152, 0, 0.3);
    font-weight: bold;
}

button.equals {
    background: rgba(76, 175, 80, 0.3);
    grid-column: span 2;
    font-weight: bold;
}

button.clear {
    background: rgba(244, 67, 54, 0.3);
    font-weight: bold;
}

@keyframes buttonPress {
    0% { transform: scale(1); }
    50% { transform: scale(0.92); }
    100% { transform: scale(1); }
}

.pressed {
    animation: buttonPress 0.2s ease;
}

/* Responsive Design */
@media screen and (max-width: 480px) {
    .calculator {
        padding: 15px;
        width: 95%;
    }

    .display {
        height: 80px;
        font-size: 2rem;
        margin-bottom: 15px;
    }

    .buttons {
        gap: 10px;
    }

    button {
        padding: 15px;
        font-size: 1.2rem;
    }
}

@media screen and (max-width: 320px) {
    .calculator {
        padding: 10px;
    }

    .display {
        height: 60px;
        font-size: 1.5rem;
        margin-bottom: 10px;
    }

    button {
        padding: 12px;
        font-size: 1rem;
    }
}