*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body{
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    padding: 20px;
}

.calculator{
    width: 100%;
    max-width: 400px;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1{
    text-align: center;
    color: white;
    margin-bottom: 2rem;
    font-size: 2.5rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card{
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.card:hover{
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.c-head{
    margin-bottom: 1.5rem;
}

#result{
    width: 100%;
    height: 80px;
    font-size: 2.5rem;
    font-weight: 500;
    text-align: right;
    padding: 0.5rem 1rem;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    color: #333;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

#result:focus {
    outline: none;
    background: rgba(0, 0, 0, 0.08);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.c-body{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.8rem;
}

.btn{
    border: none;
    padding: 1rem;
    font-size: 1.2rem;
    font-weight: 500;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: #f0f0f0;
    color: #333;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease-out, height 0.3s ease-out;
}

.btn:active::after {
    width: 200px;
    height: 200px;
}

.btn:hover{
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn:active{
    transform: translateY(0);
}

.btn-style{
    background: #3498db;
    color: white;
}

.btn-style:hover{
    background: #2980b9;
}

.btn-result{
    background: #2ecc71;
    color: white;
}

.btn-result:hover{
    background: #27ae60;
}

/* Special buttons styling */
.btn[value="C"] {
    background: #e74c3c;
    color: white;
}

.btn[value="C"]:hover {
    background: #c0392b;
}

.btn[value="DEL"] {
    background: #f1c40f;
    color: #333;
}

.btn[value="DEL"]:hover {
    background: #f39c12;
}

/* Button press animation */
@keyframes buttonPress {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
    }
}

.btn:active {
    animation: buttonPress 0.2s ease-out;
}

/* Responsive design */
@media (max-width: 480px) {
    .calculator {
        max-width: 100%;
    }
    
    .btn {
        padding: 0.8rem;
        font-size: 1rem;
    }
    
    #result {
        font-size: 2rem;
        height: 70px;
    }
}