* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.calculator-title {
    font-size: 1em;
    font-weight: 600;
    color:rgba(0, 0, 0, 0.4);
    text-align: center;
    margin-bottom: 15px;
    animation: fadeInUp 0.8s ease-out;
}

.calculator {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1), 0, 0, 0, 1px rgba(255, 255, 255, 0.2);
    padding: 25px;
    width: 100%;
    max-width: 320px;
    transition: transform 0.3s ease;
}

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

.display {
    margin-bottom: 20px;
}

.display input {
    width: 100%;
    height: 80px;
    border: none;
    background: #f8f9fa;
    border-radius: 15px;
    font-size: 50px;
    font-weight: 300;
    text-align: right;
    padding: 0 20px;
    color: #2c3e50;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.display input:focus {
    outline: none;
    background: #ffffff;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1), 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 12px;
    height: 400px;
}

.btn {
    border: none;
    border-radius: 15px;
    font-size: 20px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.btn:active::before {
    width: 100%;
    height: 100%;
}

.btn.number {
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    color: #2c3e50;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.btn.number:hover {
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
}

.btn.operator {
    background: linear-gradient(145deg, #ff6b6b, #ee5a52);
    color: white;
    font-weight: 600;
}

.btn:hover {
    background: linear-gradient(145deg, #ff5252, #e53935);
}

.btn.clear {
    background: linear-gradient(145deg, #ffa726, #ff9800);
    color: white;
    font-weight: 600;
    font-size: 1.2em;
}

.btn.clear:hover {
    background: linear-gradient(145deg, #ff9800, #f57c00);
}

.btn.equals {
    background: linear-gradient(145deg, #4caf50, #43a047);
    color: white;
    font-weight: 600;
    grid-row: span 2;
    font-size: 20px;
}

.btn.equals:hover {
    background: linear-gradient(145deg, #43a047, #388e3c);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    } 
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calculator {
    animation: fadeInUp 0.6s ease-out;
}