* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow-x: hidden;
    background: linear-gradient(135deg, #fce4ec, #e1f5fe);
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    background-image: url('images/cat.png');
    background-size: 40px 40px; 
    opacity: 0.25;
    z-index: -1;
    pointer-events: none;
}

.calculator {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 30px;
    box-shadow: 0 20px 40px rgba(255, 182, 193, 0.4);
    
    width: 100%; 
    max-width: 350px;
    
    backdrop-filter: blur(10px);
    border: 4px solid #fff;
    position: relative;
    margin-top: 60px;
}

.calc-cat {
    position: absolute;
    top: -85px; 
    left: 50%;
    transform: translateX(-50%);
    width: 140px; 
    z-index: 10;
    pointer-events: none;
}

.display {
    background: linear-gradient(to bottom, #f3e5f5, #ffffff);
    color: #8e24aa;
    text-align: right;
    padding: 15px;
    font-size: 1.8rem;
    margin-bottom: 20px;
    border-radius: 20px;
    box-shadow: inset 2px 4px 8px rgba(0,0,0,0.05);
    min-height: 50px;
    word-wrap: break-word;
}

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

.btn {
    background-color: #ffffff;
    border: none;
    border-radius: 18px;
    padding: 18px 5px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #8c6fa2;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);

    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.btn:active {
    background-color: #fce4ec;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(255, 182, 193, 0.3);
	color: #f06292;
}

.operator { background-color: #e1f5fe; color: #039be5; }
.clear { background-color: #ffcdd2; color: #c62828; }
.equal { background: linear-gradient(45deg, #f06292, #ba68c8); color: white; }

@media (min-width: 768px) {
    body::before {
        background-size: 50px 50px;
        opacity: 0.25;
    }

    .calculator {
        padding: 25px;
        max-width: 380px;
    }

    .calc-cat {
        width: 200px;
        top: -118px;
    }

    .display {
        font-size: 2.2rem;
        padding: 20px;
    }

    .btn {
        padding: 20px;
        font-size: 1.3rem;
    }
	
	.btn:hover {
		background-color: #fce4ec;
		transform: translateY(-2px);
		box-shadow: 0 6px 12px rgba(255, 182, 193, 0.3);
		color: #f06292;
	}
}