@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #1e1e2e; 
    background-image: radial-gradient(circle at 20% 20%, rgba(255, 107, 107, 0.15), transparent 25%),
                      radial-gradient(circle at 80% 80%, rgba(78, 205, 196, 0.15), transparent 25%);
}

.calculator {
    width: 350px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    padding: 20px;
}

.display {
    width: 100%;
    height: 120px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 20px;
    margin-bottom: 10px;
    word-wrap: break-word;
    word-break: break-all;
}

.previous-operand {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    min-height: 24px;
}

.current-operand {
    color: #fff;
    font-size: 2.5rem;
    font-weight: 500;
}

.buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.btn {
    border: none;
    outline: none;
    height: 60px;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 500;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}


.operator {
    background: rgba(255, 165, 0, 0.2); 
    color: #ffb74d;
}

.operator:hover {
    background: rgba(255, 165, 0, 0.35);
}

.fn {
    color: #81c784; 
    background: rgba(129, 199, 132, 0.1);
}

.equals {
    grid-column: span 2;
    background: #6366f1; 
    color: white;
}

.equals:hover {
    background: #4f46e5;
}

.zero {
    grid-column: span 1;
}