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

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.calculator {
    width: 340px;
    background: rgba(30, 30, 50, 0.95);
    border-radius: 20px;
    padding: 24px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(100, 80, 200, 0.15);
    backdrop-filter: blur(10px);
}

.display {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 14px;
    padding: 20px 24px;
    margin-bottom: 20px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-end;
    word-break: break-all;
}

.previous-operand {
    color: rgba(255, 255, 255, 0.45);
    font-size: 1rem;
    min-height: 24px;
    margin-bottom: 4px;
}

.current-operand {
    color: #fff;
    font-size: 2.4rem;
    font-weight: 300;
    letter-spacing: 1px;
}

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

.btn {
    padding: 18px;
    font-size: 1.25rem;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    transition: all 0.15s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

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

.btn.operator {
    color: #c4b5fd;
}

.btn.accent {
    background: rgba(139, 92, 246, 0.25);
    color: #a78bfa;
    font-size: 1.4rem;
}

.btn.accent:hover {
    background: rgba(139, 92, 246, 0.4);
}

.btn.accent:active {
    background: rgba(139, 92, 246, 0.5);
}

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

.btn.equals {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: #fff;
    font-size: 1.4rem;
}

.btn.equals:hover {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.btn.equals:active {
    background: linear-gradient(135deg, #6d28d9, #5b21b6);
}
