* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    color: #fff;
    overflow: hidden;
    position: relative;
}

body::before, body::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    z-index: 0;
    filter: blur(100px);
}

body::before {
    background: rgba(99, 102, 241, 0.4);
    top: -100px;
    left: -100px;
}

body::after {
    background: rgba(236, 72, 153, 0.3);
    bottom: -100px;
    right: -100px;
}

.calculator {
    width: 340px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 28px;
    padding: 22px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    z-index: 10;
}

.display {
    width: 100%;
    margin-bottom: 24px;
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    word-wrap: break-word;
    word-break: break-all;
    min-height: 110px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 18px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.2);
}

.previous-operand {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.1rem;
    min-height: 1.6rem;
    margin-bottom: 8px;
    font-weight: 300;
}

.current-operand {
    color: white;
    font-size: 2.8rem;
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -1px;
}

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

.btn {
    cursor: pointer;
    border: none;
    outline: none;
    background: rgba(255, 255, 255, 0.06);
    color: white;
    font-size: 1.4rem;
    font-weight: 400;
    border-radius: 18px;
    height: 68px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: center;
    align-items: center;
    user-select: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.btn:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(1px);
    background: rgba(255, 255, 255, 0.04);
}

.btn.op {
    background: rgba(99, 102, 241, 0.85);
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn.op:hover {
    background: rgba(99, 102, 241, 1);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn.fn {
    background: rgba(255, 255, 255, 0.15);
    color: #e2e8f0;
    font-weight: 500;
}

.btn.fn:hover {
    background: rgba(255, 255, 255, 0.22);
}

.btn.equals {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn.equals:hover {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn.span-two {
    grid-column: span 2;
}
