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

body {
    background: linear-gradient(135deg, #1a2a6c, #2c3e50, #4a00e0);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.mainBody {
    width: 100%;
    max-width: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calculator {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
}

.calculator:hover {
    transform: translateY(-5px);
}

.calculator-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.calculator-header h3 {
    color: #fff;
    font-weight: 300;
    letter-spacing: 2px;
    font-size: 1.5rem;
}

.answer {
    width: 100%;
    height: 80px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.answer input {
    width: 100%;
    height: 100%;
    font-size: 28px;
    font-weight: 300;
    padding: 5px;
    text-align: right;
    background: transparent;
    border: none;
    color: #fff;
    outline: none;
}

.allBtn {
    width: 100%;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.button-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.Btn {
    flex: 1;
    border: none;
    outline: none;
    font-size: 20px;
    padding: 18px 0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #fff;
    font-weight: 500;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
}

.Btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

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

.Btn.number {
    background: rgba(255, 255, 255, 0.15);
}

.Btn.operator {
    background: rgba(255, 152, 0, 0.7);
}

.Btn.bracket {
    background: rgba(3, 169, 244, 0.7);
}

.Btn.function {
    background: rgba(156, 39, 176, 0.7);
}

.Btn.clear {
    background: rgba(244, 67, 54, 0.7);
}

.Btn.equals {
    background: linear-gradient(45deg, #4CAF50, #8BC34A);
}

/* Animation classes */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes success {
    0% { background-color: transparent; }
    50% { background-color: rgba(76, 175, 80, 0.3); }
    100% { background-color: transparent; }
}

@keyframes error {
    0% { background-color: transparent; }
    50% { background-color: rgba(244, 67, 54, 0.3); }
    100% { background-color: transparent; }
}

.shake {
    animation: shake 0.5s;
}

.pulse {
    animation: pulse 0.3s;
}

.success {
    animation: success 1s;
}

.error {
    animation: error 1.5s;
}

/* Responsive design */
@media (max-width: 400px) {
    .calculator {
        width: 100%;
    }
    
    .Btn {
        padding: 15px 0;
        font-size: 18px;
        min-height: 55px;
    }
    
    .answer input {
        font-size: 24px;
    }
}